| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
(cherry picked from commit d4792ce916b94d090b6c7bce8b0f973e840c9e4e)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
str (GH-28323) (GH-29111)
An object implementing the os.PathLike protocol can represent a file
system path as a str or bytes object.
Therefore, _infer_return_type function should infer os.PathLike[str]
object as str type and os.PathLike[bytes] object as bytes type.
(cherry picked from commit 6270d3eeaf17b50abc4f8f4d97790d66179638e4)
Co-authored-by: Kyungmin Lee <rekyungmin@gmail.com>
|
| |
|
|
|
|
|
|
| |
Fix typos in the Lib directory as identified by codespell.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>.
(cherry picked from commit 745c9d9dfc1ad6fdfdf1d07420c6273ff67fa5be)
Co-authored-by: Christian Clauss <cclauss@me.com>
|
| |
|
|
|
|
|
| |
(GH-28005) (GH-28027)
(cherry picked from commit 2a8127cafe1d196f858a3ecabf5f1df3eebf9a12)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
| |
tempfile.TemporaryDirectory() (GH-24793)
|
| |
|
|
|
|
|
|
|
|
|
| |
The case of tempfile.tempdir variable being bytes is now handled consistently.
The getters return the right type and no more error of mixing str and bytes unless explicitly caused by the user.
Adds a regression test.
Expands the documentation to clarify the behavior.
Co-authored-by: Eric L <ewl+git@lavar.de>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
| | |
|
| |
|
|
|
| |
`_RandomNameSequence` is not true singleton so using `os.register_at_fork` doesn't make sense unlike `random._inst`.
This reverts commit 8e409cebad42032bb7d0f2cadd8b1e36081d98af.
|
| |
|
|
| |
The _RandomSequence class in tempfile used to check the current pid every time its rng property was used.
This commit replaces this code with `os.register_at_fork` to reduce the overhead.
|
| | |
|
| | |
|
| |
|
| |
It has not returned the file position after the seek.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This implements things like `list[int]`,
which returns an object of type `types.GenericAlias`.
This object mostly acts as a proxy for `list`,
but has attributes `__origin__` and `__args__`
that allow recovering the parts (with values `list` and `(int,)`.
There is also an approximate notion of type variables;
e.g. `list[T]` has a `__parameters__` attribute equal to `(T,)`.
Type variables are objects of type `typing.TypeVar`.
|
| |
|
|
|
|
|
|
|
| |
Moreover, the following tests now check the child process exit code:
* test_os.PtyTests
* test_mailbox.test_lock_conflict()
* test_tempfile.test_process_awareness()
* test_uuid.testIssue8621()
* multiprocessing resource tracker tests
|
| |
|
|
|
|
| |
(GH-17560)
|
| |
|
|
|
|
|
| |
SpooledTemporaryFile.rollback() might cause data corruption
when it is in text mode.
Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
| |
Co-Authored-By: Ammar Askar <ammar_askar@hotmail.com>
|
| |
|
|
|
|
|
| |
(GH-10320)
TemporaryDirectory.cleanup() failed when non-writeable or non-searchable
files or directories were created inside a temporary directory.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
TestRandomNameSequence.test_process_awareness() now calls
os.waitpid() to avoid leaking a zombie process.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(#1341)
* bpo-30197: Enhance functions swap_attr() and swap_item() in test.support.
They now work when delete replaced attribute or item inside the with
statement. The old value of the attribute or item (or None if it doesn't
exist) now will be assigned to the target of the "as" clause, if there is
one.
* Update docstrings.
|
| |
|
|
| |
Revert f50354adaaafebe95ad09d09b825804a686ea843: it introduced a
regression in test_threadedtempfile.
|
| | |
|
| | |
|
| |
|
|
| |
parameters and returns bytes in such situations (matching the os module APIs).
|
| |\
| |
| |
| |
| |
| | |
when a directory with the chosen name already exists on Windows as well as
on Unix. tempfile.mkstemp() now fails early if parent directory is not
valid (not exists or is a file) on Windows.
|
| | |
| |
| |
| |
| |
| | |
when a directory with the chosen name already exists on Windows as well as
on Unix. tempfile.mkstemp() now fails early if parent directory is not
valid (not exists or is a file) on Windows.
|
| | |
| |
| |
| | |
Patch by Christie Wilson.
|
| |/
|
|
|
|
|
| |
I have compared output between pre- and post-patch runs of these tests
to make sure there's nothing missing and nothing broken, on both
Windows and Linux. The only differences I found were actually tests
that were previously *not* run.
|
| |
|
|
| |
NamedTemporaryFile instance. Patch by Bohuslav Kabrda.
|
| |
|
|
| |
used in the with statement in generator.
|
| | |
|
| | |
|
| |
|
|
| |
close the file descriptor if io.open() fails
|
| |\
| |
| |
| |
| | |
called during shutdown. Emitting resource warning in __del__ no longer fails.
Original patch by Antoine Pitrou.
|
| | |
| |
| |
| |
| |
| | |
successful when called during nulling out of modules during shutdown.
Misleading exception no longer raised when resource warning is emitted
during shutdown.
|
| |\ \
| |/
| |
| | |
the file before the method is possibly called.
|
| | |
| |
| |
| | |
the file before the method is possibly called.
|
| |\ \
| |/ |
|
| | | |
|
| | | |
|
| |\ \
| |/
| |
| | |
Patch by Vlad Shcherbina
|
| | |
| |
| |
| | |
Patch by Vlad Shcherbina
|
| |\ \
| |/
| |
| |
| | |
existing directory caused mkstemp and related APIs to fail instead of
retrying. Report and fix by Vlad Shcherbina.
|
| | |
| |
| |
| |
| | |
existing directory caused mkstemp and related APIs to fail instead of
retrying. Report and fix by Vlad Shcherbina.
|
| | |
| |
| |
| |
| | |
are now created non-inheritable; add functions os.get/set_inheritable(),
os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
|
| | |
| |
| |
| |
| |
| | |
instead of 6, to reduce the risk of filename collision. The entropy was reduced
when uppercase letters were removed from the charset used to generate random
characters.
|
| |\ \
| |/
| |
| | |
the disk is full. Original patch by Amir Szekely.
|