]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 years agogh-91051: fix type watcher test to be robust to existing watcher (#107989)
Carl Meyer [Wed, 16 Aug 2023 19:13:32 +0000 (13:13 -0600)] 
gh-91051: fix type watcher test to be robust to existing watcher (#107989)

2 years agoImprove the feature-proposal issue form (#108033)
Alex Waygood [Wed, 16 Aug 2023 18:38:58 +0000 (19:38 +0100)] 
Improve the feature-proposal issue form (#108033)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years agoRemove Sphinx problem matcher to avoid annotating unchanged files (#108005)
Hugo van Kemenade [Wed, 16 Aug 2023 18:18:56 +0000 (21:18 +0300)] 
Remove Sphinx problem matcher to avoid annotating unchanged files (#108005)

2 years agogh-107298: Fix C API Buffer documentation (#108011)
Victor Stinner [Wed, 16 Aug 2023 16:24:46 +0000 (18:24 +0200)] 
gh-107298: Fix C API Buffer documentation (#108011)

2 years agoGH-92584: Drop reference to Distutils in ``site.USER_BASE`` (#108031)
Adam Turner [Wed, 16 Aug 2023 16:10:44 +0000 (17:10 +0100)] 
GH-92584: Drop reference to Distutils in ``site.USER_BASE`` (#108031)

Drop reference to Distutils in ``site.USER_BASE``

2 years agogh-104683: Argument Clinic: Extract parse function name helper (#107964)
Erlend E. Aasland [Wed, 16 Aug 2023 13:47:15 +0000 (15:47 +0200)] 
gh-104683: Argument Clinic: Extract parse function name helper (#107964)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-107909: Test explicit `object` base in PEP695 generic classes (#108001)
Nikita Sobolev [Wed, 16 Aug 2023 13:30:03 +0000 (16:30 +0300)] 
gh-107909: Test explicit `object` base in PEP695 generic classes (#108001)

2 years agogh-108000: Test that `lambda` also has `__type_params__` (#108002)
Nikita Sobolev [Wed, 16 Aug 2023 13:22:18 +0000 (16:22 +0300)] 
gh-108000: Test that `lambda` also has `__type_params__` (#108002)

2 years agogh-106659: Fix test_embed.test_forced_io_encoding() on Windows (#108010)
Victor Stinner [Wed, 16 Aug 2023 11:56:56 +0000 (13:56 +0200)] 
gh-106659: Fix test_embed.test_forced_io_encoding() on Windows (#108010)

Use config.legacy_windows_stdio=1 to avoid _io._WindowsConsoleIO.

2 years agogh-106368: Argument Clinic: Test that keyword params are disallowed in groups (#107985)
Erlend E. Aasland [Wed, 16 Aug 2023 10:39:56 +0000 (12:39 +0200)] 
gh-106368: Argument Clinic: Test that keyword params are disallowed in groups (#107985)

2 years agogh-105724: Add location information to `assert` errors (GH-105935)
Nikita Sobolev [Wed, 16 Aug 2023 10:35:38 +0000 (13:35 +0300)] 
gh-105724: Add location information to `assert` errors (GH-105935)

2 years agogh-106300: Improve errors testing in test_unittest.test_runner (GH-106737)
Nikita Sobolev [Wed, 16 Aug 2023 09:20:42 +0000 (12:20 +0300)] 
gh-106300: Improve errors testing in test_unittest.test_runner (GH-106737)

Use a custom exception to prevent unintentional silence of actual errors.

2 years agogh-107955 Remove old comment about increasing the reference count in usage of Py_None...
brandonardenwalli [Wed, 16 Aug 2023 09:14:14 +0000 (11:14 +0200)] 
gh-107955 Remove old comment about increasing the reference count in usage of Py_None (#107993)

2 years agogh-100061: Proper fix of the bug in the matching of possessive quantifiers (GH-102612)
SKO [Wed, 16 Aug 2023 07:43:45 +0000 (16:43 +0900)] 
gh-100061: Proper fix of the bug in the matching of possessive quantifiers (GH-102612)

Restore the global Input Stream pointer after trying to match a sub-pattern.

Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
2 years agogh-99203: shutil.make_archive(): restore select CPython <= 3.10.5 behavior (GH-99802)
6t8k [Wed, 16 Aug 2023 07:00:03 +0000 (07:00 +0000)] 
gh-99203: shutil.make_archive(): restore select CPython <= 3.10.5 behavior (GH-99802)

Restore following CPython <= 3.10.5 behavior of shutil.make_archive()
that went away as part of gh-93160:

Do not create an empty archive if root_dir is not a directory, and, in
that case, raise FileNotFoundError or NotADirectoryError regardless
of format choice. Beyond the brought-back behavior, the function may
now also raise these exceptions in dry_run mode.

2 years agoMore actionable error message when spawn is incorrectly used. (#102203)
Yuxin Wu [Wed, 16 Aug 2023 01:03:45 +0000 (18:03 -0700)] 
More actionable error message when spawn is incorrectly used. (#102203)

Co-authored-by: Yuxin Wu <ppwwyyxx@users.noreply.github.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2 years agogh-106368: Argument Clinic: Add tests for cloned functions with custom C base names...
Erlend E. Aasland [Tue, 15 Aug 2023 20:45:53 +0000 (22:45 +0200)] 
gh-106368: Argument Clinic: Add tests for cloned functions with custom C base names (#107977)

2 years agoNote that lnotab_notes.txt is only valid before 3.11 (#107961)
Martin DeMello [Tue, 15 Aug 2023 20:27:35 +0000 (13:27 -0700)] 
Note that lnotab_notes.txt is only valid before 3.11 (#107961)

2 years agogh-107557: Setup abstract interpretation (#107847)
Ken Jin [Tue, 15 Aug 2023 18:04:17 +0000 (02:04 +0800)] 
gh-107557: Setup abstract interpretation (#107847)

Co-authored-by: Guido van Rossum <gvanrossum@users.noreply.github.com>
Co-authored-by: Jules <57632293+juliapoo@users.noreply.github.com>
2 years agogh-106242: Minor fixup to avoid compiler warnings (GH-107983)
Steve Dower [Tue, 15 Aug 2023 17:02:32 +0000 (18:02 +0100)] 
gh-106242: Minor fixup to avoid compiler warnings (GH-107983)

2 years agogh-103082: remove assumption that INSTRUMENTED_LINE is the last instrumented opcode...
Irit Katriel [Tue, 15 Aug 2023 15:40:05 +0000 (16:40 +0100)] 
gh-103082: remove assumption that INSTRUMENTED_LINE is the last instrumented opcode (#107978)

2 years agogh-106242: Fix path truncation in os.path.normpath (GH-106816)
Finn Womack [Tue, 15 Aug 2023 15:33:00 +0000 (08:33 -0700)] 
gh-106242: Fix path truncation in os.path.normpath (GH-106816)

2 years agogh-107972: Argument Clinic: Ensure a C basename is provided after 'as' (#107973)
Erlend E. Aasland [Tue, 15 Aug 2023 14:41:40 +0000 (16:41 +0200)] 
gh-107972: Argument Clinic: Ensure a C basename is provided after 'as' (#107973)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years agogh-107880: Argument Clinic: Fix regression in gh-107885 (#107974)
Erlend E. Aasland [Tue, 15 Aug 2023 14:00:52 +0000 (16:00 +0200)] 
gh-107880: Argument Clinic: Fix regression in gh-107885 (#107974)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-107963: Fix set_forkserver_preload to check the type of given list (#107965)
Dong-hee Na [Tue, 15 Aug 2023 13:58:12 +0000 (22:58 +0900)] 
gh-107963: Fix set_forkserver_preload to check the type of given list (#107965)

gh-107963: Fix set_forkserver_preload to check the type of given list

2 years agogh-107967: Fix infinite recursion on invalid escape sequence warning (#107968)
Lysandros Nikolaou [Tue, 15 Aug 2023 11:26:42 +0000 (14:26 +0300)] 
gh-107967: Fix infinite recursion on invalid escape sequence warning (#107968)

2 years agogh-93057: Deprecate positional use of optional sqlite3.connect() params (#107948)
Erlend E. Aasland [Tue, 15 Aug 2023 08:09:56 +0000 (10:09 +0200)] 
gh-93057: Deprecate positional use of optional sqlite3.connect() params (#107948)

2 years agogh-76913: Add "merge extras" feature to LoggerAdapter (GH-107292)
Romuald Brunet [Tue, 15 Aug 2023 07:23:54 +0000 (09:23 +0200)] 
gh-76913: Add "merge extras" feature to LoggerAdapter (GH-107292)

2 years agoRevert "gh-104469 : Convert _testcapi/vectorcall_limited.c to use AC … (gh-107951)
Dong-hee Na [Mon, 14 Aug 2023 23:25:57 +0000 (08:25 +0900)] 
Revert "gh-104469 : Convert _testcapi/vectorcall_limited.c to use AC … (gh-107951)

Revert "gh-104469 : Convert _testcapi/vectorcall_limited.c to use AC (gh-107857)"

This reverts commit 2e27da18952c6561f48dab706b5911135cedd7cf.

2 years agoConvert the GitHub issue templates into GitHub issue forms (#107920)
Alex Waygood [Mon, 14 Aug 2023 22:37:27 +0000 (23:37 +0100)] 
Convert the GitHub issue templates into GitHub issue forms (#107920)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2 years agoAttempt to speed up deepfreeze.py (#107887)
Guido van Rossum [Mon, 14 Aug 2023 21:41:27 +0000 (14:41 -0700)] 
Attempt to speed up deepfreeze.py (#107887)

* Instead of calling get_identifiers_and_strings(), extract identifiers and strings from pycore_global_strings.h.
* Avoid ast.literal_eval(), it's very slow.

2 years agogh-105481: reduce repetition in opcode metadata generation code (#107942)
Irit Katriel [Mon, 14 Aug 2023 18:36:29 +0000 (19:36 +0100)] 
gh-105481: reduce repetition in opcode metadata generation code (#107942)

2 years agogh-107938: Synchonise the signature of of sqlite3.connect and sqlite3.Connection...
Erlend E. Aasland [Mon, 14 Aug 2023 14:37:44 +0000 (16:37 +0200)] 
gh-107938: Synchonise the signature of of sqlite3.connect and sqlite3.Connection.__init__ (#107939)

2 years agogh-103082: use IS_VALID_OPCODE instead of _PyOpcode_OpName to check if an opcode...
Irit Katriel [Mon, 14 Aug 2023 09:51:50 +0000 (10:51 +0100)] 
gh-103082: use IS_VALID_OPCODE instead of _PyOpcode_OpName to check if an opcode is defined (#107882)

2 years agogh-107910: Remove not needing newline in error message (GH-107928)
Joon Hwan 김준환 [Mon, 14 Aug 2023 09:26:18 +0000 (18:26 +0900)] 
gh-107910: Remove not needing newline in error message (GH-107928)

2 years agogh-107877: Update logging levels reference table with usage criteria. (#107894)
Vinay Sajip [Sun, 13 Aug 2023 13:19:41 +0000 (14:19 +0100)] 
gh-107877: Update logging levels reference table with usage criteria. (#107894)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agoAdd another example to the statistics docs (GH-107904)
Raymond Hettinger [Sun, 13 Aug 2023 13:01:23 +0000 (08:01 -0500)] 
Add another example to the statistics docs (GH-107904)

2 years agogh-107880: Teach Argument Clinic to clone __init__ and __new__ methods (#107885)
Erlend E. Aasland [Sun, 13 Aug 2023 10:13:11 +0000 (12:13 +0200)] 
gh-107880: Teach Argument Clinic to clone __init__ and __new__ methods (#107885)

2 years agoImprove `_typing.__doc__` (#107908)
Nikita Sobolev [Sun, 13 Aug 2023 09:24:59 +0000 (12:24 +0300)] 
Improve `_typing.__doc__` (#107908)

2 years agogh-107883: Argument Clinic: Handle full module/class path in Function.fulldisplayname...
Erlend E. Aasland [Sat, 12 Aug 2023 23:46:00 +0000 (01:46 +0200)] 
gh-107883: Argument Clinic: Handle full module/class path in Function.fulldisplayname (#107884)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-106797: Remove warning logs from Python/generated_cases.c.h and executor_cases...
Dong-hee Na [Sat, 12 Aug 2023 19:36:46 +0000 (04:36 +0900)] 
gh-106797: Remove warning logs from Python/generated_cases.c.h and executor_cases.c.h (gh-107889)

gh-106797: Remove warning logs from Python/generated_cases.c.h

2 years agogh-107891: Fix typo in 3.12 whatsnew (#107892)
wookie184 [Sat, 12 Aug 2023 12:05:22 +0000 (13:05 +0100)] 
gh-107891: Fix typo in 3.12 whatsnew  (#107892)

2 years agogh-104469 : Convert _testcapi/vectorcall_limited.c to use AC (gh-107857)
nahyeon [Sat, 12 Aug 2023 00:57:35 +0000 (09:57 +0900)] 
gh-104469 : Convert _testcapi/vectorcall_limited.c to use AC (gh-107857)

2 years agogh-101162: Forbid using issubclass() with GenericAlias as the 1st arg (GH-103369)
Nikita Sobolev [Fri, 11 Aug 2023 19:12:11 +0000 (22:12 +0300)] 
gh-101162: Forbid using issubclass() with GenericAlias as the 1st arg (GH-103369)

2 years agoGH-106485: Create object's dict-values instead of creating __dict__, when we can...
Mark Shannon [Fri, 11 Aug 2023 19:05:56 +0000 (20:05 +0100)] 
GH-106485: Create object's dict-values instead of creating __dict__, when we can. (GH-107843)

2 years agogh-91051: fix segfault when using all 8 type watchers (#107853)
Carl Meyer [Fri, 11 Aug 2023 18:42:26 +0000 (12:42 -0600)] 
gh-91051: fix segfault when using all 8 type watchers (#107853)

2 years agogh-106844: Fix issues in _winapi.LCMapStringEx (GH-107832)
Serhiy Storchaka [Fri, 11 Aug 2023 18:13:46 +0000 (21:13 +0300)] 
gh-106844: Fix issues in _winapi.LCMapStringEx (GH-107832)

* Strings with length from 2**31-1 to 2**32-2 always caused MemoryError,
   it doesn't matter how much memory is available.
* Strings with length exactly 2**32-1 caused OSError.
* Strings longer than 2**32-1 characters were truncated due to integer overflow bug.
* Strings containing the null character were truncated at the first null character.

Now strings longer than 2**31-1 characters caused OverflowError and the null character is allowed.

2 years agogh-107782: Pydoc: fall back to __text_signature__ if inspect.signature() fails (GH...
Serhiy Storchaka [Fri, 11 Aug 2023 17:51:36 +0000 (20:51 +0300)] 
gh-107782: Pydoc: fall back to __text_signature__ if inspect.signature() fails (GH-107786)

It allows to show signatures which are not representable in Python,
e.g. for getattr and dict.pop.

2 years agogh-106558: break ref cycles through exceptions in multiprocessing manager (#106559)
Andrew Geng [Fri, 11 Aug 2023 17:44:18 +0000 (13:44 -0400)] 
gh-106558: break ref cycles through exceptions in  multiprocessing manager (#106559)

2 years agogh-105481: split opcode_ids.h out of opcode.h so that it can be generated separately...
Irit Katriel [Fri, 11 Aug 2023 16:42:01 +0000 (17:42 +0100)] 
gh-105481: split opcode_ids.h out of opcode.h so that it can be generated separately (#107866)

2 years agoExtend _sqrtprod() to cover the full range of inputs. Add tests. (GH-107855)
Raymond Hettinger [Fri, 11 Aug 2023 16:19:19 +0000 (17:19 +0100)] 
Extend _sqrtprod() to cover the full range of inputs. Add tests. (GH-107855)

2 years agoDocs: Document PyBUF_MAX_NDIM (#107865)
Erlend E. Aasland [Fri, 11 Aug 2023 16:03:53 +0000 (18:03 +0200)] 
Docs: Document PyBUF_MAX_NDIM (#107865)

2 years agogh-84805: Autogenerate signature for METH_NOARGS and METH_O extension functions ...
Serhiy Storchaka [Fri, 11 Aug 2023 15:08:38 +0000 (18:08 +0300)] 
gh-84805: Autogenerate signature for METH_NOARGS and METH_O extension functions (GH-107794)

2 years agogh-107421: Clarify `OrderedDict` Examples and Recipes (#107613)
shailshouryya [Fri, 11 Aug 2023 04:43:13 +0000 (21:43 -0700)] 
gh-107421: Clarify `OrderedDict` Examples and Recipes (#107613)

2 years agoFix the long64 reader in umarshal.py (GH-107828)
Martin DeMello [Thu, 10 Aug 2023 20:43:14 +0000 (13:43 -0700)] 
Fix the long64 reader in umarshal.py (GH-107828)

2 years agogh-107810: Improve DeprecationWarning for metaclasses with custom tp_new (GH-107834)
Marc Mueller [Thu, 10 Aug 2023 15:55:47 +0000 (17:55 +0200)] 
gh-107810: Improve DeprecationWarning for metaclasses with custom tp_new (GH-107834)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2 years agogh-107838: In dataclasses, improve error message when a non-default field follows...
Eric V. Smith [Thu, 10 Aug 2023 14:39:13 +0000 (09:39 -0500)] 
gh-107838: In dataclasses, improve error message when a non-default field follows a default field. (gh-107842)

Add the name of the previous default argument field in an error message.

2 years agoGH-107674: Avoid allocating boxed ints for `sys.settrace` line events (GH-107780)
Mark Shannon [Thu, 10 Aug 2023 12:35:02 +0000 (13:35 +0100)] 
GH-107674: Avoid allocating boxed ints for `sys.settrace` line events (GH-107780)

2 years agoGH-106485: Handle dict subclasses correctly when dematerializing `__dict__` (GH-107837)
Mark Shannon [Thu, 10 Aug 2023 12:34:00 +0000 (13:34 +0100)] 
GH-106485: Handle dict subclasses correctly when dematerializing `__dict__` (GH-107837)

2 years agogh-106149: move CFG and basicblock definitions into flowgraph.c, use them as opaque...
Irit Katriel [Thu, 10 Aug 2023 12:03:47 +0000 (13:03 +0100)] 
gh-106149: move CFG and basicblock definitions into flowgraph.c, use them as opaque types in compile.c (#107639)

2 years agoGH-107774: Add missing audit event for PEP 669 (GH-107775)
Mark Shannon [Thu, 10 Aug 2023 11:29:06 +0000 (12:29 +0100)] 
GH-107774: Add missing audit event for PEP 669 (GH-107775)

2 years agogh-95065: Argument Clinic: Add functional tests of deprecated positionals (#107768)
Erlend E. Aasland [Thu, 10 Aug 2023 07:19:05 +0000 (09:19 +0200)] 
gh-95065: Argument Clinic: Add functional tests of deprecated positionals (#107768)

Move the "deprecated positinal" tests from clinic.test.c to
_testclinic.c. Mock PY_VERSION_HEX in order to prevent generated
compiler warnings/errors to trigger. Put clinic code for deprecated
positionals in Modules/clinic/_testclinic_depr_star.c.h for easy
inspection of the generated code.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years agogh-107409: set `__wrapped__` attribute in `reprlib.recursive_repr` (#107410)
denballakh [Thu, 10 Aug 2023 06:55:49 +0000 (11:55 +0500)] 
gh-107409: set `__wrapped__` attribute in `reprlib.recursive_repr` (#107410)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 years agogh-107689: Add docstring to `ctypes.Array` (#107697)
Kostya Farber [Thu, 10 Aug 2023 06:39:14 +0000 (07:39 +0100)] 
gh-107689: Add docstring to `ctypes.Array` (#107697)

2 years agoUpdate README for the cases generator (#107826)
Guido van Rossum [Thu, 10 Aug 2023 01:05:51 +0000 (18:05 -0700)] 
Update README for the cases generator (#107826)

2 years agoGH-107812: extend `socket`'s netlink support to FreeBSD (gh-107813)
Mina Galić [Thu, 10 Aug 2023 00:47:46 +0000 (01:47 +0100)] 
GH-107812: extend `socket`'s netlink support to FreeBSD (gh-107813)

2 years agogh-91054: make code watcher tests resilient to other watchers (#107821)
Carl Meyer [Wed, 9 Aug 2023 22:42:32 +0000 (16:42 -0600)] 
gh-91054: make code watcher tests resilient to other watchers (#107821)

2 years agogh-107814: Avoid output from Nuget installation in find_python.bat (GH-107815)
Max Bachmann [Wed, 9 Aug 2023 22:42:16 +0000 (00:42 +0200)] 
gh-107814: Avoid output from Nuget installation in find_python.bat (GH-107815)

2 years agoGH-106485: Dematerialize instance dictionaries when possible (GH-106539)
Brandt Bucher [Wed, 9 Aug 2023 19:14:50 +0000 (12:14 -0700)] 
GH-106485: Dematerialize instance dictionaries when possible (GH-106539)

2 years agoGH-105848: Simplify the arrangement of CALL's stack (GH-107788)
Brandt Bucher [Wed, 9 Aug 2023 18:19:39 +0000 (11:19 -0700)] 
GH-105848: Simplify the arrangement of CALL's stack (GH-107788)

2 years agogh-95065: Produce nicer deprecation messages in Argument Clinic (#107808)
Erlend E. Aasland [Wed, 9 Aug 2023 13:28:18 +0000 (15:28 +0200)] 
gh-95065: Produce nicer deprecation messages in Argument Clinic (#107808)

2 years agogh-104683: Argument Clinic: Params now render their own docstrings (#107790)
Erlend E. Aasland [Wed, 9 Aug 2023 12:44:26 +0000 (14:44 +0200)] 
gh-104683: Argument Clinic: Params now render their own docstrings (#107790)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-104683: Remove unused variables from `Tools/clinic` and tests for `Tools/clinic...
Alex Waygood [Wed, 9 Aug 2023 10:24:05 +0000 (11:24 +0100)] 
gh-104683: Remove unused variables from `Tools/clinic` and tests for `Tools/clinic` (#107771)

2 years agoGH-107724: Fix the signature of `PY_THROW` callback functions. (GH-107725)
Mark Shannon [Wed, 9 Aug 2023 08:30:50 +0000 (09:30 +0100)] 
GH-107724: Fix the signature of `PY_THROW` callback functions. (GH-107725)

2 years agoFuture-proof helper function with zero handling. (GH-107798)
Raymond Hettinger [Wed, 9 Aug 2023 07:44:43 +0000 (08:44 +0100)] 
Future-proof helper function with zero handling. (GH-107798)

2 years agoDocs: clean up Argument Clinic howto's (#107797)
Erlend E. Aasland [Wed, 9 Aug 2023 07:43:02 +0000 (09:43 +0200)] 
Docs: clean up Argument Clinic howto's (#107797)

- fix formatting in @text_signature howto and NEWS entry
- fix formatting and example text in deprecate-positionals howto

2 years agogh-80282: Argument Clinic: Add clarifying comment about ASCII docstring limitation...
Erlend E. Aasland [Wed, 9 Aug 2023 05:55:34 +0000 (07:55 +0200)] 
gh-80282: Argument Clinic: Add clarifying comment about ASCII docstring limitation (#107764)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-106052: Fix bug in the matching of possessive quantifiers (gh-106515)
Serhiy Storchaka [Wed, 9 Aug 2023 05:47:57 +0000 (08:47 +0300)] 
gh-106052: Fix bug in the matching of possessive quantifiers (gh-106515)

It did not work in the case of a subpattern containing backtracking.

Temporary implement possessive quantifiers as equivalent greedy qualifiers
in atomic groups.

2 years agogh-104683: Argument Clinic: refactor format_docstring() (#107623)
Erlend E. Aasland [Tue, 8 Aug 2023 21:12:35 +0000 (23:12 +0200)] 
gh-104683: Argument Clinic: refactor format_docstring() (#107623)

Extract helper methods for formatting the signature and parameter
sections, and clean up the remaining function body.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years agogh-104683: Add --exclude option to Argument Clinic CLI (#107770)
Erlend E. Aasland [Tue, 8 Aug 2023 20:50:54 +0000 (22:50 +0200)] 
gh-104683: Add --exclude option to Argument Clinic CLI (#107770)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years agoGH-107596: Specialize str[int] (GH-107597)
Brandt Bucher [Tue, 8 Aug 2023 20:42:43 +0000 (13:42 -0700)] 
GH-107596: Specialize str[int] (GH-107597)

2 years agoGH-100425: Note improved commutativity in sum(). (GH-107785)
Raymond Hettinger [Tue, 8 Aug 2023 17:30:33 +0000 (19:30 +0200)] 
GH-100425: Note improved commutativity in sum(). (GH-107785)

2 years agoMinor accuracy improvement for statistics.correlation() (GH-107781)
Raymond Hettinger [Tue, 8 Aug 2023 16:12:52 +0000 (18:12 +0200)] 
Minor accuracy improvement for statistics.correlation() (GH-107781)

2 years agogh-105699: Re-enable the Multiple-Interpreters Stress Tests (gh-107572)
Eric Snow [Tue, 8 Aug 2023 15:52:13 +0000 (09:52 -0600)] 
gh-105699: Re-enable the Multiple-Interpreters Stress Tests (gh-107572)

We had disabled them due to crashes they exposed, which have since been fixed.

2 years agogh-91795: Update build optimization part of PCbuild/readme.txt (GH-91849)
Fatih [Tue, 8 Aug 2023 12:47:15 +0000 (15:47 +0300)] 
gh-91795: Update build optimization part of PCbuild/readme.txt (GH-91849)

2 years agogh-106368: Argument clinic: add tests for more failure paths (#107731)
Alex Waygood [Tue, 8 Aug 2023 12:12:49 +0000 (13:12 +0100)] 
gh-106368: Argument clinic: add tests for more failure paths (#107731)

2 years agogh-95065: Argument Clinic: Add comment to preprocessor warning code (#107766)
Erlend E. Aasland [Tue, 8 Aug 2023 08:43:41 +0000 (10:43 +0200)] 
gh-95065: Argument Clinic: Add comment to preprocessor warning code (#107766)

2 years agogh-107659: Add docstrings for ctypes.pointer and ctypes.POINTER (#107660)
Tomas R [Tue, 8 Aug 2023 08:20:10 +0000 (10:20 +0200)] 
gh-107659: Add docstrings for ctypes.pointer and ctypes.POINTER (#107660)

2 years agoREADME: remove unmaintained sections (#107703)
Inada Naoki [Tue, 8 Aug 2023 07:37:45 +0000 (16:37 +0900)] 
README: remove unmaintained sections (#107703)

2 years agogh-86457: Add docs for Argument Clinic @text_signature directive (#107747)
Erlend E. Aasland [Tue, 8 Aug 2023 06:42:08 +0000 (08:42 +0200)] 
gh-86457: Add docs for Argument Clinic @text_signature directive (#107747)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-95065: Make Argument Clinic append deprecation warnings to docstrings (#107745)
Erlend E. Aasland [Tue, 8 Aug 2023 06:41:09 +0000 (08:41 +0200)] 
gh-95065: Make Argument Clinic append deprecation warnings to docstrings (#107745)

2 years agogh-107758: Improvements to lltrace feature (#107757)
Guido van Rossum [Tue, 8 Aug 2023 04:36:25 +0000 (21:36 -0700)] 
gh-107758: Improvements to lltrace feature (#107757)

- The `dump_stack()` method could call a `__repr__` method implemented in Python,
  causing (infinite) recursion.
  I rewrote it to only print out the values for some fundamental types (`int`, `str`, etc.);
  for everything else it just prints `<type_name @ 0xdeadbeef>`.

- The lltrace-like feature for uops wrote to `stderr`, while the one in `ceval.c` writes to `stdout`;
  I changed the uops to write to stdout as well.

2 years agogh-106812: Small stack effect fixes (#107759)
Guido van Rossum [Tue, 8 Aug 2023 04:32:42 +0000 (21:32 -0700)] 
gh-106812: Small stack effect fixes (#107759)

- Generalize the syntax for the type of a stack effect to allow a trailing `*`,
  so we can declare something as e.g. `PyCodeObject *`.

- When generating assignments for stack effects,
  the type of the value on the stack should be the default (i.e., `PyObject *`)
  even when the variable copied to/from it has a different type,
  so that an appropriate cast is generated
  However, not when the variable is an array --
  then the type is taken from the variable (as it is always `PyObject **`).

2 years agogh-107630: Fix Remaining Subinterpreters Crashes on Py_TRACE_REFS Builds (gh-107750)
Eric Snow [Mon, 7 Aug 2023 23:10:57 +0000 (17:10 -0600)] 
gh-107630: Fix Remaining Subinterpreters Crashes on Py_TRACE_REFS Builds (gh-107750)

This is a follow-up to gh-107567 and gh-107733.

We skip test_basic_multiple_interpreters_deleted_no_reset on tracerefs builds.  The test breaks interpreter isolation a little, which doesn't work well with Py_TRACE_REFS builds, so I feel fine about skipping the test.

2 years agogh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552)
Eric Snow [Mon, 7 Aug 2023 21:40:59 +0000 (15:40 -0600)] 
gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552)

PEP 683 (immortal objects) revealed some ways in which the Python documentation has been unnecessarily coupled to the implementation details of reference counts.  In the end users should focus on reference ownership, including taking references and releasing them, rather than on how many reference counts an object has.

This change updates the documentation to reflect that perspective.  It also updates the docs relative to immortal objects in a handful of places.

2 years agogh-107735: Move just added C API tests to better place (GH-107743)
Serhiy Storchaka [Mon, 7 Aug 2023 21:04:11 +0000 (00:04 +0300)] 
gh-107735: Move just added C API tests to better place (GH-107743)

2 years agogh-86457: Fix signature for code.replace() (GH-23199)
Serhiy Storchaka [Mon, 7 Aug 2023 20:34:53 +0000 (23:34 +0300)] 
gh-86457: Fix signature for code.replace() (GH-23199)

Also add support of @text_signature in Argument Clinic.

2 years agogh-107735: Add C API tests for PySys_GetObject() and PySys_SetObject() (GH-107736)
Serhiy Storchaka [Mon, 7 Aug 2023 19:29:01 +0000 (22:29 +0300)] 
gh-107735: Add C API tests for PySys_GetObject() and PySys_SetObject() (GH-107736)

2 years agogh-107630: Initialize Each Interpreter's refchain Properly (gh-107733)
Eric Snow [Mon, 7 Aug 2023 19:14:56 +0000 (13:14 -0600)] 
gh-107630: Initialize Each Interpreter's refchain Properly (gh-107733)

This finishes fixing the crashes in Py_TRACE_REFS builds.  We missed this part in gh-107567.

2 years agogh-107178: Add the C API tests for the Abstract Objects Layer (GH-107179)
Serhiy Storchaka [Mon, 7 Aug 2023 15:51:43 +0000 (18:51 +0300)] 
gh-107178: Add the C API tests for the Abstract Objects Layer (GH-107179)

Cover all the Mapping Protocol, almost all the Sequence Protocol
(except PySequence_Fast) and a part of the Object Protocol.

Move existing tests to Lib/test/test_capi/test_abstract.py and
Modules/_testcapi/abstract.c.

Add also tests for PyDict C API.