Commit Graph

120879 Commits

Author SHA1 Message Date
Eugene Toder c0b0c2f201
gh-101860: Expose __name__ on property (GH-101876)
Useful for introspection and consistent with functions and other
descriptors.
2024-02-20 17:14:34 +02:00
Victor Stinner 9af80ec83d
gh-110850: Replace _PyTime_t with PyTime_t (#115719)
Run command:

sed -i -e 's!\<_PyTime_t\>!PyTime_t!g' $(find -name "*.c" -o -name "*.h")
2024-02-20 15:02:27 +00:00
Brett Simmers 0749244d13
gh-112175: Add `eval_breaker` to `PyThreadState` (#115194)
This change adds an `eval_breaker` field to `PyThreadState`. The primary
motivation is for performance in free-threaded builds: with thread-local eval
breakers, we can stop a specific thread (e.g., for an async exception) without
interrupting other threads.

The source of truth for the global instrumentation version is stored in the
`instrumentation_version` field in PyInterpreterState. Threads usually read the
version from their local `eval_breaker`, where it continues to be colocated
with the eval breaker bits.
2024-02-20 09:57:48 -05:00
talcs e71468ba4f
gh-112020: Document the meaning of empty bytes returned by socket.recv() (GH-112055) 2024-02-20 16:54:33 +02:00
Victor Stinner e00960a74d
gh-110850: Enhance PyTime C API tests (#115715) 2024-02-20 15:53:40 +01:00
Alexander Shadchin 1ff6c1416b
Add missed `stream` argument (#111775)
* Add missed `stream` argument

* Add news
2024-02-20 14:09:46 +00:00
Victor Stinner d24bed5ba0
gh-110850: PyTime_Time() return 0 on success (GH-115713)
Thanks!
2024-02-20 14:35:41 +01:00
Ken Jin dcba21f905
gh-115687: Split up guards from COMPARE_OP (GH-115688) 2024-02-20 11:30:49 +00:00
Kirill Podoprigora a2bb8ad144
gh-115700: Add target `_RegenCases` in Windows build for cases regeneration. (GH-115708) 2024-02-20 19:10:47 +08:00
Mark Shannon 626c414995
GH-115457: Support splitting and replication of micro ops. (GH-115558) 2024-02-20 10:50:59 +00:00
Mark Shannon 7b21403ccd
GH-112354: Initial implementation of warm up on exits and trace-stitching (GH-114142) 2024-02-20 09:39:55 +00:00
Raymond Hettinger acda1757bc
gh-113157: Document and test __get__ for MethodType (gh-115492) 2024-02-20 01:53:25 -06:00
Raymond Hettinger 2aaef56236
Make the title match the content (GH-115702) 2024-02-20 01:51:56 -06:00
Raymond Hettinger 9f8a9e8ac7
Modernize the Sorting HowTo guide (gh-115479) 2024-02-19 21:22:07 -06:00
Jason Zhang c2cb31bbe1
gh-115539: Allow enum.Flag to have None members (GH-115636) 2024-02-19 14:36:11 -08:00
Steve Dower 6cd18c75a4
gh-115543: Update py.exe to know about Python 3.13 and to install 3.12 by default (GH-115544) 2024-02-19 20:36:20 +00:00
Naglis Jonaitis 57d31ec359
Fix typo in multiprocessing docs (#115650) 2024-02-19 18:19:14 +00:00
Serhiy Storchaka 8f602981ba
gh-115664: Fix versionadded and versionchanged directives in multiprocessing.rst (GH-115665) 2024-02-19 18:03:42 +00:00
Brian Schubert b02ab65e80
gh-115664: Fix chronological ordering of versionadded and versionchanged directives (#115676) 2024-02-19 17:54:54 +00:00
Serhiy Storchaka e47ecbd042
gh-60346: Improve handling single-dash options in ArgumentParser.parse_known_args() (GH-114180) 2024-02-19 19:20:00 +02:00
Serhiy Storchaka 872cc9957a
gh-115341: Fix loading unit tests with doctests in -OO mode (GH-115342) 2024-02-19 19:03:21 +02:00
Serhiy Storchaka 07ef9d86a5
Fix test_py_compile with -O mode (GH-115345) 2024-02-19 19:02:51 +02:00
Serhiy Storchaka 7b25a82e83
Fix test_compile with -O mode (GH-115346) 2024-02-19 19:02:29 +02:00
Pablo Galindo Salgado ecf16ee50e
gh-115154: Fix untokenize handling of unicode named literals (#115171) 2024-02-19 14:54:10 +00:00
Daniel Haag d504968983
gh-115652: Fix indentation in the documentation of multiprocessing.get_start_method (GH-115658) 2024-02-19 14:26:23 +00:00
Victor Stinner aa8c1a0d16
gh-114626: Add again _PyCFunctionFastWithKeywords name (GH-115561)
Keep the old private _PyCFunctionFastWithKeywords name (Python 3.7)
as an alias to the new public name PyCFunctionFastWithKeywords
(Python 3.13a4).

_PyCFunctionWithKeywords doesn't exist in Python 3.13a3, whereas
_PyCFunctionFastWithKeywords was removed in Python 3.13a4.
2024-02-19 13:20:46 +01:00
0xflotus cbe809dfa9
gh-83648: Add missing `deprecated` arg in argparse.rst (GH-115640) 2024-02-19 10:29:32 +02:00
Masayuki Moriyama 1476ac2c58
gh-102388: Add windows_31j to aliases for cp932 codec (#102389)
The charset name "Windows-31J" is registered in the IANA Charset Registry[1]
and is implemented in Python as the cp932 codec.

[1] https://www.iana.org/assignments/charset-reg/windows-31J

Signed-off-by: Masayuki Moriyama <masayuki.moriyama@miraclelinux.com>
2024-02-19 17:01:35 +09:00
Simon A. Eugster 177b9cb52e
Docs: Add explanation about little/big endian (#109841)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-02-18 23:50:09 -08:00
Jamie Phan 53d5e67804
gh-111358: Fix timeout behaviour in BaseEventLoop.shutdown_default_executor (#115622) 2024-02-19 00:01:00 +00:00
Shantanu edea0e7d99
gh-114709: Mark commonpath behaviour as changed in 3.13 (#115639) 2024-02-18 14:08:50 -08:00
Victor Stinner 1e5719a663
gh-115122: Add --bisect option to regrtest (#115123)
* test.bisect_cmd now exit with code 0 on success, and code 1 on
  failure. Before, it was the opposite.
* test.bisect_cmd now runs the test worker process with
  -X faulthandler.
* regrtest RunTests: Add create_python_cmd() and bisect_cmd()
  methods.
2024-02-18 20:06:39 +00:00
Daler 0c80da4c14
gh-115572: Move `codeobject.replace()` docs to the data model (#115631) 2024-02-18 14:13:46 +00:00
Sebastian Rittau 371c970886
gh-114709: Fix exceptions raised by posixpath.commonpath (#114710)
Fix the exceptions raised by posixpath.commonpath

Raise ValueError, not IndexError when passed an empty iterable. Raise
TypeError, not ValueError when passed None.
2024-02-18 00:24:58 -08:00
Nikita Sobolev f9154f8f23
gh-108303: Move `Lib/test/sortperf.py` to `Tools/scripts` (#114687) 2024-02-18 10:27:14 +03:00
Serhiy Storchaka 090dd21ab9
gh-115618: Remove improper Py_XDECREFs in property methods (GH-115619) 2024-02-17 23:18:30 +02:00
Hugo van Kemenade aba37d451f
gh-100176: Remove outdated Tools/{io,cc,string}bench (#101853)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-02-17 14:17:21 -07:00
Brian Schubert 90dd653a61
gh-115596: Fix ProgramPriorityTests in test_os permanently changing the process priority (GH-115610) 2024-02-17 16:42:57 +00:00
Dmitry Marakasov 437924465d
Fix ProgramPriorityTests on FreeBSD with high nice value (GH-100145)
It expects priority to be capped with 19, which is the cap for Linux,
but for FreeBSD the cap is 20 and the test fails under the similar
conditions. Tweak the condition to cover FreeBSD as well.
2024-02-17 14:54:47 +00:00
Kirill Podoprigora 265548a4ea
gh-115567: Catch test_ctypes.test_callbacks.test_i38748_stackCorruption stdout output (GH-115568) 2024-02-17 15:17:55 +02:00
Thomas Grainger 04005f5021
Document use of ANY in test assertions (GH-94060) 2024-02-17 13:13:34 +00:00
Kirill Podoprigora b9a9e3dd62
gh-107155: Fix help() for lambda function with return annotation (GH-107401) 2024-02-17 12:47:51 +00:00
wookie184 664965a1c1
gh-96497: Mangle name before symtable lookup in 'symtable_extend_namedexpr_scope' (GH-96561) 2024-02-17 12:06:31 +00:00
Matthew Hughes e88ebc1c40
gh-97590: Update docs and tests for ftplib.FTP.voidcmd() (GH-96825)
Since 2f3941d743 this function returns the
response string, rather than nothing.
2024-02-17 11:57:51 +00:00
6t8k 26800cf25a
gh-95782: Fix io.BufferedReader.tell() etc. being able to return offsets < 0 (GH-99709)
lseek() always returns 0 for character pseudo-devices like
`/dev/urandom` (for other non-regular files, e.g. `/dev/stdin`, it
always returns -1, to which CPython reacts by raising appropriate
exceptions). They are thus technically seekable despite not having seek
semantics.

When calling read() on e.g. an instance of `io.BufferedReader` that
wraps such a file, `BufferedReader` reads ahead, filling its buffer,
creating a discrepancy between the number of bytes read and the internal
`tell()` always returning 0, which previously resulted in e.g.
`BufferedReader.tell()` or `BufferedReader.seek()` being able to return
positions < 0 even though these are supposed to be always >= 0.

Invariably keep the return value non-negative by returning
max(former_return_value, 0) instead, and add some corresponding tests.
2024-02-17 11:16:06 +00:00
Furkan Onder d5a30a1777
gh-56499: Update the pickle library's note section for the __setstate__ function (GH-101062) 2024-02-17 10:51:43 +00:00
Rami debb1386be
gh-87688: Amend SSLContext.hostname_checks_common_name docs (GH-100517) 2024-02-17 10:22:19 +00:00
Thomas Weißschuh 09fab93c3d
gh-100884: email/_header_value_parser: don't encode list separators (GH-100885)
ListSeparator should not be encoded. This could happen when a long line
pushes its separator to the next line, which would have been encoded.
2024-02-17 10:13:46 +00:00
Derek Higgins 465db27cb9
gh-100985: Consistently wrap IPv6 IP address during CONNECT (GH-100986)
Update _get_hostport to always remove square brackets
from IPv6 addresses. Then add them if needed
in "CONNECT .." and "Host: ".
2024-02-17 10:10:12 +00:00
Hugo van Kemenade 4dff48d1f4
gh-101100: Fix Sphinx warnings in `whatsnew/3.2.rst` (#115580)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-02-17 03:03:20 -07:00