Tomas R.
7ad793e5db
gh-125553: Fix backslash continuation in untokenize
( #126010 )
2025-01-21 19:58:44 +00:00
Wim Jeantine-Glenn
a4760ef8e5
gh-128720: Fix doc inacurracy about __main__.__file__ existence in the REPL ( #128721 )
...
Fix doc inacurracy about __main__.__file__ existence in the REPL
2025-01-21 19:52:21 +00:00
Barney Gale
01d91500ca
GH-128520: Make pathlib._abc.WritablePath
a sibling of ReadablePath
( #129014 )
...
In the private pathlib ABCs, support write-only virtual filesystems by
making `WritablePath` inherit directly from `JoinablePath`, rather than
subclassing `ReadablePath`.
There are two complications:
- `ReadablePath.open()` applies to both reading and writing
- `ReadablePath.copy` is secretly an object that supports the *read* side
of copying, whereas `WritablePath.copy` is a different kind of object
supporting the *write* side
We untangle these as follow:
- A new `pathlib._abc.magic_open()` function replaces the `open()` method,
which is dropped from the ABCs but remains in `pathlib.Path`. The
function works like `io.open()`, but additionally accepts objects with
`__open_rb__()` or `__open_wb__()` methods as appropriate for the mode.
These new dunders are made abstract methods of `ReadablePath` and
`WritablePath` respectively. If the pathlib ABCs are made public, we
could consider blessing an "openable" protocol and supporting it in
`io.open()`, removing the need for `pathlib._abc.magic_open()`.
- `ReadablePath.copy` becomes a true method, whereas `WritablePath.copy` is
deleted. A new `ReadablePath._copy_reader` property provides a
`CopyReader` object, and similarly `WritablePath._copy_writer` is a
`CopyWriter` object. Once GH-125413 is resolved, we'll be able to move
the `CopyReader` functionality into `ReadablePath.info` and eliminate
`ReadablePath._copy_reader`.
2025-01-21 18:35:37 +00:00
Michael Droettboom
3d7c0e5366
gh-129141: Fix build on gcc-9.4.0 (GH-129142)
2025-01-21 19:13:33 +01:00
Hugo van Kemenade
05d12eecbd
gh-127873: Only check sys.flags.ignore_environment
for PYTHON*
env vars ( #127877 )
2025-01-21 16:10:08 +00:00
Petr Viktorin
13475e0a5a
gh-128889: Zero out memory ctypes for generated struct layout tests (GH-128944)
2025-01-21 16:29:02 +01:00
Serhiy Storchaka
4b37a6bda2
gh-71339: Fix an order-dependent failure in test_unittest (GH-129133)
...
It failed if it was preceded by test_builtin.
2025-01-21 16:45:20 +02:00
Ken Jin
5809b25909
gh-128563: Move lltrace into the frame struct (GH-129113)
2025-01-21 22:17:15 +08:00
Victor Stinner
31f149d5b3
gh-128679: Use _PyThreadState_GET() in tracemalloc.c ( #129126 )
...
Replace uncommon PyGILState_GetThisThreadState() with common
_PyThreadState_GET().
2025-01-21 14:43:31 +01:00
Bénédikt Tran
6a0f915aae
gh-129064: Fix RST markup for the NEWS and What's New entries ( #129131 )
...
This amends the NEWS and What's New entries introduced in 0a6412f9cc
.
2025-01-21 12:43:09 +01:00
Victor Stinner
01de4af3e1
gh-126925: Make PyConfig.use_system_logger read-only ( #129124 )
...
The variable is only used once during early Python initialization, it
doesn't make sense to modify it at runtime.
2025-01-21 12:02:38 +01:00
Victor Stinner
80189ff647
Remove PyInit__imp() function ( #129125 )
...
This function was exposed by mistake to the public C API. It's the
only "PyInit" function which is exposed.
2025-01-21 11:58:43 +01:00
Bénédikt Tran
fafc618e2f
gh-111178: fix UBSan failures in Modules/_ctypes
( #129071 )
...
This fixes UBSan failures for the following objects:
- `DictRemoverObject` and `StructParamObject`,
- `CDataObject` and `CFieldObject`, and
- `PyCFuncPtrObject` and `PyCArgObject`.
On the default build, we convert the `LOCK_PTR` and `UNLOCK_PTR` macros to
functions with an unused parameter to ease "unused variable" compiler warnings
suppression. Finally, we also remove some redundant casts to `PyObject *`.
2025-01-21 11:50:13 +01:00
Bénédikt Tran
36f341ca3e
gh-127787: allow retrieving the clipped slice length in _PyUnicodeError_GetParams
(GH-128980)
2025-01-21 11:45:53 +01:00
Petr Viktorin
bf150f61ad
gh-126349: test_turtle: Add cleanup to avoid reference leaks (GH-129079)
2025-01-21 11:28:34 +01:00
Mark Shannon
f5b6356a11
GH-128563: Add new frame owner type for interpreter entry frames (GH-129078)
...
Add new frame owner type for interpreter entry frames
2025-01-21 10:15:02 +00:00
Petr Viktorin
d3b1bb228c
gh-128156: Guard use of ffi_type_complex_double
on macOS system libffi (GH-128680)
...
* Determine ffi complex support at runtime
* Also, generate SIMPLE_TYPE_CHARS once at runtime
2025-01-21 10:59:18 +01:00
Mark Shannon
7239da7559
GH-127953: Make line number lookup O(1) regardless of the size of the code object (GH-128350)
2025-01-21 09:33:23 +00:00
Serhiy Storchaka
f7cc7d296c
gh-71339: Use new assertion methods in test_import and test_importlib (GH-129052)
2025-01-21 11:24:19 +02:00
smelnikov
da310d209a
Docs: fix typo in Doc/howto/mro.rst
(GH-129095)
2025-01-21 10:22:13 +01:00
Hugo van Kemenade
417f7a9ef7
gh-128595: Fix test__colorize
unexpected keyword argument 'file' on buildbots ( #129070 )
2025-01-21 11:20:54 +02:00
Adam Turner
e65a1eb93a
Revert "doc: add social cards generation support in sphinxext-opengraph ( #129085 )" ( #129106 )
2025-01-20 23:53:33 +00:00
Adam Turner
e54ac3b69e
GH-121970: Extract `changes
` into a new extension ( #129105 )
2025-01-20 23:53:08 +00:00
Adam Turner
f3980af38b
Add Adam Turner to CODEOWNERS ( #129104 )
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-01-20 22:32:31 +00:00
Filipe Laíns 🇵🇸
e52ab564da
GH-92897: schedule the check_home deprecation to 3.15 ( #129102 )
2025-01-20 21:25:14 +00:00
Bénédikt Tran
5ed5572cac
gh-111178: fix UBSan failures in Modules/_multiprocessing/semaphore.c
( #129084 )
...
fix UBSan failures for `SemLockObject`
2025-01-20 20:43:55 +00:00
Filipe Laíns 🇵🇸
382340d559
doc: add social cards generation support in sphinxext-opengraph ( #129085 )
2025-01-20 20:41:27 +00:00
Filipe Laíns 🇵🇸
da36bccdac
doc: fix venv creating for the local Python using uv ( #129094 )
2025-01-20 21:04:05 +02:00
Wulian
5d57959d7d
gh-91279: ZipFile.writestr now respect SOURCE_DATE_EPOCH ( #124435 )
2025-01-20 13:12:29 -05:00
5ec1cff
dda02eb7be
GH-128131: Completely support random read access of uncompressed unencrypted files in ZipFile ( #128143 )
...
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-01-20 13:04:43 -05:00
Thomas Grainger
ed6934e71e
gh-128588: gh-128550: remove eager tasks optimization that missed and introduced incorrect cancellations ( #129063 )
...
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-01-20 17:13:01 +00:00
Mark Shannon
ab61d3f430
GH-128914: Remove conditional stack effects from bytecodes.c
and the code generators (GH-128918)
2025-01-20 17:09:23 +00:00
Filipe Laíns 🇵🇸
0a6412f9cc
GH-129064: deprecate sysconfig.expand_makefile_vars ( #129082 )
2025-01-20 17:03:44 +00:00
Thomas Grainger
38a9956876
gh-128308: pass **kwargs
to asyncio task_factory ( #128768 )
...
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-01-20 22:23:55 +05:30
Diego Russo
6c914bf85c
Move to public Linux arm64 hosted runners ( #128964 )
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-01-20 18:51:09 +02:00
Peter Bierma
6e02096e2f
gh-118915: C API: Document compiler flag macros (GH-129028)
2025-01-20 17:45:08 +01:00
Peter Bierma
e792f4bc2e
Docs C API: Clarify what happens when null bytes are passed to PyUnicode_AsUTF8
( #127458 )
...
Co-authored-by: Stan U. <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-01-20 16:54:29 +01:00
Mark Shannon
f0f7b978be
GH-128939: Refactor JIT optimize structs (GH-128940)
2025-01-20 15:49:15 +00:00
nikalinov
e1fa2fcc7c
gh-129044: Update glossary entry for 'loader' to reflect current import system ( #129073 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-01-20 15:46:09 +00:00
Victor Stinner
8ceb6cb117
gh-129033: Remove _PyInterpreterState_SetConfig() function ( #129048 )
...
Remove _PyInterpreterState_GetConfigCopy() and
_PyInterpreterState_SetConfig() private functions. PEP 741 "Python
Configuration C API" added a better public C API: PyConfig_Get() and
PyConfig_Set().
2025-01-20 16:31:33 +01:00
Victor Stinner
573c181502
Add Configuration Options table to PyInitConfig API doc ( #129062 )
...
Document PyConfig members:
* dump_refs_file
* stdlib_dir
* use_frozen_modules
* _pystats
2025-01-20 15:46:45 +01:00
Serhiy Storchaka
38c3cf6320
gh-71339: Use new assertion methods in test_ctypes (GH-129054)
2025-01-20 13:30:00 +00:00
Bénédikt Tran
df66ff14b4
gh-128978: Fix a NameError
in sysconfig.expand_makefile_vars
( #128979 )
...
This fixes a regression introduced by 4a53a397c3
.
2025-01-20 13:27:14 +00:00
Bénédikt Tran
59fcae793f
Remove duplicated dict keys in test_{embed,long}.py
fixtures ( #128727 )
2025-01-20 13:50:10 +01:00
Erlend E. Aasland
da0f47ceab
gh-111178: Regen clinic and fix exceptions.c post gh-128447 ( #129060 )
2025-01-20 12:46:30 +00:00
Serhiy Storchaka
a30277a06a
gh-71339: Use new assertion methods in test_capi (GH-129053)
2025-01-20 14:32:27 +02:00
Erlend E. Aasland
537296cdcd
gh-111178: Generate correct signature for most self converters ( #128447 )
2025-01-20 12:40:18 +01:00
Peter Bierma
4d0a6595a0
gh-128360: Add _Py_AssertHoldsTstate
as assertion for holding a thread state ( #128361 )
...
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-01-20 17:04:35 +05:30
Serhiy Storchaka
c6b570e5e3
gh-71339: Use new assertion methods in test_asyncio
( #129051 )
2025-01-20 17:02:39 +05:30
Hugo van Kemenade
6f167d7134
gh-128595: Default to stdout isatty for colour detection instead of stderr ( #128498 )
...
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-01-20 12:52:42 +02:00