Eric Snow
1acd249798
gh-117953: Let update_global_state_for_extension() Caller Decide If Singlephase or Not (gh-118193)
...
This change makes other upcoming changes simpler.
2024-04-24 16:28:35 +00:00
Eric Snow
03e3e31723
gh-76785: Rename _xxsubinterpreters to _interpreters (gh-117791)
...
See https://discuss.python.org/t/pep-734-multiple-interpreters-in-the-stdlib/41147/26 .
2024-04-24 16:18:24 +00:00
Eric Snow
af3c1d817d
gh-117953: Cleanups For fix_up_extension() in import.c (gh-118192)
...
These are cleanups I've pulled out of gh-118116. Mostly, this change moves code around to align with some future changes and to improve clarity a little. There is one very small change in behavior: we now add the module to the per-interpreter caches after updating the global state, rather than before.
2024-04-24 09:55:48 -06:00
Alex Waygood
8227883d1f
gh-118013: Use weakrefs for the cache key in `inspect._shadowed_dict` ( #118202 )
2024-04-24 15:55:02 +01:00
Mark Shannon
83235f7791
GH-115419: Move setting the instruction pointer to error exit stubs (GH-118088)
2024-04-24 14:41:30 +01:00
Mark Shannon
77cd0428b6
GH-118095: Convert DEOPT_IFs on likely side exits to EXIT_IFs (GH-118106)
...
Covert DEOPT_IFs on likely side exits to EXIT_IFs
2024-04-24 14:37:55 +01:00
Thomas Grainger
7d369d471c
GH-117536: GH-117894: fix athrow().throw(...) unawaited warning (GH-117851)
2024-04-24 14:20:19 +02:00
Hugo van Kemenade
975081b11e
gh-117225: Add color to doctest output ( #117583 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-04-24 14:27:40 +03:00
rindeal
f6e5cc66be
no-issue: devcontainer: update to Fedora 40 (gh-118161)
2024-04-24 20:13:35 +09:00
Irit Katriel
0aa0fc3d3c
gh-117901: Add option for compiler's codegen to save nested instruction sequences for introspection ( #118007 )
2024-04-24 09:46:17 +00:00
Nikita Sobolev
692e902c74
gh-116023: Add `show_empty=False` to `ast.dump` ( #116037 )
...
Co-authored-by: Carl Meyer <carl@oddbird.net>
2024-04-24 11:02:38 +03:00
Guido van Rossum
7e87d30f1f
gh-118074: Immortal executors are not GC-able ( #118182 )
...
Better version of gh-118117.
Just check for immortality instead of an address range check.
2024-04-23 13:38:23 -07:00
Oleg Iarygin
258408239a
gh-118189: Revert accidentally added incl.tar ( #118190 )
2024-04-23 17:38:33 +00:00
mpage
2e7771a03d
gh-117657: Quiet TSAN warnings about remaining non-atomic accesses of `tstate->state` ( #118165 )
...
Quiet TSAN warnings about remaining non-atomic accesses of `tstate->state`
2024-04-23 10:20:14 -07:00
Animesh Kumar
0d221e9a19
Fix typo in py_compile.rst (GH-118102)
2024-04-23 17:12:49 +00:00
morotti
8fa1248685
gh-117151: optimize BufferedWriter(), do not buffer writes that are the buffer size (GH-118037)
...
BufferedWriter() was buffering calls that are the exact same size as the buffer. it's a very common case to read/write in blocks of the exact buffer size.
it's pointless to copy a full buffer, it's costing extra memory copy and the full buffer will have to be written in the next call anyway.
Co-authored-by: rmorotti <romain.morotti@man.com>
2024-04-23 18:51:20 +03:00
Eric Snow
23950beff8
gh-117953: Small Cleanup of Extensions-Related Machinery Code (gh-118167)
...
This is a collection of very basic cleanups I've pulled out of gh-118116. It is mostly renaming variables and moving a couple bits of code in functionally equivalent ways.
2024-04-23 08:25:50 -06:00
Jelle Zijlstra
d0b664ee06
gh-118168: Fix Unpack interaction with builtin aliases ( #118169 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-04-23 13:40:26 +00:00
Kirill Podoprigora
d687d3fcfa
gh-118140: Make the``test_concurrent_futures.test_init`` quiet. (GH-118141)
...
Add stream argument to unittest.TextTestRunner call
2024-04-23 14:36:06 +02:00
Nikita Sobolev
de1f686827
gh-118082: Improve `import` without names syntax error message ( #118083 )
2024-04-23 13:00:52 +01:00
Joe Jevnik
eb927e9fc8
gh-68114: Fix handling for removed PyArg_ParseTuple 'w' formatters (GH-8204)
...
Co-authored-by: Joe Jevnik <joe@quantopian.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-04-23 13:15:15 +02:00
Yichen Yan
e17cd1fbfd
gh-116984: Install mimalloc headers ( #116985 )
...
- Install mimalloc header only when enabled
- Rename WITH_MIMALLOC to INSTALL_MIMALLOC
2024-04-23 09:56:00 +02:00
Nice Zombies
456c29cf85
gh-118039: Fix config.cache key on WASI ( #118137 )
2024-04-23 10:46:28 +03:00
Shantanu
8e86579cae
gh-95754: Better error when script shadows a standard library or third party module ( #113769 )
2024-04-22 18:24:21 -07:00
Seth Michael Larson
c9829eec08
gh-116741: Upgrade libexpat to 2.6.2 ( #117296 )
...
Upgrade libexpat to 2.6.2
2024-04-22 18:15:08 -07:00
Guido van Rossum
1b85b3424c
GH-118074: Executors in the COLD_EXITS array are not GC'able ( #118117 )
2024-04-22 16:20:39 -07:00
Nikita Sobolev
fc21c7f7a7
Set proper permissions for `jit.yml` workflow ( #118084 )
2024-04-23 00:31:01 +03:00
Jelle Zijlstra
85f727c5fb
gh-109118: Allow lambdas in annotation scopes in classes ( #118019 )
2024-04-22 12:50:26 -07:00
Guido van Rossum
4c7bfdff90
Remove more remnants of deepfreeze ( #118159 )
2024-04-22 12:17:57 -07:00
tahia
8974a63f5e
bpo-18108: Adding dir_fd and follow_symlinks keyword args to shutil.chown (GH-15811)
...
* Adding dir_fd and follow_symlinks keyword args to shutil.chown
* Extending test_shutil.TestShutil.test_chown to include new kwargs
* Updating shutil.chown documentation
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
2024-04-22 18:23:36 +00:00
Nice Zombies
78ba4cb758
gh-118030: Group definitions for `ParamSpecArgs` and `ParamSpecKwargs` in `typing.rst` ( #118154 )
2024-04-22 14:57:46 +00:00
Serhiy Storchaka
287d939ed4
gh-118148: Improve tests for shutil.make_archive() (GH-118149)
2024-04-22 16:27:47 +03:00
Mark Shannon
a6647d16ab
GH-115480: Reduce guard strength for binary ops when type of one operand is known already (GH-118050)
2024-04-22 13:34:06 +01:00
Kerim Kabirov
ceb6038b05
gh-115986 Improve pprint documentation accuracy ( #117403 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-04-22 12:28:21 +02:00
Erlend E. Aasland
550483b7e6
gh-117995: Don't raise DeprecationWarnings for indexed nameless params ( #118001 )
...
Filter out '?NNN' placeholders when looking for named params.
Co-authored-by: AN Long <aisk@users.noreply.github.com>
2024-04-22 08:43:20 +02:00
Dino Viehland
8b541c017e
gh-112075: Make instance attributes stored in inline "dict" thread safe ( #114742 )
...
Make instance attributes stored in inline "dict" thread safe on free-threaded builds
2024-04-21 22:57:05 -07:00
Clément Robert
1446024124
Docs: replace Harry Potter reference with Monty Python ( #118130 )
2024-04-21 19:03:46 +01:00
Serhiy Storchaka
51ef89cd9a
gh-115961: Add name and mode attributes for compressed file-like objects (GH-116036)
...
* Add name and mode attributes for compressed and archived file-like objects
in modules bz2, lzma, tarfile and zipfile.
* Change the value of the mode attribute of GzipFile from integer (1 or 2)
to string ('rb' or 'wb').
* Change the value of the mode attribute of ZipExtFile from 'r' to 'rb'.
2024-04-21 11:46:39 +03:00
Nikita Sobolev
ccda738284
gh-118121: Fix `test_doctest.test_look_in_unwrapped` ( #118122 )
2024-04-21 10:08:32 +03:00
Andrew Cassidy
5fa5b7facb
gh-91629 Use conf.d configs and fish_add_path to set the PATH when installing for the Fish shell. (GH-91630)
...
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-04-21 02:52:58 -04:00
Russell Keith-Magee
df987331d8
gh-114099: Formalize Tier 3 status of iOS (GH-118020)
2024-04-20 23:04:08 -04:00
Kirill Podoprigora
92c84ef831
``Objects/typeobject.c``: Fix typo ( #118126 )
2024-04-21 02:25:39 +00:00
Quazi Irfan
1558d99316
Clarifying nonlocal doc: SyntaxError is raised if nearest enclosing scope is global ( #114009 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-04-20 18:42:51 -07:00
Barney Gale
15fbd53ba9
GH-112855: Speed up `pathlib.PurePath` pickling ( #112856 )
...
The second item in the tuple returned from `__reduce__()` is a tuple of arguments to supply to path constructor. Previously we returned the `parts` tuple here, which entailed joining, parsing and normalising the path object, and produced a compact pickle representation.
With this patch, we instead return a tuple of paths that were originally given to the path constructor. This makes pickling much faster (at the expense of compactness).
It's worth noting that, in the olden times, pathlib performed this parsing/normalization up-front in every case, and so using `parts` for pickling was almost free. Nowadays pathlib only parses/normalises paths when it's necessary or advantageous to do so (e.g. computing a path parent, or iterating over a directory, respectively).
2024-04-20 17:46:52 +01:00
Savannah Ostrowski
d8f350309d
GH-115874: Fix segfault in FutureIter_dealloc (GH-117741)
2024-04-19 22:30:52 +00:00
Dino Viehland
07525c9a85
gh-116818: Make `sys.settrace`, `sys.setprofile`, and monitoring thread-safe ( #116775 )
...
Makes sys.settrace, sys.setprofile, and monitoring generally thread-safe.
Mostly uses a stop-the-world approach and synchronization around the code object's _co_instrumentation_version. There may be a little bit of extra synchronization around the monitoring data that's required to be TSAN clean.
2024-04-19 14:47:42 -07:00
Dino Viehland
b45af00bad
[gh-117657] _Py_MergeZeroLocalRefcount isn't loading ob_ref_shared with strong enough semantics ( #118111 )
...
Use acquire for load of ob_ref_shared
2024-04-19 14:21:01 -07:00
Noah Kim
b624490dee
Fix a typo in dictobject.c documentation ( #117515 )
2024-04-19 19:19:12 +00:00
Russell Keith-Magee
ab99438900
gh-114099: Modify preprocessor symbol usage to support older macOS SDKs (GH-118073)
...
Co-authored-by: Joshua Root jmr@macports.org
2024-04-19 14:56:33 -04:00
Nikita Sobolev
2aa11cca11
gh-118100: Improve links in `ast.rst` ( #118101 )
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-04-19 21:25:54 +03:00