| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
(GH-11015) (GH-11020) (GH-11026)
(cherry picked from commit 4c49da0cb7434c676d70b9ccf38aca82ac0d64a9)
(cherry picked from commit 602d307ac5e8a2da38a193dca3bdfef5994dfe67)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 32bc11c33cf5ccea165b5f4ac3799f02fdf9c76a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
| |
os_read_impl() now also truncates the size to _PY_READ_MAX
on macOS, to avoid to allocate a larger buffer even if _Py_read() is
limited to _PY_READ_MAX bytes (ex: INT_MAX on macOS).
(cherry picked from commit 9a0d7a7648547ffb77144bf2480155f6d7940dea)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
| |
|
|
|
|
|
| |
Some methods in the os module can accept path-like objects. This is documented in the general documentation but not in the function docstrings. To keep both in sync, the docstrings need to be updated to reflect that path-like objects are also accepted..
(cherry picked from commit b942707fc23454a998323c17e30be78ff1a4f0e7)
Co-authored-by: BNMetrics <luna@bnmetrics.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
truncate() (GH-5784)
path_error() uses GetLastError() on Windows, but some os functions
are implemented via CRT APIs which report errors via errno.
This may result in raising OSError with invalid error code (such
as zero).
Introduce posix_path_error() function and use it where appropriate.
(cherry picked from commit 834603112e6ca35944dd21105b01fca562dc3241)
Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-8584)
* Fix integer overflow in os.readv(), os.writev() and in os.sendfile()
with headers or trailers arguments (on BSD-based OSes and MacOS).
* Fix sending the part of the file in os.sendfile() on MacOS.
Using the trailers argument could cause sending more bytes from
the input file than was specified.
Thanks Ned Deily for testing on 32-bit MacOS.
(cherry picked from commit 9d5727326af53ddd91016d98e16ae7cf829caa95)
|
| |
|
|
| |
(GH-6032)
|
| | |
|
| |
|
|
|
| |
(cherry picked from commit 3e197c7a6740d564ad52fb7901c07d5ff49460f5)
Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
os.dup2() tests for dup3() system call availability at runtime,
but doesn't remember the result across calls, repeating
the test on each call with inheritable=False.
Since the caller of os.dup2() is expected to hold the GIL,
fix this by making the variable holding the test result static.
(cherry picked from commit b3caf388a0418f6c031e4dbdcc0c1ce7e5cc36bd)
Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
A closing parentheses was missing.
Signed-off-by: Ngie Cooper <yaneurabeya@gmail.com>
(cherry picked from commit 7745ec4e356ac1f4eaf43b155f4482c20a907d48)
Co-authored-by: ngie-eign <1574099+ngie-eign@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
The PrintNameOffset field of the reparse data buffer
was treated as a number of characters instead of bytes.
(cherry picked from commit 3c34aad4e7a95913ec7db8e5e948a8fc69047bf7)
Co-authored-by: SSE4 <tomskside@gmail.com>
|
| |
|
|
|
| |
(GH-3000) (GH-3000) (#4101)
(cherry picked from commit d4b93e21c2664d6a78e0656e7a7be0807be1c352)
|
| |
|
|
|
| |
(GH-4797) (#4869)
(cherry picked from commit 233ef249cc5c18d796fb581747179c5e062b4083)
|
| |
|
|
|
|
|
| |
Include sys/sysmacros.h for major(), minor(), and makedev(). GNU C libray
plans to remove the functions from sys/types.h.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 75b9618)
|
| |
|
|
|
|
|
|
|
| |
(#2934) (#3267)
* Fixes #30581 by adding a path to use newer GetMaximumProcessorCount API on Windows calls to os.cpu_count()
* Add NEWS.d entry for bpo-30581, os.cpu_count on Windows.
* Tweak NEWS entry
|
| |
|
|
|
|
|
| |
(#3102)
Use only the LongLong form for the conversions
(cherry picked from commit 50e86033de85294d87b7e942701d456342abde8e)
|
| |
|
|
|
|
| |
(GH-2634) (#2656)
called with bytes-like argument..
(cherry picked from commit 1180e5a51871fa53ca6892e83fd2e69dc2600447)
|
| |
|
|
|
|
| |
When os.spawnv() fails while handling arguments, free correctly
argvlist: pass lastarg+1 rather than lastarg to free_string_array()
to also free the first item.
(cherry picked from commit 8acb4cf2b3436652568d7a70228b166316181466)
|
| |
|
|
|
|
|
|
|
|
| |
(GH-2302) (#2462)
Based on patch by Victor Stinner.
Add private C API function _PyUnicode_AsUnicode() which is similar to
PyUnicode_AsUnicode(), but checks for null characters..
(cherry picked from commit f7eae0adfcd4c50034281b2c69f461b43b68db84)
|
| |
|
|
|
|
|
|
| |
New error condition paths were introduced, which did not decrement
`key2` and `val2` objects. Therefore, decrement references before
jumping to the error label.
Signed-off-by: Eric N. Vander Weele <ericvw@gmail.com>
(cherry picked from commit a7874c73c0c729bbec2fd4b077bd0eec276cfff4)
|
| |
|
|
|
|
|
| |
(GH-2382) (#2391)
in `os.putenv()` and `os.spawn*()`..
(cherry picked from commit 77703942c5997dff00c48f10df1b29b11645624c)
|
| |
|
|
|
| |
Fix a regression introduced by myself in the commit
526b22657cb18fe79118c2ea68511aca09430c2c.
(cherry picked from commit c8d6ab2e25ff212702d387e516e258b1d8c52910)
|
| |
|
|
|
| |
(#2215)
(cherry picked from commit 0d32218)
|
| |
|
|
|
|
|
| |
(#1096) (#1180)
raised an error.
(cherry picked from commit bf623ae8843dc30b28c574bec8d29fc14be59d86)
|
| |
|
|
|
|
|
| |
bpo-29619: os.stat() and os.DirEntry.inodeo() now convert inode
(st_ino) using unsigned integers.
(cherry picked from commit 0f6d73343d342c106cda2219ebb8a6f0c4bd9b3c)
(Misc/NEWS conflict handled manually.)
|
| | |
|
| |\ |
|
| | | |
|
| | |
| |
| |
| | |
with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
|
| |\ \
| |/ |
|
| | | |
|
| | |
| |
| |
| | |
arguments
|
| |\ \
| |/ |
|
| | |
| |
| |
| | |
Prevents crashes in some other posixmodule.c functions
|
| |\ \
| |/ |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
Patch by Eryk Sun.
|
| |\ \
| |/ |
|
| | | |
|
| | |
| |
| |
| | |
I forgot there two variations of os.stat() in Python 3.5.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Issue #27778: Fix a memory leak in os.getrandom() when the getrandom() is
interrupted by a signal and a signal handler raises a Python exception.
Modify also os_getrandom_impl() to avoid the temporary buffer, use directly a
Python bytes object.
|
| | |
| |
| |
| |
| | |
Issue #28200: Replace PyUnicode_AsWideCharString() with
PyUnicode_AsUnicodeAndSize().
|
| |\ \
| |/ |
|
| | |
| |
| |
| |
| |
| | |
os.stat()
Patch by Eryk Sun.
|
| | |
| |
| |
| | |
Patch by Ed Schouten.
|
| | |
| |
| |
| | |
Patch by Eryk Sun.
|
| | | |
|
| | | |
|