Jakub Kulík
8f82d9aa21
bpo-41843: Reenable use of sendfile in shutil module on Solaris (GH-23893)
2024-09-19 14:47:05 +00:00
Stefano Rivera
426569eb8c
Support the "pager" binary in _pyrepl ( #122878 )
...
Debian (and derivatives) provide a /usr/bin/pager binary, managed by the
alternatives system, that always points to an available pager utility.
Allow _pyrepl to use it, to follow system policy.
This is a very trivial change, from a patch that Debian has been
carrying since 2.7 era. Seems appropriate to upstream.
https://bugs.debian.org/799555
2024-09-19 13:18:24 +00: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
Cody Maloney
8b6c7c7877
gh-120754: Refactor I/O modules to stash whole stat result rather than individual members ( #123412 )
...
Multiple places in the I/O stack optimize common cases by using the
information from stat. Currently individual members are extracted from
the stat and stored into the fileio struct. Refactor the code to store
the whole stat struct instead.
Parallels the changes to _io. The `stat` Python object doesn't allow
changing members, so rather than modifying estimated_size, just clear
the value.
2024-09-18 17:47:57 +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
Jacek
a15a584bf3
gh-122765: make prompt in activate.csh robust against unbalanced quotes and newlines (GH-123751)
2024-09-17 17:16:43 +00: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
sobolevn
9dacf430c2
Remove unused `_allowed_types` from `typing.py` ( #124090 )
2024-09-14 16:14:45 +03:00
sobolevn
1de46136b9
Remove unused variable in `MagicMixin._mock_set_magics` ( #124092 )
2024-09-14 10:20:44 +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
Miro Hrončok
f4e5643df6
gh-124027: Support Del, PgUp, and PgDn on TERM=vt100 ( #124028 )
...
pyrepl: Support Del, PgUp, and PgDn on TERM=vt100
From Fedora's /etc/inputrc:
"\e[5~": history-search-backward
"\e[6~": history-search-forward
"\e[3~": delete-char
Fixes https://github.com/python/cpython/issues/124027
2024-09-13 02:07:23 +01: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
Xie Yanbo
e9eedf19c9
Fix invisible character typo ( #123933 )
...
Remove accidental addition of zero-width character (U+FEFF) reported by @jaraco:
- c3f4a6b524 (commitcomment-146456562)
2024-09-11 07:44:46 -04: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
Tushar Sadhwani
3597642ed5
gh-122239: Add actual count in unbalanced unpacking error message when possible ( #122244 )
2024-09-10 16:07:30 +01:00
Jelle Zijlstra
b52de7e02d
gh-123881: Add additional test coverage for PEP 695 edge cases ( #123886 )
2024-09-10 08:26:42 +01:00
Raymond Hettinger
2afba5ca6d
Small improvements to the itertools docs (GH-123885)
2024-09-09 20:57:49 -05:00
Serhiy Storchaka
c0c2aa7644
gh-122213: Add notes for pickle serialization errors (GH-122214)
...
This allows to identify the source of the error.
2024-09-09 21:28:55 +03:00
Eric Snow
d8f3c1e8f9
gh-117482: Simplify the Fix For Builtin Types Slot Wrappers (GH-122865)
...
In gh-121602, I applied a fix to a builtin types initialization bug.
That fix made sense in the context of some broader future changes,
but introduced a little bit of extra complexity. That fix has turned
out to be incomplete for some of the builtin types we haven't
been testing. I found that out while improving the tests.
A while back, @markshannon suggested a simpler fix that doesn't
have that problem, which I've already applied to 3.12 and 3.13.
I'm switching to that here. Given the potential long-term
benefits of the more complex (but still incomplete) approach,
I'll circle back to it in the future, particularly after I've improved
the tests so no corner cases slip through the cracks.
(This is effectively a "forward-port" of 716c677
from 3.13.)
2024-09-09 16:04:58 +02:00
algonell
9017b95ff2
Fix typos ( #123775 )
2024-09-09 14:58:26 +02:00