]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 years agogh-81057: Move More Globals in Core Code to _PyRuntimeState (gh-99516)
Eric Snow [Wed, 16 Nov 2022 16:37:14 +0000 (09:37 -0700)] 
gh-81057: Move More Globals in Core Code to _PyRuntimeState (gh-99516)

https://github.com/python/cpython/issues/81057

2 years agogh-99518: Fix escape symbol in `test_enum` (#99519)
Nikita Sobolev [Wed, 16 Nov 2022 14:06:37 +0000 (17:06 +0300)] 
gh-99518: Fix escape symbol in `test_enum` (#99519)

2 years agogh-93649: Split memory and docstring tests from _testcapimodule.c (#99517)
Erlend E. Aasland [Wed, 16 Nov 2022 13:09:10 +0000 (14:09 +0100)] 
gh-93649: Split memory and docstring tests from _testcapimodule.c (#99517)

2 years agogh-96269: static and shared ext need different deps (#96316)
Christian Heimes [Wed, 16 Nov 2022 13:03:35 +0000 (14:03 +0100)] 
gh-96269: static and shared ext need different deps (#96316)

2 years agogh-99300: Replace Py_INCREF() with Py_NewRef() (#99513)
Victor Stinner [Wed, 16 Nov 2022 09:39:47 +0000 (10:39 +0100)] 
gh-99300: Replace Py_INCREF() with Py_NewRef() (#99513)

Replace Py_INCREF() and Py_XINCREF() using a cast with Py_NewRef()
and Py_XNewRef().

2 years agogh-98940: Fix Mac/Extras.install.py File filter bug (#98943)
zhangbo [Wed, 16 Nov 2022 09:17:18 +0000 (17:17 +0800)] 
gh-98940: Fix Mac/Extras.install.py File filter bug (#98943)

Slightly simplify the script and fix a case issue in the name of ``.DS_Store`` files.

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years agoGH-98831: Implement basic cache effects (#99313)
Guido van Rossum [Wed, 16 Nov 2022 03:59:19 +0000 (19:59 -0800)] 
GH-98831: Implement basic cache effects (#99313)

2 years agoUpdate Windows readme.txt to clarify Visual Studio required versions (GH-99522)
Ben Kuhn [Wed, 16 Nov 2022 03:31:16 +0000 (19:31 -0800)] 
Update Windows readme.txt to clarify Visual Studio required versions (GH-99522)

This is just a minor update to add a clarification to the requirements in the Windows build readme.

Automerge-Triggered-By: GH:zooba
2 years agogh-99460 Emscripten trampolines on optimized METH_O and METH_NOARGS code paths (...
Hood Chatham [Tue, 15 Nov 2022 17:53:39 +0000 (09:53 -0800)] 
gh-99460 Emscripten trampolines on optimized METH_O and METH_NOARGS code paths (#99461)

2 years agogh-92647: [Enum] use final status to determine lookup or create (GH-99500)
Ethan Furman [Tue, 15 Nov 2022 16:49:22 +0000 (08:49 -0800)] 
gh-92647: [Enum] use final status to determine lookup or create (GH-99500)

* use final status to determine lookup or create

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2 years agogh-81057: Move Globals in Core Code to _PyRuntimeState (gh-99496)
Eric Snow [Tue, 15 Nov 2022 16:45:11 +0000 (09:45 -0700)] 
gh-81057: Move Globals in Core Code to _PyRuntimeState (gh-99496)

This is the first of several changes to consolidate non-object globals in core code.

https://github.com/python/cpython/issues/81057

2 years agoMerge the 3.12.0a2 release into main.
Thomas Wouters [Tue, 15 Nov 2022 12:38:09 +0000 (13:38 +0100)] 
Merge the 3.12.0a2 release into main.

2 years agoPost 3.12.0a2
Thomas Wouters [Tue, 15 Nov 2022 12:36:51 +0000 (13:36 +0100)] 
Post 3.12.0a2

2 years agogh-99300: Use Py_NewRef() in Python/Python-ast.c (#99499)
Victor Stinner [Tue, 15 Nov 2022 09:29:56 +0000 (10:29 +0100)] 
gh-99300: Use Py_NewRef() in Python/Python-ast.c (#99499)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in Python/Python-ast.c.

Update Parser/asdl_c.py to regenerate code.

2 years agogh-93649: Split pytime and datetime tests from _testcapimodule.c (#99494)
Erlend E. Aasland [Tue, 15 Nov 2022 07:17:52 +0000 (08:17 +0100)] 
gh-93649: Split pytime and datetime tests from _testcapimodule.c (#99494)

2 years agogh-99370: fix test_zippath_from_non_installed_posix (GH-99483)
Kai Zhang [Tue, 15 Nov 2022 01:01:01 +0000 (09:01 +0800)] 
gh-99370: fix test_zippath_from_non_installed_posix (GH-99483)

When build with shared enabled, we need to set `LD_LIBRARY_PATH`
for the non-installed python environment in
test_zippath_from_non_installed_posix so that the python binary
and find and link the libpython.so.

2 years agoGH-99205: remove `_static` field from `PyThreadState` and `PyInterpreterState` (GH...
Kumar Aditya [Tue, 15 Nov 2022 00:35:37 +0000 (06:05 +0530)] 
GH-99205: remove `_static` field from `PyThreadState` and `PyInterpreterState` (GH-99385)

2 years agogh-81057: Move the Remaining Import State Globals to _PyRuntimeState (gh-99488)
Eric Snow [Mon, 14 Nov 2022 22:56:16 +0000 (15:56 -0700)] 
gh-81057: Move the Remaining Import State Globals to _PyRuntimeState (gh-99488)

https://github.com/python/cpython/issues/81057

2 years agogh-87604: Avoid publishing list of active per-interpreter audit hooks via the gc...
Steve Dower [Mon, 14 Nov 2022 21:39:18 +0000 (21:39 +0000)] 
gh-87604: Avoid publishing list of active per-interpreter audit hooks via the gc module (GH-99373)

2 years agogh-93649: Split getargs tests from _testcapimodule.c (#99346)
Erlend E. Aasland [Mon, 14 Nov 2022 21:23:41 +0000 (22:23 +0100)] 
gh-93649: Split getargs tests from _testcapimodule.c (#99346)

2 years agogh-81057: Move Global Variables Holding Objects to _PyRuntimeState. (gh-99487)
Eric Snow [Mon, 14 Nov 2022 20:50:56 +0000 (13:50 -0700)] 
gh-81057: Move Global Variables Holding Objects to _PyRuntimeState. (gh-99487)

This moves nearly all remaining object-holding globals in core code (other than static types).

https://github.com/python/cpython/issues/81057

2 years agoGH-98219: reduce sleep time in `asyncio` subprocess test (#99464)
Kumar Aditya [Mon, 14 Nov 2022 19:53:11 +0000 (01:23 +0530)] 
GH-98219: reduce sleep time in `asyncio` subprocess test (#99464)

2 years agoGH-99388: add `loop_factory` parameter to `asyncio.run` (#99462)
Kumar Aditya [Mon, 14 Nov 2022 18:18:51 +0000 (23:48 +0530)] 
GH-99388: add `loop_factory` parameter to `asyncio.run` (#99462)

2 years agogh-99300: Use Py_NewRef() in PC/ directory (#99479)
Victor Stinner [Mon, 14 Nov 2022 17:49:51 +0000 (18:49 +0100)] 
gh-99300: Use Py_NewRef() in PC/ directory (#99479)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in test C files of the PC/ directory.

2 years agogh-99300: Use Py_NewRef() in Doc/ directory (#99480)
Victor Stinner [Mon, 14 Nov 2022 17:49:14 +0000 (18:49 +0100)] 
gh-99300: Use Py_NewRef() in Doc/ directory  (#99480)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in test C files of the Doc/ directory.

Replace PyModule_AddObject() with PyModule_AddObjectRef() to simplify
reference counting.

2 years agogh-99300: Use Py_NewRef() in Modules/ directory (#99473)
Victor Stinner [Mon, 14 Nov 2022 15:21:40 +0000 (16:21 +0100)] 
gh-99300: Use Py_NewRef() in Modules/ directory (#99473)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in test C files of the Modules/ directory.

2 years agogh-99300: Use Py_NewRef() in Modules/ directory (#99469)
Victor Stinner [Mon, 14 Nov 2022 15:21:23 +0000 (16:21 +0100)] 
gh-99300: Use Py_NewRef() in Modules/ directory (#99469)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in test C files of the Modules/ directory.

2 years agogh-99370: Calculate zip path from prefix when in a venv (GH-99371)
Kai Zhang [Mon, 14 Nov 2022 15:05:14 +0000 (23:05 +0800)] 
gh-99370: Calculate zip path from prefix when in a venv (GH-99371)

Before python3.11, when in a venv the zip path is calculated
from prefix on POSIX platforms. In python3.11 the behavior is
accidentally changed to calculating from default prefix. This
change will break venv created from a non-installed python
with a stdlib zip file. This commit restores the behavior back
to before python3.11.

2 years agogh-87092: expose the compiler's codegen to python for unit tests (GH-99111)
Irit Katriel [Mon, 14 Nov 2022 13:56:40 +0000 (13:56 +0000)] 
gh-87092: expose the compiler's codegen to python for unit tests (GH-99111)

2 years agogh-78453: Move Unicode C API tests from test_unicode to test_capi.test_unicode (GH...
Serhiy Storchaka [Mon, 14 Nov 2022 13:32:02 +0000 (15:32 +0200)] 
gh-78453: Move Unicode C API tests from test_unicode to test_capi.test_unicode (GH-99431)

2 years agogh-99426: Use PyUnicode_FromFormat() and PyErr_Format() instead of sprintf (GH-99427)
Serhiy Storchaka [Mon, 14 Nov 2022 13:25:34 +0000 (15:25 +0200)] 
gh-99426: Use PyUnicode_FromFormat() and PyErr_Format() instead of sprintf (GH-99427)

2 years agogh-99300: Use Py_NewRef() in Modules/ directory (#99468)
Victor Stinner [Mon, 14 Nov 2022 12:44:56 +0000 (13:44 +0100)] 
gh-99300: Use Py_NewRef() in Modules/ directory (#99468)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in test C files of the Modules/ directory.

2 years agogh-99289: Add COMPILEALL_OPTS to Makefile (#99291)
Victor Stinner [Mon, 14 Nov 2022 12:43:45 +0000 (13:43 +0100)] 
gh-99289: Add COMPILEALL_OPTS to Makefile (#99291)

Add COMPILEALL_OPTS variable in Makefile to override compileall
options (default: -j0) in "make install". Also merge the compileall
commands into a single command building PYC files for the all
optimization levels (0, 1, 2) at once.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 years agogh-99300: Use Py_NewRef() in Modules/_datetimemodule.c (#99465)
Victor Stinner [Mon, 14 Nov 2022 12:09:12 +0000 (13:09 +0100)] 
gh-99300: Use Py_NewRef() in Modules/_datetimemodule.c (#99465)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in Modules/_datetimemodule.c and Modules/_zoneinfo.c

2 years agogh-99300: Use Py_NewRef() in Modules/ directory (#99467)
Victor Stinner [Mon, 14 Nov 2022 12:08:43 +0000 (13:08 +0100)] 
gh-99300: Use Py_NewRef() in Modules/ directory (#99467)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in test C files of the Modules/ directory.

2 years agogh-99300: Use Py_NewRef() in Modules/ directory (#99466)
Victor Stinner [Mon, 14 Nov 2022 12:08:15 +0000 (13:08 +0100)] 
gh-99300: Use Py_NewRef() in Modules/ directory (#99466)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in test C files of the Modules/ directory.

2 years agoPython 3.12.0a2 v3.12.0a2
Thomas Wouters [Mon, 14 Nov 2022 11:12:42 +0000 (12:12 +0100)] 
Python 3.12.0a2

2 years ago[Enum] update version TODO comment (GH-99458)
Ethan Furman [Mon, 14 Nov 2022 04:52:30 +0000 (20:52 -0800)] 
[Enum] update version TODO comment (GH-99458)

2 years agogh-96192: fix os.ismount() to use a path that is str or bytes (#96194)
Christoph Anton Mitterer [Mon, 14 Nov 2022 04:12:32 +0000 (05:12 +0100)] 
gh-96192: fix os.ismount() to use a path that is str or bytes (#96194)

Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
Co-authored-by: Eryk Sun <eryksun@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years agogh-99300: Use Py_NewRef() in Modules/_asynciomodule.c (#99441)
Victor Stinner [Sun, 13 Nov 2022 23:31:21 +0000 (00:31 +0100)] 
gh-99300: Use Py_NewRef() in Modules/_asynciomodule.c (#99441)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in Modules/_asynciomodule.c.

2 years agoFix misspelling in docs for http.HTTPMethod (#99376)
Matt Harasymczuk [Sun, 13 Nov 2022 20:46:28 +0000 (21:46 +0100)] 
Fix misspelling in docs for http.HTTPMethod (#99376)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agogh-98930: improve the docstring of signal.strsignal (#99290)
ram vikram singh [Sun, 13 Nov 2022 19:41:23 +0000 (01:11 +0530)] 
gh-98930: improve the docstring of signal.strsignal (#99290)

Improves the docstring on signal.strsignal to make it explain when it returns a message, None, or when it raises ValueError.

Closes #98930

Co-authored-by: Gregory P. Smith <greg@krypto.org>
3 years agogh-99275: Fix `SystemError` in `ctypes` during `__initsubclass__` (#99283)
Nikita Sobolev [Sun, 13 Nov 2022 19:22:45 +0000 (22:22 +0300)] 
gh-99275: Fix `SystemError` in `ctypes` during `__initsubclass__` (#99283)

3 years agogh-99430: Remove duplicated tests for old-styled classes (#99432)
Nikita Sobolev [Sun, 13 Nov 2022 18:30:00 +0000 (21:30 +0300)] 
gh-99430: Remove duplicated tests for old-styled classes (#99432)

python 1 & 2 were a loong time ago.

3 years agogh-99418: Make urllib.parse.urlparse enforce that a scheme must begin with an alphabe...
Ben Kallus [Sun, 13 Nov 2022 18:25:55 +0000 (18:25 +0000)] 
gh-99418: Make urllib.parse.urlparse enforce that a scheme must begin with an alphabetical ASCII character. (#99421)

Prevent urllib.parse.urlparse from accepting schemes that don't begin with an alphabetical ASCII character.

RFC 3986 defines a scheme like this: `scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )`
RFC 2234 defines an ALPHA like this: `ALPHA = %x41-5A / %x61-7A`

The WHATWG URL spec defines a scheme like this:
`"A URL-scheme string must be one ASCII alpha, followed by zero or more of ASCII alphanumeric, U+002B (+), U+002D (-), and U+002E (.)."`

3 years agogh-99300: Use Py_NewRef() in Modules/_ctypes/ (#99436)
Victor Stinner [Sun, 13 Nov 2022 15:04:54 +0000 (16:04 +0100)] 
gh-99300: Use Py_NewRef() in Modules/_ctypes/ (#99436)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in C files of the Modules/_ctypes/ directory.

3 years agogh-99300: Use Py_NewRef() in Modules/ directory (#99440)
Victor Stinner [Sun, 13 Nov 2022 15:04:33 +0000 (16:04 +0100)] 
gh-99300: Use Py_NewRef() in Modules/ directory (#99440)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in test C files of the Modules/ directory.

3 years agogh-99300: Use Py_NewRef() in Modules/itertoolsmodule.c (#99439)
Victor Stinner [Sun, 13 Nov 2022 15:04:22 +0000 (16:04 +0100)] 
gh-99300: Use Py_NewRef() in Modules/itertoolsmodule.c (#99439)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in Modules/itertoolsmodule.c.

3 years agogh-99300: Use Py_NewRef() in Modules/_elementtree.c (#99438)
Victor Stinner [Sun, 13 Nov 2022 15:04:11 +0000 (16:04 +0100)] 
gh-99300: Use Py_NewRef() in Modules/_elementtree.c (#99438)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in Modules/_elementtree.c.

3 years agogh-91248: Optimize PyFrame_GetVar() (#99252)
Victor Stinner [Sun, 13 Nov 2022 14:37:03 +0000 (15:37 +0100)] 
gh-91248: Optimize PyFrame_GetVar() (#99252)

PyFrame_GetVar() no longer creates a temporary dictionary to get a
variable.

3 years agogh-99103: Normalize specialized traceback anchors against the current line (GH-99145)
Batuhan Taskaya [Sat, 12 Nov 2022 23:37:25 +0000 (02:37 +0300)] 
gh-99103: Normalize specialized traceback anchors against the current line (GH-99145)

Automerge-Triggered-By: GH:isidentical
3 years agogh-83638: Add sqlite3.Connection.autocommit for PEP 249 compliant behaviour (#93823)
Erlend E. Aasland [Sat, 12 Nov 2022 22:44:41 +0000 (23:44 +0100)] 
gh-83638: Add sqlite3.Connection.autocommit for PEP 249 compliant behaviour (#93823)

Introduce the autocommit attribute to Connection and the autocommit
parameter to connect() for PEP 249-compliant transaction handling.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
3 years agogh-99357: Close the event loop when it is no longer used in test_uncancel_structured_...
Xiao Chen [Sat, 12 Nov 2022 20:16:44 +0000 (04:16 +0800)] 
gh-99357: Close the event loop when it is no longer used in test_uncancel_structured_blocks (#99414)

3 years agogh-99392: Fix sqlite3 converter recipes (#99393)
naglis [Sat, 12 Nov 2022 19:39:37 +0000 (21:39 +0200)] 
gh-99392: Fix sqlite3 converter recipes (#99393)

3 years agogh-98762: Fix locations of match sub-patterns (GH-98775)
Irit Katriel [Sat, 12 Nov 2022 18:42:17 +0000 (18:42 +0000)] 
gh-98762: Fix locations of match sub-patterns (GH-98775)

3 years agogh-99304: [Enum] clarify what constitutes a flag alias (GH-99395)
Ethan Furman [Sat, 12 Nov 2022 18:39:47 +0000 (10:39 -0800)] 
gh-99304: [Enum] clarify what constitutes a flag alias (GH-99395)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agoGH-81057: Remove static state from arraymodule (#99409)
Kumar Aditya [Sat, 12 Nov 2022 09:11:32 +0000 (14:41 +0530)] 
GH-81057: Remove static state from arraymodule (#99409)

3 years agoGH-94597: add deprecation warnings for subclassing `AbstractChildWatcher` (#99386)
Kumar Aditya [Sat, 12 Nov 2022 07:17:53 +0000 (12:47 +0530)] 
GH-94597: add deprecation warnings for subclassing `AbstractChildWatcher` (#99386)

3 years agogh-80448: argparse: Fix IndexError on store_true action (#15656)
Hai Shi [Sat, 12 Nov 2022 01:51:38 +0000 (09:51 +0800)] 
gh-80448: argparse: Fix IndexError on store_true action (#15656)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
3 years agogh-81057: Move PyImport_Inittab to _PyRuntimeState (gh-99402)
Eric Snow [Sat, 12 Nov 2022 00:06:05 +0000 (17:06 -0700)] 
gh-81057: Move PyImport_Inittab to _PyRuntimeState (gh-99402)

We actually don't move PyImport_Inittab.  Instead, we make a copy that we keep on _PyRuntimeState and use only that after Py_Initialize().  We also prevent folks from modifying PyImport_Inittab (the best we can) after that point.

https://github.com/python/cpython/issues/81057

3 years agogh-81057: Move the Allocators to _PyRuntimeState (gh-99217)
Eric Snow [Fri, 11 Nov 2022 23:30:46 +0000 (16:30 -0700)] 
gh-81057: Move the Allocators to _PyRuntimeState (gh-99217)

The global allocators were stored in 3 static global variables: _PyMem_Raw, _PyMem, and _PyObject.  State for the "small block" allocator was stored in another 13.  That makes a total of 16 global variables. We are moving all 16 to the _PyRuntimeState struct as part of the work for gh-81057.  (If PEP 684 is accepted then we will follow up by moving them all to PyInterpreterState.)

https://github.com/python/cpython/issues/81057

3 years agogh-99305: Speed up secrets.token_hex() ~2x (#99306)
NewUserHa [Fri, 11 Nov 2022 22:45:24 +0000 (06:45 +0800)] 
gh-99305: Speed up secrets.token_hex() ~2x (#99306)

simple code modernization.

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
3 years agogh-81057: Add PyInterpreterState.static_objects (gh-99397)
Eric Snow [Fri, 11 Nov 2022 21:24:18 +0000 (14:24 -0700)] 
gh-81057: Add PyInterpreterState.static_objects (gh-99397)

As we consolidate global variables, we find some objects that are almost suitable to add to _PyRuntimeState.global_objects, but have some small/sneaky bit of per-interpreter state (e.g. a weakref list). We're adding PyInterpreterState.static_objects so we can move such objects there. (We'll removed the _not_used field once we've added others.)

https://github.com/python/cpython/issues/81057

3 years agogh-81057: Move the Extension Modules Cache to _PyRuntimeState (gh-99355)
Eric Snow [Fri, 11 Nov 2022 21:16:28 +0000 (14:16 -0700)] 
gh-81057: Move the Extension Modules Cache to _PyRuntimeState (gh-99355)

We also move the closely related max_module_number and add comments documenting the group of struct members.

https://github.com/python/cpython/issues/81057

3 years agogh-81057: Generate a Separate Initializer For Each Part of the Global Objects Initial...
Eric Snow [Fri, 11 Nov 2022 20:23:41 +0000 (13:23 -0700)] 
gh-81057: Generate a Separate Initializer For Each Part of the Global Objects Initializer (gh-99389)

Up until now we had a single generated initializer macro for all the statically declared global objects in _PyRuntimeState, including several one-offs (e.g. the empty tuple). The one-offs don't need to be generated, but were because we had one big initializer. Having separate initializers for set of generated global objects allows us to generate only the ones we need to.  This allows us to add initializers for one-off global objects without having to generate them.

https://github.com/python/cpython/issues/81057

3 years agogh-98707: configure --with-system-libmpdec and --with-system-expat no longer include...
Miro Hrončok [Fri, 11 Nov 2022 18:59:30 +0000 (19:59 +0100)] 
gh-98707: configure --with-system-libmpdec and --with-system-expat no longer include vendored headers (#98711)

3 years agoFix typo in Tools/wasm/README.md (GH-99384)
Ikko Ashimine [Fri, 11 Nov 2022 16:38:09 +0000 (01:38 +0900)] 
Fix typo in Tools/wasm/README.md (GH-99384)

Noticable -> Noticeable

Automerge-Triggered-By: GH:AlexWaygood
3 years agogh-87604: Clarify in docs that sys.addaudithook is not for sandboxes (GH-99372)
Steve Dower [Fri, 11 Nov 2022 13:35:02 +0000 (13:35 +0000)] 
gh-87604: Clarify in docs that sys.addaudithook is not for sandboxes (GH-99372)

3 years agogh-99254: remove all unused consts from code objects (GH-99255)
Irit Katriel [Fri, 11 Nov 2022 10:53:43 +0000 (10:53 +0000)] 
gh-99254: remove all unused consts from code objects (GH-99255)

3 years agogh-99325: Remove unused `NameError` handling (#99326)
Nikita Sobolev [Fri, 11 Nov 2022 09:56:57 +0000 (12:56 +0300)] 
gh-99325: Remove unused `NameError` handling (#99326)

3 years agoUpdate github CI to use OpenSSL 1.1.1s and 3.0.7. (#99364)
Gregory P. Smith [Fri, 11 Nov 2022 09:33:55 +0000 (01:33 -0800)] 
Update github CI to use OpenSSL 1.1.1s and 3.0.7. (#99364)

3 years agogh-98086: Now ``patch.dict`` can decorate async functions (#98095)
Nikita Sobolev [Fri, 11 Nov 2022 08:04:30 +0000 (11:04 +0300)] 
gh-98086: Now ``patch.dict`` can decorate async functions (#98095)

3 years agogh-84522: Add for-loop to apply-method-to-sequence FAQ (#94660)
Samuel Sloniker [Fri, 11 Nov 2022 04:16:16 +0000 (20:16 -0800)] 
gh-84522: Add for-loop to apply-method-to-sequence FAQ (#94660)

3 years agogh-98366: use sphinx.locale._ as gettext() in pyspecific.py (#98437)
Wei-Hsiang (Matt) Wang [Fri, 11 Nov 2022 01:18:11 +0000 (09:18 +0800)] 
gh-98366: use sphinx.locale._ as gettext() in pyspecific.py (#98437)

fix(doc-tools): use sphinx.locale._ as gettext() for backward-compatibility in pyspecific.py

[why] spinix 5.3 changed locale.translators from a defaultdict(gettext.NullTranslations) to a dict, which leads to failure of pyspecific.py. Use sphinx.locale._ as gettext to fix the issue.

3 years agogh-99300: Use Py_NewRef() in Objects/ directory (#99354)
Victor Stinner [Thu, 10 Nov 2022 22:58:07 +0000 (23:58 +0100)] 
gh-99300: Use Py_NewRef() in Objects/ directory (#99354)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in C files of the Objects/ directory.

3 years agogh-99300: Use Py_NewRef() in Objects/ directory (#99351)
Victor Stinner [Thu, 10 Nov 2022 22:40:31 +0000 (23:40 +0100)] 
gh-99300: Use Py_NewRef() in Objects/ directory (#99351)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in C files of the Objects/ directory.

3 years agogh-99300: Use Py_NewRef() in Objects/ directory (#99335)
Victor Stinner [Thu, 10 Nov 2022 21:22:02 +0000 (22:22 +0100)] 
gh-99300: Use Py_NewRef() in Objects/ directory (#99335)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in C files of the Objects/ directory.

3 years agoGH-99183: Document behavior of count() for empty substrings (GH-99339)
Raymond Hettinger [Thu, 10 Nov 2022 21:20:01 +0000 (15:20 -0600)] 
GH-99183: Document behavior of count() for empty substrings (GH-99339)

3 years agogh-99300: Use Py_NewRef() in Objects/listobject.c (#99336)
Victor Stinner [Thu, 10 Nov 2022 21:09:18 +0000 (22:09 +0100)] 
gh-99300: Use Py_NewRef() in Objects/listobject.c (#99336)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in Objects/listobject.c.

3 years agoGH-98831: Remove all remaining DISPATCH() calls from bytecodes.c (#99271)
Guido van Rossum [Thu, 10 Nov 2022 18:50:57 +0000 (10:50 -0800)] 
GH-98831: Remove all remaining DISPATCH() calls from bytecodes.c (#99271)

Also mark those opcodes that have no stack effect as such.

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
3 years agoGH-99298: Don't perform jumps before error handling (GH-99299)
Brandt Bucher [Thu, 10 Nov 2022 16:46:56 +0000 (08:46 -0800)] 
GH-99298: Don't perform jumps before error handling (GH-99299)

3 years agogh-99204: Calculate base_executable by alternate names in POSIX venvs (GH-99206)
Vincent Fazio [Thu, 10 Nov 2022 16:26:42 +0000 (10:26 -0600)] 
gh-99204: Calculate base_executable by alternate names in POSIX venvs (GH-99206)

Check to see if `base_executable` exists. If it does not, attempt
to use known alternative names of the python binary to find an
executable in the path specified by `home`.

If no alternative is found, previous behavior is preserved.

Signed-off-by: Vincent Fazio <vfazio@gmail.com>
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
3 years agogh-99277: remove older version of `get_write_buffer_limits` (#99280)
Carlo [Thu, 10 Nov 2022 16:07:17 +0000 (17:07 +0100)] 
gh-99277: remove older version of `get_write_buffer_limits` (#99280)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agogh-90110: Update the C-analyzer Tool (gh-99307)
Eric Snow [Thu, 10 Nov 2022 16:03:57 +0000 (09:03 -0700)] 
gh-90110: Update the C-analyzer Tool (gh-99307)

3 years agogh-99300: Use Py_NewRef() in Objects/dictobject.c (#99333)
Victor Stinner [Thu, 10 Nov 2022 15:27:53 +0000 (16:27 +0100)] 
gh-99300: Use Py_NewRef() in Objects/dictobject.c (#99333)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in Objects/dictobject.c.

3 years agogh-99300: Use Py_NewRef() in Objects/ directory (#99332)
Victor Stinner [Thu, 10 Nov 2022 15:27:32 +0000 (16:27 +0100)] 
gh-99300: Use Py_NewRef() in Objects/ directory (#99332)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in C files of the Objects/ directory.

3 years agogh-99300: Use Py_NewRef() in Parser/ directory (#99330)
Victor Stinner [Thu, 10 Nov 2022 14:30:05 +0000 (15:30 +0100)] 
gh-99300: Use Py_NewRef() in Parser/ directory (#99330)

Replace Py_INCREF() with Py_NewRef() in C files of the Parser/
directory and in the PEG generator.

3 years agoGH-96421: Insert shim frame on entry to interpreter (GH-96319)
Mark Shannon [Thu, 10 Nov 2022 12:34:57 +0000 (04:34 -0800)] 
GH-96421: Insert shim frame on entry to interpreter (GH-96319)

* Adds EXIT_INTERPRETER instruction to exit PyEval_EvalDefault()

* Simplifies RETURN_VALUE, YIELD_VALUE and RETURN_GENERATOR instructions as they no longer need to check for entry frames.

3 years agogh-74044: inspect.signature for wrappers around decorated bound methods (GH-736)
Anton Ryzhov [Thu, 10 Nov 2022 12:32:01 +0000 (13:32 +0100)] 
gh-74044: inspect.signature for wrappers around decorated bound methods (GH-736)

3 years agoGH-99257: Check the owner's type when specializing slots (GH-99258)
Brandt Bucher [Thu, 10 Nov 2022 11:50:34 +0000 (03:50 -0800)] 
GH-99257: Check the owner's type when specializing slots (GH-99258)

3 years agogh-99320: remove tests for old-style class from `test_complex` (#99321)
Nikita Sobolev [Thu, 10 Nov 2022 10:51:22 +0000 (13:51 +0300)] 
gh-99320: remove tests for old-style class from `test_complex` (#99321)

3 years agogh-99281: [csv] remove try/except, `complex` always exists (#99282)
Nikita Sobolev [Thu, 10 Nov 2022 10:37:57 +0000 (13:37 +0300)] 
gh-99281: [csv] remove try/except, `complex` always exists (#99282)

3 years agogh-99300: Use Py_NewRef() in Python/ceval.c (#99318)
Victor Stinner [Thu, 10 Nov 2022 10:25:33 +0000 (11:25 +0100)] 
gh-99300: Use Py_NewRef() in Python/ceval.c (#99318)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in Python/ceval.c and related files.

3 years agogh-99300: Use Py_NewRef() in Python/ directory (#99317)
Victor Stinner [Thu, 10 Nov 2022 10:23:36 +0000 (11:23 +0100)] 
gh-99300: Use Py_NewRef() in Python/ directory (#99317)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in C files of the Python/ directory.

Update Parser/asdl_c.py to regenerate Python/Python-ast.c.

3 years agogh-99300: Use Py_NewRef() in Python/ directory (#99302)
Victor Stinner [Thu, 10 Nov 2022 08:03:39 +0000 (09:03 +0100)] 
gh-99300: Use Py_NewRef() in Python/ directory (#99302)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in C files of the Python/ directory.

3 years agobpo-34272: Reorganize C API tests. (GH-8551)
Serhiy Storchaka [Thu, 10 Nov 2022 06:54:37 +0000 (08:54 +0200)] 
bpo-34272: Reorganize C API tests. (GH-8551)

Move some C API tests into Lib/test/test_capi/.

3 years agogh-98832: Change wording in docstring of `pathlib.Path.iterdir` (GH-98833)
Nikita Sobolev [Wed, 9 Nov 2022 22:05:07 +0000 (01:05 +0300)] 
gh-98832: Change wording in docstring of `pathlib.Path.iterdir` (GH-98833)

Found while working on https://github.com/python/cpython/issues/98829

Automerge-Triggered-By: GH:AlexWaygood
3 years agoGH-99205: Mark new interpreters and threads as non-static (GH-99268)
Brandt Bucher [Wed, 9 Nov 2022 21:55:20 +0000 (13:55 -0800)] 
GH-99205: Mark new interpreters and threads as non-static (GH-99268)

3 years agoUpdate reference to the size of PyPI (#99076)
jmcb [Wed, 9 Nov 2022 19:26:46 +0000 (19:26 +0000)] 
Update reference to the size of PyPI (#99076)

Update reference to the size of PyPI

Last changed in 2008 (528576031d9655ca8004260a2bf2c783f77d1da1).

3 years agoGH-98686: Get rid of "adaptive" and "quick" instructions (GH-99182)
Brandt Bucher [Wed, 9 Nov 2022 18:50:09 +0000 (10:50 -0800)] 
GH-98686: Get rid of "adaptive" and "quick" instructions (GH-99182)