Commit Graph

120673 Commits

Author SHA1 Message Date
dependabot[bot] 93bfaa858c
build(deps): bump hypothesis from 6.92.2 to 6.97.4 in /Tools (#114851)
Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 6.92.2 to 6.97.4.
- [Release notes](https://github.com/HypothesisWorks/hypothesis/releases)
- [Commits](https://github.com/HypothesisWorks/hypothesis/compare/hypothesis-python-6.92.2...hypothesis-python-6.97.4)

---
updated-dependencies:
- dependency-name: hypothesis
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 10:42:35 +00:00
dependabot[bot] 21c01a009f
build(deps-dev): bump types-setuptools from 69.0.0.0 to 69.0.0.20240125 in /Tools (#114853)
build(deps-dev): bump types-setuptools in /Tools

Bumps [types-setuptools](https://github.com/python/typeshed) from 69.0.0.0 to 69.0.0.20240125.
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-setuptools
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 09:52:05 +00:00
Christophe Nanteuil de6f97cd35
Fix typos in ElementTree documentation (GH-108848)
PI objects instead of comment objects.
2024-02-01 11:34:04 +02:00
Sam Gross e6d6d5dcc0
gh-114746: Avoid quadratic behavior in free-threaded GC (GH-114817)
The free-threaded build's GC implementation is non-generational, but was
scheduled as if it were collecting a young generation leading to
quadratic behavior. This increases the minimum threshold and scales it
to the number of live objects as we do for the old generation in the
default build.

Note that the scheduling is still not thread-safe without the GIL. Those
changes will come in later PRs.

A few tests, like "test_sneaky_frame_object" rely on prompt scheduling
of the GC. For now, to keep that test passing, we disable the scaled
threshold after calls like `gc.set_threshold(1, 0, 0)`.
2024-02-01 10:26:23 +01:00
technillogue 5ce193e65a
gh-114364: Fix awkward wording about mmap.mmap.seekable (#114374)
---------
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-02-01 06:03:58 +00:00
srinivasan 57c3e775df
gh-114648: Add IndexError exception to tutorial datastructures list.pop entry (#114681)
Remove redundant explanation of optional argument.
2024-01-31 22:46:49 -05:00
Skip Montanaro 586057e9f8
gh-67230: Add versionadded notes for QUOTE_NOTNULL and QUOTE_STRINGS (#114816)
As @GPHemsley pointed out, #29469 omitted `versionadded` notes for the 2 new items.
2024-01-31 22:11:16 -05:00
Pradyot Ranjan ff8939e5ab
gh-114811: Change '\*' to '*' in warnings.rst (#114819)
Regression in 3.12.
2024-01-31 20:48:39 -05:00
Hugo van Kemenade 854e2bc423
CI: Test on macOS M1 (#114766)
Test on macOS M1
2024-01-31 17:35:48 -08:00
Aidan Holm a79a27242f
gh-111112: Avoid potential confusion in TCP server example. (#111113)
Improve misleading TCP server docs and example.

socket.recv(), as documented by the Python reference documentation,
returns at most `bufsize` bytes, and the underlying TCP protocol means
there is no guaranteed correspondence between what is sent by the client
and what is received by the server.

This conflation could mislead readers into thinking that TCP is
datagram-based or has similar semantics, which will likely appear to
work for simple cases, but introduce difficult to reproduce bugs.
2024-01-31 16:42:38 -08:00
Jamie Phan 80aa7b3688
gh-109534: fix reference leak when SSL handshake fails (#114074) 2024-01-31 16:42:17 -08:00
Donghee Na 7b9d406729
gh-112087: Make PyList_{Append,Size,GetSlice} to be thread-safe (gh-114651) 2024-02-01 08:58:08 +09:00
Bradley Reynolds 1836f674c0
Add note to `sys.orig_argv` clarifying the difference from `sys.argv` (#114630)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2024-01-31 13:33:28 -08:00
Nikita Sobolev b25b7462d5
gh-114788: Do not run JIT workflow on unrelated changes (#114789)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-01-31 12:51:18 -07:00
Albert Zeyer 78c254582b
gh-113939: Frame clear, clear locals (#113940) 2024-01-31 19:14:44 +00:00
Nachtalb b905fad838
gh-111741: Recognise image/webp as a standard format in the mimetypes module (GH-111742)
Previously it was supported as a non-standard type.
2024-01-31 17:33:46 +02:00
Tian Gao 765b9ce9fb
gh-59013: Set breakpoint on the first executable line of function when using `break func` in pdb (#112470) 2024-01-31 13:03:05 +00:00
Nikita Sobolev 1c2ea8b33c
gh-114790: Do not execute `workflows/require-pr-label.yml` on forks (#114791)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-01-31 13:32:27 +02:00
Alex Waygood 25ce7f872d
Remove Alex Waygood as an Argument Clinic CODEOWNER (#114796) 2024-01-31 11:28:23 +00:00
Sam Gross 66f95ea6a6
gh-114737: Revert change to ElementTree.iterparse "root" attribute (GH-114755)
Prior to gh-114269, the iterator returned by ElementTree.iterparse was
initialized with the root attribute as None. This restores the previous
behavior.
2024-01-31 13:22:24 +02:00
Serhiy Storchaka b7688ef71e
gh-114685: Check flags in PyObject_GetBuffer() (GH-114707)
PyObject_GetBuffer() now raises a SystemError if called with
PyBUF_READ or PyBUF_WRITE as flags. These flags should
only be used with the PyMemoryView_* C API.
2024-01-31 13:11:35 +02:00
Skip Montanaro 7a93db4425
gh-101100: Fix class reference in library/test.rst (GH-114769)
The text clearly seems to be referencing `TestFuncAcceptsSequencesMixin`,
for which no target is available. Name the class properly and suppress
the dangling reference.
2024-01-31 11:33:10 +02:00
Daniel Hollas 5e390a0fc8
gh-109653: Speedup import of threading module (#114509)
Avoiding an import of functools leads to 50% speedup of import time.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-01-31 09:29:44 +00:00
Erlend E. Aasland c8cf5d7d14
Docs: mark up dbm.gnu.open() and dbm.ndbm.open() using param list (#114762) 2024-01-31 07:59:34 +01:00
Brett Cannon 2ed8f924ee
GH-114743: Set a low recursion limit for `test_main_recursion_error()` in `test_runpy` (GH-114772)
This can fail under a debug build of WASI when directly executing test.test_runpy.
2024-01-31 01:49:27 +00:00
Barney Gale 574291963f
pathlib ABCs: drop partial, broken, untested support for `bytes` paths. (#114777)
Methods like `full_match()`, `glob()`, etc, are difficult to make work with
byte paths, and it's not worth the effort. This patch makes `PurePathBase`
raise `TypeError` when given non-`str` path segments.
2024-01-31 00:59:33 +00:00
Barney Gale 1667c28686
pathlib ABCs: raise `UnsupportedOperation` directly. (#114776)
Raise `UnsupportedOperation` directly, rather than via an `_unsupported()`
helper, to give human readers and IDEs/typecheckers/etc a bigger hint that
these methods are abstract.
2024-01-31 00:38:01 +00:00
Diego Russo a06b606462
gh-110190: Fix ctypes structs with array on Windows ARM64 (GH-114753) 2024-01-30 23:53:04 +00:00
Serhiy Storchaka dc4cd2c9ba
gh-106392: Fix inconsistency in deprecation warnings in datetime module (GH-114761) 2024-01-30 22:15:33 +00:00
Brandt Bucher 348a72ce3f
GH-113464: Add aarch64-apple-darwin/clang to JIT CI (GH-114759) 2024-01-30 14:08:53 -08:00
Skip Montanaro 3911b42cc0
gh-101100: Fix references in csv docs (GH-114658)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-01-30 21:54:37 +00:00
Matt Prodani e5e186609f
gh-112606: Use pthread_cond_timedwait_relative_np() in parking_lot.c when available (#112616)
Add a configure define for HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP and
replaces pthread_cond_timedwait() with pthread_cond_timedwait_relative_np()
for relative time when supported in semaphore waiting logic.
2024-01-30 22:22:17 +01:00
Barney Gale fda7445ca5
GH-70303: Make `pathlib.Path.glob('**')` return both files and directories (#114684)
Return files and directories from `pathlib.Path.glob()` if the pattern ends
with `**`. This is more compatible with `PurePath.full_match()` and with
other glob implementations such as bash and `glob.glob()`. Users can add a
trailing slash to match only directories.

In my previous patch I added a `FutureWarning` with the intention of fixing
this in Python 3.15. Upon further reflection I think this was an
unnecessarily cautious remedy to a clear bug.
2024-01-30 19:52:53 +00:00
Kirill Podoprigora 6de8aa31f3
``importlib/_bootstrap.py``: Reduce size of ``_List`` instances (GH-114747)
Reduce size of _List instances
2024-01-30 10:44:09 -08:00
Terry Jan Reedy a1332a99cf
Clarify one-item tuple (#114745)
A 'single tuple' means 'one typle, of whatever length.
Remove the unneeded and slight distracting parenthetical 'singleton' comment.
2024-01-30 18:40:54 +00:00
Dino Viehland 0990d55725
gh-112075: refactor dictionary lookup functions for better re-usability (#114629)
Refactor dict lookup functions to use force inline helpers
2024-01-30 09:33:36 -08:00
Pablo Galindo Salgado 39d102c2ee
gh-113744: Add a new IncompleteInputError exception to improve incomplete input detection in the codeop module (#113745)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
2024-01-30 16:21:30 +00:00
Eugene Toder 1f515e8a10
gh-112919: Speed-up datetime, date and time.replace() (GH-112921)
Use argument clinic and call new_* functions directly. This speeds up
these functions 6x to 7.5x when calling with keyword arguments.
2024-01-30 15:19:46 +00:00
Hugo van Kemenade 4287e8608b
gh-109975: Copyedit "What's New in Python 3.13" (#114401)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-30 17:12:11 +02:00
Barney Gale 809eed4805
GH-114610: Fix `pathlib._abc.PurePathBase.with_suffix('.ext')` handling of stems (#114613)
Raise `ValueError` if `with_suffix('.ext')` is called on a path without a
stem. Paths may only have a non-empty suffix if they also have a non-empty
stem.

ABC-only bugfix; no effect on public classes.
2024-01-30 14:25:16 +00:00
Vinay Sajip e21754d7f8
gh-114706: Allow QueueListener.stop() to be called more than once. (GH-114748) 2024-01-30 12:34:18 +00:00
Serhiy Storchaka ea30a28c3e
gh-113732: Fix support of QUOTE_NOTNULL and QUOTE_STRINGS in csv.reader (GH-113738) 2024-01-30 14:21:12 +02:00
Victor Stinner 58f883b91b
gh-103323: Remove current_fast_get() unused parameter (#114593)
The current_fast_get() static inline function doesn't use its
'runtime' parameter, so just remove it.
2024-01-30 11:47:58 +01:00
Sviatoslav Sydorenko (Святослав Сидоренко) 963904335e
GH-80789: Get rid of the ``ensurepip`` infra for many wheels (#109245)
Co-authored-by: vstinner@python.org
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-01-30 01:25:31 +00:00
Brandt Bucher 742ba6081c
GH-113464: Make Brandt a codeowner for JIT stuff (GH-114739) 2024-01-29 16:29:54 -08:00
Erlend E. Aasland 8612230c1c
gh-114569: Use PyMem_* APIs for non-PyObjects in compiler (#114587) 2024-01-30 00:04:34 +01:00
Hugo van Kemenade 3996cbdd33
Set `hosted_on` for Read the Docs builds (#114697) 2024-01-29 14:24:21 -07:00
Erlend E. Aasland 53d921ed96
gh-114569: Use PyMem_* APIs for non-PyObjects in unicodeobject.c (#114690) 2024-01-29 21:48:49 +01:00
Matan Perelman 29952c86f3
TaskGroup: Use explicit None check for cancellation error (#114708) 2024-01-29 11:12:33 -08:00
Serhiy Storchaka aa3402ad45
gh-114678: Fix incorrect deprecation warning for 'N' specifier in Decimal format (GH-114683)
Co-authored-by: Stefan Krah <skrah@bytereef.org>
2024-01-29 19:58:31 +02:00