Dino Viehland
5da0280648
gh-117657: Fixes a few small TSAN issues in dictobject ( #118200 )
...
Fixup TSAN errors for dict
2024-04-25 08:53:29 -07:00
mpage
cce5ae6082
gh-117657: Add a couple more TSAN suppressions ( #118256 )
2024-04-25 11:48:16 -04:00
mpage
f14e9f9154
gh-117657: Fix data race in `_Py_IsImmortal` ( #118261 )
...
The load of `ob_ref_local races with stores. Using a relaxed load is
sufficient; stores to the field are relaxed.
2024-04-25 11:31:57 -04:00
Faidon Liambotis
fb7f79b4da
gh-117566: fix IPv6Address.is_loopback for IPv4-mapped loopbacks (GH-117567)
...
While properties like IPv6Address.is_private account for IPv4-mapped
IPv6 addresses, such as for example:
>>> ipaddress.ip_address("192.168.0.1").is_private
True
>>> ipaddress.ip_address("::ffff:192.168.0.1").is_private
True
...the same doesn't currently apply to the is_loopback property:
>>> ipaddress.ip_address("127.0.0.1").is_loopback
True
>>> ipaddress.ip_address("::ffff:127.0.0.1").is_loopback
False
At minimum, this inconsistency between different properties is
counter-intuitive. Moreover, ::ffff:127.0.0.0/104 is for all intents and
purposes a loopback address, and should be treated as such.
2024-04-25 15:17:40 +00:00
Donghee Na
eb20a7d12c
gh-112069: Do not require lock if the set has never been exposed. (gh-118069)
2024-04-26 00:13:57 +09:00
Kirill Podoprigora
1723c76d79
Fix incorrect usage of ``support.requires_gil_enabled`` ( #118170 )
2024-04-25 11:11:59 -04:00
neonene
2c45148912
gh-117578: Introduce _PyType_GetModuleByDef2 private function (GH-117661)
...
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-04-25 13:51:31 +02:00
Mark Shannon
f180b31e76
GH-118095: Handle `RETURN_GENERATOR` in tier 2 (GH-118180)
2024-04-25 11:32:47 +01:00
Nice Zombies
10bb90ed49
gh-102511: Speed up os.path.splitroot() with native helpers (GH-118089)
2024-04-25 10:07:38 +01:00
Erlend E. Aasland
e38b43c213
gh-118221: Always use the default row factory in sqlite3.iterdump() ( #118223 )
...
sqlite3.iterdump() depends on the row factory returning resulting rows
as tuples; it will fail with custom row factories like for example a
dict factory.
With this commit, we explicitly reset the row factory of the cursor used
by iterdump(), so we always get predictable results. This does not
affect the row factory of the parent connection.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-04-25 10:11:45 +02:00
Itamar Oren
796b3fb280
gh-118207: Rename the COMMON_FIELDS macro in funcobject.h and undef it after use (GH-118208)
2024-04-25 08:49:15 +02:00
Serhiy Storchaka
546cbcfa0e
gh-117968: Make the test for closed file more safe in the C API tests (GH-118230)
...
The behavior of fileno() after fclose() is undefined, but it is the only
practical way to check whether the file was closed.
Only test this on the known platforms (Linux, Windows, macOS), where we
already tested that it works.
2024-04-25 08:00:42 +03:00
Steve Dower
4b10e209c7
gh-117786: Fix venv created from Windows Store install by restoring __PYVENV_LAUNCHER__ smuggling (GH-117814)
2024-04-24 23:00:55 +01:00
Savannah Ostrowski
8942bf41da
GH-118246: Exclude test_pathlib and test_posixpath from emulated JIT CI (GH-118247)
2024-04-24 21:43:50 +00:00
Serhiy Storchaka
93b7ed7c6b
gh-108191: Add support of positional argument in SimpleNamespace constructor (GH-108195)
...
SimpleNamespace({'a': 1, 'b': 2}) and SimpleNamespace([('a', 1), ('b', 2)])
are now the same as SimpleNamespace(a=1, b=2).
2024-04-25 00:39:54 +03:00
Eric Snow
85ec1c2dc6
gh-117953: Fix Refleaks Introduced by gh-118194 (gh-118250)
...
A couple of refleaks slipped through in gh-118194. This takes care of them.
(AKA _Py_ext_module_loader_info_init() does not steal references.)
2024-04-24 21:23:45 +00:00
Pablo Galindo Salgado
345e1e04ec
gh-112730: Make the test suite resilient to color-activation environment variables ( #117672 )
2024-04-24 21:25:22 +01:00
edson duarte
59a4d52973
gh-85453: Make numeric literals consistent across datetime.rst ( #118245 )
...
Remove code formatting from remaining numeric literals.
2024-04-24 20:19:54 +00:00
edson duarte
809aa9a682
gh-85453: Adapt datetime.rst to devguide recommendations for code snippets and variables ( #118068 )
...
Also remove formatting from numeric literals.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-04-24 19:53:52 +00:00
Eric Snow
5865fa5f9b
gh-117953: Add Internal struct _Py_ext_module_loader_info (gh-118194)
...
This helps with a later change that splits up _PyImport_LoadDynamicModuleWithSpec().
2024-04-24 17:42:01 +00:00
David Rubin
9b280ab0ab
gh-116988: Remove duplicates of `annotated_rhs` in the Grammar ( #117004 )
2024-04-24 18:16:06 +01:00
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