| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* Revert "[3.13] gh-124873: Tolerate 100 ms in TimerfdTests on Android (GH-127101) (#127105)"
This reverts commit c09366b1fed2289530581505834b2b262120a7c7.
* Skip timerfd tests on Android.
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
| |
Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
|
|
|
|
|
| |
comment (GH-126871)
Include a list of possibilities for not unique prefix.
|
| |
|
|
|
| |
Use AsyncFor element access in codegen
|
|
|
|
| |
(#126894)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#127194)
When handed an absolute Windows path such as `C:\foo` or `//server/share`,
the `urllib.request.pathname2url()` function returns a URL with an
authority section, such as `///C:/foo` or `//server/share` (or before
GH-126205, `////server/share`). Only the `file:` prefix is omitted.
But when handed an absolute POSIX path such as `/etc/hosts`, or a Windows
path of the same form (rooted but lacking a drive), the function returns a
URL without an authority section, such as `/etc/hosts`.
This patch corrects the discrepancy by adding a `//` prefix before
drive-less, rooted paths when generating URLs.
|
|
|
|
|
| |
value (#127219)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
| |
The interpreter now handles `_PyStackRef`s pointing to immortal objects
without the deferred bit set, so `_PyEvalFramePushAndInit_UnTagged` is
no longer necessary.
|
|
|
|
| |
(GH-127249)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Make `create_shelllink_persist` top level function.
* Add `CopyComPointerTests`.
* Add more tests.
* Update tests.
* Add assertions for `Release`'s return value.
|
|
|
| |
In `socket.ioctl`, `:platform:` -> `.. availability::`
|
|
|
| |
Now it's correct and closer to Python/initconfig.c
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These functions have long sown confusion among Python developers. The
existing documentation says they deal with URL path components, but that
doesn't fit the evidence on Windows:
>>> pathname2url(r'C:\foo')
'///C:/foo'
>>> pathname2url(r'\\server\share')
'////server/share' # or '//server/share' as of quite recently
If these were URL path components, they would imply complete URLs like
`file://///C:/foo` and `file://////server/share`. Clearly this isn't right.
Yet the implementation in `nturl2path` is deliberate, and the
`url2pathname()` function correctly inverts it.
On non-Windows platforms, the behaviour until quite recently is to simply
quote/unquote the path without adding or removing any leading slashes. This
behaviour is compatible with *both* interpretations -- 1) the value is a
URL path component (existing docs), and 2) the value is everything
following `file:` (this commit)
The conclusion I draw is that these functions operate on everything after
the `file:` prefix, which may include an authority section. This is the
only explanation that fits both the Windows and non-Windows behaviour.
It's also a better match for the function names.
|
|
|
|
| |
Posix (GH-127218)
|
| |
|
|
|
|
| |
`zipfile.is_zipfile` (#122397)
|
| |
|
|
|
|
| |
groups (#127186)
|
|
|
| |
`x**y == 1/x**-y ` thus changing `/=` to `*=` by negating the exponent.
|
|
|
|
|
| |
urllib.parse (GH-126663)
harmonize naming for three namedtuple base classes in urllib.parse
|
|
|
| |
Move tests for Path.walk() into a new PathWalkTest class, and apply a similar change in tests for the ABCs. This allows us to properly tear down the walk test hierarchy in tearDown(), rather than leaving it to os_helper.rmtree().
|
|
|
| |
Fix typo in docs
|
| |
|
|
|
|
|
| |
Stop converting Windows drive letters to uppercase in
`urllib.request.pathname2url()` and `url2pathname()`. This behaviour is
unnecessary and inconsistent with pathlib's file URI implementation.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Record success in `specialize`
This matches the existing behavior where we increment the success
stat for the generic opcode each time we successfully specialize
an instruction.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
startup failure (GH-109761)
If Python fails to start newly created thread
due to failure of underlying PyThread_start_new_thread() call,
its state should be removed from interpreter' thread states list
to avoid its double cleanup.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
This gets rid of the immortal check in `PyStackRef_FromPyObjectSteal()`.
Overall, this improves performance about 2% in the free threading
build.
This also renames `PyStackRef_Is()` to `PyStackRef_IsExactly()` because
the macro requires that the tag bits of the arguments match, which is
only true in certain special cases.
|
|
|
| |
This change enables custom GHA runners for Ubuntu-24.04 that run on Arm hardware. It also prepares for Windows runners on Arm hardware, but doesn't enable that just yet, because the Arm GHA runner images for Windows need to be updated.
|
|
|
|
|
|
|
|
|
|
|
| |
Add free-threaded specialization for `UNPACK_SEQUENCE` opcode.
`UNPACK_SEQUENCE_TUPLE/UNPACK_SEQUENCE_TWO_TUPLE` are already thread safe since tuples are immutable.
`UNPACK_SEQUENCE_LIST` is not thread safe because of nature of lists (there is nothing preventing another thread from adding items to or removing them the list while the instruction is executing). To achieve thread safety we add a critical section to the implementation of `UNPACK_SEQUENCE_LIST`, especially around the parts where we check the size of the list and push items onto the stack.
---------
Co-authored-by: Matt Page <mpage@meta.com>
Co-authored-by: mpage <mpage@cs.stanford.edu>
|
|
|
|
|
| |
_PyRuntimeState (gh-127118)
We add some comments so contributors can be aware and we move one out-of-place field up.
|
| |
|
|
|
|
|
|
|
|
|
| |
avoid joining parent process' threads (GH-126098)
Threads are gone after fork, so clear the queues too. Otherwise the
child process (here created via multiprocessing.Process) crashes on
interpreter exit.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
| |
Skip threads which are not running.
|
|
|
|
|
|
|
|
|
| |
* Name without a PATHEXT extension is only searched if the mode does not
include X_OK.
* Support multi-component PATHEXT extensions (e.g. ".foo.bar").
* Support files without extensions in PATHEXT contains dot-only extension
(".", "..", etc).
* Support PATHEXT extensions that end with a dot (e.g. ".foo.").
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(GH-125891)
The usage parameter of argparse.ArgumentParser no longer
affects the default value of the prog parameter in subparsers.
Previously the full custom usage of the main parser was used as
the prog prefix in subparsers.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`mmap`, `munmap`, and `mprotect` are used by CPython for memory
management, which may occur in the middle of the FileIO tests. The
system calls can also be used with files, so `strace` includes them
in its `%file` and `%desc` filters.
Filter out the `mmap` system calls related to memory allocation for the
file tests. Currently FileIO doesn't do `mmap` at all, so didn't add
code to track from `mmap` through `munmap` since it wouldn't be used.
For now if an `mmap` on a fd happens, the call will be included (which
may cause test to fail), and at that time support for tracking the
address throug `munmap` could be added.
|
|
|
|
| |
Support multi-argument gettext functions: ngettext(), pgettext(), dgettext(), etc.
|
|
|
|
|
|
|
| |
The `methodcaller` C vectorcall implementation uses an arguments array
that is shared across calls. The first argument is modified on every
invocation. This isn't thread-safe in the free threading build. I think
it's also not safe in general, but for now just disable it in the free
threading build.
|