Commit Graph

123848 Commits

Author SHA1 Message Date
Eric V. Smith 5c6e3b7150
gh-90562: Support zero argument super with dataclasses when slots=True (gh-124455)
Co-authored-by: @wookie184
Co-authored-by: Carl Meyer <carl@oddbird.net>
2024-09-24 21:26:26 -04:00
Savannah Ostrowski b6471f4a39
GH-124408: Temporarily skip test_strftime_y2k for emulated Linux JIT CI (GH-124466) 2024-09-24 18:09:50 -07:00
Jelle Zijlstra 950fab46ad
dataclasses: Avoid using private class (#124465)
typing.get_origin() does what we need here, without reaching into
typing internals. This shouldn't change any behavior (so I am going
to skip news), but it sets a good example for other users introspecting
typing objects.
2024-09-24 14:02:18 -07:00
Victor Stinner 5a60566074
gh-124402: Require cpu resource in test_super slow method (#124434)
test___class___modification_multithreaded() now requires the 'cpu'
test resource on a Free Threaded build.
2024-09-24 22:36:45 +02:00
Jakub Kulík b169cf394f
gh-86009: Fix solaris detection in `_USE_CP_SENDFILE` check (GH-124289) 2024-09-24 22:23:17 +02:00
Sam Gross f4997bb3ac
gh-123923: Defer refcounting for `f_funcobj` in `_PyInterpreterFrame` (#124026)
Use a `_PyStackRef` and defer the reference to `f_funcobj` when
possible. This avoids some reference count contention in the common case
of executing the same code object from multiple threads concurrently in
the free-threaded build.
2024-09-24 20:08:18 +00:00
Jérémie Detrey d3c76dff44
bpo-44864: Do not translate user-provided strings in ArgumentParser.add_subparsers() (GH-27667)
Call _() on literal strings only.
2024-09-24 19:54:50 +00:00
Tian Gao af8403a58d
gh-120254: Add a `commands` argument to `pdb.set_trace` (#120255) 2024-09-24 12:52:15 -07:00
Ned Deily fc9e6bf53d
gh-124448: Update bundled Tcl/Tk in macOS installer to 8.6.15. (#124453) 2024-09-24 19:49:58 +00:00
sobolevn 17b3bc9cc7
gh-124405: Fix `NameError` in `openpty` (#124406) 2024-09-24 20:06:39 +02:00
Savannah Ostrowski b4d0d7de0f
GH-124398: Pin LLVM to 18.1.0 for Windows JIT CI (GH-124399) 2024-09-24 10:03:16 -07:00
Savannah Ostrowski 20ccda000b
GH-87358: Add clarification about nargs and default argparse behaviour (#124094) 2024-09-24 19:30:01 +03:00
Victor Stinner 38a5beb12a
gh-124402: Require cpu resource in test_free_threading (#124438)
Require the 'cpu' test resource on slow test_free_threading tests.
2024-09-24 16:33:27 +02:00
Payton d21b0b5d36
gh-113008: Correct argparse usage output for required, mutually exclusive groups (GH-113085) 2024-09-24 17:14:35 +03:00
Serhiy Storchaka 4a5e4aade4
gh-59317: Improve parsing optional positional arguments in argparse (GH-124303)
Fix parsing positional argument with nargs equal to '?' or '*' if it is
preceded by an option and another positional argument.
2024-09-24 15:46:41 +03:00
Stanley e69ff34e81
gh-65169: Clarify prog default in argparse (GH-31602) 2024-09-24 10:57:37 +00:00
Serhiy Storchaka e670a113b5
gh-123978: Remove broken time.thread_time() on NetBSD (GH-124116) 2024-09-24 08:26:25 +00:00
Serhiy Storchaka e2f710792b
gh-124188: Fix PyErr_ProgramTextObject() (GH-124189)
* Detect source file encoding.
* Use the "replace" error handler even for UTF-8 (default) encoding.
* Remove the BOM.
* Fix detection of too long lines if they contain NUL.
* Return the head rather than the tail for truncated long lines.
2024-09-24 11:01:37 +03:00
Serhiy Storchaka 3c83f9958c
gh-72795: Make positional arguments with nargs='*' or REMAINDER non-required (GH-124306)
This allows to use positional argument with nargs='*' and without default
in mutually exclusive group and improves error message about required
arguments.
2024-09-24 07:55:33 +00:00
Serhiy Storchaka c578271366
gh-53780: Ignore the first "--" (double dash) between an option and command in argparse (GH-124275) 2024-09-24 07:35:28 +00:00
Serhiy Storchaka 3094cd17b0
gh-63143: Fix parsing mutually exclusive arguments in argparse (GH-124307)
Arguments with the value identical to the default value (e.g. booleans,
small integers, empty or 1-character strings) are no longer considered
"not present".
2024-09-24 10:23:07 +03:00
sobolevn faef3fa653
gh-124120: Document `Annotated.__origin__` (#124125)
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-09-24 09:53:04 +03:00
Victor Stinner 9d344fafc4
gh-124127: Make Py_REFCNT() opaque in limited C API 3.14 (#124128) 2024-09-24 08:42:58 +02:00
Serhiy Storchaka b82f07653e
gh-124130: Increase test coverage for \b and \B in regular expressions (GH-124330) 2024-09-24 06:31:10 +00:00
Xie Yanbo 536bc8a806
Fix typos (#124409) 2024-09-23 23:19:25 -07:00
Jelle Zijlstra d56faf28e6
gh-119180: Add discussion of annotations to the 3.14 What's New (#124393)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-09-23 22:50:13 -07:00
Jason Fried d87482bc4e
gh-119333: Add C api to have contextvar enter/exit callbacks (#119335)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-09-23 20:40:17 -07:00
Donghee Na ad7c778546
gh-123990: Good bye WITH_FREELISTS macro (gh-124358) 2024-09-24 01:28:59 +00:00
Petr Viktorin be76e3f26e
gh-100980: ctypes: Test, document, and fix finalizing _fields_ (GH-124292)
- If setting `_fields_` fails, e.g. with AttributeError, don't set the attribute in `__dict__`
- Document the “finalization” behaviour
- Beef up tests: add `getattr`, test Union as well as Structure
- Put common functionality in a common function

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2024-09-24 02:40:53 +02:00
Hugo van Kemenade e256a7590a
Lint and format Tools/build/check-warnings.py (#124382) 2024-09-24 02:47:05 +03:00
Bénédikt Tran 38a887dc3e
gh-119004: fix a crash in equality testing between `OrderedDict` (#121329) 2024-09-23 18:44:36 -05:00
Malcolm Smith e80dd3035f
gh-116622: Complete Android documentation (#124259)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Co-authored-by: T. Wouters <thomas@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-09-23 23:09:53 +00:00
Wulian 27a62e7371
gh-124102: Update internal PCbuild docs to accurately list build dependencies (GH-124103) 2024-09-23 23:09:22 +00:00
Alex Waygood 8a2baedc4b
Bump Ruff to 0.6.7 (#124384) 2024-09-23 22:19:35 +00:00
Adam Turner 0060486862
Doc: Add ``make dist-no-html`` (#124383)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-09-23 23:11:34 +01:00
Brett Cannon 67201ad53f
GH-65961: Document the deprecation of `__package__` and `__cached__` (GH-124377)
The code changes for warning related to `__package__` landed in Python 3.12. `__cached__` doesn't have any changes as it isn't used but only set by the import system.
2024-09-23 14:14:33 -07:00
Malcolm Smith 41e7992e31
gh-99108: Disable HACL SIMD code on older versions of Android (#124304)
Disable HACL SIMD code on older versions of Android
2024-09-23 13:28:03 -07:00
Savannah Ostrowski 7ee9921734
GH-87041: Fix incorrect indentation in argparse help (GH-124230)
In case of usage a long command along with max_help_position more than
the length of the command, the command's help was incorrectly started
on the new line.

Co-authored-by: Pavel Ditenbir <pavel.ditenbir@gmail.com>
2024-09-23 19:45:36 +00:00
Adam Turner 9e55a02fab
GH-109975: Copyedit 3.13 What's New: Trivia (#124348) 2024-09-23 19:32:23 +00:00
neonene d9d5b3d2ef
gh-124344: Make `_PyObject_IS_GC()` use underscored `PyType_IS_GC()` (#124349)
move up _PyType_IS_GC and use it
2024-09-23 21:14:15 +02:00
Jelle Zijlstra 2e0d445364
gh-119180: Fix annotationlib.ForwardRef.evaluate with no globals (#124326)
We were sometimes passing None as the globals argument to eval(), which makes it
inherit the globals from the calling scope. Instead, ensure that globals is always
non-None. The test was passing accidentally because I passed "annotationlib" as a
module object; fix that. Also document the parameters to ForwardRef() and remove
two unused private ones.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-09-23 19:06:19 +00:00
Adam Turner e7d465a607
GH-109975: Copyedit 3.13 What's New: Copyedit C API deprecations pending removal (#124336) 2024-09-23 19:40:20 +01:00
Adam Turner f3b2c36deb
GH-109975: Copyedit 3.13 What's New: Build Changes (#124343)
Co-authored-by: Malcolm Smith <smith@chaquo.com>
2024-09-23 11:30:45 -07:00
Savannah Ostrowski dc48312717
GH-124321: Fix argparse negative number parsing to capture -.5(GH-124322)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-09-23 11:16:55 -07:00
Adam Turner 2f6d4109b8
GH-109975: Copyedit 3.13 What's New: Porting to Python 3.13 (#124341)
Copyedit Porting to Python 3.13
2024-09-23 11:14:37 -07:00
Mark Shannon c87b0e4a46
GH-124284: Add stats for refcount operations on immortal objects (GH-124288) 2024-09-23 19:10:55 +01:00
decorator-factory 6203ef35dd
Replace the term `Immutable` with a `Hashable` in the `sequence` entry of the Glossary (#124350)
The term `Immutable` in the `sequence` entry of the glossary is used incorrectly, in fact dicts accepts hashable keys, which is not the same as immutable.
2024-09-23 16:34:08 +00:00
Steve Dower df7228ce14
gh-124254: Detect freethreaded MSI component when doing an upgrade on Windows (GH-124279) 2024-09-23 16:27:46 +01:00
Kirill Podoprigora 6ab634840c
Add Kirill Podoprigora for AST codeowners (#124302) 2024-09-23 07:16:19 -07:00
Adam Turner 9d0a75269c
GH-109975: Copyedit 3.13 What's New: C API (#124313) 2024-09-23 14:28:17 +01:00