| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
BINARY_FUNC) (GH-112145)
* Use BINARY_FUNC macro for some remaining ops
* Add UNARY_FUNC macro to define unary PyNumber_* functions
|
|
|
|
|
| |
---
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
|
|
|
|
|
| |
Refactor delete-safe symbol handling in subprocess.
Only module globals are force-cleared during interpreter finalization, using a class reference instead of individually listing the constants everywhere is simpler.
|
|
|
|
|
|
| |
Use `_from_parsed_parts()` to create a pre-joined/pre-parsed path, rather
than passing multiple arguments to `with_segments()`
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
behavior (#112617)
Restore `subprocess`'s intended use of `vfork()` by default for performance on Linux;
also fixes the behavior of `extra_groups=[]` which was unintentionally broken in 3.12.0:
Fixed a performance regression in 3.12's :mod:`subprocess` on Linux where it
would no longer use the fast-path ``vfork()`` system call when it could have
due to a logic bug, instead falling back to the safe but slower ``fork()``.
Also fixed a security bug introduced in 3.12.0. If a value of ``extra_groups=[]``
was passed to :mod:`subprocess.Popen` or related APIs, the underlying
``setgroups(0, NULL)`` system call to clear the groups list would not be made
in the child process prior to ``exec()``.
The security issue was identified via code inspection in the process of
fixing the first bug. Thanks to @vain for the detailed report and
analysis in the initial bug on Github.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
| |
Add also test.support.Py_GIL_DISABLED constant.
|
|
|
| |
Replace Py_T_STRING_INLINE with Py_T_STRING_INPLACE
|
|
|
|
|
|
|
|
|
| |
1gig (#112615)
Work around a macOS bug, limit zlib crc32 calls to 1GiB.
Without this, `zlib.crc32` and `binascii.crc32` could produce incorrect
results on multi-gigabyte inputs depending on the macOS version's Apple
supplied zlib implementation.
|
|
|
|
| |
`group()` (#107962)
|
|
|
|
| |
`_ProtocolMeta.__subclasscheck__` (#112717)
|
| |
|
|
|
|
|
| |
It breaks import machinery if the test module has submodules used in
other tests.
|
|
|
|
| |
runtime-checkable protocols by avoiding costly `super()` calls (#112708)
|
| |
|
|
|
|
| |
(GH-109788)
|
|
|
|
| |
arguments (GH-110299)
|
|
|
|
|
|
|
|
|
|
|
| |
Change the declaration of the keywords parameter in functions
PyArg_ParseTupleAndKeywords() and PyArg_VaParseTupleAndKeywords() from `char **`
to `char * const *` in C and `const char * const *` in C++.
It makes these functions compatible with argument of type `const char * const *`,
`const char **` or `char * const *` in C++ and `char * const *` in C
without explicit type cast.
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
|
| |
|
|
|
|
| |
Fix sign conversion in pycore_code.h: use unsigned integers and cast
explicitly when needed.
|
| |
|
|
|
|
| |
bytearray.join (GH-112626)
|
| |
|
|
|
|
| |
Mostly double spacing before 'if __name__...'.
|
|
|
| |
Revise spec-callable pairs from percolator to end.
|
|
|
|
|
|
|
| |
Add trailing slashes to expected `Path.glob()` results wherever a pattern
has a trailing slash. This matches what `glob.glob()` produces.
Due to another bug (GH-65238) pathlib strips all trailing slashes, so this
change is academic for now.
|
|
|
|
| |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
| |
|
|
|
| |
Use author link to 'The Perils of Floating Point'.
|
|
|
|
| |
(#112659)
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Avoid duplicated declarations of "extern" functions in
Python/frozen.c.
Compiler warnings seen by building Python with gcc -Wredundant-decls.
|
|
|
|
|
|
| |
Don't declare PyBool_Type, PyLong_Type and PySys_Audit() twice, but
only once.
Compiler warnings seen by building Python with gcc -Wredundant-decls.
|
| |
|
|
|
|
| |
(#112631)
|
|
|
|
|
| |
Examine and update spec -- callable pairs.
Revise run method.
|
|
|
| |
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
| |
|
|
|
| |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
| |
(#112317)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use a fraction internally in the _PyTime API to reduce the risk of
integer overflow: simplify the fraction using Greatest Common
Divisor (GCD). The fraction API is used by time functions:
perf_counter(), monotonic() and process_time().
For example, QueryPerformanceFrequency() usually returns 10 MHz on
Windows 10 and newer. The fraction SEC_TO_NS / frequency =
1_000_000_000 / 10_000_000 can be simplified to 100 / 1.
* Add _PyTimeFraction type.
* Add functions:
* _PyTimeFraction_Set()
* _PyTimeFraction_Mul()
* _PyTimeFraction_Resolution()
* No longer check "numer * denom <= _PyTime_MAX" in
_PyTimeFraction_Set(). _PyTimeFraction_Mul() uses _PyTime_Mul()
which handles integer overflow.
|
|
|
|
|
|
|
|
|
|
| |
* Move _PyRuntimeState.time to _posixstate.ticks_per_second and
time_module_state.ticks_per_second.
* Add time_module_state.clocks_per_second.
* Rename _PyTime_GetClockWithInfo() to py_clock().
* Rename _PyTime_GetProcessTimeWithInfo() to py_process_time().
* Add process_time_times() helper function, called by
py_process_time().
* os.times() is now always built: no longer rely on HAVE_TIMES.
|
| |
|
|
|
|
|
| |
* Fix a crash when pass UINT_MAX.
* Fix an integer overflow on 64-bit non-Windows platforms.
|
|
|
|
|
| |
files (#112586)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If Py_NOGIL is defined and Py_SET_REFCNT() is called with a reference
count larger than UINT32_MAX, make the object immortal.
Set _Py_IMMORTAL_REFCNT constant type to Py_ssize_t to fix the
following compiler warning:
Include/internal/pycore_global_objects_fini_generated.h:14:24:
warning: comparison of integers of different signs: 'Py_ssize_t'
(aka 'long') and 'unsigned int' [-Wsign-compare]
if (Py_REFCNT(obj) < _Py_IMMORTAL_REFCNT) {
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~
|
|
|
|
| |
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Donghee Na <donghee.na92@gmail.com>
|
| |
|