Commit Graph

123444 Commits

Author SHA1 Message Date
Barney Gale 5002f17794
GH-119518: Stop interning strings in pathlib GH-123356)
Remove `sys.intern(str(x))` calls when normalizing a path in pathlib. This
speeds up `str(Path('foo/bar'))` by about 10%.
2024-09-02 18:14:09 +02:00
Bénédikt Tran 77a2fb4bf1
gh-123409: fix `IPv6Address.reverse_pointer` for IPv4-mapped addresses (GH-123419)
Fix functionality that was broken with better textual representation for IPv4-mapped addresses (gh-87799)
2024-09-02 17:05:05 +02:00
Donghee Na f95fc4de11
gh-101525: Skip test_gdb if the binary is relocated by BOLT. (gh-118572) 2024-09-02 13:24:53 +00:00
Victor Stinner f1a0d96f41
gh-123091: Use _Py_IsImmortalLoose() (#123511)
Use _Py_IsImmortalLoose() in bytesobject.c, typeobject.c
and ceval.c.
2024-09-02 14:25:19 +02:00
Nice Zombies 22fdb8cf89
gh-118508: Clarify which characters are matched by `\s` (#119155)
Clarify re syntax
2024-09-02 07:48:15 -04:00
sobolevn 23f159ae71
gh-123562: Improve `SyntaxError` message for `case ... as a.b` (#123563) 2024-09-02 13:11:44 +02:00
sobolevn c3ed775899
gh-123570: Add link to `weakref.ref` from `weakref_slot` docs in `dataclasses` (#123571) 2024-09-02 09:58:38 +03:00
dependabot[bot] 88210c295d
build(deps): bump hypothesis from 6.108.10 to 6.111.2 in /Tools (#123567)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 08:04:50 +03:00
Rafael Fontenelle 9a32a2588e
gh-109975: Remove dangling angle bracket from 3.13.rst (#123589)
Remove dangling angle bracket from 3.13.rst
2024-09-02 07:57:56 +03:00
Raymond Hettinger e3f76e5cfb
Remove irrelevant detail from example code. (gh-123587) 2024-09-01 20:04:33 -05:00
Raymond Hettinger cb6d25011e
Simplify Property() recipe to focus on the essentials (gh-123585) 2024-09-01 17:49:38 -05:00
sobolevn 91b7f2e7f6
gh-123553: Fix compile warning in `compile.c` (#123578) 2024-09-01 15:43:45 +00:00
Daniel Hollas 2304774465
gh-118761: Speedup pathlib import by deferring shutil (#123520)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-09-01 15:44:48 +01:00
Yoda 42a818912b
gh-123341: Support `tkinter.Event` type subcript (#123353)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-09-01 12:47:07 +01:00
dependabot[bot] 64af2b29d2
Bump types-setuptools from 71.1.0.20240726 to 74.0.0.20240831 in /Tools (#123565)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-01 10:38:58 +00:00
sobolevn 75e72822a3
gh-91126: Docs and tests for slotted dataclasses with `__init_subclass__` (#123342) 2024-09-01 13:25:34 +03:00
dependabot[bot] d9439a205a
Bump mypy from 1.11.1 to 1.11.2 in /Tools (#123566)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-01 10:10:10 +00:00
dependabot[bot] bb6fe14921
Bump types-psutil from 6.0.0.20240621 to 6.0.0.20240901 in /Tools (#123564)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-01 11:09:51 +01:00
Kirill Podoprigora 084e0f35d1
gh-123553: Fix compiler warning in `Python/compile.c` (#123554) 2024-09-01 06:29:34 +00:00
jlallas384 bac0e115b8
gh-123550: Fix code snippet of `BUILD_TUPLE` in `dis` docs (#123551) 2024-09-01 07:11:40 +01:00
Adam Turner 0ff59d707c
GH-109975: Copyedit 3.13 What's New: Removals (#123529)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-09-01 05:41:17 +00:00
Aarni Koskela 0b6acfee04
gh-123494: Improve documentation for ``webbrowser`` return types (#123495)
Document the return value for ``webbrowser.open*()``.
2024-09-01 06:17:03 +01:00
Luka 917283ada6
gh-115238: Remove a redundant f-string in graphlib (#115239) 2024-09-01 06:12:53 +01:00
Wei-Hsiang (Matt) Wang cf472577e2
gh-123517: Remove unnecessary ``:meth:`` parentheses (#123518) 2024-09-01 05:59:42 +01:00
Seth Michael Larson 34ddb64d08
gh-121285: Remove backtracking when parsing tarfile headers (GH-121286)
* Remove backtracking when parsing tarfile headers
* Rewrite PAX header parsing to be stricter
* Optimize parsing of GNU extended sparse headers v0.0

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-08-31 15:17:05 -07:00
Hugo van Kemenade 0cba289870
Enable colour for doctest on GitHub Actions (#123536) 2024-08-31 15:15:44 +01:00
Serhiy Storchaka 5414b97ce2
gh-123309: Remove check for redefined memo entry in pickletools.dis() (GH-123374)
Such pickles are supported by the Unpickler even if the Pickler does not
produce them.
2024-08-31 16:21:49 +03:00
Serhiy Storchaka fc897fcc01
gh-76960: Fix urljoin() and urldefrag() for URIs with empty components (GH-123273)
* urljoin() with relative reference "?" sets empty query and removes fragment.
* Preserve empty components (authority, params, query, fragment) in urljoin().
* Preserve empty components (authority, params, query) in urldefrag().

Also refactor the code and get rid of double _coerce_args() and
_coerce_result() calls in urljoin(), urldefrag(), urlparse() and
urlunparse().
2024-08-31 12:42:08 +03:00
Serhiy Storchaka e5a567b0a7
gh-123309: Add more tests for the pickletools module (GH-123355)
Add tests for genops() and dis().
2024-08-31 12:30:05 +03:00
Maciej Olko 5332d989af
gh-123407: Enable translating literal and code blocks (#123408) 2024-08-31 07:31:36 +01:00
Oded Arbel 10bf615bab
gh-108172: do not override OS preferred browser if it is a super-string of a known browser (GH-113011)
When checking if the registering browser is the "OS preferred browser", do not use a substring search - that makes no sense: one can have a preferred browser that looks like a super-string of a known browser, e.g. "firefox-nightly" vs "firefox".

https://github.com/python/cpython/issues/108172 explains in more detail, and lays out a potential better future enhancement for this case of just using xdg-open.  We'll go with this for now.

---------

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-08-30 23:11:57 -07:00
Alexander P. 74bfb53e3a
gh-121313: Limit the reading size from pipes to their default buffer size on POSIX systems (GH-121315)
See https://github.com/python/cpython/issues/121313 for analysis, but this greatly reduces memory overallocation and overhead when multiprocessing is sending non-small data over its pipes between processes.
2024-08-30 22:57:22 -07:00
Terry Jan Reedy 1ce9e58803
Make self turtledemo codeowner (#123524) 2024-08-30 21:59:12 -04:00
Irit Katriel 6bfbfc6af3
gh-121404: rearrange code in compile.c so that codegen functions come first and compiler functions second (#123510) 2024-08-30 22:54:42 +01:00
sobolevn e451a8937d
gh-123440: Improve error message for `except as` used with not a name (#123442) 2024-08-30 17:21:59 +01:00
Victor Stinner d8e69b2c1b
gh-122854: Add Py_HashBuffer() function (#122855) 2024-08-30 15:42:27 +00:00
Victor Stinner 3d60dfbe17
gh-121645: Add PyBytes_Join() function (#121646)
* Replace _PyBytes_Join() with PyBytes_Join().
* Keep _PyBytes_Join() as an alias to PyBytes_Join().
2024-08-30 12:57:33 +00:00
Matt Wozniski 7fca268bee
gh-123484: Fix the debug offsets for PyLongObject (#123485) 2024-08-30 12:39:28 +01:00
Wei-Hsiang (Matt) Wang 103a0470e3
gh-123492: Remove unnecessary `:func:` parentheses (#123493) 2024-08-30 14:34:09 +03:00
Kirill Podoprigora 8aaf7525ab
gh-123189: [`Modules/blake2module.c`]: Move function definitions and their usage under the macros (#123190) 2024-08-30 13:28:32 +03:00
sobolevn f8a736b8e1
gh-123446: Fix empty function names in `TypeError`s in `typeobject` (#123470) 2024-08-30 10:36:51 +03:00
Serhiy Storchaka 32c7dbb2bc
gh-121485: Always use 64-bit integers for integers bits count (GH-121486)
Use 64-bit integers instead of platform specific size_t or Py_ssize_t
to represent the number of bits in Python integer.
2024-08-30 08:13:24 +03:00
sobolevn 58ce131037
gh-123446: Fix empty function names in `TypeError`s in `_csv` module (#123462) 2024-08-29 11:12:37 +03:00
sobolevn 303f92a9ce
gh-123446: Fix empty function names in `TypeError`s in `_csv` module (#123461) 2024-08-29 06:53:57 +00:00
Serhiy Storchaka 0c3ea30238
gh-123431: Harmonize extension code checks in pickle (GH-123434)
This checks are redundant in normal circumstances and can only work if
the extension registry was intentionally broken.

* The Python implementation now raises exception for the extension code
  with false boolean value.
* Simplify the C code. RuntimeError is now raised in explicit checks.
* Add many tests.
2024-08-29 08:26:16 +03:00
Peter Bierma c9930f5022
gh-123448: Move `_PyNoDefault_Type` to the static types array (#123449) 2024-08-28 18:27:40 -07:00
Petr Viktorin b379f1b26c
gh-122136: test_asyncio: Don't fail if the kernel buffers more data than advertised (GH-123423) 2024-08-28 22:36:42 +02:00
Irit Katriel 61bef6245c
gh-123142: fix too wide source location of GET_ITER/GET_AITER (#123420) 2024-08-28 17:11:52 +01:00
Bénédikt Tran 40fff90ae3
gh-101860: document `property.__name__` (GH-123399) 2024-08-28 16:10:13 +02:00
Bogdan Romanyuk be083cee34
gh-123344: Add missing ast optimizations for PEP 696 (#123377)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-08-28 06:38:56 -07:00