]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 years agogh-95913: Edit, xref & sort 3.11 WhatsNew Removed section (#98584)
C.A.M. Gerlach [Mon, 24 Oct 2022 12:33:16 +0000 (07:33 -0500)] 
gh-95913: Edit, xref & sort 3.11 WhatsNew Removed section (#98584)

3 years agogh-95913 Add string section to Whatsnew with new Template methods (#98311)
C.A.M. Gerlach [Mon, 24 Oct 2022 12:33:04 +0000 (07:33 -0500)] 
gh-95913 Add string section to Whatsnew with new Template methods (#98311)

3 years agogh-91524: Speed up the regular expression substitution (#91525)
Serhiy Storchaka [Sun, 23 Oct 2022 22:57:30 +0000 (01:57 +0300)] 
gh-91524: Speed up the regular expression substitution (#91525)

Functions re.sub() and re.subn() and corresponding re.Pattern methods
are now 2-3 times faster for replacement strings containing group references.

Closes #91524

Primarily authored by serhiy-storchaka Serhiy Storchaka
Minor-cleanups-by: Gregory P. Smith [Google] <greg@krypto.org>
3 years agoUpdate Mac installer messages to 3.12 alpha (GH-98575)
Ned Deily [Sun, 23 Oct 2022 20:36:53 +0000 (16:36 -0400)] 
Update Mac installer messages to 3.12 alpha (GH-98575)

3 years agogh-98561: Fix a typo in typing (GH-98562)
Omkaar [Sun, 23 Oct 2022 14:05:08 +0000 (19:35 +0530)] 
gh-98561: Fix a typo in typing (GH-98562)

3 years agono-issue: typo fix in c-api/tuple.rst (gh-98560)
wim glenn [Sun, 23 Oct 2022 10:46:56 +0000 (05:46 -0500)] 
no-issue: typo fix in c-api/tuple.rst (gh-98560)

3 years agogh-98456: Replace deprecated `set-output` with up-to-date version (gh-98457)
Noam Cohen [Sun, 23 Oct 2022 05:23:40 +0000 (08:23 +0300)] 
gh-98456: Replace deprecated `set-output` with up-to-date version (gh-98457)

3 years agogh-95913: Edit & expand Optimizations in 3.11 WhatsNew (#98426)
C.A.M. Gerlach [Sat, 22 Oct 2022 19:14:11 +0000 (14:14 -0500)] 
gh-95913: Edit & expand Optimizations in 3.11 WhatsNew (#98426)

3 years agogh-95913: Copyedit & xref FrameInfo in Whatsnew inspect section (#98304)
C.A.M. Gerlach [Sat, 22 Oct 2022 19:12:04 +0000 (14:12 -0500)] 
gh-95913: Copyedit & xref FrameInfo in Whatsnew inspect section (#98304)

3 years agoGH-98539: fix ref cycle in `_SSLProtocolTransport` after close (#98540)
Kumar Aditya [Sat, 22 Oct 2022 16:11:27 +0000 (21:41 +0530)] 
GH-98539: fix ref cycle in `_SSLProtocolTransport` after close  (#98540)

3 years agoGH-98543: Fix `asyncio.TaskGroup` to not keep reference to errors after raising...
Kumar Aditya [Sat, 22 Oct 2022 16:05:11 +0000 (21:35 +0530)] 
GH-98543: Fix `asyncio.TaskGroup`  to not keep reference to errors after raising ExceptionGroup  (#98544)

3 years agoGH-98363: Slicing isn't necessary. A size reduction will suffice. (GH-98538)
Raymond Hettinger [Sat, 22 Oct 2022 12:21:06 +0000 (07:21 -0500)] 
GH-98363: Slicing isn't necessary. A size reduction will suffice. (GH-98538)

3 years agoFix typo in news entry (#98361)
Ikko Ashimine [Sat, 22 Oct 2022 11:59:12 +0000 (20:59 +0900)] 
Fix typo in news entry (#98361)

ouput -> output

3 years ago[Enum docs]: fix order of arguments to isinstance() (#98542)
Clément Robert [Sat, 22 Oct 2022 11:29:00 +0000 (13:29 +0200)] 
[Enum docs]: fix order of arguments to isinstance() (#98542)

3 years agoGH-98363: Use better accessor macro (#98535)
Raymond Hettinger [Fri, 21 Oct 2022 23:44:49 +0000 (18:44 -0500)] 
GH-98363: Use better accessor macro (#98535)

3 years agogh-51511: Note that codecs.open()'s encoding parameter affects automatic conversion...
Stanley [Fri, 21 Oct 2022 23:01:05 +0000 (16:01 -0700)] 
gh-51511: Note that codecs.open()'s encoding parameter affects automatic conversion to binary mode (#94370)

3 years agobpo-2716: add license for audioop module (#19972)
Furkan Onder [Fri, 21 Oct 2022 22:43:20 +0000 (01:43 +0300)] 
bpo-2716: add license for audioop module (#19972)

3 years agogh-98298: [Enum] document ReprEnum, global_enum, and show_flag_values (GH-98455)
Ethan Furman [Fri, 21 Oct 2022 22:36:41 +0000 (15:36 -0700)] 
gh-98298: [Enum] document ReprEnum, global_enum, and show_flag_values (GH-98455)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agoGH-98363: Fix exception handling in batched() (GH-98523)
Raymond Hettinger [Fri, 21 Oct 2022 17:31:52 +0000 (12:31 -0500)] 
GH-98363:  Fix exception handling in batched() (GH-98523)

3 years agogh-95027: Fix regrtest stdout encoding on Windows (#98492)
Victor Stinner [Fri, 21 Oct 2022 14:21:36 +0000 (16:21 +0200)] 
gh-95027: Fix regrtest stdout encoding on Windows (#98492)

On Windows, when the Python test suite is run with the -jN option,
the ANSI code page is now used as the encoding for the stdout
temporary file, rather than using UTF-8 which can lead to decoding
errors.

3 years agogh-91051: allow setting a callback hook on PyType_Modified (GH-97875)
Carl Meyer [Fri, 21 Oct 2022 13:41:51 +0000 (07:41 -0600)] 
gh-91051: allow setting a callback hook on PyType_Modified (GH-97875)

3 years agogh-98172: [doc] mention that except* handles naked exceptions (GH-98496)
Irit Katriel [Fri, 21 Oct 2022 10:35:20 +0000 (11:35 +0100)] 
gh-98172: [doc] mention that except* handles naked exceptions (GH-98496)

3 years agogh-97514: Don't use Linux abstract sockets for multiprocessing (#98501)
Gregory P. Smith [Thu, 20 Oct 2022 22:30:09 +0000 (15:30 -0700)] 
gh-97514: Don't use Linux abstract sockets for multiprocessing (#98501)

Linux abstract sockets are insecure as they lack any form of filesystem
permissions so their use allows anyone on the system to inject code into
the process.

This removes the default preference for abstract sockets in
multiprocessing introduced in Python 3.9+ via
https://github.com/python/cpython/pull/18866 while fixing
https://github.com/python/cpython/issues/84031.

Explicit use of an abstract socket by a user now generates a
RuntimeWarning.  If we choose to keep this warning, it should be
backported to the 3.7 and 3.8 branches.

3 years agogh-97912: Avoid quadratic behavior when adding LOAD_FAST_CHECK (GH-97952)
Dennis Sweeney [Thu, 20 Oct 2022 22:27:41 +0000 (18:27 -0400)] 
gh-97912: Avoid quadratic behavior when adding LOAD_FAST_CHECK (GH-97952)

* The compiler analyzes the usage of the first 64 local variables all at once using bit masks.

* Local variables beyond the first 64 are only partially analyzed, achieving linear time.

3 years agogh-96035: Make urllib.parse.urlparse reject non-numeric ports (#98273)
Ben Kallus [Thu, 20 Oct 2022 21:00:56 +0000 (17:00 -0400)] 
gh-96035: Make urllib.parse.urlparse reject non-numeric ports (#98273)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agogh-98461: Fix source location in comprehensions bytecode (GH-98464)
Irit Katriel [Thu, 20 Oct 2022 15:58:37 +0000 (16:58 +0100)] 
gh-98461: Fix source location in comprehensions bytecode (GH-98464)

3 years agogh-98421: Clean Up PyObject_Print (GH-98422)
MonadChains [Thu, 20 Oct 2022 13:59:10 +0000 (15:59 +0200)] 
gh-98421: Clean Up PyObject_Print (GH-98422)

Work on test coverage for `PyObject_Print` made it clear that some lines can't get executed.
Simplify the function by excluding the checks for non-string types.
Also eliminate creating a temporary bytes object.

3 years agogh-98360: multiprocessing now spawns children on Windows with correct argv[0] in...
Steve Dower [Thu, 20 Oct 2022 13:53:38 +0000 (14:53 +0100)] 
gh-98360: multiprocessing now spawns children on Windows with correct argv[0] in virtual environments (GH-98462)

3 years agoCODEOWNERS: Become a typing code owner (#98480)
Alex Waygood [Thu, 20 Oct 2022 13:45:34 +0000 (14:45 +0100)] 
CODEOWNERS: Become a typing code owner (#98480)

3 years ago[doc] Improve logging cookbook example. (GH-98481)
Vinay Sajip [Thu, 20 Oct 2022 11:46:03 +0000 (12:46 +0100)] 
[doc] Improve logging cookbook example. (GH-98481)

3 years agoAdd more tkinter.Canvas tests (GH-98475)
Serhiy Storchaka [Thu, 20 Oct 2022 10:43:12 +0000 (13:43 +0300)] 
Add more tkinter.Canvas tests (GH-98475)

It is a prerequisite for #94473. Add tests for the coords() method and
for creation of some Canvas items.

3 years agogh-95023: Added os.setns and os.unshare functions (#95046)
Noam Cohen [Thu, 20 Oct 2022 09:08:54 +0000 (12:08 +0300)] 
gh-95023: Added os.setns and os.unshare functions (#95046)

Added os.setns and os.unshare to easily switch between namespaces
on Linux.

Co-authored-by: Christian Heimes <christian@python.org>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agoGH-98363: Presize the list for batched() (GH-98419)
Raymond Hettinger [Thu, 20 Oct 2022 07:28:17 +0000 (02:28 -0500)] 
GH-98363: Presize the list for batched() (GH-98419)

3 years agogh-98374: Suppress ImportError for invalid query for help() command. (gh-98450)
Dong-hee Na [Thu, 20 Oct 2022 01:56:21 +0000 (10:56 +0900)] 
gh-98374: Suppress ImportError for invalid query for help() command. (gh-98450)

3 years agotyping tests: `_overload_dummy` raises `NotImplementedError`, not `RuntimeError`...
Nikita Sobolev [Thu, 20 Oct 2022 00:53:36 +0000 (03:53 +0300)] 
typing tests: `_overload_dummy` raises `NotImplementedError`, not `RuntimeError` (#98351)

3 years agogh-98354: Add unicode check for 'name' attribute in _imp_create_builtin (GH-98412)
chgnrdv [Thu, 20 Oct 2022 00:25:10 +0000 (03:25 +0300)] 
gh-98354: Add unicode check for 'name' attribute in _imp_create_builtin (GH-98412)

Fixes #98354

3 years agogh-98257: Make _PyEval_SetTrace() reentrant (#98258)
Victor Stinner [Wed, 19 Oct 2022 22:31:47 +0000 (00:31 +0200)] 
gh-98257: Make _PyEval_SetTrace() reentrant (#98258)

Make sys.setprofile() and sys.settrace() functions reentrant.  They
can no long fail with: RuntimeError("Cannot install a trace function
while another trace function is being installed").

Make _PyEval_SetTrace() and _PyEval_SetProfile() functions reentrant,
rather than detecting and rejecting reentrant calls. Only delete the
reference to function arguments once the new function is fully set,
when a reentrant call is safe. Call also _PySys_Audit() earlier.

3 years agogh-98414: py.exe launcher does not use defaults for -V:company/ option (GH-98460)
Steve Dower [Wed, 19 Oct 2022 22:00:09 +0000 (23:00 +0100)] 
gh-98414: py.exe launcher does not use defaults for -V:company/ option (GH-98460)

3 years agogh-98417: Store int_max_str_digits on the Interpreter State (GH-98418)
Eric Snow [Wed, 19 Oct 2022 20:27:46 +0000 (14:27 -0600)] 
gh-98417: Store int_max_str_digits on the Interpreter State (GH-98418)

3 years agoDoc: Remove title text from internal links (#98409)
Rafael Fontenelle [Wed, 19 Oct 2022 15:36:07 +0000 (12:36 -0300)] 
Doc: Remove title text from internal links (#98409)

Rely on the title of the linked internal page instead of putting the title. Sphinx will render with the title correctly, and this will reduce work for translators

3 years ago[doc] Refresh the venv introduction documentation, and correct the statement about...
Phil Elson [Wed, 19 Oct 2022 14:49:34 +0000 (16:49 +0200)] 
[doc] Refresh the venv introduction documentation, and correct the statement about VIRTUAL_ENV (GH-98350)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agoDocs: Bump sphinx-lint and fix unbalanced inline literal markup (#98441)
Hugo van Kemenade [Wed, 19 Oct 2022 12:00:28 +0000 (14:00 +0200)] 
Docs: Bump sphinx-lint and fix unbalanced inline literal markup (#98441)

Bump sphinx-lint and fix unbalanced inline literal markup

3 years agogh-92886: Replace assertion statements in `handlers.BaseHandler` to support running...
Jack Hindmarch [Wed, 19 Oct 2022 10:38:59 +0000 (11:38 +0100)] 
gh-92886: Replace assertion statements in `handlers.BaseHandler` to support running with optimizations (`-O`) (GH-93231)

3 years agogh-92886: Fix tests that fail when running with optimizations (`-O`) in `_test_multip...
Jack Hindmarch [Wed, 19 Oct 2022 10:07:07 +0000 (11:07 +0100)] 
gh-92886: Fix tests that fail when running with optimizations (`-O`) in `_test_multiprocessing.py` (GH-93233)

3 years agogh-92886: Fix tests that fail when running with optimizations (`-O`) in `test_py_comp...
Jack Hindmarch [Wed, 19 Oct 2022 10:05:08 +0000 (11:05 +0100)] 
gh-92886: Fix tests that fail when running with optimizations (`-O`) in `test_py_compile.py` (GH-93235)

3 years agogh-98398: Fix source locations for 'assert' bytecode (GH-98405)
Irit Katriel [Wed, 19 Oct 2022 09:48:50 +0000 (10:48 +0100)] 
gh-98398: Fix source locations for 'assert' bytecode (GH-98405)

3 years agogh-97928: Fix handling options starting with "-" in tkinter.Text.count() (GH-98436)
Serhiy Storchaka [Wed, 19 Oct 2022 09:30:14 +0000 (12:30 +0300)] 
gh-97928: Fix handling options starting with "-" in tkinter.Text.count() (GH-98436)

Previously they were silently ignored. Now they are errors.

3 years agogh-97928: Add tests for tkinter.Text.count() (GH-98269)
Serhiy Storchaka [Wed, 19 Oct 2022 06:17:45 +0000 (09:17 +0300)] 
gh-97928: Add tests for tkinter.Text.count() (GH-98269)

3 years agogh-95913: Edit zipfile Whatsnew section & add new APIs (#98314)
C.A.M. Gerlach [Wed, 19 Oct 2022 04:33:50 +0000 (23:33 -0500)] 
gh-95913: Edit zipfile Whatsnew section & add new APIs (#98314)

* Link ZipFile in What's New entry discussing it

* Add entry for new ZipFile.mkdir method

* Add entry for new zipfile.Path.stem/suffix/suffixes methods

* Add missing line breaks between zipfile bullet list items

3 years agogh-95913: Add WhatsNew section for new logging APIs (#98320)
C.A.M. Gerlach [Wed, 19 Oct 2022 04:25:58 +0000 (23:25 -0500)] 
gh-95913: Add WhatsNew section for new logging APIs (#98320)

* Add entry for new logging.getLevelNamesMapping function

* Add entry for SysLogHandler.createSocket to whatsnew

* Add missing line break between logging bullet list items

3 years agoFix markup indentation (GH-98424)
Raymond Hettinger [Wed, 19 Oct 2022 01:14:41 +0000 (20:14 -0500)] 
Fix markup indentation (GH-98424)

Fix markup

3 years agogh-95914: Add links to 3.11 WhatsNew Summary items (#98416)
C.A.M. Gerlach [Tue, 18 Oct 2022 23:10:35 +0000 (18:10 -0500)] 
gh-95914: Add links to 3.11 WhatsNew Summary items (#98416)

Add links to Summary items to where readers can learn more

3 years agoGeneral improvements to the itertools docs (GH-98408)
Raymond Hettinger [Tue, 18 Oct 2022 19:09:34 +0000 (14:09 -0500)] 
General improvements to the itertools docs (GH-98408)

3 years agogh-98390: Fix source locations of boolean sub-expressions (GH-98396)
Irit Katriel [Tue, 18 Oct 2022 16:18:38 +0000 (17:18 +0100)] 
gh-98390: Fix source locations of boolean sub-expressions (GH-98396)

3 years agogh-92886: Fixing tests that fail when running with optimizations (`-O`) in `test_sys_...
Jack Hindmarch [Tue, 18 Oct 2022 15:59:05 +0000 (16:59 +0100)] 
gh-92886: Fixing tests that fail when running with optimizations (`-O`) in `test_sys_settrace.py` (GH-93234)

3 years agogh-98393: os module reject bytes-like, only accept bytes (#98394)
Victor Stinner [Tue, 18 Oct 2022 15:52:31 +0000 (17:52 +0200)] 
gh-98393: os module reject bytes-like, only accept bytes (#98394)

The os module and the PyUnicode_FSDecoder() function no longer accept
bytes-like paths, like bytearray and memoryview types: only the exact
bytes type is accepted for bytes strings.

3 years agogh-98331: Update bundled pip to 22.3 (#98332)
Paul Moore [Tue, 18 Oct 2022 14:48:14 +0000 (15:48 +0100)] 
gh-98331: Update bundled pip to 22.3 (#98332)

3 years agoDoc: Found some remaining default roles. (GH-98392)
Julien Palard [Tue, 18 Oct 2022 13:46:18 +0000 (15:46 +0200)] 
Doc: Found some remaining default roles. (GH-98392)

3 years agogh-98378: Add small format string example to strftime comments (GH-98379)
Alex Zvorygin [Tue, 18 Oct 2022 13:42:10 +0000 (06:42 -0700)] 
gh-98378: Add small format string example to strftime comments (GH-98379)

A small example of what a full date and time would look like would help a lot of developers who may not realize that they should investigate `time.h`'s `strftime`, run `man strftime`, or click through a series of docs on the python docs before they get to the actual [definition here](https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes) which still doesn't have an obvious copy-pastable example of "what the heck format does this thing actually expect?".

Automerge-Triggered-By: GH:rhettinger
3 years agoDoc: missing underscore in hyperlink. (GH-98391)
Julien Palard [Tue, 18 Oct 2022 13:28:19 +0000 (15:28 +0200)] 
Doc: missing underscore in hyperlink. (GH-98391)

3 years agogh-95913: Copyedit, xref and organize enum section (#98295)
C.A.M. Gerlach [Tue, 18 Oct 2022 09:26:24 +0000 (04:26 -0500)] 
gh-95913: Copyedit, xref and organize enum section (#98295)

* Whatsnew: Convert literals in enum section to actual x-references

* Whatsnew: Rewrite enum section for clear and consistant phrasing

* Whatsnew: Combine directly related enum items instead of seperating them

* gh-98250: Describe __str__/__format__ changes more clearly/accurately

* Tweak enum section language per feedback from Ethan

3 years agogh-95913: Prepare remaining Whatsnew sections for editing (#98342)
C.A.M. Gerlach [Tue, 18 Oct 2022 08:41:57 +0000 (03:41 -0500)] 
gh-95913: Prepare remaining Whatsnew sections for editing (#98342)

* Add line breaks & ref targets to Whatsnew to prepare for future changes

* Use standard heading underbar symbols for H4 sections

* Flatten Porting subsection; clarify scope of/link Python->CAPI sections

* Move C API pending deprecations to C API section, to match the others

3 years agoFix typos in comments (GH-98375)
Raymond Hettinger [Tue, 18 Oct 2022 02:01:28 +0000 (21:01 -0500)] 
Fix typos in comments (GH-98375)

3 years agoGH-98363: Add itertools.batched() (GH-98364)
Raymond Hettinger [Mon, 17 Oct 2022 23:53:45 +0000 (18:53 -0500)] 
GH-98363:  Add itertools.batched() (GH-98364)

3 years agoMove random selection recipes from itertools.rst to random.rst (GH-98369)
Raymond Hettinger [Mon, 17 Oct 2022 22:30:49 +0000 (17:30 -0500)] 
Move random selection recipes from itertools.rst to random.rst (GH-98369)

3 years agogh-95913: Move subinterpreter exper removal to 3.11 WhatsNew (GH-98345)
C.A.M. Gerlach [Mon, 17 Oct 2022 19:59:22 +0000 (14:59 -0500)] 
gh-95913: Move subinterpreter exper removal to 3.11 WhatsNew (GH-98345)

Part of #95913
Forward port of #93306, which was a backport of #93185, to address #84694

This adds the What's New entry for the removal of the subinterpreter-related env variable, build-time flag, etc. As @ericsnowcurrently  was author of the original changes, I added him as a co-author to the commit.

This addition to the Python 3.11 What's New document were only made to the Python 3.11 branch during the backport process, and not added to the version in `main`. Forward-porting it ensures the docs retain these additions for the future, rather than being lost in a legacy Python versions, allows it to be be edited as part of #95913 , and avoids merge conflicts with routine back-ports of PRs touching it.

I've pulled in the addition exactly as-is with no modifications; any editing will be done in future PRs (and therefore can be reviewed and backported accordingly).

The one other such addition is forward-ported in #98344

3 years agogh-95914: Add What's New item describing PEP 670 changes (#98315)
C.A.M. Gerlach [Mon, 17 Oct 2022 19:16:37 +0000 (14:16 -0500)] 
gh-95914: Add What's New item describing PEP 670 changes (#98315)

3 years agoRemove unused arrange_output_buffer function from zlibmodule.c. (GH-98358)
Benjamin Peterson [Mon, 17 Oct 2022 16:38:34 +0000 (09:38 -0700)] 
Remove unused arrange_output_buffer function from zlibmodule.c. (GH-98358)

3 years agogh-98174: Handle EPROTOTYPE under macOS in test_sendfile_fallback_close_peer_in_the_m...
fancidev [Mon, 17 Oct 2022 15:45:38 +0000 (23:45 +0800)] 
gh-98174: Handle EPROTOTYPE under macOS in test_sendfile_fallback_close_peer_in_the_middle_of_receiving (#98316)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agoGH-98327: Reduce scope of catch_warnings() in _make_subprocess_transport (#98333)
Kumar Aditya [Mon, 17 Oct 2022 15:27:02 +0000 (20:57 +0530)] 
GH-98327: Reduce scope of catch_warnings() in _make_subprocess_transport (#98333)

Alas, warnings.catch_warnings() has global scope, not thread scope, so this is still not perfect, but it reduces the time during which warnings are ignored. Better solution welcome.

3 years agogh-93691: Compiler's code-gen passes location around instead of holding it on the...
Irit Katriel [Mon, 17 Oct 2022 13:28:51 +0000 (14:28 +0100)] 
gh-93691: Compiler's code-gen passes location around instead of holding it on the global compiler state (GH-98001)

3 years agogh-97669: Create Tools/build/ directory (#97963)
Victor Stinner [Mon, 17 Oct 2022 10:01:00 +0000 (12:01 +0200)] 
gh-97669: Create Tools/build/ directory (#97963)

Create Tools/build/ directory. Move the following scripts from
Tools/scripts/ to Tools/build/:

* check_extension_modules.py
* deepfreeze.py
* freeze_modules.py
* generate_global_objects.py
* generate_levenshtein_examples.py
* generate_opcode_h.py
* generate_re_casefix.py
* generate_sre_constants.py
* generate_stdlib_module_names.py
* generate_token.py
* parse_html5_entities.py
* smelly.py
* stable_abi.py
* umarshal.py
* update_file.py
* verify_ensurepip_wheels.py

Update references to these scripts.

3 years agogh-95534: Improve gzip reading speed by 10% (#97664)
Ruben Vorderman [Mon, 17 Oct 2022 02:10:58 +0000 (04:10 +0200)] 
gh-95534: Improve gzip reading speed by 10% (#97664)

Change summary:
+ There is now a `gzip.READ_BUFFER_SIZE` constant that is 128KB. Other programs that read in 128KB chunks: pigz and cat. So this seems best practice among good programs. Also it is faster than 8 kb chunks.
+ a zlib._ZlibDecompressor was added. This is the _bz2.BZ2Decompressor ported to zlib. Since the zlib.Decompress object is better for in-memory decompression, the _ZlibDecompressor is hidden. It only makes sense in file decompression, and that is already implemented now in the gzip library. No need to bother the users with this.
+ The ZlibDecompressor uses the older Cpython arrange_output_buffer functions, as those are faster and more appropriate for the use case.
+ GzipFile.read has been optimized. There is no longer a `unconsumed_tail` member to write back to padded file. This is instead handled by the ZlibDecompressor itself, which has an internal buffer. `_add_read_data` has been inlined, as it was just two calls.

EDIT: While I am adding improvements anyway, I figured I could add another one-liner optimization now to the python -m gzip application. That read chunks in io.DEFAULT_BUFFER_SIZE previously, but has been updated now to use READ_BUFFER_SIZE chunks.

3 years agogh-95913: Forward-port int/str security change to 3.11 What's New in main (#98344)
C.A.M. Gerlach [Mon, 17 Oct 2022 01:43:13 +0000 (20:43 -0500)] 
gh-95913: Forward-port int/str security change to 3.11 What's New in main (#98344)

Add int/str security change from issue gh-95778 PRs gh-96499 / gh-95800

Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
3 years agoGH-91415: Mention alphabetical sort ordering in the Sorting HOWTO (GH-98336)
Raymond Hettinger [Sun, 16 Oct 2022 19:34:25 +0000 (14:34 -0500)] 
GH-91415: Mention alphabetical sort ordering in the Sorting HOWTO (GH-98336)

3 years agogh-97930: Merge with importlib_resources 5.9 (GH-97929)
Jason R. Coombs [Sun, 16 Oct 2022 19:00:39 +0000 (15:00 -0400)] 
gh-97930: Merge with importlib_resources 5.9 (GH-97929)

* Merge with importlib_resources 5.9

* Update changelog

3 years agogh-85525: Remove extra row in doc (#98337)
Joannah Nanjekye [Sun, 16 Oct 2022 17:43:31 +0000 (13:43 -0400)] 
gh-85525: Remove extra row in doc (#98337)

* remove extra row

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
3 years agogh-85299: Add note warning about entry point guard for asyncio example (#93457)
Stanley [Sun, 16 Oct 2022 17:04:43 +0000 (10:04 -0700)] 
gh-85299: Add note warning about entry point guard for asyncio example (#93457)

3 years agogh-97527: IDLE - fix buggy macosx patch (#98313)
Terry Jan Reedy [Sun, 16 Oct 2022 14:23:11 +0000 (10:23 -0400)] 
gh-97527: IDLE - fix buggy macosx patch (#98313)

#97530 fixed IDLE tests possibly crashing on a Mac without a GUI.
But it resulted in IDLE not starting in 3.10.8, 3.12.0a1, and
Microsoft Python 3.10.2288.0 when test/* is not installed.
After this patch, test.* is only imported when testing on Mac.

3 years agogh-98307: Add docstring and documentation for SysLogHandler.createSocket (GH-98319)
Vinay Sajip [Sun, 16 Oct 2022 08:15:46 +0000 (09:15 +0100)] 
gh-98307: Add docstring and documentation for SysLogHandler.createSocket (GH-98319)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agogh-94808: Cover `PyFunction_GetCode`, `PyFunction_GetGlobals`, `PyFunction_GetModule...
Nikita Sobolev [Sun, 16 Oct 2022 04:18:59 +0000 (07:18 +0300)] 
gh-94808: Cover `PyFunction_GetCode`, `PyFunction_GetGlobals`, `PyFunction_GetModule` (#98158)

3 years agoGH-94597: Deprecate child watcher getters and setters (#98215)
Kumar Aditya [Sat, 15 Oct 2022 23:09:30 +0000 (04:39 +0530)] 
GH-94597: Deprecate child watcher getters and setters (#98215)

This is the next step for deprecating child watchers.

Until we've removed the API completely we have to use it, so this PR is mostly suppressing a lot of warnings when using the API internally.

Once the child watcher API is totally removed, the two child watcher implementations we actually use and need (Pidfd and Thread) will be turned into internal helpers.

3 years agogh-98254: Include stdlib module names in error messages for NameErrors (#98255)
Pablo Galindo Salgado [Sat, 15 Oct 2022 22:13:33 +0000 (23:13 +0100)] 
gh-98254: Include stdlib module names in error messages for NameErrors (#98255)

3 years agoImprove speed. Reduce auxiliary memory to 16.6% of the main array. (GH-98294)
Raymond Hettinger [Sat, 15 Oct 2022 21:05:28 +0000 (16:05 -0500)] 
Improve speed. Reduce auxiliary memory to 16.6% of the main array. (GH-98294)

3 years ago[doc] Update logging cookbook with an example of custom handling of levels. (GH-98290)
Vinay Sajip [Sat, 15 Oct 2022 20:23:06 +0000 (21:23 +0100)] 
[doc] Update logging cookbook with an example of custom handling of levels. (GH-98290)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agodocs(typing): harmonize "See PEP x for more details" (#97927)
Simon Legner [Sat, 15 Oct 2022 19:17:51 +0000 (21:17 +0200)] 
docs(typing): harmonize "See PEP x for more details" (#97927)

3 years agogh-94808: Cover `str.rsplit` for UCS1, UCS2 or UCS4 (#98228)
Nikita Sobolev [Sat, 15 Oct 2022 18:40:22 +0000 (21:40 +0300)] 
gh-94808: Cover `str.rsplit` for UCS1, UCS2 or UCS4 (#98228)

3 years agoFaster sieve() recipe (#98287)
Raymond Hettinger [Sat, 15 Oct 2022 17:43:58 +0000 (12:43 -0500)] 
Faster sieve() recipe (#98287)

3 years agogh-98227: executionmodel.rst: except* can also bind names (#98256)
BiscuitCandy [Sat, 15 Oct 2022 16:04:08 +0000 (21:34 +0530)] 
gh-98227: executionmodel.rst: except* can also bind names (#98256)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agogh-94808: Cover `PyEval_GetFuncName` (#98246)
Nikita Sobolev [Sat, 15 Oct 2022 15:20:39 +0000 (18:20 +0300)] 
gh-94808: Cover `PyEval_GetFuncName` (#98246)

3 years agogh-95731: Fix module docstring extraction in pygettext (#95732)
Jakub Kuczys [Sat, 15 Oct 2022 14:57:53 +0000 (16:57 +0200)] 
gh-95731: Fix module docstring extraction in pygettext (#95732)

3 years agogh-95971: Turn @writes_bytecode_files to skip when not running (#95972)
Jeong YunWon [Sat, 15 Oct 2022 14:57:06 +0000 (23:57 +0900)] 
gh-95971: Turn @writes_bytecode_files to skip when not running (#95972)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agogh-96258: move Py_REFCNT and Py_SET_REFCNT to reference counting page (#96259)
QuakeIV [Sat, 15 Oct 2022 14:56:14 +0000 (07:56 -0700)] 
gh-96258: move Py_REFCNT and Py_SET_REFCNT to reference counting page (#96259)

3 years agogh-85455: Add missing doc strings and improve docs (#21573)
Joannah Nanjekye [Sat, 15 Oct 2022 13:31:06 +0000 (09:31 -0400)] 
gh-85455: Add missing doc strings and improve docs (#21573)

* Add missing doc strings and improve docs

* Use imperative form

* Modify docstring wording

3 years agogh-85525: Indicate supported sound header formats (#21575)
Joannah Nanjekye [Sat, 15 Oct 2022 13:30:05 +0000 (09:30 -0400)] 
gh-85525: Indicate supported sound header formats (#21575)

* Indicate supported sound header formats

* modify file names

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agogh-91485: Doc: Using Python syntax to document builtin Python functions. (GH-96579)
Julien Palard [Sat, 15 Oct 2022 10:19:35 +0000 (12:19 +0200)] 
gh-91485: Doc: Using Python syntax to document builtin Python functions. (GH-96579)

3 years agogh-98251: Allow venv to pass along PYTHON* variables to pip and ensurepip when they...
Steve Dower [Fri, 14 Oct 2022 15:58:54 +0000 (16:58 +0100)] 
gh-98251: Allow venv to pass along PYTHON* variables to pip and ensurepip when they do not impact path resolution (GH-98259)

3 years agoBpo-41246: IOCP Proactor avoid callback code duplication (#21399) 98272/head
Tony Solomonik [Thu, 13 Oct 2022 18:05:16 +0000 (21:05 +0300)] 
Bpo-41246: IOCP Proactor avoid callback code duplication (#21399)

Use the same callback function for overlapped operations recv, recv_into, recvfrom, sendto, send, and sendfile inside IocpProactor.

3 years agobpo-46364: Use sockets for stdin of asyncio only on AIX (#30596)
Christoph Hamsen [Thu, 13 Oct 2022 16:11:15 +0000 (18:11 +0200)] 
bpo-46364: Use sockets for stdin of asyncio only on AIX (#30596)

Signed-off-by: Christoph Hamsen <hamsen.christoph@posteo.de>
Co-authored-by: July Tikhonov <july.tikh@gmail.com>
3 years agogh-98178: syslog() is not thread-safe on macOS (#98213)
Victor Stinner [Thu, 13 Oct 2022 11:34:55 +0000 (13:34 +0200)] 
gh-98178: syslog() is not thread-safe on macOS (#98213)

On macOS, fix a crash in syslog.syslog() in multi-threaded
applications. On macOS, the libc syslog() function is not
thread-safe, so syslog.syslog() no longer releases the GIL to call
it.