]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 years agogh-108083: Don't ignore exceptions in sqlite3.Connection.__init__() and .close()... 104245/head
Erlend E. Aasland [Fri, 18 Aug 2023 11:39:12 +0000 (13:39 +0200)] 
gh-108083: Don't ignore exceptions in sqlite3.Connection.__init__() and .close() (#108084)

- Add explanatory comments
- Add return value to connection_close() for propagating errors
- Always check the return value of connection_exec_stmt()
- Assert pre/post state in remove_callbacks()
- Don't log unraisable exceptions in case of interpreter shutdown
- Make sure we're not initialized if reinit fails
- Try to close the database even if ROLLBACK fails

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years agogh-108014: Add Py_IsFinalizing() function (#108032)
Victor Stinner [Fri, 18 Aug 2023 10:34:41 +0000 (12:34 +0200)] 
gh-108014: Add Py_IsFinalizing() function (#108032)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years agoDocs: emphasise warning and add accurate markups for sys.unraisablehook (#108105)
Erlend E. Aasland [Fri, 18 Aug 2023 10:16:22 +0000 (12:16 +0200)] 
Docs: emphasise warning and add accurate markups for sys.unraisablehook (#108105)

2 years agogh-107801: Improve the docs of the SEEK_* constants (#108099)
Erlend E. Aasland [Thu, 17 Aug 2023 20:41:35 +0000 (22:41 +0200)] 
gh-107801: Improve the docs of the SEEK_* constants (#108099)

2 years agoDocs: Fix Sphinx warnings in io.rst (#107903)
Erlend E. Aasland [Thu, 17 Aug 2023 19:19:01 +0000 (21:19 +0200)] 
Docs: Fix Sphinx warnings in io.rst (#107903)

- Mark up parameter and argument names properly
- If possible, link to docs for methods like `seek`, `tell`, `write`, `read`, etc.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years agogh-107944: Improve error message for function calls with bad keyword arguments (...
Pablo Galindo Salgado [Thu, 17 Aug 2023 18:39:42 +0000 (19:39 +0100)] 
gh-107944: Improve error message for function calls with bad keyword arguments (#107969)

2 years agogh-106581: Project through calls (#108067)
Guido van Rossum [Thu, 17 Aug 2023 18:29:58 +0000 (11:29 -0700)] 
gh-106581: Project through calls (#108067)

This finishes the work begun in gh-107760. When, while projecting a superblock, we encounter a call to a short, simple function, the superblock will now enter the function using `_PUSH_FRAME`, continue through it, and leave it using `_POP_FRAME`, and then continue through the original code. Multiple frame pushes and pops are even possible. It is also possible to stop appending to the superblock in the middle of a called function, when running out of space or encountering an unsupported bytecode.

2 years agogh-104683: Argument Clinic: Remove unreachable code from _module_and_class() (#108092)
Erlend E. Aasland [Thu, 17 Aug 2023 18:16:08 +0000 (20:16 +0200)] 
gh-104683: Argument Clinic: Remove unreachable code from _module_and_class() (#108092)

'not hasattr(parent, "classes")' is always false, since 'parent' is an
instance of either the Module, Class, or Clinic classes, and all of
them has a "classes" attribute.

2 years agogh-102029: Deprecate passing arguments to `_PyRLock` in `threading` (#102071)
Nikita Sobolev [Thu, 17 Aug 2023 16:19:07 +0000 (19:19 +0300)] 
gh-102029: Deprecate passing arguments to `_PyRLock` in `threading` (#102071)

2 years agogh-105481: opcode.h is no longer generated during the build (#108080)
Irit Katriel [Thu, 17 Aug 2023 16:07:58 +0000 (17:07 +0100)] 
gh-105481: opcode.h is no longer generated during the build (#108080)

2 years agoAdd workflow for automatic issue headers (#108054)
Adam Turner [Thu, 17 Aug 2023 15:37:07 +0000 (16:37 +0100)] 
Add workflow for automatic issue headers (#108054)

We don't get the "Bug report" and "Feature or enhancement" titles anymore, with the new issue forms. This brings them back!

2 years agogh-107801: Document SEEK_HOLE and SEEK_DATA (#107936)
Erlend E. Aasland [Thu, 17 Aug 2023 14:14:01 +0000 (16:14 +0200)] 
gh-107801: Document SEEK_HOLE and SEEK_DATA (#107936)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Antoine Pitrou <antoine@python.org>
2 years agogh-105481: fix out of date comment (#108079)
Irit Katriel [Thu, 17 Aug 2023 10:25:28 +0000 (11:25 +0100)] 
gh-105481: fix out of date comment (#108079)

2 years agoGH-108035: Remove the `_PyCFrame` struct as it is no longer needed for performance...
Mark Shannon [Thu, 17 Aug 2023 10:16:03 +0000 (11:16 +0100)] 
GH-108035: Remove the `_PyCFrame` struct as it is no longer needed for performance. (GH-108036)

2 years agoGH-107987: Remove the Distributing Python Modules guide (#108016)
Adam Turner [Thu, 17 Aug 2023 10:01:14 +0000 (11:01 +0100)] 
GH-107987: Remove the Distributing Python Modules guide (#108016)

2 years agogh-107298: Fix some references in the C API documentation (GH-108072)
Serhiy Storchaka [Thu, 17 Aug 2023 08:16:00 +0000 (11:16 +0300)] 
gh-107298: Fix some references in the C API documentation (GH-108072)

2 years agogh-105539: Explict resource management for connection objects in sqlite3 tests (...
Erlend E. Aasland [Thu, 17 Aug 2023 06:45:48 +0000 (08:45 +0200)] 
gh-105539: Explict resource management for connection objects in sqlite3 tests (#108017)

- Use memory_database() helper
- Move test utility functions to util.py
- Add convenience memory database mixin
- Add check() helper for closed connection tests

2 years agogh-107298: Add standard exceptions and warnings in the nitpick_ignore list (GH-108029)
Serhiy Storchaka [Thu, 17 Aug 2023 06:44:05 +0000 (09:44 +0300)] 
gh-107298: Add standard exceptions and warnings in the nitpick_ignore list (GH-108029)

2 years agogh-106581: Split `CALL_PY_EXACT_ARGS` into uops (#107760)
Guido van Rossum [Wed, 16 Aug 2023 23:26:43 +0000 (16:26 -0700)] 
gh-106581: Split `CALL_PY_EXACT_ARGS` into uops (#107760)

* Split `CALL_PY_EXACT_ARGS` into uops

This is only the first step for doing `CALL` in Tier 2.
The next step involves tracing into the called code object and back.
After that we'll have to do the remaining `CALL` specialization.
Finally we'll have to deal with `KW_NAMES`.

Note: this moves setting `frame->return_offset` directly in front of
`DISPATCH_INLINED()`, to make it easier to move it into `_PUSH_FRAME`.

2 years agogh-105481: generate op IDs from bytecode.c instead of hard coding them in opcode...
Irit Katriel [Wed, 16 Aug 2023 22:25:18 +0000 (23:25 +0100)] 
gh-105481: generate op IDs from bytecode.c instead of hard coding them in opcode.py (#107971)

2 years agoGH-92584: Remove references to Distutils in configure.rst (#108043)
Adam Turner [Wed, 16 Aug 2023 21:13:05 +0000 (22:13 +0100)] 
GH-92584: Remove references to Distutils in configure.rst (#108043)

Remove references to Distutils in configure.rst

2 years agoGH-92584: Remove Installing Python Modules (Distutils version) (#108020)
Adam Turner [Wed, 16 Aug 2023 21:06:56 +0000 (22:06 +0100)] 
GH-92584: Remove Installing Python Modules (Distutils version) (#108020)

2 years agoGH-92584: Remove references to Distutils in ``PYTHONUSERBASE`` (#108040)
Adam Turner [Wed, 16 Aug 2023 20:43:30 +0000 (21:43 +0100)] 
GH-92584: Remove references to Distutils in ``PYTHONUSERBASE`` (#108040)

Remove references to Distutils in ``PYTHONUSERBASE``

2 years agoGH-92584: Redirect macOS package installation to the PPUG (#108044)
Adam Turner [Wed, 16 Aug 2023 20:42:23 +0000 (21:42 +0100)] 
GH-92584: Redirect macOS package installation to the PPUG (#108044)

2 years agogh-56166: Deprecate passing confusing positional arguments in re functions (#107778)
Serhiy Storchaka [Wed, 16 Aug 2023 20:35:35 +0000 (23:35 +0300)] 
gh-56166: Deprecate passing confusing positional arguments in re functions (#107778)

Deprecate passing optional arguments maxsplit, count and flags in
module-level functions re.split(), re.sub() and re.subn() as positional.
They should only be passed by keyword.

2 years agogh-107211: Fix select extension build on Solaris (#108012)
Victor Stinner [Wed, 16 Aug 2023 20:26:22 +0000 (22:26 +0200)] 
gh-107211: Fix select extension build on Solaris (#108012)

Export the internal _Py_open() and _Py_write() functions for Solaris:
the select shared extension uses them.

2 years agoGH-92584: Remove reference to Distutils in ``cx_Freeze``'s description (#108047)
Adam Turner [Wed, 16 Aug 2023 20:23:12 +0000 (21:23 +0100)] 
GH-92584: Remove reference to Distutils in ``cx_Freeze``'s description (#108047)

Remove reference to Distutils in ``cx_Freeze``'s description

2 years agogh-105522: [Enum] Correctly handle possible exceptions during testing (GH-105523)
Nikita Sobolev [Wed, 16 Aug 2023 19:17:28 +0000 (22:17 +0300)] 
gh-105522: [Enum] Correctly handle possible exceptions during testing (GH-105523)

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>