summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-113903: Fix an IDLE configdialog test (#113973)Terry Jan Reedy2024-01-123-16/+16
| | | | | | | | | | | test_configdialog.HighPageTest.test_highlight_target_text_mouse fails if a line of the Highlight tab text sample is not visible. If so, bbox() in click_char() returns None and the unpacking iteration fails. This occurred on a Devuan Linux system. Fix by moving the 'see character' call inside click_char, just before the bbox call. Also, reduce the click_char calls to just one per tag name and replace the other nested function with a dict comprehension.
* gh-111968: Explicit handling for finalized freelist (gh-113929)Donghee Na2024-01-122-19/+7
|
* Improve kde graph with better caption and number formatting (gh-113967)Raymond Hettinger2024-01-121-0/+0
|
* GH-107678: Improve Unicode handling clarity in ``library/re.rst`` (#107679)Adam Turner2024-01-111-92/+145
|
* gh-81489: Use Unicode APIs for mmap tagname on Windows (GH-14133)Zackery Spytz2024-01-115-25/+23
| | | Co-authored-by: Erlend E. Aasland <erlend@python.org>
* Update KDE recipe to match the standard use of the h parameter (gh-#113958)Raymond Hettinger2024-01-111-7/+5
|
* gh-111968: Use per-thread freelists for tuple in free-threading (gh-113921)Donghee Na2024-01-118-70/+45
|
* gh-113845: Fix a compiler warning in Python/suggestions.c (GH-113949)Serhiy Storchaka2024-01-111-2/+0
|
* GH-113853: Guarantee forward progress in executors (GH-113854)Mark Shannon2024-01-115-74/+121
|
* gh-107901: jump leaving an exception handler doesn't need an eval break ↵Irit Katriel2024-01-113-3/+4
| | | | check (#113943)
* gh-91960: Remove Cirrus CI configuration (#113938)Victor Stinner2024-01-111-29/+0
| | | | | Remove .cirrus.yml which was already disabled by being renamed to .cirrus-DISABLED.yml. In total, Cirrus CI only run for less than one month.
* gh-113932: assert ``SyntaxWarning`` in test_compile.TestSpecifics.test_… ↵Kirill Podoprigora2024-01-111-1/+2
| | | | (#113933)
* gh-112419: Document removal of sys.meta_path's 'find_module' fallback (#112421)AN Long2024-01-111-4/+7
| | | Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-112640: Add `kwdefaults` parameter to `types.FunctionType.__new__` (#112641)Nikita Sobolev2024-01-118-13/+76
|
* gh-89811: Check for valid tp_version_tag in specializer (GH-113558)Peter Lazorchak2024-01-114-3/+243
|
* gh-111968: Unify naming scheme for freelist (gh-113919)Donghee Na2024-01-102-3/+3
|
* gh-113896: Fix test_builtin.BuiltinTest.test___ne__() (#113897)Kirill Podoprigora2024-01-101-2/+2
| | | | | Fix DeprecationWarning in test___ne__(). Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* gh-87868: Skip `test_one_environment_variable` in `test_subprocess` when the ↵AN Long2024-01-101-3/+12
| | | | | | | | | | | platform or build cannot do that (#113867) * improve the assert for test_one_environment_variable * skip some test in test_subprocess when python is configured with shared * also skip the test if AddressSanitizer is enabled --------- Co-authored-by: Steve Dower <steve.dower@microsoft.com>
* gh-77046: os.pipe() sets _O_NOINHERIT flag on fds (#113817)Victor Stinner2024-01-105-6/+68
| | | | | | | | On Windows, set _O_NOINHERIT flag on file descriptors created by os.pipe() and io.WindowsConsoleIO. Add test_pipe_spawnl() to test_os. Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* gh-112302: Point core developers to SBOM devguide on errors (#113490)Seth Michael Larson2024-01-101-9/+44
| | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-113753: Clear finalized bit when putting PyAsyncGenASend back into free ↵Sam Gross2024-01-104-0/+16
| | | | list (#113754)
* gh-113625: Align object addresses in the Descriptor HowTo Guide (#113894)Raymond Hettinger2024-01-101-1/+1
|
* Add @requires_zlib() decorator for gh-109858 tests (GH-113918)Serhiy Storchaka2024-01-101-0/+2
|
* gh-111968: Use per-thread freelists for float in free-threading (gh-113886)Donghee Na2024-01-109-59/+43
|
* GH-113860: All executors are now defined in terms of micro ops. Convert ↵Mark Shannon2024-01-109-139/+125
| | | | counter executor to use uops. (GH-113864)
* gh-111139: Optimize math.gcd(int, int) (#113887)Victor Stinner2024-01-101-5/+9
| | | | | | | | | | | | | Add a fast-path for the common case. Benchmark: python -m pyperf timeit \ -s 'import math; gcd=math.gcd; x=2*3; y=3*5' \ 'gcd(x,y)' Result: 1.07x faster (-3.4 ns) Mean +- std dev: 52.6 ns +- 4.0 ns -> 49.2 ns +- 0.4 ns: 1.07x faster
* gh-109858: Protect zipfile from "quoted-overlap" zipbomb (GH-110016)Serhiy Storchaka2024-01-103-0/+73
| | | | | Raise BadZipFile when try to read an entry that overlaps with other entry or central directory.
* gh-111789: Use PyDict_GetItemRef() in Modules/_zoneinfo.c (GH-112078)Serhiy Storchaka2024-01-101-14/+5
|
* gh-66515: Fix locking of an MH mailbox without ".mh_sequences" file (GH-113482)Serhiy Storchaka2024-01-102-2/+26
| | | | | Guarantee that it either open an existing ".mh_sequences" file or create a new ".mh_sequences" file, but do not replace existing ".mh_sequences" file.
* gh-89850: Add default C implementations of persistent_id() and ↵Serhiy Storchaka2024-01-105-214/+190
| | | | | | | | | | | persistent_load() (GH-113579) Previously the C implementation of pickle.Pickler and pickle.Unpickler classes did not have such methods and they could only be used if they were overloaded in subclasses or set as instance attributes. Fixed calling super().persistent_id() and super().persistent_load() in subclasses of the C implementation of pickle.Pickler and pickle.Unpickler classes. It no longer causes an infinite recursion.
* gh-58032: Do not use argparse.FileType in module CLIs and scripts (GH-113649)Serhiy Storchaka2024-01-107-41/+56
| | | | | Open and close files manually. It prevents from leaking files, preliminary creation of output files, and accidental closing of stdin and stdout.
* gh-113664: Improve style of Big O notation (GH-113695)Serhiy Storchaka2024-01-1016-27/+27
| | | | Use cursive to make it looking like mathematic formulas.
* gh-113594: Fix UnicodeEncodeError in TokenList.fold() (GH-113730)Serhiy Storchaka2024-01-103-0/+48
| | | It occurred when try to re-encode an unknown-8bit part combined with non-unknown-8bit part.
* gh-70835: Clarify error message for CSV file opened with wrong newline ↵Serhiy Storchaka2024-01-102-8/+14
| | | | | (GH-113786) Based on patch by SilentGhost.
* gh-96037: Always insert TimeoutError when exit an expired asyncio.timeout() ↵Serhiy Storchaka2024-01-103-13/+133
| | | | | | | | block (GH-113819) If other exception was raised during exiting an expired asyncio.timeout() block, insert TimeoutError in the exception context just above the CancelledError.
* gh-113879: Fix ResourceWarning in test_asyncio.test_server (GH-113881)Serhiy Storchaka2024-01-101-14/+14
|
* gh-113877: Fix Tkinter method winfo_pathname() on 64-bit Windows (GH-113900)Serhiy Storchaka2024-01-103-0/+15
| | | | | winfo_id() converts the result of "winfo id" command to integer, but "winfo pathname" command requires an argument to be a hexadecimal number on Win64.
* GH-113858: GitHub Actions config: Only save ccache on pushes (GH-113859)Petr Viktorin2024-01-102-0/+10
|
* gh-112182: Replace StopIteration with RuntimeError for future (#113220)Jamie Phan2024-01-104-12/+49
| | | | | | When an `StopIteration` raises into `asyncio.Future`, this will cause a thread to hang. This commit address this by not raising an exception and silently transforming the `StopIteration` with a `RuntimeError`, which the caller can reconstruct from `fut.exception().__cause__`
* pathlib ABCs: Require one or more initialiser arguments (#113885)Barney Gale2024-01-102-32/+26
| | | | | | | Refuse to guess what a user means when they initialise a pathlib ABC without any positional arguments. In mainline pathlib it's normalised to `.`, but in the ABCs this guess isn't appropriate; for example, the path type may not represent the current directory as `.`, or may have no concept of a "current directory" at all.
* GH-113528: Deoptimise `pathlib._abc.PurePathBase` (#113559)Barney Gale2024-01-094-140/+195
| | | | | | | Apply pathlib's normalization and performance tuning in `pathlib.PurePath`, but not `pathlib._abc.PurePathBase`. With this change, the pathlib ABCs do not normalize away alternate path separators, empty segments, or dot segments. A single string given to the initialiser will round-trip by default, i.e. `str(PurePathBase(my_string)) == my_string`. Implementors can set their own path domain-specific normalization scheme by overriding `__str__()` Eliminating path normalization makes maintaining and caching the path's parts and string representation both optional and not very useful, so this commit moves the `_drv`, `_root`, `_tail_cached` and `_str` slots from `PurePathBase` to `PurePath`. Only `_raw_paths` and `_resolving` slots remain in `PurePathBase`. This frees the ABCs from the burden of some of pathlib's hardest-to-understand code.
* gh-111968: Introduce _PyFreeListState and _PyFreeListState_GET API (gh-113584)Donghee Na2024-01-0917-50/+171
|
* GH-113528: Deoptimise `pathlib._abc.PurePathBase.relative_to()` (again) ↵Barney Gale2024-01-092-15/+42
| | | | | | | | | (#113882) Restore full battle-tested implementations of `PurePath.[is_]relative_to()`. These were recently split up in 3375dfe and a15a773. In `PurePathBase`, add entirely new implementations based on `_stack`, which itself calls `pathmod.split()` repeatedly to disassemble a path. These new implementations preserve features like trailing slashes where possible, while still observing that a `..` segment cannot be added to traverse an empty or `.` segment in *walk_up* mode. They do not rely on `parents` nor `__eq__()`, nor do they spin up temporary path objects. Unfortunately calling `pathmod.relpath()` isn't an option, as it calls `abspath()` and in turn `os.getcwd()`, which is impure.
* GH-113528: Deoptimise `pathlib._abc.PurePathBase.parts` (#113883)Barney Gale2024-01-092-4/+13
| | | | | Implement `parts` using `_stack`, which itself calls `pathmod.split()` repeatedly. This avoids use of `_tail`, which will be moved to `PurePath` shortly.
* gh-66060: Use actual class name in _io type's __repr__ (#30824)AN Long2024-01-097-20/+59
| | | | | | Use the object's actual class name in the following _io type's __repr__: - FileIO - TextIOWrapper - _WindowsConsoleIO
* GH-113528: Deoptimise `pathlib._abc.PathBase.resolve()` (#113782)Barney Gale2024-01-091-25/+40
| | | | | | Replace use of `_from_parsed_parts()` with `with_segments()` in `resolve()`. No effect on `Path.resolve()`, which uses `os.path.realpath()`.
* GH-113661: unittest runner: Don't exit 5 if tests were skipped (#113856)Stefano Rivera2024-01-095-3/+18
| | | | | The intention of exiting 5 was to detect issues where the test suite wasn't discovered at all. If we skipped tests, it was correctly discovered.
* gh-113781: Silence AttributeError in warning module during Python ↵Serhiy Storchaka2024-01-092-3/+6
| | | | | | finalization (GH-113813) The tracemalloc module can already be cleared.
* gh-113848: Handle CancelledError subclasses in asyncio TaskGroup() and ↵Serhiy Storchaka2024-01-093-7/+13
| | | | timeout() (GH-113850)
* gh-113848: Use PyErr_GivenExceptionMatches() for check for CancelledError ↵Serhiy Storchaka2024-01-091-15/+1
| | | | (GH-113849)