Nikita Sobolev
fabcf6bc8f
gh-120388: Improve deprecation warning message, when test returns non-None ( #120401 )
...
Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-06-12 14:50:58 +00:00
Ken Jin
e16aed63f6
gh-117657: Make Py_TYPE and Py_SET_TYPE thread safe (GH-120165)
...
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Nadeshiko Manju <me@manjusaka.me>
2024-06-12 20:41:07 +08:00
Irit Katriel
97b69db167
gh-93691: fix too broad source locations of for statement iterators ( #120330 )
2024-06-12 12:53:19 +01:00
Bénédikt Tran
755dab719d
gh-120029: make symtable.Symbol.__repr__ correctly reflect the compiler's flags, add methods ( #120099 )
...
Expose :class:`symtable.Symbol` methods :meth:`~symtable.Symbol.is_free_class`,
:meth:`~symtable.Symbol.is_comp_iter` and :meth:`~symtable.Symbol.is_comp_cell`.
---------
Co-authored-by: Carl Meyer <carl@oddbird.net>
2024-06-12 05:14:50 -06:00
Ken Jin
203565b2f9
gh-120198: Fix race condition when editing __class__ with an audit hook active (GH-120195)
2024-06-11 20:10:23 +01:00
Eugene Triguba
86a8a1c57a
gh-118908: Limit exposed globals from internal imports and definitions on new REPL startup ( #119547 )
2024-06-11 17:40:31 +00:00
Lysandros Nikolaou
1b62bcee94
gh-120343: Do not reset byte_col_offset_diff after multiline tokens ( #120352 )
...
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2024-06-11 17:00:53 +00:00
Jelle Zijlstra
9b8611eeea
gh-119180: PEP 649 compiler changes ( #119361 )
2024-06-11 13:06:49 +00:00
Kirill Podoprigora
02c1dfff07
gh-120080: Mark test_round_with_none_arg_direct_call as cpython_only ( #120328 )
2024-06-11 09:56:38 +02:00
Nikita Sobolev
141babad9b
gh-120298: Fix use-after-free in list_richcompare_impl ( #120303 )
...
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-06-11 10:04:27 +03:00
blhsing
9e9ee50421
gh-65454: avoid triggering call to a PropertyMock in NonCallableMock.__setattr__ ( #120019 )
2024-06-11 05:42:49 +00:00
Robert Collins
422c4fc855
gh-119600: mock: do not access attributes of original when new_callable is set ( #119601 )
...
In order to patch flask.g e.g. as in #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.
2024-06-11 06:41:12 +01:00
Victor Stinner
7aff2de62b
gh-120057: Add os.environ.refresh() method ( #120059 )
2024-06-10 16:34:17 +00:00
Pieter Eendebak
c3b6dbff2c
gh-115801: Only allow sequence of strings as input for difflib.unified_diff (GH-118333)
2024-06-10 14:06:18 +03:00
E. M. Bray
4829522b8d
bpo-24766: doc= argument to subclasses of property not handled correctly (GH-2487)
...
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-06-10 08:55:49 +00:00
Carl Meyer
0ae8579b85
gh-119666: fix multiple class-scope comprehensions referencing __class__ ( #120295 )
2024-06-09 22:23:30 -04:00
Kirill Podoprigora
34f5ae69fe
gh-120268: Prohibit passing `None to _pydatetime.date.fromtimestamp` ( #120269 )
...
This makes the pure Python implementation consistent with the C implementation.
2024-06-08 16:45:57 -04:00
Saul Shanabrook
55402d3232
gh-119258: Eliminate Type Guards in Tier 2 Optimizer with Watcher (GH-119365)
...
Co-authored-by: parmeggiani <parmeggiani@spaziodati.eu>
Co-authored-by: dpdani <git@danieleparmeggiani.me>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
Co-authored-by: Ken Jin <kenjin@python.org>
2024-06-08 17:41:45 +08:00
Enrico Tröger
2080425154
bpo-37755: Use configured output in pydoc instead of pager (GH-15105)
...
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.
2024-06-08 09:19:13 +00:00
Nikita Sobolev
95f4db88d5
gh-120242: Fix handling of [setUp,tearDown]Class in test_datetime ( #120243 )
2024-06-08 10:51:09 +03:00
Irit Katriel
4fc82b6d3b
gh-120225: fix crash in compiler on empty block at end of exception handler ( #120235 )
2024-06-07 22:37:35 +01:00
Eric Snow
e6076d1e13
gh-119659: Get the datetime CAPI Tests Running Again (gh-120180)
...
The tests were accidentally disabled by 2da0dc0 , which didn't handle classes correctly.
I considered updating no_rerun() to support classes, but the way test_datetime.py works would have made things fairly messy. Plus, it looks like the refleaks we had encountered before have been resolved.
2024-06-07 11:44:56 -06:00
Xi Ruoyao
a758424566
gh-120226: Fix test_sendfile_close_peer_in_the_middle_of_receiving on Linux >= 6.10 ( #120227 )
...
The worst case is that the kernel buffers 17 pages with a page size of 64k.
2024-06-07 08:51:32 -07:00
Nikita Sobolev
10fb1b8f36
gh-120200: Fix inspect.iscoroutinefunction(inspect) is True corner case ( #120214 )
2024-06-07 18:48:31 +03:00
Irit Katriel
eca3f7762c
gh-93691: fix too broad source locations of with-statement instructions ( #120125 )
2024-06-07 14:06:24 +01:00
Kirill Podoprigora
d5ba4fc9bc
gh-120164: Fix test_os.test_win32_mkdir_700() ( #120177 )
...
Don't compare the path to avoid encoding issues.
Co-authored-by: Eryk Sun <eryksun@gmail.com>
2024-06-07 11:14:13 +02:00
Kirill Podoprigora
57ad769076
gh-120080: Accept `None as a valid argument for direct call of the int.__round__` ( #120088 )
...
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-06-07 10:03:28 +02:00
Jacob Walls
6b606522ca
gh-119577: Adjust DeprecationWarning when testing element truth values in ElementTree (GH-119762)
...
Adjust DeprecationWarning when testing element truth values in ElementTree, we're planning to go with the more natural True return rather than a disruptive harder to code around exception raise, and are deferring the behavior change for a few more releases.
2024-06-06 20:18:30 -07:00
Serhiy Storchaka
2d7ff6e0e7
Restore decimal context after decimal doctests (GH-120149)
...
The modified context caused tests failures in several other tests.
2024-06-06 20:12:32 +03:00
benchatt
14e3c7071b
gh-115225: Raise error on unsupported ISO 8601 time strings ( #119339 )
...
Some time strings that contain fractional hours or minutes are permitted
by ISO 8601, but such strings are very unlikely to be intentional. The
current parser does not parse such strings correctly or raise an error.
This change raises a ValueError when hours or minutes contain a decimal mark.
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2024-06-05 13:35:40 -04:00
Sam Gross
4bba1c9e6c
gh-120065: Increase collect_in_thread period to 5 ms. ( #120068 )
...
This matches the default GIL switch interval. It greatly speeds up the
free-threaded build: previously, it spent nearly all its time in
`gc.collect()`.
2024-06-05 09:23:29 -04:00
Vinay Sajip
983efcf15b
gh-119819: Update logging configuration to support joinable multiproc… (GH-120090)
...
gh-119819: Update logging configuration to support joinable multiprocessing manager queues.
2024-06-05 07:25:47 +01:00
Vinay Sajip
109e1082ea
gh-119819: Update test to skip if _multiprocessing is unavailable. (GH-120067)
2024-06-04 20:16:43 +01:00
Sam Gross
710cbea660
gh-120048: Make test_imaplib faster ( #120050 )
...
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.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-06-04 14:59:23 -04:00
Pablo Galindo Salgado
d9095194dd
gh-119842: Honor PyOS_InputHook in the new REPL (GH-119843)
...
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Michael Droettboom <mdboom@gmail.com>
2024-06-04 20:32:43 +02:00
Lysandros Nikolaou
010ea93b2b
gh-119553: Clear reader on Ctrl-C command (GH-119801)
2024-06-04 19:46:33 +02:00
Sam Gross
d419d468ff
gh-120039: Reduce expected timeout in test_siginterrupt_off ( #120047 )
...
The process is expected to time out. In the refleak builds,
`support.SHORT_TIMEOUT` is often five minutes and we run the tests six
times, so test_signal was taking >30 minutes.
2024-06-04 17:38:29 +00:00
Serhiy Storchaka
7111d9605f
gh-89928: Fix integer conversion of device numbers (GH-31794)
...
Fix os.major(), os.minor() and os.makedev().
Support device numbers larger than 2**63-1.
Support non-existent device number (NODEV).
2024-06-04 19:36:37 +03:00
Lysandros Nikolaou
8fc7653766
gh-120041: Do not use append_to_screen when completions are visible (GH-120042)
2024-06-04 18:09:31 +02:00
Bénédikt Tran
ff1857d6ed
gh-120029: export DEF_TYPE_PARAM compiler flag ( #120028 )
2024-06-04 07:24:22 -07:00
Vinay Sajip
99d945c0c0
gh-119819: Fix regression to allow logging configuration with multipr… (GH-120030)
2024-06-04 13:20:50 +01:00
Kaundur
dce14bb2dc
gh-118868: logging QueueHandler fix passing of kwargs (GH-118869)
...
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
2024-06-04 12:48:05 +01:00
Steve Dower
5c48eb0cc6
gh-119070: Update test_shebang_executable_extension to always use non-installed version (GH-119846)
2024-06-04 10:17:45 +02:00
Jason R. Coombs
8d63c8d47b
gh-106531: Apply changes from importlib_resources 6.3.2 ( #117054 )
...
Apply changes from importlib_resources 6.3.2.
2024-06-04 06:36:28 +00:00
Petr Viktorin
31a4fb3c74
gh-119724: Revert "bpo-45759: Better error messages for non-matching 'elif'/'else' statements ( #29513 )" ( #119974 )
...
This reverts commit 1c8f912ebd .
2024-06-03 18:10:15 -07:00
Sam Gross
47fb4327b5
gh-117657: Fix race involving immortalizing objects ( #119927 )
...
The free-threaded build currently immortalizes objects that use deferred
reference counting (see gh-117783). This typically happens once the
first non-main thread is created, but the behavior can be suppressed for
tests, in subinterpreters, or during a compile() call.
This fixes a race condition involving the tracking of whether the
behavior is suppressed.
2024-06-03 20:58:41 +00:00
Daniel Hollas
2e0aa731ae
gh-118835: pyrepl: Fix prompt length computation for custom prompts containing ANSI escape codes ( #119942 )
2024-06-03 18:07:06 +01:00
Victor Stinner
4e8aa32245
gh-119727: Add --single-process option to regrtest ( #119728 )
2024-06-03 16:34:36 +00:00
Nikita Sobolev
1d4c2e4a87
gh-119057: Use better error messages for zero division ( #119066 )
2024-06-03 19:03:56 +03:00
Łukasz Langa
6acb32fac3
Use Cirrus M1 macOS runners for CI (GH-119979)
...
Co-authored-by: Ee Durbin <ee@python.org>
2024-06-03 17:32:40 +02:00