| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
They do not work with Tcl 9.0.
Use new methods added in Python 3.6.
|
| |
|
|
|
|
|
|
|
|
| |
ntohl(), htonl(), if_indextoname(), getaddrinfo() now use __index__() if
available.
Also fix the Argument Clinic names for module-level functions (although
this does not affect the user).
|
| |
|
|
|
|
| |
(gh-132934)
|
| |
|
| |
|
|
|
|
|
| |
(gh-133129)
This is triggering deadlocks in test_opcache. See GH-133130 for stack trace.
|
| |
|
|
|
|
|
| |
Doing this was always the intention. I was finally motivated to find the time to do it.
See #87859 (comment).
|
|
|
|
|
| |
The function indicates whether or not the function has a return statement.
This is used by a later change related treating some functions like scripts.
|
|
|
| |
Note that the bulk of this change is tests.
|
| |
|
|
|
|
|
|
|
|
| |
In the free-threaded build, avoid data races caused by updating type slots
or type flags after the type was initially created. For those (typically
rare) cases, use the stop-the-world mechanism. Remove the use of atomics
when reading or writing type flags. The use of atomics is not sufficient to
avoid races (since flags are sometimes read without a lock and without
atomics) and are no longer required.
|
|
|
|
|
| |
The `test_load_global_module()` test consumes a lot of dict key versions.
Skip the test if we have consumed half of the available versions that can be
used for the "load global" cache.
|
|
|
|
|
| |
Follow-up to fbffd70. Set `encoding='utf-8'` when reading and writing text
in the tests for the private pathlib ABCs, which allows the tests to run
with `-W error -X warn_default_encoding`
|
| |
|
|
|
|
|
|
|
| |
(#133051)
Ensure that warnings about unspecified text encodings are emitted from
`ReadablePath.read_text()`, `WritablePath.write_text()` and `magic_open()`
with the correct stack level set.
|
|
|
| |
This change consists of adding tests and moving code around, with some renaming thrown in.
|
|
|
|
|
| |
(#133055)
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Add @cpython_only decorator to lazy import tests
- Rename reference to SOURCE format
- Always two newlines between test case classes
- Merge two classes of ForwardRef tests
- Use get_annotations instead of annotationlib.get_annotations
- Format test_annotationlib with Black (not expecting that we'll keep this up
but it's close to Black-formatted right now)
|
| |
|
|
|
|
|
|
|
|
| |
(#128638)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Daniel Watkins <daniel@daniel-watkins.co.uk>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
|
|
|
| |
Add an "__init__.py" file. Fix test_tools.test_freeze.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(gh-130402)
If `Py_IsFinalizing()` is true, non-daemon threads (other than the current one)
are done, and daemon threads are prevented from running, so they
cannot finalize themselves and become done. Joining them (without timeout)
would block forever.
Raise PythonFinalizationError instead of hanging.
Raise even when a timeout is given, for consistency with trying to join your own thread.
See gh-123940 for a use case: calling `join()` from `__del__`. This is
ill-advised, but an exception should at least make it easier to diagnose.
|
|
|
| |
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
|
|
|
|
| |
This was in C version from beginning, but available only
on conditional compilation (EXTRA_FUNCTIONALITY). Current
patch adds function to create IEEE contexts to the
pure-python module as well.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
|
|
|
| |
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
|
|
|
|
| |
* Use better tests for integer argument.
* Add also parallel tests for tcflush() and tcflow().
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gh-133005: Support `tarfile.open(mode="w|xz", preset=...)`
Support passing the `preset` option to `tarfile.open` when the file
is open with `mode="w|xz"`. This aligns the behavior with `"w:xz"`
mode.
* Also raise an error for `compresslevel` or `preset` with wrong mode
Raise an error if `compresslevel` or `preset` argument is specified
for stream mode with incorrect compression. This should reduce the risk
of mistakes and align the stream modes with regular modes, that raise
an implicit TypeError on unsupported arguments.
* Apply suggestions from code review
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-133018)
* Introduces `compression` package for https://peps.python.org/pep-0784/
This commit introduces the `compression` package, specified in PEP 784
to re-export the `lzma`, `bz2`, `gzip`, and `zlib` modules. Introduction
of `compression.zstd` will be completed in a future commit once the
`_zstd` module is merged.
This commit also moves the `_compression` private module to
`compression._common._streams`.
* Re-exports existing module docstrings.
|
|
|
|
|
|
|
|
|
| |
* Fix formatting in module docstring for `ast` https://github.com/python/cpython/issues/133046
* #133046 ast docstring: remove header, dedent, 80-char width.
* Keep existing wrapping
---------
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
|
|
|
|
| |
argument. (GH-115314)
|
|
|
|
|
| |
* [tests] test_fcntl fails when run in a ChromeOS linux runtime container.
It doesn't appear to support F_NOTIFY? Detect the lack of that and skip the test.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Co-authored-by: Julian Gindi <julian@gindi.io>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
|
|
| |
Just use the builtin `TimeoutError`, and remove the import of `futures`.
|
|
|
|
| |
(GH-133003)
|
| |
|
| |
|
|
|
|
| |
(GH-132988)
|
| |
|
|
|
| |
Terminals with `xterm-256color` Xterm support may use 15 (bright white) as their default foreground color.
|
|
|
|
|
|
|
|
|
|
| |
The following are added to the internal C-API:
* _PyErr_FormatV()
* _PyErr_SetModuleNotFoundError()
* _PyXIData_GetNotShareableErrorType()
* _PyXIData_FormatNotShareableError()
We also drop _PyXIData_lookup_context_t and _PyXIData_GetLookupContext().
|