| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
(GH-104283)
|
|
|
|
|
| |
junction (GH-114089)
This avoids impact on later parts of the application which may be able to do things they otherwise shouldn't.
|
|
|
|
|
|
|
|
| |
This comment appears to have been mistakenly copied from what is now
called iobase_check_closed() in commit 4d9aec022063.
Also unite the iobase_check_closed() code with the relevant comment.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
| |
- use PyErr_SetString() iso. PyErr_Format() in parse_tuple_and_keywords()
- fix misspelled format specifier in CHECK_SIGNNESS() macro
|
|
|
|
|
|
|
|
| |
If *trackfd* is False, the file descriptor specified by *fileno*
will not be duplicated.
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
Add some constants to module 'stat' that are used on macOS.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
The new flags were extracted from the macOS 14.2 SDK.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
| |
Co-authored-by: Erlend E. Aasland <erlend@python.org>
|
| |
|
|
|
|
|
|
|
|
| |
On Windows, set _O_NOINHERIT flag on file descriptors
created by os.pipe() and io.WindowsConsoleIO.
Add test_pipe_spawnl() to test_os.
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a fast-path for the common case.
Benchmark:
python -m pyperf timeit \
-s 'import math; gcd=math.gcd; x=2*3; y=3*5' \
'gcd(x,y)'
Result: 1.07x faster (-3.4 ns)
Mean +- std dev: 52.6 ns +- 4.0 ns -> 49.2 ns +- 0.4 ns: 1.07x faster
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
persistent_load() (GH-113579)
Previously the C implementation of pickle.Pickler and pickle.Unpickler
classes did not have such methods and they could only be used if
they were overloaded in subclasses or set as instance attributes.
Fixed calling super().persistent_id() and super().persistent_load() in
subclasses of the C implementation of pickle.Pickler and pickle.Unpickler
classes. It no longer causes an infinite recursion.
|
|
|
|
|
| |
(GH-113786)
Based on patch by SilentGhost.
|
|
|
|
|
|
| |
When an `StopIteration` raises into `asyncio.Future`, this will cause
a thread to hang. This commit address this by not raising an exception
and silently transforming the `StopIteration` with a `RuntimeError`,
which the caller can reconstruct from `fut.exception().__cause__`
|
|
|
|
|
|
| |
Use the object's actual class name in the following _io type's __repr__:
- FileIO
- TextIOWrapper
- _WindowsConsoleIO
|
|
|
|
| |
(GH-113849)
|
|
|
|
|
| |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
|
| |
macOS in the time module (#113792)
|
|
|
|
|
|
|
| |
Adapt the following functions to Argument Clinic:
- gc.set_threshold
- gc.get_referrers
- gc.get_referents
|
|
|
| |
Fix refleaks and a typo.
|
|
|
|
| |
to use the traceback module (#113712)
|
|
|
|
|
|
|
| |
(GH-22535)
io.TextIOWrapper was dropping the internal decoding buffer
during read() and write() calls.
|
|
|
|
|
|
| |
Remove LibreSSL specific workaround ifdefs from `_ssl.c` and delete the non-version-specific `_ssl_data.h` file (relevant for OpenSSL < 1.1.1, which we no longer support per PEP 644).
Co-authored-by: Christian Heimes <christian@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
|
|
|
|
|
| |
gh-113750: Fix object resurrection on free-threaded builds
This avoids the undesired re-initializing of fields like `ob_gc_bits`,
`ob_mutex`, and `ob_tid` when an object is resurrected due to its
finalizer being called.
This change has no effect on the default (with GIL) build.
|
|
|
|
|
| |
This splits part of Modules/gcmodule.c of into Python/gc.c, which
now contains the core garbage collection implementation. The Python
module remain in the Modules/gcmodule.c file.
|
|
|
|
|
| |
_tkinter.c (GH-112893)
Fix undefined behavior warnings (UBSan -fsanitize=function).
|
|
|
| |
Use module state structure for _testcapi.
|
|
|
|
|
|
|
|
|
| |
* gh-113536: Expose `os.waitid` on macOS
This API has been available on macOS for a long time, but was
explicitly excluded due to unspecified problems with the API
in ancient versions of macOS.
* Document that the API is available on macOS starting in Python 3.13
|
|
|
|
|
|
|
|
|
|
|
| |
The length field of StgDictObject for Structure class contains now
the total number of items in ffi_type_pointer.elements (excluding
the trailing null).
The old behavior of using the number of elements in the parent class can
cause the array to be truncated when it is copied, especially when there
are multiple layers of subclassing.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
(GH-19856)
Always include <sys/types.h> before <sys/sysmacros.h>.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
| |
Enable imports of _elementtree module in sub-interpreters
|
|
|
|
| |
_ssl.c currently tries to preserve the verification callback, but at no
point does it ever set one. Just pass in NULL.
|
|
|
|
| |
Also support a file descriptor in os.chmod().
|
|
|
|
|
|
|
|
|
|
| |
First fix resolve situation when pyexpat module (which contains expat_CAPI
capsule) deallocates before _elementtree, so we need to hold a strong
reference to pyexpat module to.
Second fix resolve situation when module state is deallocated before
deallocation of XMLParser instances, which uses module state to clear
some stuff.
|
|
|
|
|
| |
---------
Co-authored-by: Erlend E. Aasland <erlend@python.org>
|
|
|
| |
`--enable-framework` builds were failing. we apparently do not have good CI & buildbot coverage here.
|
|
|
|
| |
getpath.py (GH-113022)
|
|
|
|
|
|
|
|
| |
Add support for `os.POSIX_SPAWN_CLOSEFROM` and
`posix_spawn_file_actions_addclosefrom_np` and have the `subprocess` module use
them when available. This means `posix_spawn` can now be used in the default
`close_fds=True` situation on many platforms.
Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
|
| |
|
|
|
|
|
|
|
| |
used (#113120)
* Allow posix_spawn to inherit environment form parent environ variable.
With this change, posix_spawn call can behave similarly to execv with regards to environments when used in subprocess functions.
|
| |
|
|
|
|
| |
This adds `_PyRWMutex`, a "readers-writer" lock, which wil be used to
serialize global stop-the-world pauses with per-interpreter pauses.
|
|
|
| |
Fix compiler waarnings in Modules/_xxinterpqueuesmodule.c
|
| |
|
|
|
|
| |
initialization (GH-113077)
|
|
|
|
| |
(GH-113049)
|
| |
|