| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
(cherry picked from commit e07d8098892e85ecc56969d2c9a5afb3ea33ce8f)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
|
| |
It would just fail if the path was inaccessible and had a trailing slash. It should fall back to the parent directory's metadata.
(cherry picked from commit fe63a401a9b3ca1751b81b5d6ddb2beb7f3675c1)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
| |
objects from file locations (GH-25121)
|
|
|
|
|
| |
(cherry picked from commit fd4ed57674c675e05bd5d577dd5047a333c76c78)
Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
|
|
|
|
|
| |
(cherry picked from commit 7f21c9ac872acc2114aee3313d132b016550ff42)
Co-authored-by: Minmin Gong <gongminmin@msn.com>
|
|
|
|
|
| |
Fix the Windows implementation of os.waitpid() for exit code
larger than "INT_MAX >> 8". The exit status is now interpreted as an
unsigned number.
|
|
|
|
|
|
|
|
|
|
|
| |
Fix os.getgrouplist(): if getgrouplist() function fails because the
group list is too small, retry with a larger group list.
On failure, the glibc implementation of getgrouplist() sets ngroups
to the total number of groups. For other implementations, double the
group list size.
(cherry picked from commit f5c7cabb2be4e42a5975ba8aac8bb458c8d9d6d7)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
| |
On macOS, getgrouplist() returns a non-zero value without setting
errno if the group list is too small. Double the list size and call
it again in this case.
(cherry picked from commit 8ec7370c89aa522602eb9604086ce9f09770953d)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
| |
`resource`, `shutil`, `signal`, `syslog` (GH-18407)
Co-authored-by: Saiyang Gou <gousaiyang@163.com>
|
|
|
|
|
|
|
| |
modules (GH-17824)
(cherry picked from commit 95f60010219e142a436fae18e1695cbc45407afe)
Co-authored-by: Saiyang Gou <gousaiyang@163.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On most platforms, the `environ` symbol is accessible everywhere.
In a dylib on OSX, it's not easily accessible, you need to find it with
_NSGetEnviron.
The code was caching the *value* of environ. But a setenv() can change the value,
leaving garbage at the old value. Fix: don't cache the value of environ, just
read it every time.
(cherry picked from commit 723f71abf7ab0a7be394f9f7b2daa9ecdf6fb1eb)
Co-authored-by: Benoit Hudson <benoit@imgspc.com>
|
|
|
|
|
|
|
|
| |
https://bugs.python.org/issue38418
Automerge-Triggered-By: @zooba
(cherry picked from commit fbe3c76c7ce1eec887d332d801d3784212cc0f73)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
|
|
|
|
|
| |
None. (GH-13933) (GH-16141)
In ArgumentClinic, value "NULL" should now be used only for unrepresentable default values
(like in the optional third parameter of getattr). "None" should be used if None is accepted
as argument and passing None has the same effect as not passing the argument at all.
(cherry picked from commit 279f44678c8b84a183f9eeb85e0b086228154497)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
| |
Use fdwalk() on platforms that support it to implement os.closerange().
(cherry picked from commit e20134f889a0cfcc37a46979f31a1c98b800de07)
Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit aa929273caca2f4e24e3aa9e790272fd4458ad35)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
| |
(cherry picked from commit 772ec0fad57412daa53d16d7019b6b2fe6e94942)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
| |
(cherry picked from commit 993ac92418839427d4068d6ae8e618b06b5d9294)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
|
|
|
|
|
| |
bpo-37834: Normalise handling of reparse points on Windows
* ntpath.realpath() and nt.stat() will traverse all supported reparse points (previously was mixed)
* nt.lstat() will let the OS traverse reparse points that are not name surrogates (previously would not traverse any reparse point)
* nt.[l]stat() will only set S_IFLNK for symlinks (previous behaviour)
* nt.readlink() will read destinations for symlinks and junction points only
bpo-1311: os.path.exists('nul') now returns True on Windows
* nt.stat('nul').st_mode is now S_IFCHR (previously was an error)
|
|
|
|
|
|
|
| |
* Fix test for integer overflow.
* Add an unit test.
(cherry picked from commit ec3e20a2d1edddb0558f9d32e2b367904ccdde88)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
|
|
| |
(GH-14414)
(cherry picked from commit 45a30af109f69a81576b87ea775863ba12d55316)
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
|
|
|
|
|
|
|
|
| |
os.posix_spawn() (GH-14409)
Use Py_ssize_t instead of int for i.
(cherry picked from commit d52a83a3d471ff3c7e9ebfa1731765e5334f7c24)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The os.getcwdb() function now uses the UTF-8 encoding on Windows,
rather than the ANSI code page: see PEP 529 for the rationale. The
function is no longer deprecated on Windows.
os.getcwd() and os.getcwdb() now detect integer overflow on memory
allocations. On Unix, these functions properly report MemoryError on
memory allocation failure.
(cherry picked from commit 689830ee6243126798a6c519c05aa11ba73db7cd)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
| |
(cherry picked from commit 60419a7e96577cf783b3b45bf3984f9fb0d7ddff)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
| |
(cherry picked from commit 8725c83ed5ca8959195ad8326db99d564a921749)
Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
(GH-13464)
Automatically replace
tp_print -> tp_vectorcall_offset
tp_compare -> tp_as_async
tp_reserved -> tp_as_async
|
|
|
| |
https://bugs.python.org/issue26836
|
|
|
|
|
|
|
|
| |
(GH-4944)
It is now allowed to add new fields at the end of the PyTypeObject struct without having to allocate a dedicated compatibility flag in tp_flags.
This will reduce the risk of running out of bits in the 32-bit tp_flags value.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-26836: Add os.memfd_create()
* Use the glibc wrapper for memfd_create()
Co-Authored-By: Christian Heimes <christian@python.org>
* Fix deletions caused by autoreconf.
* Use MFD_CLOEXEC as the default value for *flags*.
* Add memset_s to configure.ac.
* Revert memset_s changes.
* Apply the requested changes.
* Tweak the docs.
|
|
|
|
|
|
|
| |
PyOS_AfterFork_Child(): _PyInterpreterState_DeleteExceptMain() must
be called after _PyRuntimeState_ReInitThreads().
_PyRuntimeState_ReInitThreads() resets interpreters mutex after fork,
mutex used by _PyInterpreterState_DeleteExceptMain().
|
|
|
| |
Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.
|
| |
|
|
|
|
|
|
|
|
| |
Remove the PyEval_ReInitThreads() function from the Python C API.
It should not be called explicitly: use PyOS_AfterFork_Child()
instead.
Rename PyEval_ReInitThreads() to _PyEval_ReInitThreads() and add a
'runtime' parameter.
|
|
|
|
| |
Fix an issue where os.posix_spawn() would incorrectly raise a TypeError
when file_actions is None.
|
| |
|
|
|
|
|
|
|
|
|
| |
The PyOS_AfterFork_Child() function now pass a 'runtime' parameter to
subfunctions.
* Fix _PyRuntimeState_ReInitThreads(): use the correct memory allocator
* Add runtime parameter to _PyRuntimeState_ReInitThreads(),
_PyGILState_Reinit() and _PyInterpreterState_DeleteExceptMain()
* Move _PyGILState_Reinit() to the internal C API.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
path_converter (GH-11831)
The error message emitted when returning invalid types from __fspath__ in interfaces that allow passing PathLike objects has been improved and now it does explain the origin of the error.
|
| |
|
|
|
| |
Make sure that failure paths call CloseHandle outside of the function that failed
|
|
|
|
|
| |
lock (GH-7789)
LoadLibrary, GetProcAddress, FreeLibrary and GetModuleHandle acquire the system loader lock. Calling these while holding the GIL will cause a deadlock on the rare occasion that another thread is detaching and needs to destroy its thread state at the same time.
|
| |
|
|
|
|
| |
(GH-11608)
|
|
|
| |
Add a new os.posix_spawnp() function.
|
|
|
| |
It doesn't know the details of a few less common libc functions.
|
|
|
|
|
|
|
| |
Python source code uses on several places ifdef sun or defined(sun) without the underscores, which is not standard compliant and shouldn't be used.
Defines should check for __sun instead. Reference: http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system#Solaris
https://bugs.python.org/issue35550
|
| |
|