summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-99300: Use Py_NewRef() in Doc/ directory (#99480)Victor Stinner2022-11-143-33/+15
| | | | | | | 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.
* gh-99300: Use Py_NewRef() in Modules/ directory (#99473)Victor Stinner2022-11-147-97/+54
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in test C files of the Modules/ directory.
* gh-99300: Use Py_NewRef() in Modules/ directory (#99469)Victor Stinner2022-11-1410-130/+66
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in test C files of the Modules/ directory.
* gh-99370: Calculate zip path from prefix when in a venv (GH-99371)Kai Zhang2022-11-144-2/+99
| | | | | | | | 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.
* gh-87092: expose the compiler's codegen to python for unit tests (GH-99111)Irit Katriel2022-11-1411-97/+321
|
* gh-78453: Move Unicode C API tests from test_unicode to ↵Serhiy Storchaka2022-11-142-502/+515
| | | | test_capi.test_unicode (GH-99431)
* gh-99426: Use PyUnicode_FromFormat() and PyErr_Format() instead of sprintf ↵Serhiy Storchaka2022-11-143-25/+9
| | | | (GH-99427)
* gh-99300: Use Py_NewRef() in Modules/ directory (#99468)Victor Stinner2022-11-1410-173/+92
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in test C files of the Modules/ directory.
* gh-99289: Add COMPILEALL_OPTS to Makefile (#99291)Victor Stinner2022-11-144-21/+23
| | | | | | | | 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>
* gh-99300: Use Py_NewRef() in Modules/_datetimemodule.c (#99465)Victor Stinner2022-11-142-98/+49
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in Modules/_datetimemodule.c and Modules/_zoneinfo.c
* gh-99300: Use Py_NewRef() in Modules/ directory (#99467)Victor Stinner2022-11-1410-144/+75
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in test C files of the Modules/ directory.
* gh-99300: Use Py_NewRef() in Modules/ directory (#99466)Victor Stinner2022-11-1410-214/+106
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in test C files of the Modules/ directory.
* [Enum] update version TODO comment (GH-99458)Ethan Furman2022-11-141-1/+1
|
* gh-96192: fix os.ismount() to use a path that is str or bytes (#96194)Christoph Anton Mitterer2022-11-143-0/+4
| | | | | 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>
* gh-99300: Use Py_NewRef() in Modules/_asynciomodule.c (#99441)Victor Stinner2022-11-131-54/+26
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in Modules/_asynciomodule.c.
* Fix misspelling in docs for http.HTTPMethod (#99376)Matt Harasymczuk2022-11-131-7/+16
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-98930: improve the docstring of signal.strsignal (#99290)ram vikram singh2022-11-133-9/+11
| | | | | | | 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>
* gh-99275: Fix `SystemError` in `ctypes` during `__initsubclass__` (#99283)Nikita Sobolev2022-11-133-1/+15
|
* gh-99430: Remove duplicated tests for old-styled classes (#99432)Nikita Sobolev2022-11-135-139/+6
| | | python 1 & 2 were a loong time ago.
* gh-99418: Make urllib.parse.urlparse enforce that a scheme must begin with ↵Ben Kallus2022-11-133-1/+21
| | | | | | | | | | | 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 (.)."`
* gh-99300: Use Py_NewRef() in Modules/_ctypes/ (#99436)Victor Stinner2022-11-135-124/+62
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in C files of the Modules/_ctypes/ directory.
* gh-99300: Use Py_NewRef() in Modules/ directory (#99440)Victor Stinner2022-11-136-82/+41
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in test C files of the Modules/ directory.
* gh-99300: Use Py_NewRef() in Modules/itertoolsmodule.c (#99439)Victor Stinner2022-11-131-62/+31
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in Modules/itertoolsmodule.c.
* gh-99300: Use Py_NewRef() in Modules/_elementtree.c (#99438)Victor Stinner2022-11-131-82/+37
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in Modules/_elementtree.c.
* gh-91248: Optimize PyFrame_GetVar() (#99252)Victor Stinner2022-11-133-95/+144
| | | | PyFrame_GetVar() no longer creates a temporary dictionary to get a variable.
* gh-99103: Normalize specialized traceback anchors against the current line ↵Batuhan Taskaya2022-11-124-7/+53
| | | | | (GH-99145) Automerge-Triggered-By: GH:isidentical
* gh-83638: Add sqlite3.Connection.autocommit for PEP 249 compliant behaviour ↵Erlend E. Aasland2022-11-1214-62/+537
| | | | | | | | | | (#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>
* gh-99357: Close the event loop when it is no longer used in ↵Xiao Chen2022-11-121-21/+24
| | | | test_uncancel_structured_blocks (#99414)
* gh-99392: Fix sqlite3 converter recipes (#99393)naglis2022-11-121-3/+22
|
* gh-98762: Fix locations of match sub-patterns (GH-98775)Irit Katriel2022-11-123-130/+212
|
* gh-99304: [Enum] clarify what constitutes a flag alias (GH-99395)Ethan Furman2022-11-122-15/+73
| | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* GH-81057: Remove static state from arraymodule (#99409)Kumar Aditya2022-11-121-5/+12
|
* GH-94597: add deprecation warnings for subclassing `AbstractChildWatcher` ↵Kumar Aditya2022-11-125-3/+21
| | | | (#99386)
* gh-80448: argparse: Fix IndexError on store_true action (#15656)Hai Shi2022-11-123-2/+7
| | | | | 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>
* gh-81057: Move PyImport_Inittab to _PyRuntimeState (gh-99402)Eric Snow2022-11-129-8/+80
| | | | | 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
* gh-81057: Move the Allocators to _PyRuntimeState (gh-99217)Eric Snow2022-11-1114-900/+1104
| | | | | 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
* gh-99305: Speed up secrets.token_hex() ~2x (#99306)NewUserHa2022-11-112-2/+2
| | | | | simple code modernization. Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
* gh-81057: Add PyInterpreterState.static_objects (gh-99397)Eric Snow2022-11-116-5/+35
| | | | | 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
* gh-81057: Move the Extension Modules Cache to _PyRuntimeState (gh-99355)Eric Snow2022-11-117-33/+104
| | | | | 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
* gh-81057: Generate a Separate Initializer For Each Part of the Global ↵Eric Snow2022-11-114-1517/+1528
| | | | | | | 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
* gh-98707: configure --with-system-libmpdec and --with-system-expat no longer ↵Miro Hrončok2022-11-114-7/+11
| | | | include vendored headers (#98711)
* Fix typo in Tools/wasm/README.md (GH-99384)Ikko Ashimine2022-11-111-1/+1
| | | | | Noticable -> Noticeable Automerge-Triggered-By: GH:AlexWaygood
* gh-87604: Clarify in docs that sys.addaudithook is not for sandboxes (GH-99372)Steve Dower2022-11-111-0/+9
|
* gh-99254: remove all unused consts from code objects (GH-99255)Irit Katriel2022-11-115-33/+142
|
* gh-99325: Remove unused `NameError` handling (#99326)Nikita Sobolev2022-11-112-16/+6
|
* Update github CI to use OpenSSL 1.1.1s and 3.0.7. (#99364)Gregory P. Smith2022-11-112-5/+5
|
* gh-98086: Now ``patch.dict`` can decorate async functions (#98095)Nikita Sobolev2022-11-113-0/+36
|
* gh-84522: Add for-loop to apply-method-to-sequence FAQ (#94660)Samuel Sloniker2022-11-111-3/+15
|
* gh-98366: use sphinx.locale._ as gettext() in pyspecific.py (#98437)Wei-Hsiang (Matt) Wang2022-11-111-4/+4
| | | | | 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.
* gh-99300: Use Py_NewRef() in Objects/ directory (#99354)Victor Stinner2022-11-1013-128/+66
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in C files of the Objects/ directory.