Commit graph

51277 commits

Author SHA1 Message Date
Miss Islington (bot) a85241d76b
[3.12] gh-114053: Fix another edge case involving get_type_hints, PEP 695 and PEP 563 (GH-120272) (#121004)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-06-25 16:31:01 +00:00
Miss Islington (bot) 7a874b4ca6
[3.12] gh-120373: Mark test_audit.test_http as requiring the network resource (GH-120374) (#120949)
gh-120373: Mark test_audit.test_http as requiring the network resource (GH-120374)
(cherry picked from commit b0e1c51882)

Co-authored-by: Itamar Oren <itamarost@gmail.com>
2024-06-24 13:37:51 +00:00
Miss Islington (bot) d5a8d4b196
[3.12] gh-119614: Fix truncation of strings with embedded null characters in Tkinter (GH-120909) (GH-120939)
Now the null character is always represented as \xc0\x80 for
Tcl_NewStringObj().
(cherry picked from commit c38e2f64d0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-06-24 09:39:56 +00:00
Tian Gao 69bd1a8da0
[3.12] gh-119824: Revert the where solution and use meta commands (#120928) 2024-06-23 14:58:10 -07:00
Jason R. Coombs daef7de36f
[3.12] gh-120910: Fix issue resolving relative paths outside site-packages. (GH-120911) (#120918)
Incorporates changes from importlib_metadata 7.2.1.
(cherry picked from commit 1ba0bb21ed)
2024-06-23 17:30:18 +00:00
Serhiy Storchaka c525cb3a7b
[3.12] gh-101830: Fix Tcl_Obj to string conversion (GH-120884) (GH-120913)
Accessing the Tkinter object's string representation no longer converts
the underlying Tcl object to a string on Windows.
(cherry picked from commit f4ddaa3967)
2024-06-23 16:02:43 +00:00
Miss Islington (bot) 7f64c2fb43
[3.12] gh-120873: Add tests for new widget options in Tk 8.7 (GH-120877) (GH-120880)
(cherry picked from commit a046c848c1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-06-22 13:38:08 +00:00
Miss Islington (bot) 22a276ff15
[3.12] gh-120873: Add test for "state" option in ttk.Scale (GH-120874) (GH-120876)
Also refactor the "state" option tests for other ttk widgets.
(cherry picked from commit 974a978631)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-06-22 11:39:33 +00:00
Miss Islington (bot) f1acb3a592
[3.12] gh-104855: Update Tkinter tests for Tcl/Tk 8.7 and 9.0 (GH-120824) (GH-120865)
The tests are now passed with the current version of Tcl/Tk under
development (8.7b1+ and 9.0b3+).

The following changes were also made to make the tests more flexible:

* Helper methods like checkParam() now interpret the expected error message
  as a regular expression instead of a literal.
* Add support of new arguments in checkEnumParam():
  - allow_empty=True skips testing with empty string;
  - fullname= specifies the name for error message if it differs from the
    option name;
  - sort=True sorts values for error message.
* Add support of the allow_empty argument in checkReliefParam():
  allow_empty=True adds an empty string to the list of accepted values.
* Attributes _clip_highlightthickness, _clip_pad and  _clip_borderwidth
  specify how negative values of options -highlightthickness, -padx, -pady
  and -borderwidth are handled.
* Use global variables for some common error messages.

(cherry picked from commit 6ad26de6e8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-06-22 07:10:04 +00:00
Miss Islington (bot) d75eddcf36
[3.12] gh-120384: Fix array-out-of-bounds crash in list_ass_subscript (GH-120442) (#120825)
gh-120384: Fix array-out-of-bounds crash in `list_ass_subscript` (GH-120442)
(cherry picked from commit 8334a1b55c)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-06-21 11:08:22 +00:00
Jelle Zijlstra 0c6d6ab252
[3.12] gh-119698: fix symtable.Class.get_methods and document its behaviour correctly (#120151) (#120776)
(cherry picked from commit b8a8e04fec)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-06-19 22:12:31 -07:00
Miss Islington (bot) 34ace5ba4c
[3.12] gh-120732: Fix name passing to Mock, when using kwargs to create_autospec (GH-120737) (#120761)
gh-120732: Fix `name` passing to `Mock`, when using kwargs to `create_autospec` (GH-120737)
(cherry picked from commit 1e4815692f)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-06-19 20:53:19 +00:00
Jelle Zijlstra d62cbba235
[3.12] gh-120722: Set position on RETURN_VALUE in lambda (GH-120724) (#120739)
(cherry picked from commit d8f27cb114)
2024-06-19 13:19:39 +00:00
Miss Islington (bot) cde976d85c
[3.12] gh-119506: fix _io.TextIOWrapper.write() write during flush (GH-119507) (#119965)
gh-119506: fix `_io.TextIOWrapper.write()` write during flush (GH-119507)
(cherry picked from commit 52586f930f)

Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2024-06-19 10:23:29 +00:00
Miss Islington (bot) 57f955f9af
[3.12] gh-120449: fix `test_pyclbr` introspection for mangled names (GH-120450) (GH-120701)
gh-120449: fix ``test_pyclbr`` introspection for mangled names (GH-120450)
(cherry picked from commit d8cd0fa4e3)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-06-19 09:20:16 +02:00
Irit Katriel 5d997b5d4e
[3.12] gh-119897: Revert buggy optimization which was removed in 3.13 (#120467) 2024-06-18 10:45:40 +01:00
Miss Islington (bot) 4b53ea822c
[3.12] gh-120590: Fix test_pydoc in the refleak hunting mode (GH-120615) (GH-120670)
Mocking only works if sys.modules['pydoc'] and pydoc are the same,
but some pydoc functions reload the module and change sys.modules.
Ensure that sys.modules['pydoc'] is always restored after the corresponding
tests.
(cherry picked from commit 2cf47389e2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-06-18 09:44:02 +00:00
Tian Gao e4f1fed5f6
[3.12] gh-119824: Print stack entry when user input is needed … (#120594)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-06-17 10:40:49 -07:00
Miss Islington (bot) 717d2bd1d9
[3.12] gh-120567: Clarify weekday return in calendar.monthrange docstring (GH-120570) (#120598)
gh-120567: Clarify weekday return in calendar.monthrange docstring (GH-120570)
(cherry picked from commit bd4516d9ef)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-06-16 21:03:09 +00:00
Terry Jan Reedy 51af315a32
[3.12] gh-120417: Remove unused import in idlelib (GH-120420) (#120574)
(cherry picked from commit 4c6d4f5)

Co-authored-by: Victor Stinner vstinner@python.org
2024-06-16 05:45:32 +00:00
Miss Islington (bot) f03f4b15ef
[3.12] Add some more edge-case tests for inspect.get_annotations with eval_str=True (GH-120550) (#120552)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-06-15 13:10:01 +00:00
Miss Islington (bot) 4fb2af3195
[3.12] gh-120128: fix description of argument to ipaddress.collapse_addresses() (GH-120131) (#120136)
gh-120128: fix description of argument to ipaddress.collapse_addresses() (GH-120131)

The argument to collapse_addresses() is now described as an *iterable*
(rather than *iterator*).
(cherry picked from commit f878d46e56)

Co-authored-by: Jan Kaliszewski <zuo@kaliszewski.net>
2024-06-15 06:12:45 -06:00
Miss Islington (bot) 454f7e8035
[3.12] gh-120544: Add else: fail() to tests where exception is expected (GH-120545) (#120547)
gh-120544: Add `else: fail()` to tests where exception is expected (GH-120545)
(cherry picked from commit 42ebdd83bb)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-06-15 12:54:22 +01:00
Miss Islington (bot) 1242c2739a
[3.12] gh-120495: Fix incorrect exception handling in Tab Nanny (GH-120498) (#120549)
gh-120495: Fix incorrect exception handling in Tab Nanny (GH-120498)
(cherry picked from commit c501261c91)

Co-authored-by: Wulian233 <71213467+Wulian233@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-06-15 11:21:05 +00:00
Miss Islington (bot) 92c1687074
[3.12] gh-119819: Conditional skip of logging tests that require multiprocessing subprocess support (GH-120476) (#120532)
gh-119819: Conditional skip of logging tests that require multiprocessing subprocess support (GH-120476)

Skip tests that require multiprocessing subprocess support.
(cherry picked from commit 92f6d400f7)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2024-06-15 08:32:28 +08:00
Miss Islington (bot) d2105a1eab
[3.12] gh-120361: Add nonmember test with enum flags inside to test_enum (GH-120364) (#120512)
gh-120361: Add `nonmember` test with enum flags inside to `test_enum` (GH-120364)

* gh-120361: Add `nonmember` test with enum flags inside to `test_enum`
(cherry picked from commit 7fadfd82eb)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-06-14 20:59:12 +03:00
Miss Islington (bot) 183445338d
[3.12] gh-114053: Fix bad interaction of PEP 695, PEP 563 and inspect.get_annotations (GH-120270) (#120475)
gh-114053: Fix bad interaction of PEP 695, PEP 563 and `inspect.get_annotations` (GH-120270)
(cherry picked from commit 42351c3b9a)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-06-13 21:35:21 +00:00
Irit Katriel 5a6cc3c67f
[3.12] gh-93691: fix too broad source locations of for statement iterators (GH-120330 (#120405)
[3.12] gh-93691: fix too broad source locations of for statement iterators (GH-120330).
(cherry picked from commit 97b69db167)
2024-06-13 11:38:36 +01:00
Xie Yanbo 0976c9f4bd
[3.12] Fix typos in documentation (GH-120338) (#120439)
(cherry picked from commit ce3879bd45)
2024-06-13 09:32:35 +03:00
Miss Islington (bot) f75abf8bcf
[3.12] gh-120343: Fix column offsets of multiline tokens in tokenize (GH-120391) (#120428)
(cherry picked from commit 4b5d3e0e72)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2024-06-12 19:10:35 +00:00
Ken Jin e8a9f0c9e7
gh-120198: Fix race condition when editing __class__ with an audit hook active (GH-120195)
Co-authored-by: Nadeshiko Manju <me@manjusaka.me>
2024-06-12 14:06:24 +01:00
Miss Islington (bot) 0315fdc24d
[3.12] gh-120343: Do not reset byte_col_offset_diff after multiline tokens (GH-120352) (#120356)
(cherry picked from commit 1b62bcee94)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2024-06-11 17:22:16 +00:00
Miss Islington (bot) e123f74513
[3.12] gh-120268: Prohibit passing `None to _pydatetime.date.fromtimestamp` (GH-120269) (GH-120283)
This makes the pure Python implementation consistent with the C implementation.
(cherry picked from commit 34f5ae69fe)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-06-11 12:54:20 +03:00
Miss Islington (bot) b8845369aa
[3.12] gh-120298: Fix use-after-free in list_richcompare_impl (GH-120303) (#120339)
gh-120298: Fix use-after-free in `list_richcompare_impl` (GH-120303)
(cherry picked from commit 141babad9b)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-06-11 07:22:59 +00:00
Miss Islington (bot) f6481925d8
[3.12] gh-65454: avoid triggering call to a PropertyMock in NonCallableMock.__setattr__ (GH-120019) (#120337)
gh-65454: avoid triggering call to a PropertyMock in NonCallableMock.__setattr__ (GH-120019)
(cherry picked from commit 9e9ee50421)

Co-authored-by: blhsing <blhsing@gmail.com>
2024-06-11 06:07:25 +00:00
Miss Islington (bot) fa291a35eb
[3.12] gh-119600: mock: do not access attributes of original when new_callable is set (GH-119601) (#120335)
gh-119600: mock: do not access attributes of original when new_callable is set (GH-119601)

In order to patch flask.g e.g. as in GH-84982, that
proxies getattr must not be invoked. For that,
mock must not try to read from the original
object. In some cases that is unavoidable, e.g.
when doing autospec. However, patch("flask.g",
new_callable=MagicMock) should be entirely safe.
(cherry picked from commit 422c4fc855)

Co-authored-by: Robert Collins <robert.collins@cognite.com>
2024-06-11 06:01:02 +00:00
Serhiy Storchaka 7545b7cb63
[3.12] bpo-24766: doc= argument to subclasses of property not handled correctly (GH-2487) (GH-120312)
(cherry picked from commit 4829522b8d)

Co-authored-by: E. M. Bray <erik.bray@lri.fr>
2024-06-10 10:32:45 +00:00
Miss Islington (bot) 82c93ea55a
[3.12] gh-119666: fix multiple class-scope comprehensions referencing __class__ (GH-120295) (#120300) 2024-06-10 00:37:15 -04:00
Miss Islington (bot) 58657d0dc1
[3.12] gh-120121: Add InvalidStateError to concurrent.futures.__all__ (GH-120123) (#120274)
gh-120121: Add InvalidStateError to concurrent.futures.__all__ (GH-120123)
(cherry picked from commit 5d59b870ef)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-06-08 16:28:21 +00:00
Serhiy Storchaka 88f67df22c
[3.12] bpo-37755: Use configured output in pydoc instead of pager (GH-15105) (GH-120262)
If the Helper() class was initialized with an output, the topics, keywords
and symbols help still use the pager instead of the output.
Change the behavior so  the output is used if available while keeping the
previous behavior if no output was configured.
(cherry picked from commit 2080425154)

Co-authored-by: Enrico Tröger <enrico.troeger@uvena.de>
2024-06-08 09:46:25 +00:00
Miss Islington (bot) 479655a27a
[3.12] gh-120242: Fix handling of [setUp,tearDown]Class in test_datetime (GH-120243) (#120260)
gh-120242: Fix handling of `[setUp,tearDown]Class` in `test_datetime` (GH-120243)
(cherry picked from commit 95f4db88d5)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-06-08 08:09:55 +00:00
Nikita Sobolev 1e7903d549
[3.12] gh-120200: Fix inspect.iscoroutinefunction(inspect) is True corner case (GH-120214) (#120239)
* [3.12] gh-120200: Fix `inspect.iscoroutinefunction(inspect) is True` corner case (GH-120214)
(cherry picked from commit 10fb1b8f36)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-06-07 16:41:45 +00:00
Miss Islington (bot) ac68d83fec
[3.12] gh-120211: Fix tkinter.ttk with Tcl/Tk 9.0 (GH-120213) (GH-120216)
* Use new methods for tracing Tcl variable.
* Fix Combobox.current() for empty combobox.
(cherry picked from commit d68a22e7a6)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-06-07 14:30:50 +03:00
Miss Islington (bot) 3730f60f39
[3.12] gh-120164: Fix test_os.test_win32_mkdir_700() (GH-120177) (#120203)
gh-120164: Fix test_os.test_win32_mkdir_700() (GH-120177)

Don't compare the path to avoid encoding issues.

(cherry picked from commit d5ba4fc9bc)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Eryk Sun <eryksun@gmail.com>
2024-06-07 09:35:08 +00:00
Thomas Wouters 8e8a4baf65 Python 3.12.4 2024-06-06 20:26:44 +02:00
Miss Islington (bot) b03d71d0d8
[3.12] Restore decimal context after decimal doctests (GH-120149) (GH-120168)
The modified context caused tests failures in several other tests.
(cherry picked from commit 2d7ff6e0e7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-06-06 17:31:36 +00:00
Miss Islington (bot) 8d199774cb
[3.12] gh-119819: Update logging configuration to support joinable multiproc… (GH-120090) (GH-120092)
(cherry picked from commit 983efcf15b)
2024-06-05 07:59:15 +01:00
Jelle Zijlstra dc40226ea1
[3.12] gh-119311: Fix name mangling with PEP 695 generic classes (#119464) (#119644)
* [3.12] gh-119311: Fix name mangling with PEP 695 generic classes (#119464)

Fixes #119311. Fixes #119395.

(cherry picked from commit a9a74da4a0)
2024-06-04 19:55:45 +00:00
Miss Islington (bot) 008f9dd027
[3.12] gh-119819: Update test to skip if _multiprocessing is unavailable. (GH-120067) (GH-120071)
(cherry picked from commit 109e1082ea)
2024-06-04 20:43:52 +01:00
Miss Islington (bot) 210cd98f75
[3.12] gh-120048: Make test_imaplib faster (GH-120050) (#120070)
The `test_imaplib` was taking 40+ minutes in the refleak build bots because
the tests waiting on a client `self._setup()` was creating a client that
prevented progress until its connection timed out, which scaled with the
global timeout.

We should set `connect=False` for the tests that don't want `_setup()` to
create a client.

(cherry picked from commit 710cbea660)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-06-04 19:25:17 +00:00