]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 years ago[3.11] GH-93516: Backport GH-93769: Speedup line number checks when tracing (GH-94127)
Mark Shannon [Wed, 22 Jun 2022 15:32:02 +0000 (16:32 +0100)] 
[3.11] GH-93516: Backport GH-93769: Speedup line number checks when tracing (GH-94127)

Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
3 years agogh-91172: Create a workflow for verifying bundled pip and setuptools (GH-31885) ...
Miss Islington (bot) [Wed, 22 Jun 2022 13:57:56 +0000 (06:57 -0700)] 
gh-91172: Create a workflow for verifying bundled pip and setuptools (GH-31885) (GH-94121)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
(cherry picked from commit d36954b7ead06daead3dcf9b0dd9f8002eab508f)

Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
3 years agogh-93951: In test_bdb.StateTestCase.test_skip, avoid including auxiliary importers...
Miss Islington (bot) [Wed, 22 Jun 2022 12:32:30 +0000 (05:32 -0700)] 
gh-93951: In test_bdb.StateTestCase.test_skip, avoid including auxiliary importers. (GH-93962) (GH-94118)

Co-authored-by: Brett Cannon <brett@python.org>
(cherry picked from commit c029b552f39200977325d4351803bdd13ddccc4f)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
3 years agoFix typo in _io.TextIOWrapper Clinic input (GH-94037) (GH-94116)
Miss Islington (bot) [Wed, 22 Jun 2022 12:29:09 +0000 (05:29 -0700)] 
Fix typo in _io.TextIOWrapper Clinic input (GH-94037) (GH-94116)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit ca308c13daa722f3669a14f1613da768086beb6a)

Co-authored-by: fikotta <81991278+fikotta@users.noreply.github.com>
3 years agogh-94101 Disallow instantiation of SSLSession objects (GH-94102)
Miss Islington (bot) [Wed, 22 Jun 2022 10:52:35 +0000 (03:52 -0700)] 
gh-94101 Disallow instantiation of SSLSession objects (GH-94102)

Fixes GH-94101

Automerge-Triggered-By: GH:tiran
(cherry picked from commit dc8e1d0390e16e90b2f74f6bd6417324a357bc23)

Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com>
3 years agogh-74696: Do not change the current working directory in shutil.make_archive() if...
Miss Islington (bot) [Wed, 22 Jun 2022 09:18:15 +0000 (02:18 -0700)] 
gh-74696: Do not change the current working directory in shutil.make_archive() if possible (GH-93160) (GH-94105)

It is no longer changed when create a zip or tar archive.

It is still changed for custom archivers registered with shutil.register_archive_format()
if root_dir is not None.

Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit fda4b2f06364ae5ef91ecd9c09e2af380c8b0b4c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agoDOC: correct bytesarray -> bytearray in comments (GH-92410) (GH-94089)
Miss Islington (bot) [Wed, 22 Jun 2022 08:47:52 +0000 (01:47 -0700)] 
DOC: correct bytesarray -> bytearray in comments (GH-92410) (GH-94089)

(cherry picked from commit 0709586744ec58dd60492e16b08fff6dc1149a0a)

Co-authored-by: Thomas A Caswell <tcaswell@gmail.com>
3 years agobpo-30535: [doc] state that sys.meta_path is not empty by default (GH-94098) (GH...
Miss Islington (bot) [Tue, 21 Jun 2022 22:04:51 +0000 (15:04 -0700)] 
bpo-30535: [doc] state that sys.meta_path is not empty by default (GH-94098) (GH-94099)

Co-authored-by: Windson yang <wiwindson@outlook.com>
(cherry picked from commit 6575841266b83f3121c188695c7513e551ade034)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
3 years agogh-92611: Add details on replacements for cgi utility funcs (GH-92792) (GH-93967)
Miss Islington (bot) [Tue, 21 Jun 2022 21:51:27 +0000 (14:51 -0700)] 
gh-92611: Add details on replacements for cgi utility funcs (GH-92792) (GH-93967)

Per [suggestions on a Discourse thread](https://discuss.python.org/t/pep-594-take-2-removing-dead-batteries-from-the-standard-library/13508/51), discussed in GH-92611 and as a followup to PR GH-92612 , this PR add additional specific per-function replacement information for the utility functions in the `cgi` module deprecated by PEP 594 (PEP-594).

(cherry picked from commit 71354adff07f8beba8374767532bb9da34546e66)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agogh-87389: Fix an open redirection vulnerability in http.server. (GH-93879)
Miss Islington (bot) [Tue, 21 Jun 2022 21:29:03 +0000 (14:29 -0700)] 
gh-87389: Fix an open redirection vulnerability in http.server. (GH-93879)

Fix an open redirection vulnerability in the `http.server` module when
an URI path starts with `//` that could produce a 301 Location header
with a misleading target.  Vulnerability discovered, and logic fix
proposed, by Hamza Avvan (@hamzaavvan).

Test and comments authored by Gregory P. Smith [Google].
(cherry picked from commit 4abab6b603dd38bec1168e9a37c40a48ec89508e)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
3 years agogh-93021: Fix __text_signature__ for __get__ (GH-93023) (GH-94085)
Miss Islington (bot) [Tue, 21 Jun 2022 20:31:57 +0000 (13:31 -0700)] 
gh-93021: Fix __text_signature__ for __get__ (GH-93023) (GH-94085)

Because of the way wrap_descr_get is written, the second argument
to __get__ methods implemented through the wrapper is always
optional.
(cherry picked from commit 4e08fbcfdfa57ea94091aabdd09413708e3fb2bf)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agoTutorial: specify match cases don't fall through (GH-93615) (GH-94083)
Miss Islington (bot) [Tue, 21 Jun 2022 19:52:47 +0000 (12:52 -0700)] 
Tutorial: specify match cases don't fall through (GH-93615) (GH-94083)

(cherry picked from commit dd5cf84f245abf84405833320b8f25dbc43b24d2)

Co-authored-by: max <36980911+pr2502@users.noreply.github.com>
3 years ago[3.11] gh-93240: clarify wording in IO tutorial (GH-93276) (GH-94082)
Łukasz Langa [Tue, 21 Jun 2022 19:51:15 +0000 (21:51 +0200)] 
[3.11] gh-93240: clarify wording in IO tutorial (GH-93276) (GH-94082)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
(cherry picked from commit 51d673176ac90f2144e3e7a492e5b3ea53bdba2e)

Co-authored-by: paulreece <96156234+paulreece@users.noreply.github.com>
3 years ago[3.11] gh-91387: Fix tarfile test on WASI (GH-93984) (#94074)
Christian Heimes [Tue, 21 Jun 2022 19:25:39 +0000 (21:25 +0200)] 
[3.11] gh-91387: Fix tarfile test on WASI (GH-93984) (#94074)

Co-authored-by: Christian Heimes <christian@python.org>
3 years ago[3.11] gh-93675: Fix typos in `Doc/` (GH-93676) (GH-94079)
Łukasz Langa [Tue, 21 Jun 2022 19:22:27 +0000 (21:22 +0200)] 
[3.11] gh-93675: Fix typos in `Doc/` (GH-93676) (GH-94079)

Closes GH-93675
(cherry picked from commit 830513754d081619b2d72db17770627312072fa5)

Co-authored-by: luzpaz <luzpaz@users.noreply.github.com>
3 years agogh-93851: Fix all broken links in Doc/ (GH-93853) (GH-94076)
Miss Islington (bot) [Tue, 21 Jun 2022 19:06:05 +0000 (12:06 -0700)] 
gh-93851: Fix all broken links in Doc/ (GH-93853) (GH-94076)

(cherry picked from commit f62ff97f31a775cc7956adeae32c14e7c85bdc15)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
3 years agogh-91387: Strip trailing slash from tarfile longname directories (GH-32423)
Miss Islington (bot) [Tue, 21 Jun 2022 18:09:07 +0000 (11:09 -0700)] 
gh-91387: Strip trailing slash from tarfile longname directories (GH-32423)

Co-authored-by: Brett Cannon <brett@python.org>
(cherry picked from commit c1e19421c23d1261ecbbe7375316adc1c24f0a87)

Co-authored-by: Chris Fernald <chrisf671@gmail.com>
3 years agogh-86986: Drop compatibility support for Sphinx 2 (GH-93737)
Miss Islington (bot) [Tue, 21 Jun 2022 17:50:47 +0000 (10:50 -0700)] 
gh-86986: Drop compatibility support for Sphinx 2 (GH-93737)

* Revert "bpo-42843: Keep Sphinx 1.8 and Sphinx 2 compatibility (GH-24282)"

This reverts commit 5c1f15b4b1024cbf0acc85832f0c623d1a4605fd

* Revert "bpo-42579: Make workaround for various versions of Sphinx more robust (GH-23662)"

This reverts commit b63a620014b67a6e63d10783149c41baaf59def8.
(cherry picked from commit 0efe3a1636c143fe0694a8e4d25d6eae19e0d618)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
3 years agogh-94052: Don't re-run failed tests with --python option (GH-94054)
Miss Islington (bot) [Tue, 21 Jun 2022 13:07:26 +0000 (06:07 -0700)] 
gh-94052: Don't re-run failed tests with --python option (GH-94054)

(cherry picked from commit 0ff7b996f5d836e63cdaf652c7aa734285261096)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agogh-94028: Clear and reset sqlite3 statements properly in cursor iternext (GH-94042)
Miss Islington (bot) [Tue, 21 Jun 2022 11:52:47 +0000 (04:52 -0700)] 
gh-94028: Clear and reset sqlite3 statements properly in cursor iternext (GH-94042)

(cherry picked from commit 94eeac03dc8c643ff050e7d0d306637d9556f798)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
3 years agogh-94021: Address unreachable code warning in specialize code (GH-94022)
Miss Islington (bot) [Tue, 21 Jun 2022 07:01:52 +0000 (00:01 -0700)] 
gh-94021: Address unreachable code warning in specialize code (GH-94022)

(cherry picked from commit 77c839c98fe57dcb01f5cad2e65fb4cac5a052c1)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agogh-91985: Ensure in-tree builds override platstdlib_dir in every path calculation...
Miss Islington (bot) [Mon, 20 Jun 2022 18:37:27 +0000 (11:37 -0700)] 
gh-91985: Ensure in-tree builds override platstdlib_dir in every path calculation (GH-93641)

(cherry picked from commit 38af903506e9b18c6350c1dadcb489f057713f36)

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
3 years agoGH-93249: relax overly strict assertion on bounds->ar_start (GH-93961) (GH-94032)
Miss Islington (bot) [Mon, 20 Jun 2022 16:42:51 +0000 (09:42 -0700)] 
GH-93249: relax overly strict assertion on bounds->ar_start (GH-93961) (GH-94032)

(cherry picked from commit 1603a1029f44f0fdc87c65b02063229962194f84)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
3 years agogh-90539: doc: Expand on what should not go into CFLAGS, LDFLAGS (GH-92754)
Miss Islington (bot) [Mon, 20 Jun 2022 14:14:47 +0000 (07:14 -0700)] 
gh-90539: doc: Expand on what should not go into CFLAGS, LDFLAGS (GH-92754)

(cherry picked from commit 61f24e7885bed096b5d7f75aff13c1001994b35a)

Co-authored-by: Matthias Köppe <mkoeppe@math.ucdavis.edu>
3 years agogh-93937, C API: Move PyFrame_GetBack() to Python.h (#93938) (#94000)
Victor Stinner [Mon, 20 Jun 2022 13:47:41 +0000 (15:47 +0200)] 
gh-93937, C API: Move PyFrame_GetBack() to Python.h (#93938) (#94000)

Move the follow functions and type from frameobject.h to pyframe.h,
so the standard <Python.h> provide frame getter functions:

* PyFrame_Check()
* PyFrame_GetBack()
* PyFrame_GetBuiltins()
* PyFrame_GetGenerator()
* PyFrame_GetGlobals()
* PyFrame_GetLasti()
* PyFrame_GetLocals()
* PyFrame_Type

Remove #include "frameobject.h" from many C files. It's no longer
needed.

(cherry picked from commit 27b989403356ccdd47545a93aeab8434e9c69f21)

3 years agogh-84461: Silence some compiler warnings on WASM (GH-93978)
Miss Islington (bot) [Mon, 20 Jun 2022 12:08:14 +0000 (05:08 -0700)] 
gh-84461: Silence some compiler warnings on WASM (GH-93978)

(cherry picked from commit 774ef28814d0d9d57ec813cb31b0a7af6c476127)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agogh-79009: sqlite3.iterdump now correctly handles tables with autoincrement (GH-9621)
Miss Islington (bot) [Sun, 19 Jun 2022 23:25:13 +0000 (16:25 -0700)] 
gh-79009: sqlite3.iterdump now correctly handles tables with autoincrement (GH-9621)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
(cherry picked from commit affa9f22cfd1e83a5fb413e5ce2feef9ea1a49ac)

Co-authored-by: itssme <itssme3000@gmail.com>
3 years agogh-61162: Clarify sqlite3 connection context manager docs (GH-93890)
Miss Islington (bot) [Sun, 19 Jun 2022 20:27:46 +0000 (13:27 -0700)] 
gh-61162: Clarify sqlite3 connection context manager docs (GH-93890)

Explicitly note that transactions are only closed if there is an open
transation at `__exit__`, and that transactions are not implicitly
opened during `__enter__`.

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Automerge-Triggered-By: GH:erlend-aasland
(cherry picked from commit 8e0897814109765a9e463676413fff016875217b)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
3 years agogh-84461: Skip test_unwritable_directory again on Emscripten (GH-94007)
Miss Islington (bot) [Sun, 19 Jun 2022 19:57:13 +0000 (12:57 -0700)] 
gh-84461: Skip test_unwritable_directory again on Emscripten (GH-94007)

GH-93992 removed geteuid() and enabled the test again on Emscripten.
(cherry picked from commit 62363bfe59b236c324cf36cd69b6f586a125bc2b)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agogh-93925: Improve clarity of sqlite3 commit/rollback, and close docs (GH-93926)
Miss Islington (bot) [Sun, 19 Jun 2022 19:44:48 +0000 (12:44 -0700)] 
gh-93925: Improve clarity of sqlite3 commit/rollback, and close docs (GH-93926)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
(cherry picked from commit 6446592c89b0c581c00e170ae6278291e940755c)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
3 years ago[3.11] gh-84461: Fix Emscripten umask and permission issues (GH-94002) (GH-94006)
Christian Heimes [Sun, 19 Jun 2022 18:18:34 +0000 (20:18 +0200)] 
[3.11] gh-84461: Fix Emscripten umask and permission issues (GH-94002) (GH-94006)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agoGH-93990: fix refcounting bug in `add_subclass` in `typeobject.c` (GH-93989)
Miss Islington (bot) [Sun, 19 Jun 2022 09:51:22 +0000 (02:51 -0700)] 
GH-93990: fix refcounting bug in `add_subclass` in `typeobject.c` (GH-93989)

(cherry picked from commit 726448ebe15cd78e180c29c9858cb6c10a581524)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agoWhat's new in 3.10: fix link to issue (GH-93968)
Miss Islington (bot) [Sun, 19 Jun 2022 09:12:06 +0000 (02:12 -0700)] 
What's new in 3.10: fix link to issue (GH-93968)

* What's new in 3.10: fix link to issue

* What's new in 3.10: fix link to GH issue

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit 59c1b33805fe553fe6a157ae9b346153b96f7ff1)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
3 years agogh-89828: Do not relay the __class__ attribute in GenericAlias (GH-93754)
Miss Islington (bot) [Sat, 18 Jun 2022 14:41:25 +0000 (07:41 -0700)] 
gh-89828: Do not relay the __class__ attribute in GenericAlias (GH-93754)

list[int].__class__ returned type, and isinstance(list[int], type)
returned True. It caused numerous problems in code that checks
isinstance(x, type).
(cherry picked from commit f9433fff476aa13af9cb314fcc6962055faa4085)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agogh-92888: Fix memoryview bad `__index__` use after free (GH-92946)
Miss Islington (bot) [Sat, 18 Jun 2022 14:40:39 +0000 (07:40 -0700)] 
gh-92888: Fix memoryview bad `__index__` use after free (GH-92946)

Co-authored-by: chilaxan <35645806+chilaxan@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <3659035+serhiy-storchaka@users.noreply.github.com>
(cherry picked from commit 11190c4ad0d3722b8d263758ac802985131a5462)

Co-authored-by: Ken Jin <kenjin@python.org>
3 years agogh-84461: Fix pydebug Emscripten browser builds (GH-93982)
Miss Islington (bot) [Sat, 18 Jun 2022 13:17:09 +0000 (06:17 -0700)] 
gh-84461: Fix pydebug Emscripten browser builds (GH-93982)

wasm_assets script did not take the ABIFLAG flag of sysconfigdata into
account.
(cherry picked from commit 7a2cc35e1ca6808a735b90269756d5286077a152)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agogh-84461: Fix circulare dependency on BUILDPYTHON (GH-93977)
Miss Islington (bot) [Sat, 18 Jun 2022 08:56:25 +0000 (01:56 -0700)] 
gh-84461: Fix circulare dependency on BUILDPYTHON (GH-93977)

(cherry picked from commit 084023ccbeb3bf54a2e19873c6a4b0bec7b617f6)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agoGH-89858: Fix test_embed for out-of-tree builds (GH-93465)
Miss Islington (bot) [Sat, 18 Jun 2022 05:11:59 +0000 (22:11 -0700)] 
GH-89858: Fix test_embed for out-of-tree builds (GH-93465)

(cherry picked from commit 96464e5401783c99f1ae24369bb2a854b8c5f46a)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agoGH-83658: make multiprocessing.Pool raise an exception if maxtasksperchild is not...
Miss Islington (bot) [Fri, 17 Jun 2022 22:31:42 +0000 (15:31 -0700)] 
GH-83658: make multiprocessing.Pool raise an exception if maxtasksperchild is not None or a positive int (GH-93364) (GH-93923)

3 years agoGH-91389: Fix dis position information for CACHEs (GH-93663) (GH-93921)
Brandt Bucher [Fri, 17 Jun 2022 17:26:20 +0000 (10:26 -0700)] 
GH-91389: Fix dis position information for CACHEs (GH-93663) (GH-93921)

(cherry picked from commit f8e576be0a7cd38f753f31cf4178db81a602fc32)

3 years agogh-74953: Fix PyThread_acquire_lock_timed() code recomputing the timeout (GH-93941)
Miss Islington (bot) [Fri, 17 Jun 2022 14:39:27 +0000 (07:39 -0700)] 
gh-74953: Fix PyThread_acquire_lock_timed() code recomputing the timeout (GH-93941)

Set timeout, don't create a local variable with the same name.
(cherry picked from commit f64557f4803528c53bb9a1d565e3cdf92e97152f)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agogh-89745: Avoid exact match when comparing program_name in test_embed on Windows...
Miss Islington (bot) [Fri, 17 Jun 2022 10:31:03 +0000 (03:31 -0700)] 
gh-89745: Avoid exact match when comparing program_name in test_embed on Windows (GH-93888)

(cherry picked from commit ffc228dd4e409336f2c2ad54125de384bf1a767b)

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
3 years agotest_logging: Fix BytesWarning in SysLogHandlerTest (GH-93920)
Miss Islington (bot) [Fri, 17 Jun 2022 09:53:35 +0000 (02:53 -0700)] 
test_logging: Fix BytesWarning in SysLogHandlerTest (GH-93920)

(cherry picked from commit 538f28921f67e36617272faa662375d305d9284c)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agogh-91404: Revert "bpo-23689: re module, fix memory leak when a match is terminated...
Miss Islington (bot) [Fri, 17 Jun 2022 08:43:56 +0000 (01:43 -0700)] 
gh-91404: Revert "bpo-23689: re module, fix memory leak when a match is terminated by a signal or allocation failure (GH-32283) (GH-93882)

Revert "bpo-23689: re module, fix memory leak when a match is terminated by a signal or memory allocation failure (GH-32283)"

This reverts commit 6e3eee5c11b539e9aab39cff783acf57838c355a.

Manual fixups to increase the MAGIC number and to handle conflicts with
a couple of changes that landed after that.

Thanks for reviews by Ma Lin and Serhiy Storchaka.
(cherry picked from commit 4beee0c7b0c2cc78a893dde88fd8e34099dcf877)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
3 years agogh-91877: Fix WriteTransport.get_write_buffer_{limits,size} docs (#92338) (#93806)
Kumar Aditya [Fri, 17 Jun 2022 08:18:00 +0000 (13:48 +0530)] 
gh-91877: Fix WriteTransport.get_write_buffer_{limits,size} docs (#92338) (#93806)

- Amend docs for WriteTransport.get_write_buffer_limits
- Add docs for WriteTransport.get_write_buffer_size

Co-authored-by: Sanket Shanbhag <TechieBoy@users.noreply.github.com>
3 years agogh-93847: Fix repr of enum of generic aliases (GH-93885)
Miss Islington (bot) [Fri, 17 Jun 2022 05:00:22 +0000 (22:00 -0700)] 
gh-93847: Fix repr of enum of generic aliases (GH-93885)

(cherry picked from commit 138db8e48b0bb006b1561f8ec76ade97afc6cbd7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agogh-93820: Fix copy() regression in enum.Flag (GH-93876) (#93886)
Miss Islington (bot) [Fri, 17 Jun 2022 03:56:20 +0000 (20:56 -0700)] 
gh-93820: Fix copy() regression in enum.Flag (GH-93876) (#93886)

GH-26658 introduced a regression in copy / pickle protocol for combined
`enum.Flag`s. `copy.copy(re.A | re.I)` would fail with
`AttributeError: ASCII|IGNORECASE`.

`enum.Flag` now has a `__reduce_ex__()` method that reduces flags by
combined value, not by combined name.
(cherry picked from commit 05b32c1c796d6c80479756ae898f488eac5f4f71)

Co-authored-by: Christian Heimes <christian@python.org>
Co-authored-by: Christian Heimes <christian@python.org>
3 years agogh-91731: Don't define 'static_assert' in C++11 where is a keyword to avoid UB (GH...
Miss Islington (bot) [Thu, 16 Jun 2022 14:50:15 +0000 (07:50 -0700)] 
gh-91731: Don't define 'static_assert' in C++11 where is a keyword to avoid UB (GH-93700)

(cherry picked from commit 65ff27c7d30b84655bf8caf6e396c65485708148)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
3 years agogh-91577: SharedMemory move imports out of methods (GH-91579)
Miss Islington (bot) [Thu, 16 Jun 2022 14:07:32 +0000 (07:07 -0700)] 
gh-91577: SharedMemory move imports out of methods (GH-91579)

SharedMemory.unlink() uses the unregister() function from resource_tracker. Previously it was imported in the method, but this can fail if the method is called during interpreter shutdown, for example when unlink is part of a __del__() method.

Moving the import to the top of the file, means that the unregister() method is available during interpreter shutdown.

The register call in SharedMemory.__init__() can also use this imported resource_tracker.
(cherry picked from commit 9a458befdd68625d088f4fea7df135a57d147deb)

Co-authored-by: samtygier <samtygier@yahoo.co.uk>
3 years agogh-91321: Fix test_cppext for C++03 (GH-93902) (#93904)
Miss Islington (bot) [Thu, 16 Jun 2022 13:17:35 +0000 (06:17 -0700)] 
gh-91321: Fix test_cppext for C++03 (GH-93902) (#93904)

Don't build _testcppext.cpp with -Wzero-as-null-pointer-constant when
testing C++03: only use this compiler flag with C++11.
(cherry picked from commit a38c2a61d585fce0973e93dd590551ccddd947fb)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
3 years ago[3.11] GH-93662: Make sure that column offsets are correct in multi-line method calls...
Irit Katriel [Thu, 16 Jun 2022 10:56:35 +0000 (11:56 +0100)] 
[3.11] GH-93662: Make sure that column offsets are correct in multi-line method calls. (GH-93673) (#93895)

Co-authored-by: Mark Shannon <mark@hotpy.org>
3 years agogh-84461: Document how to install SDKs manually (GH-93844)
Miss Islington (bot) [Wed, 15 Jun 2022 19:53:51 +0000 (12:53 -0700)] 
gh-84461: Document how to install SDKs manually (GH-93844)

Co-authored-by: Brett Cannon <brett@python.org>
(cherry picked from commit 8ba1c7f72010dedb80f0794c5f1dd1c97f81ec83)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agogh-93824: Reenable installation of shell extension on Windows ARM64 (GH-93825)
Miss Islington (bot) [Wed, 15 Jun 2022 16:34:32 +0000 (09:34 -0700)] 
gh-93824: Reenable installation of shell extension on Windows ARM64 (GH-93825)

(cherry picked from commit 99be1cbeb3b58f0daa9108abc4075412d6212169)

Co-authored-by: Steve Dower <steve.dower@python.org>
3 years agoGH-93850: Fix test_asyncio exception ignored tracebacks (GH-93854)
Miss Islington (bot) [Wed, 15 Jun 2022 15:10:40 +0000 (08:10 -0700)] 
GH-93850: Fix test_asyncio exception ignored tracebacks (GH-93854)

(cherry picked from commit b415c5f1aa29259d5d18a5d85b9365430614383a)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agogh-93857: Fix broken audit-event targets in sqlite3 docs (GH-93859)
Miss Islington (bot) [Wed, 15 Jun 2022 14:09:37 +0000 (07:09 -0700)] 
gh-93857: Fix broken audit-event targets in sqlite3 docs (GH-93859)

Corrected targets for the following audit-events:

- sqlite3.enable_load_extension => sqlite3.Connection.enable_load_extension
- sqlite3.load_extension => sqlite3.Connection.load_extension
(cherry picked from commit ce4d11f98b30ec62f56a0653a212f0f78ca08b59)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
3 years agogh-87260: Update sqlite3 signature docs to reflect actual implementation (GH-93840)
Miss Islington (bot) [Wed, 15 Jun 2022 10:35:48 +0000 (03:35 -0700)] 
gh-87260: Update sqlite3 signature docs to reflect actual implementation (GH-93840)

Align the docs for the following methods with the actual implementation:

- sqlite3.complete_statement()
- sqlite3.Connection.create_function()
- sqlite3.Connection.create_aggregate()
- sqlite3.Connection.set_progress_handler()
(cherry picked from commit d31834688bccb41fc136f780db83ffa12bef8cbd)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
3 years ago[3.11] gh-89018: Improve documentation of `sqlite3` exceptions (GH-27645) (#93836)
Erlend Egeberg Aasland [Wed, 15 Jun 2022 09:36:55 +0000 (11:36 +0200)] 
[3.11] gh-89018: Improve documentation of `sqlite3` exceptions (GH-27645) (#93836)

- Order exceptions as in PEP 249
- Reword descriptions, so they match the current behaviour

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit bb0b7689465c3aac3b1d7f68c8990009462c1ae5)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
3 years agogh-93183: Adjust wording in socket docs (GH-93832)
Miss Islington (bot) [Wed, 15 Jun 2022 08:44:14 +0000 (01:44 -0700)] 
gh-93183: Adjust wording in socket docs (GH-93832)

package => packet

Co-authored-by: Victor Norman
(cherry picked from commit cdd39843073fc27b8e4a887d5d3b7992cb2ced60)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
3 years agogh-93735: Split Docs CI to speed-up the build (GH-93736)
Miss Islington (bot) [Wed, 15 Jun 2022 08:23:08 +0000 (01:23 -0700)] 
gh-93735: Split Docs CI to speed-up the build (GH-93736)

(cherry picked from commit 4f26963526f386bba84de8e14962163bfd5da955)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
3 years agogh-92914: Round the allocated size for lists up to the even number (GH-92915) 93822/head
Miss Islington (bot) [Tue, 14 Jun 2022 19:16:21 +0000 (12:16 -0700)] 
gh-92914: Round the allocated size for lists up to the even number (GH-92915)

(cherry picked from commit 8a6af5a34642f5564220eb50d72caada8f17fc78)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agogh-90300: split --help output into separate options (GH-30331)
Miss Islington (bot) [Tue, 14 Jun 2022 19:15:42 +0000 (12:15 -0700)] 
gh-90300: split --help output into separate options (GH-30331)

Make --help output shorter and add new help options.

--help-env, --help-xoptions and --help-all command-line options are
added to complement --help.
(cherry picked from commit 8aa9d40b00741213c5a53b1ae15509998893ae31)

Co-authored-by: Éric <earaujo@caravan.coop>
3 years agogh-79512: Fixed names and __module__ value of weakref classes (GH-93719)
Miss Islington (bot) [Tue, 14 Jun 2022 19:12:51 +0000 (12:12 -0700)] 
gh-79512: Fixed names and __module__ value of weakref classes (GH-93719)

Classes ReferenceType, ProxyType and CallableProxyType have now correct
atrtributes __module__, __name__ and __qualname__.
It makes them (types, not instances) pickleable.
(cherry picked from commit 8352e322e87ba39c71e578b65ad8ae156ca3e0c7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years ago[3.11] gh-91162: Support splitting of unpacked arbitrary-length tuple over TypeVar...
Miss Islington (bot) [Tue, 14 Jun 2022 18:15:56 +0000 (11:15 -0700)] 
[3.11] gh-91162: Support splitting of unpacked arbitrary-length tuple over TypeVar and TypeVarTuple parameters (alt) (GH-93412) (GH-93746)

For example:

  A[T, *Ts][*tuple[int, ...]] -> A[int, *tuple[int, ...]]
  A[*Ts, T][*tuple[int, ...]] -> A[*tuple[int, ...], int]
(cherry picked from commit 3473817106c23eca7341c931453da0341c367e1d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years ago[3.11] gh-93795: Use test.support TESTFN/unlink in sqlite3 tests (GH-93796) (#93808)
Erlend Egeberg Aasland [Tue, 14 Jun 2022 15:41:32 +0000 (17:41 +0200)] 
[3.11] gh-93795: Use test.support TESTFN/unlink in sqlite3 tests (GH-93796) (#93808)

3 years agogh-91321: Fix compatibility with C++ older than C++11 (#93784) (#93802)
Victor Stinner [Tue, 14 Jun 2022 14:05:14 +0000 (16:05 +0200)] 
gh-91321: Fix compatibility with C++ older than C++11 (#93784) (#93802)

* Fix the compatibility of the Python C API with C++ older than C++11.
* _Py_NULL is only defined as nullptr on C++11 and newer.

(cherry picked from commit 4caf5c2753f1aa28d6f4bc1aa377975fd2a62331)

* test_cppext now builds the C++ extension with setuptools.
* Add @test.support.requires_venv_with_pip.

(cherry picked from commit ca0cc9c433830e14714a5cc93fb4e7254da3dd76)

3 years ago[3.11] gh-79579: Improve DML query detection in sqlite3 (GH-93623) (#93800)
Erlend Egeberg Aasland [Tue, 14 Jun 2022 12:49:22 +0000 (14:49 +0200)] 
[3.11] gh-79579: Improve DML query detection in sqlite3 (GH-93623) (#93800)

The fix involves using pysqlite_check_remaining_sql(), not only to check
for multiple statements, but now also to strip leading comments and
whitespace from SQL statements, so we can improve DML query detection.

pysqlite_check_remaining_sql() is renamed lstrip_sql(), to more
accurately reflect its function, and hardened to handle more SQL comment
corner cases.
(cherry picked from commit 46740073ef32bf83964c39609c7a7a4772c51ce3)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
3 years ago[3.11] gh-93741: Add private C API _PyImport_GetModuleAttrString() (GH-93742) (GH...
Serhiy Storchaka [Tue, 14 Jun 2022 05:51:39 +0000 (08:51 +0300)] 
[3.11] gh-93741: Add private C API _PyImport_GetModuleAttrString() (GH-93742) (GH-93792)

It combines PyImport_ImportModule() and PyObject_GetAttrString()
and saves 4-6 lines of code on every use.

Add also _PyImport_GetModuleAttr() which takes Python strings as arguments.
(cherry picked from commit 6fd4c8ec7740523bb81191c013118d9d6959bc9d)

3 years agogh-84461: Fix parallel testing on WebAssembly (GH-93768)
Miss Islington (bot) [Mon, 13 Jun 2022 18:15:46 +0000 (11:15 -0700)] 
gh-84461: Fix parallel testing on WebAssembly (GH-93768)

(cherry picked from commit c2007573dd449ae054f9fd5227e49ac9eef00ae8)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agogh-93353: Fix importlib.resources._tempfile() finalizer (GH-93377)
Miss Islington (bot) [Mon, 13 Jun 2022 17:49:48 +0000 (10:49 -0700)] 
gh-93353: Fix importlib.resources._tempfile() finalizer (GH-93377)

Fix the importlib.resources.as_file() context manager to remove the
temporary file if destroyed late during Python finalization: keep a
local reference to the os.remove() function. Patch by Victor Stinner.
(cherry picked from commit 443ca731d6b1267fe2f92985e0490460c95e44a8)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agogh-93461: Invalidate sys.path_importer_cache entries with relative paths (GH-93653)
Miss Islington (bot) [Mon, 13 Jun 2022 06:29:59 +0000 (23:29 -0700)] 
gh-93461: Invalidate sys.path_importer_cache entries with relative paths (GH-93653)

(cherry picked from commit 09243b898a13f3f61e275c1031143d1225e70916)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agoChange list to view object (GH-93661)
Miss Islington (bot) [Sat, 11 Jun 2022 11:20:52 +0000 (04:20 -0700)] 
Change list to view object (GH-93661)

(cherry picked from commit 5d8e7a124098add18a17b12270a66ca26b8cc058)

Co-authored-by: Pamela Fox <pamela.fox@gmail.com>
3 years agogh-86404: [doc] A make sucpicious false positive. (GH-93710)
Miss Islington (bot) [Sat, 11 Jun 2022 11:06:44 +0000 (04:06 -0700)] 
gh-86404: [doc] A make sucpicious false positive. (GH-93710)

(cherry picked from commit bc3b31ea776ecb7088c8c2acd121499be8e8638b)

Co-authored-by: Julien Palard <julien@palard.fr>
3 years agogh-90473: Skip test_queue when threading is not available (GH-93712)
Miss Islington (bot) [Sat, 11 Jun 2022 10:20:28 +0000 (03:20 -0700)] 
gh-90473: Skip test_queue when threading is not available (GH-93712)

(cherry picked from commit f0b7aa71c4a1330294c14b0c6f02e6c43e09c317)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agogh-90153: whatsnew: "z" option in format spec (GH-93624)
Miss Islington (bot) [Sat, 11 Jun 2022 10:14:24 +0000 (03:14 -0700)] 
gh-90153:  whatsnew: "z" option in format spec (GH-93624)

Add what's new entry for PEP 682 in Python 3.11.
(cherry picked from commit 010284b46b604bb07a99775a2e51475b720da030)

Co-authored-by: John Belmonte <john@neggie.net>
3 years agogh-84461: Use HOSTRUNNER to run regression tests (GH-93694) 93715/head 93718/head
Miss Islington (bot) [Sat, 11 Jun 2022 07:04:35 +0000 (00:04 -0700)] 
gh-84461: Use HOSTRUNNER to run regression tests (GH-93694)

Co-authored-by: Brett Cannon <brett@python.org>
(cherry picked from commit dc5e02b2f44dada145a3743ef77b07dbcf3e4a4a)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agogh-92930: _pickle.c: Acquire strong references before calling save() (GH-92931)
Miss Islington (bot) [Sat, 11 Jun 2022 03:52:41 +0000 (20:52 -0700)] 
gh-92930: _pickle.c: Acquire strong references before calling save() (GH-92931)

(cherry picked from commit 4c496f1f115a7910d4606b4de233d14874c77bfa)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
3 years agogh-92886: Fix tests that fail when running with optimizations (`-O`) in `test_zipimpo...
Miss Islington (bot) [Fri, 10 Jun 2022 23:25:53 +0000 (16:25 -0700)] 
gh-92886: Fix tests that fail when running with optimizations (`-O`) in `test_zipimport.py` (GH-93236)

(cherry picked from commit 484a2357c8385694a077cf2ce0517f327fb0b172)

Co-authored-by: jackh-ncl <1750152+jackh-ncl@users.noreply.github.com>
3 years agogh-91317: Document that Path does not collapse initial `//` (GH-32193)
Miss Islington (bot) [Fri, 10 Jun 2022 23:07:19 +0000 (16:07 -0700)] 
gh-91317: Document that Path does not collapse initial `//` (GH-32193)

Documentation for `pathlib` says:

> Spurious slashes and single dots are collapsed, but double dots ('..') are not, since this would change the meaning of a path in the face of symbolic links:

However, it omits that initial double slashes also aren't collapsed.

Later, in documentation of `PurePath.drive`, `PurePath.root`, and `PurePath.name` it mentions UNC but:

- this abbreviation says nothing to a person who is unaware about existence of UNC (Wikipedia doesn't help either by [giving a disambiguation page](https://en.wikipedia.org/wiki/UNC))
- it shows up only if a person needs to use a specific property or decides to fully learn what the module provides.

For context, see the BPO entry.
(cherry picked from commit 78f1a436949209dab1f4a9d04036a1a42b165086)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
3 years agogh-93671: Avoid exponential backtracking in deeply nested sequence patterns in match...
Miss Islington (bot) [Fri, 10 Jun 2022 16:21:04 +0000 (09:21 -0700)] 
gh-93671: Avoid exponential backtracking in deeply nested sequence patterns in match statements (GH-93680)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 53a8b17895e91d08f76a2fb59a555d012cd85ab4)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
3 years agobpo-42658: Allow _winapi.LCMapStringEx to handle embedded nulls (GH-93688)
Steve Dower [Fri, 10 Jun 2022 16:09:37 +0000 (17:09 +0100)] 
bpo-42658: Allow _winapi.LCMapStringEx to handle embedded nulls (GH-93688)

3 years agogh-90549: Fix leak of global named resources using multiprocessing spawn (GH-30617)
Miss Islington (bot) [Fri, 10 Jun 2022 15:04:55 +0000 (08:04 -0700)] 
gh-90549: Fix leak of global named resources using multiprocessing spawn (GH-30617)

Co-authored-by: XD Trol <milestonejxd@gmail.com>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
(cherry picked from commit 30610d28374f5a9698d456cebf3ae496ac01af51)

Co-authored-by: Leo Trol <milestone.jxd@gmail.com>
3 years agogh-93391: fix typo in `array` docs (GH-93392) (GH-93394)
Miss Islington (bot) [Fri, 10 Jun 2022 14:12:51 +0000 (07:12 -0700)] 
gh-93391: fix typo in `array` docs (GH-93392) (GH-93394)

Fixes GH-93391

(cherry picked from commit fc694364cc6745eefba0afc3ea2c5283bbb64a3b)

Co-authored-by: ynfle <23086821+ynfle@users.noreply.github.com>
3 years ago📝 Make sure the phrase "constant-time compare" actually appears in the docs (GH-93396...
Miss Islington (bot) [Fri, 10 Jun 2022 14:11:15 +0000 (07:11 -0700)] 
📝 Make sure the phrase "constant-time compare" actually appears in the docs (GH-93396) (GH-93399)

This is purely for SEO as this is the actual generic name for this kind of method and it currently does not appear in a Google search for "python constant time compare". Not creating an issue or setting this up for backports as its trivial (I think) and not a functional change.
(cherry picked from commit 8241a6971e6051ba10040af6b50f9236faa0c892)

Co-authored-by: Noah Kantrowitz <noah@coderanger.net>
3 years agogh-93372: Fix typo in os.rename documentation (GH-93401) (GH-93403)
Miss Islington (bot) [Fri, 10 Jun 2022 14:10:14 +0000 (07:10 -0700)] 
gh-93372: Fix typo in os.rename documentation (GH-93401) (GH-93403)

(cherry picked from commit e7aab7c92a7c2e4317023c71e847d55cf5c49f5f)

Co-authored-by: Wei-Ting Yang <74453331+Yang-Wei-Ting@users.noreply.github.com>
3 years agogh-87961: Remove outdated notes from functions that aren't in the Limited API (GH...
Miss Islington (bot) [Fri, 10 Jun 2022 14:04:23 +0000 (07:04 -0700)] 
gh-87961: Remove outdated notes from functions that aren't in the Limited API (GH-93581) (GH-93604)

Nowadays everything that *is* in the Limited API has a note added
automatically.
These notes could mislead people to think that these functions
could never be added to the limited API. Remove them.

(cherry picked from commit 2c3fe5eeb2b64deb2132d9259e74b521c14fd92d)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
3 years agogh-90494: Reject 6th element of the __reduce__() tuple (GH-93609) (GH-93631)
Miss Islington (bot) [Fri, 10 Jun 2022 14:00:19 +0000 (07:00 -0700)] 
gh-90494: Reject 6th element of the __reduce__() tuple (GH-93609) (GH-93631)

copy.copy() and copy.deepcopy() now always raise a TypeError if
__reduce__() returns a tuple with length 6 instead of silently ignore
the 6th item or produce incorrect result.
(cherry picked from commit a365dd64c2a1f0d142540d5031003f24986f489f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agogh-93491: Add support tier detection to configure (GH-93492)
Miss Islington (bot) [Fri, 10 Jun 2022 13:50:26 +0000 (06:50 -0700)] 
gh-93491: Add support tier detection to configure (GH-93492)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
(cherry picked from commit 3124d9a5aafb64431aa9facd0ae0e12201be77fa)

Co-authored-by: Christian Heimes <christian@python.org>
3 years ago[3.11] gh-90763: Modernise xx template module initialisation (GH-93078) (#93681)
Erlend Egeberg Aasland [Fri, 10 Jun 2022 11:28:48 +0000 (13:28 +0200)] 
[3.11] gh-90763: Modernise xx template module initialisation (GH-93078) (#93681)

Use C APIs such as PyModule_AddType instead of PyModule_AddObject.
Also remove incorrect module decrefs if module fails to initialise.
(cherry picked from commit a87c9b538fbfc42883417c4d5e69f1a5922690e3)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
3 years agobpo-42658: Use LCMapStringEx in ntpath.normcase to match OS behaviour for case-foldin...
Steve Dower [Fri, 10 Jun 2022 10:14:25 +0000 (11:14 +0100)] 
bpo-42658: Use LCMapStringEx in ntpath.normcase to match OS behaviour for case-folding (GH-93591)

* bpo-42658: Use LCMapStringEx in ntpath.normcase to match OS behaviour for case-folding (GH-32010)

* Use AsWideCharString to avoid memory leaks in deprectated unicode converter

Co-authored-by: AN Long <aisk@users.noreply.github.com>
3 years agogh-92434: Silence compiler warning in Modules/_sqlite/connection.c on 32-bit systems...
Miss Islington (bot) [Fri, 10 Jun 2022 08:37:38 +0000 (01:37 -0700)] 
gh-92434: Silence compiler warning in Modules/_sqlite/connection.c on 32-bit systems (GH-93090)

(cherry picked from commit d8395eb38d3d05f74a7f348da81a280ad272b8c8)

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
3 years agogh-90473: Skip get_config_h() tests on WASI (GH-93645)
Miss Islington (bot) [Thu, 9 Jun 2022 16:32:52 +0000 (09:32 -0700)] 
gh-90473: Skip get_config_h() tests on WASI (GH-93645)

(cherry picked from commit 6099611af5b9688f015ae4796501ce101a1c2f32)

Co-authored-by: Christian Heimes <christian@python.org>
3 years ago[3.11] Improve logging documentation with example and additional cookbook re… (GH...
Miss Islington (bot) [Thu, 9 Jun 2022 16:28:34 +0000 (09:28 -0700)] 
[3.11] Improve logging documentation with example and additional cookbook re… (GH-93644) (GH-93647)

3 years agogh-90473: disable user site packages on WASI/Emscripten (GH-93633)
Miss Islington (bot) [Thu, 9 Jun 2022 16:12:51 +0000 (09:12 -0700)] 
gh-90473: disable user site packages on WASI/Emscripten (GH-93633)

(cherry picked from commit 5a4af3ab030a3f3e708ee83d7d4ca3cb2d5b7360)

Co-authored-by: Christian Heimes <christian@python.org>
3 years ago[3.11] gh-79096: Protect cookie file created by {LWP,Mozilla}CookieJar.save() (GH...
Łukasz Langa [Thu, 9 Jun 2022 14:16:37 +0000 (16:16 +0200)] 
[3.11] gh-79096: Protect cookie file created by {LWP,Mozilla}CookieJar.save() (GH-93463) (GH-93636)

Note: This change is not effective on Microsoft Windows.

Cookies can store sensitive information and should therefore be protected
against unauthorized third parties. This is also described in issue #79096.

The filesystem permissions are currently set to 644, everyone can read the
file. This commit changes the permissions to 600, only the creater of the file
can read and modify it. This improves security, because it reduces the attack
surface. Now the attacker needs control of the user that created the cookie or
a ways to circumvent the filesystems permissions.

This change is backwards incompatible. Systems that rely on world-readable
cookies will breake. However, one could argue that those are misconfigured in
the first place.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Pascal Wittmann <mail@pascal-wittmann.de>
Co-authored-by: Christian Heimes <christian@python.org>
3 years agoDoc: Update references and examples of old, unsupported OSes and uarches (GH-92791...
Miss Islington (bot) [Thu, 9 Jun 2022 14:15:33 +0000 (07:15 -0700)] 
Doc: Update references and examples of old, unsupported OSes and uarches (GH-92791) (GH-93638)

(cherry picked from commit a5ba0f4ebca5020f6c77718a20663e0ac6e194ac)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agogh-93616: Fix env changed issue in test_modulefinder (GH-93617)
Miss Islington (bot) [Thu, 9 Jun 2022 07:02:39 +0000 (00:02 -0700)] 
gh-93616: Fix env changed issue in test_modulefinder (GH-93617)

(cherry picked from commit cffa4f7854eb11e21c25026b24e9ccd14763c8d3)

Co-authored-by: Christian Heimes <christian@python.org>
3 years ago[3.11] gh-93575: Use correct way to calculate PyUnicode struct sizes (GH-93602) ...
Christian Heimes [Wed, 8 Jun 2022 20:21:20 +0000 (22:21 +0200)] 
[3.11] gh-93575: Use correct way to calculate PyUnicode struct sizes (GH-93602) (GH-93613)

* gh-93575: Use correct way to calculate PyUnicode struct sizes

* Add comment to keep test_sys and test_unicode in sync

* Fix case code < 256.
(cherry picked from commit 5442561c1a094b68900198bade616da9ed509ac8)

Co-authored-by: Christian Heimes <christian@python.org>
3 years ago[3.11] gh-90473: Define HOSTRUNNER for WASI (GH-93606) (GH-93612)
Christian Heimes [Wed, 8 Jun 2022 20:21:04 +0000 (22:21 +0200)] 
[3.11] gh-90473: Define HOSTRUNNER for WASI (GH-93606) (GH-93612)

(cherry picked from commit 22df2e0322300d25c1255ceb73cacc0ebd96b20e)

Co-authored-by: Christian Heimes <christian@python.org>
3 years ago[3.11] gh-93584: Make all install+tests targets depends on all (GH-93589) (GH-93603)
Christian Heimes [Wed, 8 Jun 2022 15:24:30 +0000 (17:24 +0200)] 
[3.11] gh-93584: Make all install+tests targets depends on all (GH-93589) (GH-93603)

All install targets use the "all" target as synchronization point to
prevent race conditions with PGO builds. PGO builds use recursive make,
which can lead to two parallel `./python setup.py build` processes that
step on each others toes.

"test" targets now correctly compile PGO build in a clean repo.
(cherry picked from commit 243ed5439c32e8517aa745bc2ca9774d99c99d0f)

Co-authored-by: Christian Heimes <christian@python.org>
3 years ago[3.11] GH-93481: Suppress expected deprecation warning in test_pyclbr (GH-93483)...
Irit Katriel [Wed, 8 Jun 2022 15:16:46 +0000 (16:16 +0100)] 
[3.11] GH-93481: Suppress expected deprecation warning in test_pyclbr (GH-93483) (GH-93601)

(cherry picked from commit f8eae6f5c35e9def07a732f6bc7744aae106f9b2)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>