Brandt Bucher
abb9a448de
Update sum comment. ( #18240 )
2020-02-01 11:08:34 +00:00
Dong-hee Na
abdc634f33
bpo-39200: Correct the error message for min/max builtin function (GH-17814)
...
Correct the error message when calling the min() or max() with
no arguments.
2020-01-10 17:31:43 +01:00
Victor Stinner
be143ec996
bpo-38835: Don't use PyFPE_START_PROTECT and PyFPE_END_PROTECT (GH-17231)
...
The PyFPE_START_PROTECT() and PyFPE_END_PROTECT() macros are empty:
they have been doing nothing for the last year (since commit
735ae8d139 ), so stop using them.
2019-11-20 02:51:30 +01:00
Victor Stinner
4d231bcc77
bpo-38644: Add _PyObject_Call() (GH-17089)
...
* Add pycore_call.h internal header file.
* Add _PyObject_Call(): PyObject_Call() with tstate
* Add _PyObject_CallNoArgTstate(): _PyObject_CallNoArg() with tstate
* Add _PyObject_FastCallDictTstate(): _PyObject_FastCallDict()
with tstate
* _PyObject_Call_Prepend() now takes tstate
* Replace _PyObject_FastCall() calls
with _PyObject_VectorcallTstate() calls
2019-11-14 13:36:21 +01:00
Pablo Galindo
e3babbd03c
Correct signature of __build_class__ (GH-16735)
2019-10-13 16:35:41 +01:00
Raymond Hettinger
b104ecbbaf
Shorter docstring (GH-16322)
2019-09-21 12:57:44 -07:00
Ammar Askar
87d6cd3604
bpo-38237: Make pow's arguments have more descriptive names and be keyword passable (GH-16302)
...
Edit: `math.pow` changes removed on Mark's request.
https://bugs.python.org/issue38237
Automerge-Triggered-By: @rhettinger
2019-09-20 21:28:49 -07:00
Serhiy Storchaka
279f44678c
bpo-37206: Unrepresentable default values no longer represented as None. (GH-13933)
...
In ArgumentClinic, value "NULL" should now be used only for unrepresentable default values
(like in the optional third parameter of getattr). "None" should be used if None is accepted
as argument and passing None has the same effect as not passing the argument at all.
2019-09-14 12:24:05 +03:00
Serhiy Storchaka
88bdb9280b
bpo-36781: Optimize sum() for bools. ( #13074 )
...
* Optimize sum() for bools.
* Fix sum([], False).
* Add a NEWS entry.
2019-09-10 14:31:01 +01:00
Serhiy Storchaka
1f21eaa15e
bpo-15999: Clean up of handling boolean arguments. (GH-15610)
...
* Use the 'p' format unit instead of manually called PyObject_IsTrue().
* Pass boolean value instead 0/1 integers to functions that needs boolean.
* Convert some arguments to boolean only once.
2019-09-01 12:16:51 +03:00
Serhiy Storchaka
41c57b3353
bpo-37994: Fix silencing all errors if an attribute lookup fails. (GH-15630)
...
Only AttributeError should be silenced.
2019-09-01 12:03:39 +03:00
Sergey Fedoseev
6a650aaf77
bpo-37976: Prevent shadowing of TypeError in zip() (GH-15592)
2019-08-29 21:25:48 -07:00
Sergey Fedoseev
af2f5b1723
Adjust builtins.zip() docstring to better communicate its signature (GH-14833)
2019-07-18 11:19:25 -07:00
Jeroen Demeyer
762f93ff2e
bpo-37337: Add _PyObject_CallMethodNoArgs() (GH-14267)
2019-07-08 17:19:25 +09:00
Jeroen Demeyer
196a530e00
bpo-37483: add _PyObject_CallOneArg() function ( #14558 )
2019-07-04 19:31:34 +09:00
Steve Dower
60419a7e96
bpo-37363: Add audit events for a range of modules (GH-14301)
2019-06-24 08:42:54 -07:00
Victor Stinner
b45d259bdd
bpo-36710: Use tstate in pylifecycle.c (GH-14249)
...
In pylifecycle.c: pass tstate argument, rather than interp argument,
to functions.
2019-06-20 00:05:23 +02:00
Victor Stinner
37d66d7d4b
bpo-37253: Add _PyCompilerFlags_INIT macro (GH-14018)
...
Add a new _PyCompilerFlags_INIT macro to initialize PyCompilerFlags
variables, rather than initializing cf_flags and cf_feature_version
explicitly in each variable.
2019-06-13 02:16:41 +02:00
Victor Stinner
efdf6ca90f
bpo-35766: compile(): rename feature_version parameter (GH-13994)
...
Rename compile() feature_version parameter to _feature_version and
convert it to a keyword-only parameter.
Update also test_type_comments to pass feature_version as a tuple.
2019-06-12 02:52:16 +02:00
Jeroen Demeyer
530f506ac9
bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async (GH-13464)
...
Automatically replace
tp_print -> tp_vectorcall_offset
tp_compare -> tp_as_async
tp_reserved -> tp_as_async
2019-05-30 19:13:39 -07:00
Jeroen Demeyer
aacc77fbd7
bpo-36974: implement PEP 590 (GH-13185)
...
Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be >
Co-authored-by: Mark Shannon <mark@hotpy.org >
2019-05-29 20:31:52 +02:00
Dino Viehland
415406999d
bpo-37001: Makes symtable.symtable have parity with compile for input ( #13483 )
...
* Makes symtable.symtable have parity for accepted datatypes
for source code as compile()
* Add NEWS blurb
2019-05-28 16:21:17 -07:00
Victor Stinner
331a6a56e9
bpo-36763: Implement the PEP 587 (GH-13592)
...
* Add a whole new documentation page:
"Python Initialization Configuration"
* PyWideStringList_Append() return type is now PyStatus,
instead of int
* PyInterpreterState_New() now calls PyConfig_Clear() if
PyConfig_InitPythonConfig() fails.
* Rename files:
* Python/coreconfig.c => Python/initconfig.c
* Include/cpython/coreconfig.h => Include/cpython/initconfig.h
* Include/internal/: pycore_coreconfig.h => pycore_initconfig.h
* Rename structures
* _PyCoreConfig => PyConfig
* _PyPreConfig => PyPreConfig
* _PyInitError => PyStatus
* _PyWstrList => PyWideStringList
* Rename PyConfig fields:
* use_module_search_paths => module_search_paths_set
* module_search_path_env => pythonpath_env
* Rename PyStatus field: _func => func
* PyInterpreterState: rename core_config field to config
* Rename macros and functions:
* _PyCoreConfig_SetArgv() => PyConfig_SetBytesArgv()
* _PyCoreConfig_SetWideArgv() => PyConfig_SetArgv()
* _PyCoreConfig_DecodeLocale() => PyConfig_SetBytesString()
* _PyInitError_Failed() => PyStatus_Exception()
* _Py_INIT_ERROR_TYPE_xxx enums => _PyStatus_TYPE_xxx
* _Py_UnixMain() => Py_BytesMain()
* _Py_ExitInitError() => Py_ExitStatusException()
* _Py_PreInitializeFromArgs() => Py_PreInitializeFromBytesArgs()
* _Py_PreInitializeFromWideArgs() => Py_PreInitializeFromArgs()
* _Py_PreInitialize() => Py_PreInitialize()
* _Py_RunMain() => Py_RunMain()
* _Py_InitializeFromConfig() => Py_InitializeFromConfig()
* _Py_INIT_XXX() => _PyStatus_XXX()
* _Py_INIT_FAILED() => _PyStatus_EXCEPTION()
* Rename 'err' PyStatus variables to 'status'
* Convert RUN_CODE() macro to config_run_code() static inline function
* Remove functions:
* _Py_InitializeFromArgs()
* _Py_InitializeFromWideArgs()
* _PyInterpreterState_GetCoreConfig()
2019-05-27 16:39:22 +02:00
Steve Dower
b82e17e626
bpo-36842: Implement PEP 578 (GH-12613)
...
Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.
2019-05-23 08:45:22 -07:00
Serhiy Storchaka
29500737d4
bpo-36791: Safer detection of integer overflow in sum(). (GH-13080)
2019-05-05 14:26:23 +03:00