Erlend E. Aasland
a71e32ce8e
gh-78612: Mark up eval() using param list ( #115212 )
...
Also mention that the 'expression' parameter can be a string.
2024-02-28 14:03:50 +01:00
Petr Viktorin
7acf1fb5a7
gh-114911: Add CPUStopwatch test helper (GH-114912)
...
A few of our tests measure the time of CPU-bound operation, mainly
to avoid quadratic or worse behaviour.
Add a helper to ignore GC and time spent in other processes.
2024-02-28 12:53:48 +01:00
Kirill Podoprigora
3b63d0769f
gh-116030: test_unparse: Add ``ctx`` argument to ``ast.Name`` calls ( #116031 )
2024-02-28 03:04:23 -08:00
Pablo Galindo Salgado
1752b51012
gh-115773: Add tests to exercise the _Py_DebugOffsets structure ( #115774 )
2024-02-28 10:17:34 +00:00
Jelle Zijlstra
d53560deb2
gh-105858: Expose some union-related objects as internal APIs (GH-116025)
...
We now use these in the AST parsing code after gh-105880. A few comparable types (e.g.,
NoneType) are already exposed as internal APIs.
2024-02-28 09:56:40 +00:00
Serhiy Storchaka
e72576c48b
gh-115961: Improve tests for compressed file-like objects (GH-115963)
...
* Increase coverage for compressed file-like objects initialized with a
file name, an open file object, a file object opened by file
descriptor, and a file-like object without name and mode attributes
(io.BytesIO)
* Increase coverage for name, fileno(), mode, readable(), writable(),
seekable() in different modes and states
* No longer skip tests with bytes names
* Test objects implementing the path protocol, not just pathlib.Path.
2024-02-28 07:51:08 +00:00
Jelle Zijlstra
02beb9f020
gh-116026: Try disabling rebuilds of dependents in Homebrew ( #116027 )
2024-02-27 21:35:25 -08:00
Jelle Zijlstra
ed4dfd8825
gh-105858: Improve AST node constructors ( #105880 )
...
Demonstration:
>>> ast.FunctionDef.__annotations__
{'name': <class 'str'>, 'args': <class 'ast.arguments'>, 'body': list[ast.stmt], 'decorator_list': list[ast.expr], 'returns': ast.expr | None, 'type_comment': str | None, 'type_params': list[ast.type_param]}
>>> ast.FunctionDef()
<stdin>:1: DeprecationWarning: FunctionDef.__init__ missing 1 required positional argument: 'name'. This will become an error in Python 3.15.
<stdin>:1: DeprecationWarning: FunctionDef.__init__ missing 1 required positional argument: 'args'. This will become an error in Python 3.15.
<ast.FunctionDef object at 0x101959460>
>>> node = ast.FunctionDef(name="foo", args=ast.arguments())
>>> node.decorator_list
[]
>>> ast.FunctionDef(whatever="you want", name="x", args=ast.arguments())
<stdin>:1: DeprecationWarning: FunctionDef.__init__ got an unexpected keyword argument 'whatever'. Support for arbitrary keyword arguments is deprecated and will be removed in Python 3.15.
<ast.FunctionDef object at 0x1019581f0>
2024-02-27 18:13:03 -08:00
Pierre Ossman (ThinLinc team)
5a1559d949
gh-112997: Don't log arguments in asyncio unless debugging ( #115667 )
...
Nothing else in Python generally logs the contents of variables, so this
can be very unexpected for developers and could leak sensitive
information in to terminals and log files.
2024-02-27 17:39:08 -08:00
Pierre Ossman (ThinLinc team)
a355f60b03
gh-114914: Avoid keeping dead StreamWriter alive ( #115661 )
...
In some cases we might cause a StreamWriter to stay alive even when the
application has dropped all references to it. This prevents us from
doing automatical cleanup, and complaining that the StreamWriter wasn't
properly closed.
Fortunately, the extra reference was never actually used for anything so
we can just drop it.
2024-02-27 17:27:44 -08:00
Miguel Brito
686ec17f50
bpo-43952: Fix multiprocessing Listener authkey bug (GH-25845)
...
Listener.accept() no longer hangs when authkey is an empty bytes object.
2024-02-27 14:57:59 +00:00
Tahoma Software
3a72fc36f9
gh-115315: Update time.rst to include microseconds field (%f) in chart ( #115316 )
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-02-27 15:33:05 +02:00
Mark Shannon
6ecfcfe894
GH-115816: Assorted naming and formatting changes to improve maintainability. (GH-115987)
...
* Rename _Py_UOpsAbstractInterpContext to _Py_UOpsContext and _Py_UOpsSymType to _Py_UopsSymbol.
* #define shortened form of _Py_uop_... names for improved readability.
2024-02-27 13:25:02 +00:00
Mark Shannon
10fbcd6c5d
GH-115816: Make tier2 optimizer symbols testable, and add a few tests. (GH-115953)
2024-02-27 10:51:26 +00:00
Petr Viktorin
af5f9d682c
gh-115720: Show number of leaks in huntrleaks progress reports (GH-115726)
...
Instead of showing a dot for each iteration, show:
- '.' for zero (on negative) leaks
- number of leaks for 1-9
- 'X' if there are more leaks
This allows more rapid iteration: when bisecting, I don't need
to wait for the final report to see if the test still leaks.
Also, show the full result if there are any non-zero entries.
This shows negative entries, for the unfortunate cases where
a reference is created and cleaned up in different runs.
Test *failure* is still determined by the existing heuristic.
2024-02-27 09:51:17 +01:00
Jérémie Detrey
6087315926
bpo-44865: Fix yet one missing translations in argparse (GH-27668)
2024-02-26 22:05:01 +00:00
Kien Dang
de2a73dc46
bpo-45101: Add consistency in usage message IO between 2 versions of python-config (GH-28162)
...
On --help output to stdout.
On error output to stderr.
2024-02-26 22:04:44 +02:00
Emmanuel Arias
da382aaf52
gh-77956: Add the words 'default' and 'version' help text localizable (GH-12711)
...
Co-authored-by: paul.j3
Co-authored-by: Jérémie Detrey <jdetrey@users.noreply.github.com>
2024-02-26 19:20:39 +00:00
Steve Dower
37a13b9413
gh-115582: Make default PC/pyconfig.h work for free-threaded builds with manual /DPy_GIL_DISABLED (GH-115850)
2024-02-26 19:14:14 +00:00
Serhiy Storchaka
72cff8d8e5
gh-113942: Show functions implemented as builtin methods (GH-115306)
...
Pydoc no longer skips global functions implemented as builtin methods,
such as MethodDescriptorType and WrapperDescriptorType.
2024-02-26 20:29:49 +02:00
Serhiy Storchaka
68c79d21fa
gh-112006: Fix inspect.unwrap() for types where __wrapped__ is a data descriptor (GH-115540)
...
This also fixes inspect.Signature.from_callable() for builtins classmethod()
and staticmethod().
2024-02-26 20:07:41 +02:00
Michael Droettboom
b05afdd5ec
gh-115168: Add pystats counter for invalidated executors (GH-115169)
2024-02-26 17:51:47 +00:00
Yuriy Chernyshov
96c10c6485
gh-115882: Reference Unknwn.h for ctypes on Windows (GH-115350)
...
This allows the module to be compiled with WIN32_LEAN_AND_MEAN enabled
2024-02-26 17:21:55 +00:00
Guido van Rossum
c0fdfba7ff
Rename tier 2 redundancy eliminator to optimizer ( #115888 )
...
The original name is just too much of a mouthful.
2024-02-26 08:42:53 -08:00
Brandt Bucher
7259480957
GH-115802: JIT "small" code for macOS and Linux (GH-115826)
2024-02-26 08:32:44 -08:00
Jason R. Coombs
5a83292213
Add Jason as an owner of configparser to coordinate backport concerns. ( #115885 )
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-02-26 17:11:38 +01:00
Michael Droettboom
07824995a0
gh-113706: Update comment about long int representation ( #113707 )
2024-02-26 07:18:30 -08:00
Pablo Galindo Salgado
015b97d19a
gh-115823: Calculate correctly error locations when dealing with implicit encodings ( #115824 )
2024-02-26 12:57:09 +00:00
Nikita Sobolev
b7383b8b71
gh-115931: Fix `SyntaxWarning`s in `test_unparse` ( #115935 )
2024-02-26 13:32:27 +01:00
Phil Elson
37f5d06b1b
Doc: Clarify the return type of Event.wait when timeout is used (GH-104168)
2024-02-26 11:53:20 +02:00
Antti Haapala
915d7dd090
gh-115091: Remove a left-over sentence that refers to Py_OptimizeFlag from ctypes documentation (GH-115092)
...
Remove a left-over sentence that refers to Py_OptimizeFlag
Remove a left-over sentence that refers to an example that was present in Python 3.10 and was using ``Py_OptimizeFlag``.
2024-02-26 10:22:54 +01:00
Alex Waygood
7a3518e43a
gh-115881: Ensure `ast.parse()` parses conditional context managers even with low `feature_version` passed ( #115920 )
2024-02-26 09:22:09 +00:00
Hugo van Kemenade
8e8ab75d97
gh-101100: Fix Sphinx warnings in `whatsnew/2.1.rst` ( #112357 )
...
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-02-25 23:49:04 -07:00
Terry Jan Reedy
de0b4f95cb
gh-115921: Change 'equation' to 'expression' in random.rst ( #115927 )
...
In uniform function entry.
2024-02-25 22:50:49 -05:00
Russell Keith-Magee
bee7bb3310
gh-114099: Add configure and Makefile targets to support iOS compilation. (GH-115390)
2024-02-25 20:21:10 -05:00
Barney Gale
e921f09c8a
GH-101112: Add "pattern language" section to pathlib docs ( #114030 )
...
Explain the `full_match()` / `glob()` / `rglob()` pattern language in its own section. Move `rglob()` documentation under `glob()` and reduce duplicated text.
2024-02-26 00:19:03 +00:00
Gregory P. Smith
92ce41cce1
gh-71052: fix test_concurrent_futures wasi regression. ( #115923 )
...
Fix the WASI test_concurrent_futures regression from #115917 .
2024-02-26 00:02:56 +00:00
Raymond Hettinger
6d34eb0e36
gh-115532: Add kernel density estimation to the statistics module (gh-115863)
2024-02-25 17:46:47 -06:00
bssyousefi
6a3236fe2e
gh-115799: Add missing double-quote in docs ( #115884 )
2024-02-25 14:07:08 -08:00
Furkan Onder
8f5be78bce
gh-72249: Include the module name in the repr of partial object (GH-101910)
...
Co-authored-by: Anilyka Barry <vgr255@live.ca>
2024-02-25 22:55:19 +02:00
Sergii K
f082a05c67
gh-115914: minor cleanup: simplify filename_obj assignment in PyRun_AnyFileExFlags (gh-115916)
...
This simplifies the code: less lines, easier to read. Logically equivalent, as any compiler likely already determined.
2024-02-25 12:45:38 -08:00
Skip Montanaro
84a275c4a2
gh-101100: Fix broken xrefs in fcntl module doc ( #115691 )
...
* clean up fcntl module doc
* simplify
* a few changes, based on suggestion by CAM-Gerlach
* nitpick ignore for a couple other C functions mentioned in the fcntl module doc
* more changes, especially related to LOCK_* constants
* :data: back to :const:
* Apply suggestions from code review
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
---------
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2024-02-25 12:02:18 -08:00
Malcolm Smith
4827968af8
gh-71052: Enable test_concurrent_futures on platforms that lack multiprocessing (gh-115917)
...
Enable test_concurrent_futures on platforms that support threading but not multiprocessing.
2024-02-25 11:38:18 -08:00
Matan Perelman
c40b5b97fd
bpo-31116: Add Z85 variant to base64 (GH-30598)
...
Z85 specification: https://rfc.zeromq.org/spec/32/
2024-02-25 19:17:54 +02:00
Laurie O
9402ea63f7
gh-96471: Correct docs for queue shutdown ( #115838 )
2024-02-25 16:53:21 +00:00
Raymond Hettinger
a0a8d9ffe0
gh-113479: Link to workaround for subtle issue with takewhile() (gh-115890)
2024-02-25 06:32:14 -06:00
mauricelambert
cb287d3421
gh-103417: Fix the scheduler example (GH-111497)
...
Arguments to enterabs() are specified as Unix time.
If the scheduler use the time.monotonic timer, the code will take
decades to complete.
2024-02-25 13:55:57 +02:00
Arjun
6550b54813
bpo-14322: added test case for invalid update to hmac ( #26636 )
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-02-25 03:33:28 -07:00
Hugo van Kemenade
a00b41b9e9
gh-101100: Fix Sphinx warnings in `whatsnew/2.0.rst` ( #112351 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-02-25 02:45:56 -07:00
Serhiy Storchaka
79811ededd
gh-115886: Handle embedded null characters in shared memory name (GH-115887)
...
shm_open() and shm_unlink() now check for embedded null characters in
the name and raise an error instead of silently truncating it.
2024-02-25 11:31:03 +02:00