Miss Islington (bot)
a04c7ebcb9
Correct signature of __build_class__ (GH-16735)
...
(cherry picked from commit e3babbd03c )
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com >
2019-10-13 08:53:54 -07:00
Miss Islington (bot)
24231ca75c
bpo-38237: Shorter docstring (GH-16322) (GH-16323)
...
(cherry picked from commit b104ecbbaf )
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com >
2019-09-21 13:32:07 -07:00
Miss Islington (bot)
37bc935523
bpo-38237: Let pow() support keyword arguments (GH-16302) (GH-16320)
...
Backported with release manager approval
2019-09-21 01:22:29 -07:00
Serhiy Storchaka
d322abbb83
[3.8] bpo-37206: Unrepresentable default values no longer represented as None. (GH-13933) (GH-16141)
...
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.
(cherry picked from commit 279f44678c )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com >
2019-09-14 13:31:50 +03:00
Serhiy Storchaka
353053d9ad
[3.8] bpo-37994: Fix silencing all errors if an attribute lookup fails. (GH-15630) (GH-15635)
...
Only AttributeError should be silenced.
(cherry picked from commit 41c57b3353 )
2019-09-01 14:01:05 +03:00
Miss Islington (bot)
27f418640c
bpo-37976: Prevent shadowing of TypeError in zip() (GH-15592) (GH-15608)
...
(cherry picked from commit 6a650aaf77 )
Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com >
2019-08-29 23:23:17 -07:00
Miss Islington (bot)
3015191b29
Adjust builtins.zip() docstring to better communicate its signature (GH-14833)
...
(cherry picked from commit af2f5b1723 )
Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com >
2019-07-19 11:29:58 -07:00
Miss Islington (bot)
8763d43a95
bpo-37363: Add audit events for a range of modules (GH-14301)
...
(cherry picked from commit 60419a7e96 )
Co-authored-by: Steve Dower <steve.dower@python.org >
2019-06-24 09:09:47 -07:00
Miss Islington (bot)
92e836c7dc
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.
(cherry picked from commit 37d66d7d4b )
Co-authored-by: Victor Stinner <vstinner@redhat.com >
2019-06-12 17:36:03 -07:00
Victor Stinner
b2fd32b2f0
bpo-35766: compile(): rename feature_version parameter (GH-13994) (GH-14001)
...
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.
(cherry picked from commit efdf6ca90f )
2019-06-12 16:17:05 +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
Guido van Rossum
495da29225
bpo-35975: Support parsing earlier minor versions of Python 3 (GH-12086)
...
This adds a `feature_version` flag to `ast.parse()` (documented) and `compile()` (hidden) that allow tweaking the parser to support older versions of the grammar. In particular if `feature_version` is 5 or 6, the hacks for the `async` and `await` keyword from PEP 492 are reinstated. (For 7 or higher, these are unconditionally treated as keywords, but they are still special tokens rather than `NAME` tokens that the parser driver recognizes.)
https://bugs.python.org/issue35975
2019-03-07 12:38:08 -08:00
Sergey Fedoseev
f1b9abe35f
bpo-36030: Remove _PyStack_AsTuple() and _PyStack_AsTupleSlice() (GH-12032)
2019-02-25 22:37:26 +01:00
Serhiy Storchaka
a24107b04c
bpo-35459: Use PyDict_GetItemWithError() instead of PyDict_GetItem(). (GH-11112)
2019-02-25 17:59:46 +02:00
Guido van Rossum
dcfcd146f8
bpo-35766: Merge typed_ast back into CPython (GH-11645)
2019-01-31 12:40:27 +01:00
Serhiy Storchaka
7934266875
bpo-35582: Inline arguments tuple unpacking in handwritten code. (GH-11524)
...
Inline PyArg_UnpackTuple() and _PyArg_UnpackStack() in performance
sensitive code in the builtins and operator modules.
2019-01-12 08:25:41 +02:00
Serhiy Storchaka
62be74290a
bpo-33012: Fix invalid function cast warnings with gcc 8. (GH-6749)
...
Fix invalid function cast warnings with gcc 8
for method conventions different from METH_NOARGS, METH_O and
METH_VARARGS excluding Argument Clinic generated code.
2018-11-27 13:27:31 +02:00
Victor Stinner
3bb183d7fb
bpo-35177, Python-ast.h: Fix "Yield" compiler warning (GH-10664)
...
Partially revert commit 5f2df88b63 :
add "#undef Yield" to .c files after including Python-ast.h.
Fix the warning:
winbase.h(102): warning C4005: 'Yield': macro redefinition
2018-11-22 18:38:38 +01:00
Victor Stinner
621cebe81b
bpo-35081: Rename internal headers (GH-10275)
...
Rename Include/internal/ headers:
* pycore_hash.h -> pycore_pyhash.h
* pycore_lifecycle.h -> pycore_pylifecycle.h
* pycore_mem.h -> pycore_pymem.h
* pycore_state.h -> pycore_pystate.h
Add missing headers to Makefile.pre.in and PCbuild:
* pycore_condvar.h.
* pycore_hamt.h
* pycore_pyhash.h
2018-11-12 16:53:38 +01:00
Victor Stinner
5f2df88b63
bpo-35177: Add dependencies between header files (GH-10361)
...
* ast.h now includes Python-ast.h and node.h
* parsetok.h now includes node.h and grammar.h
* symtable.h now includes Python-ast.h
* Modify asdl_c.py to enhance Python-ast.h:
* Add #ifndef/#define Py_PYTHON_AST_H to be able to include the header
twice
* Add "extern { ... }" for C++
* Undefine "Yield" macro conflicting with winbase.h
* Remove "#undef Yield" from C files, it's now done in Python-ast.h
* Remove now useless includes in C files
2018-11-12 00:56:19 +01:00