Commit Graph

120983 Commits

Author SHA1 Message Date
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
Oh seungmin 5770006ffa
Add an example of of custom `__repr__` (#112761)
Added to repr entry in Doc/library/functions.rst.

---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-02-25 02:59:35 -05:00
Adorilson Bezerra f7455864f2
Erase some unnecessary quotes on data model doc (#113521)
Thanks to Pedro Arthur Duarte (pedroarthur.jedi at gmail.com) for help with this bug.
2024-02-24 19:16:19 -05:00
Jay Ting 948acd6ed8
gh-115323: Add meaningful error message for using bytearray.extend with str (#115332)
Perform str check after TypeError is raised
---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-02-24 18:34:45 -05:00
Barney Gale e3dedeae7a
GH-114610: Fix `pathlib.PurePath.with_stem('')` handling of file extensions (#114612)
Raise `ValueError` if `with_stem('')` is called on a path with a file
extension. Paths may only have an empty stem if they also have an empty
suffix.
2024-02-24 19:37:03 +00:00
Raymond Hettinger 53c5c17e0a
gh-113202: Add whatsnew entry for the batched() strict option. (gh-115889) 2024-02-24 12:03:11 -06:00
partev 5251711868
gh-115872: Doc: remove obsolete reference to MSI packages (#115873) 2024-02-23 23:53:26 -07:00
Chris Markiewicz 200271c61d
gh-114763: Protect lazy loading modules from attribute access races (GH-114781)
Setting the __class__ attribute of a lazy-loading module to ModuleType enables other threads to attempt to access attributes before the loading is complete. Now that is protected by a lock.
2024-02-23 16:02:16 -08:00
jmcb ef6074b352
Insert missing apostrophes in ctypes documentation (#115090) 2024-02-23 14:55:47 -08:00