Bénédikt Tran
38a887dc3e
gh-119004: fix a crash in equality testing between `OrderedDict` ( #121329 )
2024-09-23 18:44:36 -05:00
Alex Waygood
8a2baedc4b
Bump Ruff to 0.6.7 ( #124384 )
2024-09-23 22:19:35 +00:00
Savannah Ostrowski
7ee9921734
GH-87041: Fix incorrect indentation in argparse help (GH-124230)
...
In case of usage a long command along with max_help_position more than
the length of the command, the command's help was incorrectly started
on the new line.
Co-authored-by: Pavel Ditenbir <pavel.ditenbir@gmail.com>
2024-09-23 19:45:36 +00:00
Jelle Zijlstra
2e0d445364
gh-119180: Fix annotationlib.ForwardRef.evaluate with no globals ( #124326 )
...
We were sometimes passing None as the globals argument to eval(), which makes it
inherit the globals from the calling scope. Instead, ensure that globals is always
non-None. The test was passing accidentally because I passed "annotationlib" as a
module object; fix that. Also document the parameters to ForwardRef() and remove
two unused private ones.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-09-23 19:06:19 +00:00
Savannah Ostrowski
dc48312717
GH-124321: Fix argparse negative number parsing to capture -.5(GH-124322)
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-09-23 11:16:55 -07:00
Michał Górny
342e654b8e
gh-124213: Skip tests failing inside systemd-nspawn --suppress-sync=true ( #124215 )
...
Add a helper function that checks whether the test suite is running
inside a systemd-nspawn container, and skip the few tests failing
with `--suppress-sync=true` in that case. The tests are failing because
`--suppress-sync=true` stubs out `fsync()`, `fdatasync()` and `msync()`
calls, and therefore they always return success without checking for
invalid arguments.
Call `os.open(__file__, os.O_RDONLY | os.O_SYNC)` and check the errno to
detect whether `--suppress-sync=true` is actually used, and skip
the tests only in that scenario.
2024-09-20 13:37:49 +00:00
Y5
db6eb3640a
gh-124217, ipaddress: Add RFC 9637 reserved IPv6 block `3fff::/20` ( #124240 )
...
Signed-off-by: y5c4l3 <y5c4l3@proton.me>
2024-09-20 11:01:28 +00:00
Brian Schubert
63f196090f
gh-124248: Fix crash in struct when processing 0p fields ( #124251 )
2024-09-20 12:08:59 +02:00
Serhiy Storchaka
baa3550bc3
gh-95468: Add more tests for "--" (double dash) in test_argparse (GH-124274)
2024-09-20 09:54:20 +00:00
Petr Viktorin
aee219f455
gh-123880: Allow recursive import of single-phase-init modules (GH-123950)
...
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Brett Cannon <brett@python.org>
2024-09-20 10:27:34 +02:00
sobolevn
3e36e5aef1
gh-123797: Check for runtime availability of `ptsname_r` on macos ( #123806 )
2024-09-20 09:30:27 +03:00
Serhiy Storchaka
aae126748f
gh-81691: Fix handling of multiple "--" (double dashes) in argparse (GH-124233)
...
Only the first one has now been removed, all subsequent ones are now
taken literally.
2024-09-20 09:20:47 +03:00
Victor Stinner
7a2d77c903
test_cext, test_cppext: enable /W4 warnings on Windows ( #124253 )
...
Add an explicit cast to (void*) and add Py_UNUSED() to fix some
warnings in extension.c.
2024-09-19 22:32:01 +02:00
Serhiy Storchaka
992e8f6102
gh-124245: Fix UserWarning in test_argparse (GH-124246)
2024-09-19 21:35:12 +03:00
Sergey B Kirpichev
4420cf4dc9
gh-124040: Adjust few tests in testHypot/testDist to get exactly computed results (GH-124042)
2024-09-19 11:11:03 +03:00
sobolevn
7628f67d55
gh-123934: Fix `MagicMock` not to reset magic method return values ( #124038 )
2024-09-19 10:55:47 +03:00
Jacek
ea7fe1fe2e
gh-124212: Fix undefined variable in error message in venv (GH-124211)
2024-09-18 22:05:18 +00:00
Furkan Onder
36682c0914
gh-124083: Skip test_signal.test_strsignal() on NetBSD ( #124084 )
...
Skip test_strsignal() on NetBSD due to TypeError.
2024-09-18 21:22:00 +00:00
Tomas R
21d2a9ab2f
gh-116022: Improve `repr()` of AST nodes ( #117046 )
...
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-09-18 10:28:22 -07:00
Bénédikt Tran
5cd50cb6eb
gh-122145: Handle an empty AST body when reporting tracebacks ( #122161 )
2024-09-18 18:42:33 +02:00
Jelle Zijlstra
96f619faa7
gh-124206: Fix calling get_annotate_function() on static types ( #124208 )
...
Fixes #124206 . No news entry because the bug this fixes was never
released.
2024-09-18 08:39:22 -07:00
Sam James
0c4884d8aa
test: fix _is_perf_version_at_least typo ( #124199 )
2024-09-18 13:44:32 +01:00
Petr Viktorin
42c8b0556c
gh-123085: _compile_importlib: Avoid copying sources before compilation (GH-124131)
...
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2024-09-18 14:14:34 +02:00
Sergey B Kirpichev
8a284e1896
gh-119771: Set errno on overflows in _Py_c_pow() ( #120256 )
...
Before we did this in complex_pow() and behavior of the public C API
function _Py_c_pow() was different from the pure-python pow().
2024-09-18 10:39:11 +02:00
neonene
646f16bdee
gh-124153: Implement `PyType_GetBaseByToken()` and `Py_tp_token` slot (GH-124163)
2024-09-18 09:18:19 +02:00
Sergey B Kirpichev
28aea5d07d
gh-123836: Check zero signs in math_testcases.txt ( #123854 )
...
Just like cmath_testcases.txt. These tests require IEEE 754 anyway.
Correct zero sign for sqrt tests to match math.h convention.
2024-09-17 10:22:40 +02:00
Savannah Ostrowski
14e5bdceff
GH-123945: Update regex for parsing negative numbers that contain underscores ( #123970 )
...
---------
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-09-16 23:30:17 -07:00
Furkan Onder
10de3600a9
GH-124108: Skip test_locale.test_strcoll_with_diacritic() on NetBSD ( #124110 )
...
Skip test_strcoll_with_diacritic() and test_strxfrm_with_diacritic()
of test_locale on NetBSD due to lack of UTF-8 LC_COLLATE
support.
2024-09-16 23:00:36 +00:00
Loïc Estève
eadb9660ed
gh-122957: Fix test flakiness in asyncio test in free-thread build ( #124039 )
2024-09-13 11:13:30 -07:00
Furkan Onder
9f42b62db9
gh-124030: Skip test_tcsendbreak on NetBSD for ENOTTY error (GH-124031)
2024-09-13 19:27:54 +03:00
Wenzel Jakob
74330d992b
gh-100554: Add ``Py_tp_vectorcall`` slot to set ``PyTypeObject.tp_vectorcall`` using the ``PyType_FromSpec`` function family. ( #123332 )
2024-09-13 17:40:25 +02:00
Benjamin Peterson
bb904e063d
closes gh-124016: update Unicode to 16.0.0 ( #124017 )
2024-09-13 07:47:04 -07:00
Irit Katriel
a9594a34c6
gh-124022: Fix bug where class docstring is removed in interactive mode ( #124023 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-09-13 14:06:06 +00:00
Sergey B Kirpichev
b46c65ed2b
gh-123811: Test that round(Decimal) can return signed zero (GH-124007)
2024-09-13 15:49:13 +03:00
Petr Viktorin
432bf31327
gh-123909: PyType_From*: Disallow metaclasses with custom tp_new (GH-123947)
2024-09-13 13:18:49 +02:00
sobolevn
d7e83398c1
gh-108303: Remove the non-test `Lib/test/reperf.py` (GH-114356)
2024-09-13 13:13:52 +02:00
Malcolm Smith
f554883425
gh-116622: Mock the passage of time in Android logcat rate limit tests ( #124015 )
...
Mock the passage of time in Android logcat rate limit tests
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2024-09-13 04:58:11 +00:00
Yngve Mardal Moe
584cdf8d41
gh-123614: Add save function to turtle.py ( #123617 )
2024-09-12 21:36:17 -07:00
Jason R. Coombs
a53812df12
gh-123085: Fix issue in inferred caller when resources package has no source ( #123102 )
...
gh-123085: Fix issue in inferred caller when resources package has no source.
From importlib_resources 6.4.3 (python/importlib_resources#314 ).
2024-09-12 19:08:06 +00:00
Sam Gross
b2afe2aae4
gh-123923: Defer refcounting for `f_executable` in `_PyInterpreterFrame` ( #123924 )
...
Use a `_PyStackRef` and defer the reference to `f_executable` when
possible. This avoids some reference count contention in the common case
of executing the same code object from multiple threads concurrently in
the free-threaded build.
2024-09-12 12:37:06 -04:00
Mark Shannon
4ed7d1d6ac
GH-123996: Explicitly mark 'self_or_null' as an array of size 1 to ensure that it is kept in memory for calls (GH-124003)
2024-09-12 15:32:45 +01:00
Jason R. Coombs
3ea51fa2e3
gh-123994: Generate utf-16 file using little endian and BOM. ( #123995 )
2024-09-12 10:14:46 -04:00
Anders Kaseorg
a362c41bc9
gh-123968: Fix lower bound for `python -m random --float` ( #123971 )
2024-09-12 16:54:18 +03:00
sobolevn
ac918ccad7
gh-123935: Fix typo in `_get_slots` in `dataclasses.py` ( #123941 )
2024-09-12 10:29:06 +03:00
Malcolm Smith
43303e362e
gh-116622: Switch test_stress_delivery_simultaneous from SIGUSR1 to SIGUSR2 ( #123981 )
...
Use SIGUSR1 instead of SIGUSR2 to improve reliability of signal stress test on Android.
2024-09-12 13:52:07 +08:00
Jason R. Coombs
ba687d9481
gh-121735: Fix module-adjacent references in zip files ( #123037 )
...
* gh-116608: Apply style and compatibility changes from importlib_metadata.
* gh-121735: Ensure module-adjacent resources are loadable from a zipfile.
* gh-121735: Allow all modules to be processed by the ZipReader.
* Add blurb
* Remove update-zips script, unneeded.
* Remove unnecessary references to removed static fixtures.
* Remove zipdata fixtures, unused.
2024-09-11 22:33:07 -04:00
Irit Katriel
e07154fd1e
gh-123958: apply docstring removal optimization in ast_opt instead of codegen ( #123959 )
2024-09-11 17:02:28 +00:00
Irit Katriel
6e23c89fcd
gh-123942: add missing test for docstring-handling code in ast_opt.c ( #123943 )
2024-09-11 15:39:53 +01:00
Sergey B Kirpichev
d2b9b6f919
gh-123811: test that round() can return signed zero ( #123829 )
2024-09-11 11:21:05 +02:00
Serhiy Storchaka
a1dbf2ea69
gh-77894: Fix a crash when the GC breaks a loop containing a memoryview (GH-123898)
...
Now a memoryview object can only be cleared if there are no buffers
that refer it.
2024-09-11 12:05:46 +03:00