Commit graph

117424 commits

Author SHA1 Message Date
Miss Islington (bot)
d2be5c73ed
[3.12] gh-104341: Call _PyEval_ReleaseLock() with NULL When Finalizing the Current Thread (gh-105109) (gh-105209)
This avoids the problematic race in drop_gil() by skipping the FORCE_SWITCHING code there for finalizing threads.

(The idea for this approach came out of discussions with @markshannon.)
(cherry picked from commit 3698fda)

Co-authored-by: Eric Snow ericsnowcurrently@gmail.com
2023-06-01 22:50:28 +00:00
Miss Islington (bot)
c38ceb032d
[3.12] gh-105020: Share tp_bases and tp_mro Between Interpreters For All Static Builtin Types (gh-105115) (gh-105124)
In gh-103912 we added tp_bases and tp_mro to each PyInterpreterState.types.builtins entry.  However, doing so ignored the fact that both PyTypeObject fields are public API, and not documented as internal (as opposed to tp_subclasses).  We address that here by reverting back to shared objects, making them immortal in the process.
(cherry picked from commit 7be667d)

Co-authored-by: Eric Snow ericsnowcurrently@gmail.com
2023-06-01 22:24:55 +00:00
Erlend E. Aasland
83c7386cee
[3.12] GH-89886: Bump to GNU Autoconf v2.71 (#104925) (#105207)
Co-authored-by: Christian Heimes <christian@python.org>
2023-06-01 22:19:19 +00:00
Miss Islington (bot)
25543aecfe
[3.12] gh-103142: Upgrade binary builds and CI to OpenSSL 1.1.1u (GH-105174) (#105199)
gh-103142: Upgrade binary builds and CI to OpenSSL 1.1.1u (GH-105174)

Upgrade builds to OpenSSL 1.1.1u.

This OpenSSL version addresses a pile if less-urgent CVEs since 1.1.1t.

The Mac/BuildScript/build-installer.py was already updated.

Also updates _ssl_data_111.h from OpenSSL 1.1.1u, _ssl_data_300.h from 3.0.9, and adds a new _ssl_data_31.h file from 3.1.1 along with the ssl.c code to use it.

Manual edits to the _ssl_data_300.h file prevent it from removing any existing definitions in case those exist in some peoples builds and were important (avoiding regressions during backporting).

backports of this prior to 3.12 will not include the openssl 3.1 header.
(cherry picked from commit ede89af605)

Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
2023-06-01 17:13:35 +00:00
Miss Islington (bot)
6375287b37
[3.12] gh-89886: Rely on HAVE_SYS_TIME_H (GH-105058) (#105192)
Quoting autoconf (v2.71):

    All current systems provide time.h; it need not be checked for.
    Not all systems provide sys/time.h, but those that do, all allow
    you to include it and time.h simultaneously.

(cherry picked from commit 9ab587b714)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-01 12:08:37 +00:00
Miss Islington (bot)
dbd7d7c8e1
gh-105146: Update links at end of Windows installer (uninstall/repair) (GH-105147)
(cherry picked from commit ed86e14b16)

Co-authored-by: Steve Dower <steve.dower@python.org>
2023-05-31 22:42:48 +01:00
Miss Islington (bot)
8b516668f2
[3.12] gh-102251: Explicitly free state for test modules with state in test_import (GH-105085) (#105170)
(cherry picked from commit a99b9d911e)

Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-05-31 21:34:21 +00:00
Eric Snow
f87c6d1894
[3.12] gh-102304: Fix 2 New Stable ABI Functions (gh-104762) (gh-105123) 2023-05-31 15:17:24 -06:00
Barney Gale
e7cb216339
[3.12] GH-105113: Improve performance of pathlib.PurePath.match() (GH-105114)
We now compile a `re.Pattern` object for the entire pattern. This is made
more difficult by `fnmatch` not treating directory separators as special
when evaluating wildcards (`*`, `?`, etc), and so we arrange the path parts
onto separate *lines* in a string, and ensure we don't set `re.DOTALL`.

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-05-31 21:37:37 +01:00
Miss Islington (bot)
076f3cda14
[3.12] gh-105144: Runtime-checkable protocols: move all 'sanity checks' to _ProtocolMeta.__subclasscheck__ (GH-105152) (#105160)
(cherry picked from commit c05c31db8c)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-05-31 17:35:03 +00:00
Miss Islington (bot)
4f477c796c
[3.12] gh-87729: add LOAD_SUPER_ATTR to 3.12 What's New (GH-105125) (#105143) 2023-05-31 07:47:03 -06:00
Miss Islington (bot)
d3c21a9f33
[3.12] gh-97933: add LOAD_FAST_AND_CLEAR to 3.12 What's New bytecode section (GH-105126) (#105142) 2023-05-31 07:46:26 -06:00
Victor Stinner
01b42f9559
[3.12] gh-105096: Reformat wave documentation (#105136) (#105138)
gh-105096: Reformat wave documentation (#105136)

Add ".. class::" markups in the wave documentation.

* Reformat also wave.py (minor PEP 8 changes).
* Remove redundant "import struct": it's already imported at top
  level.
* Remove wave.rst from .nitignore

(cherry picked from commit 85e5d03163)
2023-05-31 12:04:21 +00:00
Miss Islington (bot)
c687946f68
[3.12] gh-105069: Add a readline-like callable to the tokenizer to consume input iteratively (GH-105070) (#105119)
gh-105069: Add a readline-like callable to the tokenizer to consume input iteratively (GH-105070)
(cherry picked from commit 9216e69a87)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2023-05-31 11:11:53 +01:00
Miss Islington (bot)
2f8c22f1d6
[3.12] gh-105042: Disable unmatched parens syntax error in python tokenize (GH-105061) (#105120)
gh-105042: Disable unmatched parens syntax error in python tokenize (GH-105061)
(cherry picked from commit 70f315c2d6)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2023-05-31 11:11:39 +01:00
Miss Islington (bot)
4729100239
[3.12] gh-105091: stable_abi.py: Remove "Unixy" check from --all on other platforms (GH-105092) (GH-105133)
gh-105091: stable_abi.py: Remove "Unixy" check from --all on other platforms (GH-105092)
(cherry picked from commit 0656d23d82)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2023-05-31 07:48:28 +00:00
Miss Islington (bot)
e3fcd9e4fa
[3.12] gh-103142: Update macOS installer to use OpenSSL 1.1.1u. (GH-105132)
(cherry picked from commit f90d3f68db)

Co-authored-by: Ned Deily <nad@python.org>
2023-05-31 06:18:55 +00:00
Erlend E. Aasland
af7b55d37f
[3.12] gh-89886: Properly quote Autoconf macro arguments (#105062) (#105118)
Autoconf 2.70 macros are picky about argument quotation.
2023-05-30 21:54:31 +00:00
Miss Islington (bot)
5fff491bd5
[3.12] gh-105035: fix super() calls on unusual types (e.g. meta-types) (GH-105094) (#105117)
gh-105035: fix super() calls on unusual types (e.g. meta-types) (GH-105094)
(cherry picked from commit 68c75c3153)

Co-authored-by: Carl Meyer <carl@oddbird.net>
2023-05-30 21:10:46 +00:00
Miss Islington (bot)
9ae49e3f3b
gh-88745: Add _winapi.CopyFile2 and update shutil.copy2 to use it (GH-105055)
(cherry picked from commit cda1bd3c9d)

Co-authored-by: Steve Dower <steve.dower@python.org>
2023-05-30 20:33:17 +01:00
Miss Islington (bot)
aeee5a5756
[3.12] gh-105071: add missing versionadded directive (GH-105097) (#105105)
gh-105071: add missing versionadded directive (GH-105097)
(cherry picked from commit 4571eedca2)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-05-30 17:03:57 +00:00
Miss Islington (bot)
9fb7abba6d
[3.12] gh-103921: Minor PEP-695 fixes to the ast module docs (GH-105093) (#105101)
(cherry picked from commit c8c1e73d95)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-05-30 09:34:57 -07:00
Steve Dower
4e7d41f986
[3.12] Enable the ABI check job to publish the updated ABI data file (GH-105088) 2023-05-30 17:31:51 +01:00
Irit Katriel
b45df737d4
[3.12] gh-105071: add PyUnstable_Exc_PrepReraiseStar to expose except* implementation in the unstable API (GH-105072) (#105095)
(cherry picked from commit b7aadb4583)
2023-05-30 16:50:23 +01:00
Miss Islington (bot)
7899fac3c5
[3.12] gh-104799: Move location of type_params AST fields (GH-104828) (#104974)
gh-104799: Move location of type_params AST fields (GH-104828)
(cherry picked from commit ba73473f4c)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-05-30 14:33:01 +00:00
Miss Islington (bot)
fd6b913535
[3.12] gh-102251: Fix reference leak in _testsinglephase initialization (GH-105082) (#105083)
Correctly decref 'initialized' in init_module()

(cherry picked from commit d14eb3433c)

Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-05-30 09:53:46 +00:00
Miss Islington (bot)
7f04a1546f
[3.12] gh-105077: Fix test_tkinter refleak checking (GH-105078) (GH-105079)
Use specific symbols from `test.support` to avoid having `support`
overwritten by `test_tkinter`'s own `support` submodule.
(cherry picked from commit 5454db4ace)
2023-05-29 23:25:52 -05:00
Miss Islington (bot)
67945261c4
[3.12] GH-89455: Add missing attributes (added in 3.11) to traceback module docs (GH-105044) (#105066)
GH-89455: Add missing attributes (added in 3.11) to traceback module docs (GH-105044)
(cherry picked from commit 39f6a0489f)

Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-05-29 20:37:02 +01:00
Miss Islington (bot)
56722efe36
gh-103646: Remove --include-pip-user from default APPX package build (GH-105064)
(cherry picked from commit 6da701511e)

Co-authored-by: Steve Dower <steve.dower@python.org>
2023-05-29 17:21:03 +00:00
Miss Islington (bot)
68bf3fe0e4
gh-104820: Fixes os.stat on Windows to better handle file systems that do not support FileIdInformation (GH-104892)
(cherry picked from commit 6031727a37)

Co-authored-by: Steve Dower <steve.dower@python.org>
2023-05-29 17:57:04 +01:00
Miss Islington (bot)
635ce29257
gh-104803: Implement ntpath.isdevdrive for checking whether a path is on a Windows Dev Drive (GH-104805)
(cherry picked from commit bfd20d257e)

Co-authored-by: Steve Dower <steve.dower@python.org>
2023-05-29 13:36:08 +01:00
Miss Islington (bot)
5dc6b18cb0
Fix compiler warning in unicodeobject.c (GH-105050)
Fix compiler warning in unicodeobject.c (GH-105050)
(cherry picked from commit e92ac0a741)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2023-05-29 18:05:42 +09:00
Miss Islington (bot)
74bbc603e4
[3.12] Document PEP 698 and other new typing features in What's New (GH-104957) (#105045)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-05-28 12:15:36 -07:00
Miss Islington (bot)
3f8d5d9ed6
[3.12] gh-105017: Include CRLF lines in strings and column numbers (GH-105030) (#105041)
gh-105017: Include CRLF lines in strings and column numbers (GH-105030)
(cherry picked from commit 96fff35325)

Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
2023-05-28 15:16:43 +01:00
Miss Islington (bot)
41b622b1e8
[3.12] gh-105013: Fix inspect.getsource with parenthesized multiline lambdas (GH-105021) (#105032)
gh-105013: Fix inspect.getsource with parenthesized multiline lambdas (GH-105021)
(cherry picked from commit 3a5be878be)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2023-05-28 12:18:43 +01:00
Miss Islington (bot)
36a4227859
[3.12] gh-104992: [What's New in 3.12] Document unittest.TestProgram.usageExit's deprecation (GH-104995) (#105036)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-05-28 08:12:30 +00:00
Miss Islington (bot)
5426ff1476
[3.12] gh-104497: Make tkinter test pass with tk 8.7 (GH-104789) (#105028)
For test_widgets.MenuTest.test_configure_type, the options
in the error message change to alphabetical order.
---------

(cherry picked from commit 897e716d03)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-05-27 17:51:05 -04:00
Miss Islington (bot)
2b176bc902
[3.12] gh-105017: Fix including additional NL token when using CRLF (GH-105022) (#105023)
Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2023-05-27 18:24:30 +01:00
Miss Islington (bot)
edd0cb8e77
[3.12] CI: Precompute hash for config cache key in check_source job (GH-105008) (#105014)
Co-authored-by: Itamar Ostricher <itamarost@gmail.com>
2023-05-27 10:10:03 +00:00
Miss Islington (bot)
368d177da5
[3.12] gh-104992: [What's New in 3.11] Document unittest.TestProgram.usageExit's deprecation (GH-104994) (#105009)
gh-104992: [What's New in 3.11] Document unittest.TestProgram.usageExit's deprecation (GH-104994)

Document unittest.TestProgram.usageExit's pending removal in 3.13
(cherry picked from commit 7df861c23c)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-05-26 19:17:09 -07:00
Miss Islington (bot)
f625ec3603
[3.12] gh-104839: Prevent test_venv AddressSanitizer spam (GH-105005) (#105006)
gh-104839: Prevent test_venv AddressSanitizer spam (GH-105005)

Pass any ASAN_OPTIONS environment variable through to the child process
so that leak sanitizer being disabled on our CI and buildbots stays
true in the children.
(cherry picked from commit a17f160376)

Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
2023-05-27 01:41:21 +00:00
Miss Islington (bot)
2c02c68867
[3.12] gh-104976: Ensure trailing dedent tokens are emitted as the previous tokenizer (GH-104980) (#105000) 2023-05-26 23:14:45 +01:00
Miss Islington (bot)
05189f3054
[3.12] GH-101588: Deprecate pickle/copy/deepcopy support in itertools (GH-104965) (GH-104997) 2023-05-26 16:02:42 -05:00
Miss Islington (bot)
305d78b714
[3.12] GH-103631: Fix PurePosixPath(PureWindowsPath(...)) separator handling (GH-104949) (GH-104991)
For backwards compatibility, accept backslashes as path separators in
`PurePosixPath` if an instance of `PureWindowsPath` is supplied.
This restores behaviour from Python 3.11.

(cherry picked from commit 328422ce61)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-05-26 18:42:36 +00:00
Miss Islington (bot)
eca102ddac
[3.12] GH-104947: Make pathlib.PureWindowsPath comparisons consistent across platforms (GH-104948) (GH-104990)
Use `str.lower()` rather than `ntpath.normcase()` to normalize case of
Windows paths. This restores behaviour from Python 3.11.

(cherry picked from commit ad0be361c9)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-05-26 18:33:09 +00:00
Miss Islington (bot)
dcee0aa911
[3.12] gh-103921: Document PEP 695 (GH-104642) (#104989)
(cherry picked from commit 060277d96b)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-05-26 18:19:34 +00:00
Miss Islington (bot)
bb1e57ee40
[3.12] gh-104984: remove kwargs and starargs from Call & ClassDef (GH-104986) (#104987)
gh-104984: remove kwargs and starargs from Call & ClassDef (GH-104986)

These fields are removed in 025e9ebd0a
(cherry picked from commit 61c1d6760f)

Co-authored-by: Shaygan Hooshyari <sh.hooshyari@gmail.com>
2023-05-26 11:12:41 -06:00
Hugo van Kemenade
97509ca2bc
[3.12] CI: Cache config.cache across runs to speed up build (GH-104800) (#104967) 2023-05-26 16:02:51 +00:00
Miss Islington (bot)
8ca29573a8
[3.12] gh-104972: Ensure that line attributes in tokens in the tokenize module are correct (GH-104975) (#104982)
gh-104972: Ensure that line attributes in tokens in the tokenize module are correct (GH-104975)
(cherry picked from commit 3fdb55c482)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2023-05-26 11:25:46 -04:00
Miss Islington (bot)
01af2b0e51
[3.12] Remove raw asserts in test_typing.py (GH-104951) (#104978)
Remove raw asserts in test_typing.py (GH-104951)
(cherry picked from commit 2cb445635e)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-05-26 14:35:35 +00:00