]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
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)

3 years agoGH-90699: disallow `_Py_IDENTIFIER` in core code (GH-99210)
Kumar Aditya [Wed, 9 Nov 2022 16:53:21 +0000 (22:23 +0530)] 
GH-90699: disallow `_Py_IDENTIFIER` in core code  (GH-99210)

3 years agogh-98724: Fix Py_CLEAR() macro side effects (#99100)
Victor Stinner [Wed, 9 Nov 2022 13:06:36 +0000 (14:06 +0100)] 
gh-98724: Fix Py_CLEAR() macro side effects (#99100)

The Py_CLEAR(), Py_SETREF() and Py_XSETREF() macros now only evaluate
their argument once. If an argument has side effects, these side
effects are no longer duplicated.

Add test_py_clear() and test_py_setref() unit tests to _testcapi.

3 years agogh-90868: Add _PyStaticObject_CheckRefcnt() function (#99261)
Victor Stinner [Wed, 9 Nov 2022 07:40:40 +0000 (08:40 +0100)] 
gh-90868: Add _PyStaticObject_CheckRefcnt() function (#99261)

Add _PyStaticObject_CheckRefcnt() function to make
_PyStaticObjects_CheckRefcnt() shorter. Use
_PyObject_ASSERT_FAILED_MSG() to log the object causing the fatal
error.

3 years agoCODEOWNERS: add myself to sysconfig and importlib.resources (#98851)
Filipe Laíns [Wed, 9 Nov 2022 03:27:13 +0000 (03:27 +0000)] 
CODEOWNERS: add myself to sysconfig and importlib.resources (#98851)

3 years ago[Enum] Typo: fix DuplicateFreeEnum example docs (GH-99265)
Bruno Neyra [Wed, 9 Nov 2022 00:39:56 +0000 (21:39 -0300)] 
[Enum] Typo: fix DuplicateFreeEnum example docs (GH-99265)

3 years agogh-99238: clarify the type of the env dict. (#99253)
Gregory P. Smith [Tue, 8 Nov 2022 21:00:31 +0000 (13:00 -0800)] 
gh-99238: clarify the type of the env dict. (#99253)

3 years agogh-94445: add compiler test for another case of excessive stack use (GH-99237)
Carl Meyer [Tue, 8 Nov 2022 20:39:32 +0000 (14:39 -0600)] 
gh-94445: add compiler test for another case of excessive stack use (GH-99237)

3 years agogh-99248: [Enum] fix negative number infinite loop (GH-99256)
Ethan Furman [Tue, 8 Nov 2022 20:00:19 +0000 (12:00 -0800)] 
gh-99248: [Enum] fix negative number infinite loop (GH-99256)

[Enum] fix negative number infinite loop

- _iter_bits_lsb() now raises a ValueError if a negative number
  is passed in

- verify() now skips checking negative numbers for named flags

3 years agogh-90868: Adjust the Generated Objects (gh-99223)
Eric Snow [Tue, 8 Nov 2022 17:03:03 +0000 (10:03 -0700)] 
gh-90868: Adjust the Generated Objects (gh-99223)

We do the following:

* move the generated _PyUnicode_InitStaticStrings() to its own file
* move the generated _PyStaticObjects_CheckRefcnt() to its own file
* include pycore_global_objects.h in extension modules instead of pycore_runtime_init.h

These changes help us avoid including things that aren't needed.

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

3 years agogh-98627: Add the _testsinglephase Module (gh-99039)
Eric Snow [Tue, 8 Nov 2022 16:58:11 +0000 (09:58 -0700)] 
gh-98627: Add the _testsinglephase Module (gh-99039)

This makes it more clear that a given test is definitely testing against a single-phase init (legacy) extension module.  The new module is a companion to _testmultiphase.

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

3 years agogh-91248: Add PyFrame_GetVar() function (#95712)
Victor Stinner [Tue, 8 Nov 2022 16:40:27 +0000 (17:40 +0100)] 
gh-91248: Add PyFrame_GetVar() function (#95712)

Add PyFrame_GetVar() and PyFrame_GetVarString() functions to get a
frame variable by its name.

Move PyFrameObject C API tests from test_capi to test_frame.

3 years agoFix broken link in `asyncio-subprocesses` doc (GH-99214)
Mikael Koli [Tue, 8 Nov 2022 16:26:06 +0000 (18:26 +0200)] 
Fix broken link in `asyncio-subprocesses` doc (GH-99214)

# Fix broken link in Doc/library/asyncio-subprocess.rst

This is a trivial fix in documentation to fix a broken link.

There is a broken link in [Doc/library/asyncio-subprocess.rst](https://docs.python.org/3/library/asyncio-subprocess.html#asyncio.subprocess.Process) for the function ``wait_for``:

![image](https://user-images.githubusercontent.com/37690409/200388894-fb6b7c42-b2cc-49ec-a239-e3472890db1f.png)

I suppose this refers to the function ``asyncio.wait_for`` which is not clear in the docs.

This PR fixes the link and the result looks like the following:

![image](https://user-images.githubusercontent.com/37690409/200389483-b4a92105-7d2c-4285-b0fc-78a6dc0be39c.png)

Automerge-Triggered-By: GH:AlexWaygood
3 years agoGH-98831: Simple input-output stack effects for bytecodes.c (#99120)
Guido van Rossum [Tue, 8 Nov 2022 16:22:56 +0000 (08:22 -0800)] 
GH-98831: Simple input-output stack effects for bytecodes.c (#99120)

3 years agoGH-93143: Don't turn LOAD_FAST into LOAD_FAST_CHECK (GH-99075)
Brandt Bucher [Tue, 8 Nov 2022 15:50:46 +0000 (07:50 -0800)] 
GH-93143: Don't turn LOAD_FAST into LOAD_FAST_CHECK (GH-99075)

3 years agogh-72719: Remove asyncore and asynchat modules (#96580)
Nikita Sobolev [Tue, 8 Nov 2022 15:48:58 +0000 (18:48 +0300)] 
gh-72719: Remove asyncore and asynchat modules (#96580)

Remove modules asyncore and asynchat, which were deprecated by PEP 594.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agogh-99181: fix except* on unhashable exceptions (GH-99192)
Irit Katriel [Tue, 8 Nov 2022 09:32:20 +0000 (09:32 +0000)] 
gh-99181: fix except* on unhashable exceptions (GH-99192)

3 years agoGH-90699: fix refleak in `_testcapimodule.c` (gh-99236)
Kumar Aditya [Tue, 8 Nov 2022 06:50:07 +0000 (12:20 +0530)] 
GH-90699: fix refleak in `_testcapimodule.c` (gh-99236)

3 years agogh-92119: ctypes: Print exception class name instead of its representation (#98302)
Kamil Turek [Tue, 8 Nov 2022 04:53:59 +0000 (05:53 +0100)] 
gh-92119: ctypes: Print exception class name instead of its representation (#98302)

3 years agogh-98513: Test abstract methods of some `collections` types (#98516)
Nikita Sobolev [Tue, 8 Nov 2022 01:48:23 +0000 (04:48 +0300)] 
gh-98513: Test abstract methods of some `collections` types (#98516)

3 years agogh-99124: use concrete exception types in `test_builtin` (#99125)
Nikita Sobolev [Tue, 8 Nov 2022 01:47:32 +0000 (04:47 +0300)] 
gh-99124: use concrete exception types in `test_builtin` (#99125)

3 years agogh-98433: Fix quadratic time idna decoding. (#99092)
Gregory P. Smith [Tue, 8 Nov 2022 00:54:41 +0000 (16:54 -0800)] 
gh-98433: Fix quadratic time idna decoding. (#99092)

There was an unnecessary quadratic loop in idna decoding. This restores
the behavior to linear.

This also adds an early length check in IDNA decoding to outright reject
huge inputs early on given the ultimate result is defined to be 63 or fewer
characters.

3 years agogh-98817: Remove PCbuild/lib.pyproj (GH-98818)
Hugo van Kemenade [Mon, 7 Nov 2022 20:23:35 +0000 (22:23 +0200)] 
gh-98817: Remove PCbuild/lib.pyproj (GH-98818)

3 years agoGH-90699: Remove remaining `_Py_IDENTIFIER` stdlib usage (GH-99067)
Kumar Aditya [Mon, 7 Nov 2022 20:06:23 +0000 (01:36 +0530)] 
GH-90699: Remove remaining `_Py_IDENTIFIER`  stdlib usage (GH-99067)

3 years agogh-96746: Docs: Clear up Py_TPFLAGS_DISALLOW_INSTANTIATION inheritance (GH-99002)
Petr Viktorin [Mon, 7 Nov 2022 18:45:50 +0000 (19:45 +0100)] 
gh-96746: Docs: Clear up Py_TPFLAGS_DISALLOW_INSTANTIATION inheritance (GH-99002)

The flag is not inherited, but its effect -- a NULL tp_new -- is.

Drop hints for people who come here wanting to “disallow instantiation”.

3 years agoGH-96793: Specialize FOR_ITER for generators. (GH-98772)
Mark Shannon [Mon, 7 Nov 2022 14:49:51 +0000 (06:49 -0800)] 
GH-96793: Specialize FOR_ITER for generators. (GH-98772)

3 years agogh-95389: expose popular ETHERTYPE_* constants in the socket module (#95390)
Noam Cohen [Mon, 7 Nov 2022 14:27:37 +0000 (16:27 +0200)] 
gh-95389: expose popular ETHERTYPE_* constants in the socket module (#95390)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agogh-98254: Add what's new entry for the improvement in commit bb56dead336357153a0c3b8c...
Pablo Galindo Salgado [Mon, 7 Nov 2022 13:37:14 +0000 (13:37 +0000)] 
gh-98254: Add what's new entry for the improvement in commit bb56dead336357153a0c3b8cc9d9d6856d2c5a03 (#99197)

3 years agogh-91058: Add what's new entry for the improvement in commit 7cfbb49fcd4c85f9bab37973...
Pablo Galindo Salgado [Mon, 7 Nov 2022 13:36:48 +0000 (13:36 +0000)] 
gh-91058: Add what's new entry for the improvement in commit 7cfbb49fcd4c85f9bab3797302eadf93df490344 (#99198)

3 years agoDocs: add argument spec to sqlite3 CLI docs (#99200)
Erlend E. Aasland [Mon, 7 Nov 2022 13:18:36 +0000 (14:18 +0100)] 
Docs: add argument spec to sqlite3 CLI docs (#99200)

3 years agobpo-38523: ignore_dangling_symlinks does not apply recursively (GH-22937)
Zackery Spytz [Mon, 7 Nov 2022 11:45:16 +0000 (03:45 -0800)] 
bpo-38523: ignore_dangling_symlinks does not apply recursively (GH-22937)

3 years agoremove new line in pickle exception message (GH-31782)
Harshil [Mon, 7 Nov 2022 07:43:39 +0000 (13:13 +0530)] 
remove new line in pickle exception message (GH-31782)

3 years agogh-91803: Mock - fix error when using autospec methods with seal (#92213)
andrei kulakov [Mon, 7 Nov 2022 07:24:46 +0000 (02:24 -0500)] 
gh-91803: Mock - fix error when using autospec methods with seal (#92213)

Fixes https://github.com/python/cpython/issues/91803.

Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
3 years agodoc: Formatting and typo fixes (#98974)
jmcb [Mon, 7 Nov 2022 04:55:55 +0000 (04:55 +0000)] 
doc: Formatting and typo fixes (#98974)

3 years agoGH-99155: Fix `NormalDist` pickle with `0` and `1` protocols (GH-99156)
Nikita Sobolev [Mon, 7 Nov 2022 03:02:13 +0000 (06:02 +0300)] 
GH-99155: Fix `NormalDist` pickle with `0` and `1` protocols (GH-99156)

3 years agoGH-99155: Fix `NormalDist` pickle with `0` and `1` protocols (GH99156)
Nikita Sobolev [Mon, 7 Nov 2022 02:56:41 +0000 (05:56 +0300)] 
GH-99155: Fix `NormalDist` pickle with `0` and `1` protocols (GH99156)

3 years agogh-96055: Update faulthandler to emit proper unexpect signal number (gh-99162)
Dong-hee Na [Mon, 7 Nov 2022 01:19:25 +0000 (10:19 +0900)] 
gh-96055: Update faulthandler to emit proper unexpect signal number (gh-99162)

3 years agogh-98586: Add What's New entry and update docs (#99056)
Wenzel Jakob [Sun, 6 Nov 2022 22:54:55 +0000 (23:54 +0100)] 
gh-98586: Add What's New entry and update docs (#99056)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
3 years agogh-98139: enhance namespace package repr
Anh71me [Sun, 6 Nov 2022 22:13:40 +0000 (06:13 +0800)] 
gh-98139: enhance namespace package repr

3 years agogh-94286 Fix documentation of print default param (GH-94297)
Nouran Ali [Sun, 6 Nov 2022 20:14:58 +0000 (22:14 +0200)] 
gh-94286 Fix documentation of print default param (GH-94297)

3 years agobpo-33964: IDLE macosx - removed unused local dict. (GH-7926)
Terry Jan Reedy [Sun, 6 Nov 2022 20:10:22 +0000 (15:10 -0500)] 
bpo-33964: IDLE macosx - removed unused local dict. (GH-7926)

3 years ago[Enum] add built-in property to test_test_simple_enum (GH-98453)
Ethan Furman [Sun, 6 Nov 2022 20:03:42 +0000 (12:03 -0800)] 
[Enum] add built-in property to test_test_simple_enum (GH-98453)

3 years agogh-99051: remove duplicated test from `test_weakref` (GH-99052)
Nikita Sobolev [Sun, 6 Nov 2022 19:28:44 +0000 (22:28 +0300)] 
gh-99051: remove duplicated test from `test_weakref` (GH-99052)

3 years agoGH-98831: Implement super-instruction generation (#99084)
Guido van Rossum [Sun, 6 Nov 2022 17:40:47 +0000 (09:40 -0800)] 
GH-98831: Implement super-instruction generation (#99084)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agoCorrect some typos in comments (GH-98194)
jonasdlindner [Sun, 6 Nov 2022 16:54:44 +0000 (17:54 +0100)] 
Correct some typos in comments (GH-98194)

Automerge-Triggered-By: GH:AlexWaygood
3 years agogh-99153: set location on SyntaxError for try with both except and except* (GH-99160)
Irit Katriel [Sun, 6 Nov 2022 15:36:19 +0000 (15:36 +0000)] 
gh-99153: set location on SyntaxError for try with both except and except* (GH-99160)

3 years agogh-83004: Clean up refleak in _pickle initialisation (#98841)
Shantanu [Sun, 6 Nov 2022 14:05:13 +0000 (06:05 -0800)] 
gh-83004: Clean up refleak in _pickle initialisation (#98841)

3 years agogh-83004: Clean up refleak in _zoneinfo initialisation (#98842)
Shantanu [Sun, 6 Nov 2022 14:04:36 +0000 (06:04 -0800)] 
gh-83004: Clean up refleak in _zoneinfo initialisation (#98842)

3 years agogh-99139: Improve NameError error suggestion for instances (#99140)
Pablo Galindo Salgado [Sun, 6 Nov 2022 13:52:06 +0000 (13:52 +0000)] 
gh-99139: Improve NameError error suggestion for instances (#99140)

3 years ago`test_typing`: use all pickle protocols (#99154)
Nikita Sobolev [Sun, 6 Nov 2022 11:53:57 +0000 (14:53 +0300)] 
`test_typing`: use all pickle protocols (#99154)

3 years agogh-93464: [Enum] fix auto() failure during multiple assignment (GH-99148)
Ethan Furman [Sun, 6 Nov 2022 01:01:08 +0000 (18:01 -0700)] 
gh-93464: [Enum] fix auto() failure during multiple assignment (GH-99148)

* fix auto() failure during multiple assignment

i.e. `ONE = auto(), 'text'` will now have `ONE' with the value of `(1,
'text')`.  Before it would have been `(<an auto instance>, 'text')`

3 years ago[doc] fix typo (GH-99143)
Doj [Sat, 5 Nov 2022 21:03:29 +0000 (00:03 +0300)] 
[doc] fix typo (GH-99143)

3 years agogh-99134: Update bundled pip to 22.3.1 (gh-99135)
Paul Moore [Sat, 5 Nov 2022 17:50:39 +0000 (17:50 +0000)] 
gh-99134: Update bundled pip to 22.3.1 (gh-99135)

Update bundled pip to 22.3.1

3 years agogh-94808: add tests covering `PyFunction_GetKwDefaults` and `PyFunction_SetKwDefaults...
Nikita Sobolev [Sat, 5 Nov 2022 17:08:47 +0000 (20:08 +0300)] 
gh-94808: add tests covering `PyFunction_GetKwDefaults` and `PyFunction_SetKwDefaults` (GH-98809)

3 years agogh-94808: add tests covering `PySequence_{Set,Del}Slice` (GH-99123)
Nikita Sobolev [Sat, 5 Nov 2022 17:08:00 +0000 (20:08 +0300)] 
gh-94808: add tests covering `PySequence_{Set,Del}Slice` (GH-99123)

3 years agogh-98284: better error message for undefined abstractmethod (#97971)
Kaushik Kulkarni [Sat, 5 Nov 2022 16:31:57 +0000 (11:31 -0500)] 
gh-98284: better error message for undefined abstractmethod (#97971)

3 years agogh-94808: add tests covering `PyEval_GetFuncDesc` function (GH-98300)
Nikita Sobolev [Sat, 5 Nov 2022 13:07:59 +0000 (16:07 +0300)] 
gh-94808: add tests covering `PyEval_GetFuncDesc` function (GH-98300)

3 years agogh-99086: Fix implicit int compiler warning in configure check for PTHREAD_SCOPE_SYST...
Sam James [Sat, 5 Nov 2022 08:30:31 +0000 (08:30 +0000)] 
gh-99086: Fix implicit int compiler warning in configure check for PTHREAD_SCOPE_SYSTEM (#99085)

3 years agoGH-99104: Update headers for bytecodes.c and generate_cases.py (#99112)
Guido van Rossum [Sat, 5 Nov 2022 00:40:43 +0000 (17:40 -0700)] 
GH-99104: Update headers for bytecodes.c and generate_cases.py (#99112)

Also tweak the labels near the end of bytecodes.c.

3 years agoGH-98686: Fix compiler warning for HAS_ARG (GH-99106)
Brandt Bucher [Fri, 4 Nov 2022 23:54:32 +0000 (16:54 -0700)] 
GH-98686: Fix compiler warning for HAS_ARG (GH-99106)

3 years agoGH-98831: Add some macros definitions to bytecodes.c to reduce IDE warnings. (#99093)
Mark Shannon [Fri, 4 Nov 2022 23:37:53 +0000 (16:37 -0700)] 
GH-98831: Add some macros definitions to bytecodes.c to reduce IDE warnings. (#99093)

3 years agoGH-98831: Auto-generate PREDICTED() macro calls (#99102)
Guido van Rossum [Fri, 4 Nov 2022 22:30:17 +0000 (15:30 -0700)] 
GH-98831: Auto-generate PREDICTED() macro calls (#99102)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
3 years agoGH-98831: Add `regen-cases` to `regen-all` (#99107)
Brandt Bucher [Fri, 4 Nov 2022 22:00:51 +0000 (15:00 -0700)] 
GH-98831: Add `regen-cases` to `regen-all` (#99107)

3 years agogh-90867: test.support.wait_process() uses LONG_TIMEOUT (#99071)
Victor Stinner [Fri, 4 Nov 2022 13:41:33 +0000 (14:41 +0100)] 
gh-90867: test.support.wait_process() uses LONG_TIMEOUT (#99071)

The test.support.wait_process() function now uses a timeout of
LONG_TIMEOUT seconds by default, instead of SHORT_TIMEOUT.  It
doesn't matter if a Python buildbot is slower, it only matters that
the process completes. The timeout should just be shorter than
"forever".

3 years agogh-90716: Fix pylong_int_from_string() refleak (#99094)
Victor Stinner [Fri, 4 Nov 2022 13:24:10 +0000 (14:24 +0100)] 
gh-90716: Fix pylong_int_from_string() refleak (#99094)

Fix validated by:

    $ ./python -m test -R 3:3 test_int
    Tests result: SUCCESS

3 years agominor edits to locale doc (#98537)
Skip Montanaro [Fri, 4 Nov 2022 13:02:11 +0000 (08:02 -0500)] 
minor edits to locale doc (#98537)

3 years agoSupport comparing two sets of pystats (GH-98816)
Michael Droettboom [Fri, 4 Nov 2022 10:15:54 +0000 (06:15 -0400)] 
Support comparing two sets of pystats (GH-98816)

This adds support for comparing pystats collected from two different builds.

- The `--json-output` can be used to load in a set of raw stats and output a
  JSON file.
- Two of these JSON files can be provided on the next run, and then comparative
  results between the two are output.

3 years agogh-94808: Cover `LOAD_GLOBAL` for custom dict subtypes (GH-96767)
Nikita Sobolev [Fri, 4 Nov 2022 09:58:38 +0000 (12:58 +0300)] 
gh-94808: Cover `LOAD_GLOBAL` for custom dict subtypes (GH-96767)

3 years agoDocs: add `named` to the list of styles in the sqlite3.paramstyle attr docs (#99078)
Nick Pope [Thu, 3 Nov 2022 23:21:01 +0000 (23:21 +0000)] 
Docs: add `named` to the list of styles in the sqlite3.paramstyle attr docs (#99078)

3 years agogh-90716: bugfixes and more tests for _pylong. (#99073)
Gregory P. Smith [Thu, 3 Nov 2022 23:18:38 +0000 (16:18 -0700)] 
gh-90716: bugfixes and more tests for _pylong. (#99073)

* Properly decref on _pylong import error.
* Improve the error message on _pylong TypeError.
* Fix the assertion error in pydebug builds to be a TypeError.
* Tie the return value comments together.

These are minor followups to issues not caught among the reviewers on
https://github.com/python/cpython/pull/96673.

3 years agogh-73691: Increase size limits in _xxtestfuzz (#99070)
Gregory P. Smith [Thu, 3 Nov 2022 21:41:20 +0000 (14:41 -0700)] 
gh-73691:  Increase size limits in _xxtestfuzz (#99070)

Now that our int<->str conversions are size limited and we have the
_pylong module handling larger integers, we don't need to limit
everything just to avoid wasting time in the quadratic time DoS-like
case while fuzzing.

We can tweak these further after seeing how this goes.

3 years agoGH-90699: Remove `_Py_IDENTIFIER` usage from `_ctypes` (GH-99054)
Kumar Aditya [Thu, 3 Nov 2022 20:20:10 +0000 (01:50 +0530)] 
GH-90699: Remove `_Py_IDENTIFIER` usage from `_ctypes`  (GH-99054)

3 years agogh-92584: Remove the distutils package (#99061)
Victor Stinner [Thu, 3 Nov 2022 18:27:27 +0000 (19:27 +0100)] 
gh-92584: Remove the distutils package (#99061)

Remove the distutils package. It was deprecated in Python 3.10 by PEP
632 "Deprecate distutils module". For projects still using distutils
and cannot be updated to something else, the setuptools project can
be installed: it still provides distutils.

* Remove Lib/distutils/ directory
* Remove test_distutils
* Remove references to distutils
* Skip test_check_c_globals and test_peg_generator since they use
  distutils

3 years agogh-98978: Fix Py_SetPythonHome(NULL) (#99066)
Victor Stinner [Thu, 3 Nov 2022 17:34:32 +0000 (18:34 +0100)] 
gh-98978: Fix Py_SetPythonHome(NULL) (#99066)

Fix use-after-free in Py_SetPythonHome(NULL), Py_SetProgramName(NULL)
and _Py_SetProgramFullPath(NULL) function calls.

Issue reported by Benedikt Reinartz.

3 years agogh-94172: Remove keyfile, certfile and check_hostname parameters (#94173)
Victor Stinner [Thu, 3 Nov 2022 17:32:25 +0000 (18:32 +0100)] 
gh-94172: Remove keyfile, certfile and check_hostname parameters (#94173)

Remove the keyfile, certfile and check_hostname parameters,
deprecated since Python 3.6, in modules: ftplib, http.client,
imaplib, poplib and smtplib. Use the context parameter (ssl_context
in imaplib) instead.

Parameters following the removed parameters become keyword-only
parameters.

ftplib: Remove the FTP_TLS.ssl_version class attribute: use the
context parameter instead.

3 years agogh-90716: Remove _pylong._DEBUG flag (#99063)
Victor Stinner [Thu, 3 Nov 2022 17:16:28 +0000 (18:16 +0100)] 
gh-90716: Remove _pylong._DEBUG flag (#99063)

To debug the _pylong module, it's trivial to add this code again
locally. There is not need to keep it in Python releases.

3 years agogh-98884: [pathlib] remove `hasattr` check for `lru_cache` (#98885)
Nikita Sobolev [Thu, 3 Nov 2022 17:14:12 +0000 (20:14 +0300)] 
gh-98884: [pathlib] remove `hasattr` check for `lru_cache` (#98885)

3 years agogh-92584: Remove references to removed _bootsubprocess (#99062)
Victor Stinner [Thu, 3 Nov 2022 17:12:45 +0000 (18:12 +0100)] 
gh-92584: Remove references to removed _bootsubprocess (#99062)

The _bootsubprocess module was removed in gh-93939
by commit 81dca70d704d0834d8c30580e648a973250b2973.

3 years agogh-97909: PyMemberDef & PyGetSetDef members are not marked up (GH-98810)
Johnny11502 [Thu, 3 Nov 2022 16:57:30 +0000 (12:57 -0400)] 
gh-97909: PyMemberDef & PyGetSetDef members are not marked up (GH-98810)