summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-42294: Grammar fixes in doc glossary strong/weak refs (GH-23227)kj2020-11-102-6/+6
|
* bpo-42140: Improve asyncio.wait function (GH-22938)Diogo Dutra2020-11-103-2/+29
| | | | | | | | | | # Improve asyncio.wait function The original code creates the futures set two times. We can create this set before, avoiding the second creation. This new behaviour [breaks the aiokafka library](https://github.com/aio-libs/aiokafka/pull/672), because it gives an iterator to that function, so the second iteration become empty. Automerge-Triggered-By: GH:1st1
* bpo-41073: PyType_GetSlot() can now accept static types. (GH-21931)Hai Shi2020-11-107-101/+205
| | | | | | | PyType_GetSlot() can now accept static types. Co-Authored-By: Petr Viktorin <encukou@gmail.com> Automerge-Triggered-By: GH:encukou
* bpo-42260: Fix _PyConfig_Read() if compute_path_config=0 (GH-23220)Victor Stinner2020-11-108-95/+93
| | | | | | | | | | | | | | | | | | | Fix _PyConfig_Read() if compute_path_config=0: use values set by Py_SetPath(), Py_SetPythonHome() and Py_SetProgramName(). Add compute_path_config parameter to _PyConfig_InitPathConfig(). The following functions now return NULL if called before Py_Initialize(): * Py_GetExecPrefix() * Py_GetPath() * Py_GetPrefix() * Py_GetProgramFullPath() * Py_GetProgramName() * Py_GetPythonHome() These functions no longer automatically computes the Python Path Configuration. Moreover, Py_SetPath() no longer computes program_full_path.
* bpo-42085: Introduce dedicated entry in PyAsyncMethods for sending values ↵Vladimir Matveev2020-11-1013-49/+146
| | | | (#22780)
* bpo-42014: shutil.rmtree: call onerror with correct function (GH-22585)Michal Čihař2020-11-102-1/+2
| | | | | | | The onerror is supposed to be called with failed function, but in this case lstat is wrongly used instead of open. Not sure if this needs bug or not... Automerge-Triggered-By: GH:hynek
* Update whatsnew for 3.10 release about addition of contextlib.aclosing ↵Joongi Kim2020-11-101-0/+7
| | | | (GH-23217)
* bpo-42183: Fix a stack overflow error for asyncio Task or Future repr() ↵Andrew Svetlov2020-11-103-3/+44
| | | | | | | | (GH-23020) The overflow occurs under some circumstances when a task or future recursively returns itself. Co-authored-by: Kyle Stanley <aeros167@gmail.com>
* bpo-42171: Add PEP573-related items to the limited API (GH-23009)Petr Viktorin2020-11-104-3/+13
|
* Fix typo in test_array.py (GH-23189)Ikko Ashimine2020-11-101-1/+1
|
* bpo-42260: Compute the path config in the main init (GH-23211)Victor Stinner2020-11-106-74/+85
| | | | | | | | | | | | | | | | | | | | | The path configuration is now computed in the "main" initialization. The core initialization no longer computes it. * Add _PyConfig_Read() function to read the configuration without computing the path configuration. * pyinit_core() no longer computes the path configuration: it is now computed by init_interp_main(). * The path configuration output members of PyConfig are now optional: * executable * base_executable * prefix * base_prefix * exec_prefix * base_exec_prefix * _PySys_UpdateConfig() now skips NULL strings in PyConfig. * _testembed: Rename test_set_config() to test_init_set_config() for consistency with other tests.
* Fix typo in unicodeobject.c (GH-23180)Ikko Ashimine2020-11-101-1/+1
| | | | | exeeds -> exceeds Automerge-Triggered-By: GH:Mariatta
* bpo-36310: Allow pygettext.py to detect calls to gettext in f-strings. ↵jack11422020-11-094-0/+126
| | | | | | | (GH-19875) Adds support to Tools/i18n/pygettext.py for gettext calls in f-strings. This process is done by parsing the f-strings, processing each value, and flagging the ones which contain a gettext call. Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
* bpo-41712: Avoid runaway regex match in upload scripts (GH-23166)Yash Shete2020-11-091-1/+1
|
* bpo-42294: Add borrowed/strong reference to doc glossary (GH-23206)Victor Stinner2020-11-0911-22/+72
| | | | | | Add "borrowed reference" and "strong reference" to the documentation glossary. Enhance also Py_INCREF() and Py_NewRef() documentation.
* bpo-41543: contextlib.nullcontext can fill in for an async context manager ↵Tom Gringauz2020-11-094-2/+39
| | | | | (GH-21870) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-40624: Add support for the XPath != operator in xml.etree (GH-22147)Ammar Askar2020-11-094-7/+78
|
* bpo-42233: Add union type expression support for GenericAlias and fix ↵kj2020-11-096-17/+51
| | | | de-duplicating of GenericAlias (GH-23077)
* bpo-41754: Ignore NotADirectoryError in invocation of xdg-settings (GH-23075)Ronald Oussoren2020-11-082-1/+2
| | | | It is not clear why this can happen, but several users have mentioned getting this exception on macOS.
* bpo-41100: Support macOS 11 and Apple Silicon (GH-22855)Ronald Oussoren2020-11-0827-345/+1587
| | | | | | | | | | | Co-authored-by: Lawrence D’Anna <lawrence_danna@apple.com> * Add support for macOS 11 and Apple Silicon (aka arm64) As a side effect of this work use the system copy of libffi on macOS, and remove the vendored copy * Support building on recent versions of macOS while deploying to older versions This allows building installers on macOS 11 while still supporting macOS 10.9.
* Minor wording change in concurrent.futures. (GH-23194)Don Kirkby2020-11-081-3/+3
| | | Fixes a grammar problem by adding a missing "as", and clarifies the wording of the valid ranges for max_workers.
* bpo-40077: Convert _queuemodule to use heap types (GH-23136)Erlend Egeberg Aasland2020-11-073-105/+138
| | | @vstinner / @corona10, would you mind reviewing this?
* bpo-42282: Fold constants inside named expressions (GH-23190)Nick Coghlan2020-11-072-11/+46
| | | | | | | * The AST optimiser wasn't descending into named expressions, so any constant subexpressions weren't being folded at compile time * Remove "default:" clauses inside the AST optimiser code to reduce the risk of similar bugs passing unnoticed in future compiler changes
* bpo-41028: Doc: Move switchers to docsbuild-scripts. (GH-20969)Julien Palard2020-11-076-173/+16
|
* bpo-42133: update parts of the stdlib to fall back to `__spec__.loader` when ↵Brett Cannon2020-11-076-14/+59
| | | | `__loader__` is missing (#22929)
* Remove outdated reference to pywin32 from platform module (GH-22005)Andre Delfino2020-11-061-7/+0
|
* bpo-41832: PyType_FromModuleAndSpec() now accepts NULL tp_doc (GH-23123)Hai Shi2020-11-067-4/+44
|
* Minor grammar edits for the descriptor howto guide (GH-#23175)Raymond Hettinger2020-11-061-10/+10
|
* bpo-42179: Doc/tutorial: Remove mention of __cause__ (GH-23162)Inada Naoki2020-11-061-9/+10
|
* bpo-26389: Allow passing an exception object in the traceback module (GH-22610)Zackery Spytz2020-11-055-24/+97
| | | | | | The format_exception(), format_exception_only(), and print_exception() functions can now take an exception object as a positional-only argument. Co-Authored-By: Matthias Bussonnier <bussonniermatthias@gmail.com>
* bpo-42260: PyConfig_Read() only parses argv once (GH-23168)Victor Stinner2020-11-056-105/+134
| | | | | | | | | | | | The PyConfig_Read() function now only parses PyConfig.argv arguments once: PyConfig.parse_argv is set to 2 after arguments are parsed. Since Python arguments are strippped from PyConfig.argv, parsing arguments twice would parse the application options as Python options. * Rework the PyConfig documentation. * Fix _testinternalcapi.set_config() error handling. * SetConfigTests no longer needs parse_argv=0 when restoring the old configuration.
* bpo-42260: Add _PyConfig_FromDict() (GH-23167)Victor Stinner2020-11-056-60/+653
| | | | | | | * Rename config_as_dict() to _PyConfig_AsDict(). * Add 'module_search_paths_set' to _PyConfig_AsDict(). * Add _PyConfig_FromDict(). * Add get_config() and set_config() to _testinternalcapi. * Add config_check_consistency().
* bpo-41877 Check for asert, aseert, assrt in mocks (GH-23165)vabr-g2020-11-053-3/+14
| | | | | | | | | | | Currently, a Mock object which is not unsafe will raise an AttributeError if an attribute with the prefix assert or assret is accessed on it. This protects against misspellings of real assert method calls, which lead to tests passing silently even if the tested code does not satisfy the intended assertion. Recently a check was done in a large code base (Google) and three more frequent ways of misspelling assert were found causing harm: asert, aseert, assrt. These are now added to the existing check.
* [docs] fix wrongly named AsyncContextDecorator (GH-23164)kj2020-11-051-3/+5
| | | Also added versionchanged.
* bpo-42262: Add Py_NewRef() and Py_XNewRef() (GH-23152)Victor Stinner2020-11-057-6/+85
| | | | Added Py_NewRef() and Py_XNewRef() functions to increment the reference count of an object and return the object.
* bpo-42266: Handle monkey-patching descriptors in LOAD_ATTR cache (GH-23157)Pablo Galindo2020-11-054-7/+28
|
* bpo-40816 Add AsyncContextDecorator class (GH-20516)Kazantcev Andrey2020-11-054-1/+114
| | | | Co-authored-by: Yury Selivanov <yury@edgedb.com>
* bpo-42260: Add _PyInterpreterState_SetConfig() (GH-23158)Victor Stinner2020-11-049-16/+189
| | | | | | | | * Inline _PyInterpreterState_SetConfig(): replace it with _PyConfig_Copy(). * Add _PyErr_SetFromPyStatus() * Add _PyInterpreterState_GetConfigCopy() * Add a new _PyInterpreterState_SetConfig() function. * Add an unit which gets, modifies, and sets the config.
* Disable peg generator tests when building with PGO (GH-23141)serge-sans-paille2020-11-041-0/+6
| | | | | Otherwise, when running the testsuite, test_peg_generator tries to compile C code using the optimized flags and fails because it cannot find the profile data.
* bpo-1635741: _sqlite3 uses PyModule_AddObjectRef() (GH-23148)Erlend Egeberg Aasland2020-11-042-17/+16
|
* bpo-1635741: Fix PyInit_pyexpat() error handling (GH-22489)Mohamed Koubaa2020-11-041-189/+299
| | | | Split PyInit_pyexpat() into sub-functions and fix reference leaks on error paths.
* bpo-42260: Main init modify sys.flags in-place (GH-23150)Victor Stinner2020-11-044-74/+89
| | | | | | | | | | | When Py_Initialize() is called twice, the second call now updates more sys attributes for the configuration, rather than only sys.argv. * Rename _PySys_InitMain() to _PySys_UpdateConfig(). * _PySys_UpdateConfig() now modifies sys.flags in-place, instead of creating a new flags object. * Remove old commented sys.flags flags (unbuffered and skip_first). * Add private _PySys_GetObject() function. * When Py_Initialize(), Py_InitializeFromConfig() and
* bpo-1635741: Fix ref leak in _PyWarnings_Init() error path (GH-23151)Victor Stinner2020-11-042-11/+5
| | | | | | Replace PyModule_AddObject() with PyModule_AddObjectRef() in the _warnings module to fix a reference leak on error. Use also PyModule_AddObjectRef() in importdl.c.
* bpo-1635741: _ast uses PyModule_AddObjectRef() (GH-23146)Victor Stinner2020-11-042-220/+117
| | | | Replace PyModule_AddObject() with PyModule_AddObjectRef() in the _ast module (Python-ast.c).
* bpo-1635741: _contextvars uses PyModule_AddType() (GH-23147)Victor Stinner2020-11-042-21/+6
| | | | | | Replace PyModule_AddObject() with PyModule_AddType() in the _contextvars module (Python-ast.c). Add also the module name to _contextvars types name.
* bpo-42260: Reorganize PyConfig (GH-23149)Victor Stinner2020-11-041-5/+5
| | | | | | | | * Move orig_argv before argv * Move program_name and platlibdir with other path configuration inputs Give a name to the PyPreConfig and PyConfig structures and separate the type definitions.
* bpo-1635741: Add PyModule_AddObjectRef() function (GH-23122)Victor Stinner2020-11-045-46/+146
| | | | | Added PyModule_AddObjectRef() function: similar to PyModule_AddObjectRef() but don't steal a reference to the value on success.
* bpo-42236: os.device_encoding() respects UTF-8 Mode (GH-23119)Victor Stinner2020-11-045-17/+52
| | | | On Unix, the os.device_encoding() function now returns 'UTF-8' rather than the device encoding if the Python UTF-8 Mode is enabled.
* bpo-42251: Add gettrace and getprofile to threading (GH-23125)Mario Corchero2020-11-045-1/+61
| | | This allows to retrieve the functions that were set in these two, which might differ from sys.gettrace and sys.getprofile within a thread.
* Enable signing of nuget.org packages and update to supported timestamp ↵Steve Dower2020-11-035-8/+17
| | | | server (GH-23132)