Commit Graph

122716 Commits

Author SHA1 Message Date
Bénédikt Tran 4bc27abdbe
gh-120662: Improve `smtplib` example (#120668)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-06-18 13:56:58 +02:00
Raymond Hettinger 3044d3866e
No longer watch the queue module, remove rhettinger (#120664) 2024-06-18 13:47:32 +02:00
Mark Shannon 9cefcc0ee7
GH-120507: Lower the `BEFORE_WITH` and `BEFORE_ASYNC_WITH` instructions. (#120640)
* Remove BEFORE_WITH and BEFORE_ASYNC_WITH instructions.

* Add LOAD_SPECIAL instruction

* Reimplement `with` and `async with` statements using LOAD_SPECIAL
2024-06-18 12:17:46 +01:00
Irit Katriel 73dc1c678e
gh-119897: Add test for lambda generator invocation (#120658)
gh-120467: Add test for lambda generator invocation
2024-06-18 10:45:23 +01:00
Serhiy Storchaka 2cf47389e2
gh-120590: Fix test_pydoc in the refleak hunting mode (GH-120615)
Mocking only works if sys.modules['pydoc'] and pydoc are the same,
but some pydoc functions reload the module and change sys.modules.
Ensure that sys.modules['pydoc'] is always restored after the corresponding
tests.
2024-06-18 12:19:32 +03:00
Nice Zombies ac37a80601
gh-120560: Mark `zip64` tests in `test_zipimport` as CPU-heavy (GH-120564) 2024-06-17 15:18:51 -07:00
Victor Stinner 35b16795d1
gh-120417: Remove unused imports in cases_generator (#120622) 2024-06-17 21:58:56 +02:00
Eric Snow 2c66318cdc
gh-120524: Avoid a Race On _PyRuntime.types.managed_static.types[i].interp_count (gh-120529)
gh-120182 added new global state (interp_count), but didn't add thread-safety for it.  This change eliminates the possible race.
2024-06-17 13:16:00 -06:00
Victor Stinner e73c42e15c
gh-120417: Modify test_bdb to use the import (#120628)
Run test_module_for_bdb with a specific namespace.
2024-06-17 21:06:18 +02:00
Victor Stinner c608477532
gh-120417: Remove unused imports in tests (part 1) (#120629) 2024-06-17 21:05:56 +02:00
Victor Stinner 5a8a979aeb
gh-120417: Remove unused imports in tests (part 2) (#120630) 2024-06-17 21:05:37 +02:00
Victor Stinner f916b77fea
gh-120417: Remove unused imports in tests (part 3) (#120631) 2024-06-17 21:04:58 +02:00
Daniele Parmeggiani 362cd2680b
gh-117657: Fix `__slots__` thread safety in free-threaded build (#119368)
Fix a race in `PyMember_GetOne` and `PyMember_SetOne` for `Py_T_OBJECT_EX`.
These functions implement `__slots__` accesses for Python objects.
2024-06-17 18:44:54 +00:00
Sam Gross 460cc9e14e
gh-117657: Fix TSan reported data race on ioctl_works (#120175) 2024-06-17 13:23:40 -04:00
Victor Stinner d9b4316374
gh-120417: Remove unused imports in Tools (#120623) 2024-06-17 18:09:26 +02:00
Victor Stinner 6acf7776ef
gh-120507: Double WASI memory (#120648)
Use 16 MiB stack with 40 MiB memory limit, instead of 8 MiB stack
with 20 MiB memory limit.
2024-06-17 16:08:05 +00:00
Saul Pwanson 0506f75c53
fix enum doc typo (#120091) 2024-06-17 21:31:15 +05:30
AN Long 28140d1f2d
gh-115649: Copy the filename into main interpreter before intern in import.c (#120315)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2024-06-17 21:27:22 +05:30
Kirill Podoprigora 95737bbf18
gh-120433: Mention ``chocolatey`` for installing llvm on Windows as an alternative option (#120434) 2024-06-17 15:52:07 +00:00
Victor Stinner f4d301d8b9
gh-120417: Remove unused imports in tests (part 4) (#120632) 2024-06-17 17:35:20 +02:00
Victor Stinner 5c4235cd8c
gh-119182: Add PyUnicodeWriter C API (#119184) 2024-06-17 17:10:52 +02:00
Steele Farnsworth 2c7209a3bd
gh-114091: Reword error message for unawaitable types (#114090)
Reword error message for unawaitable types.
2024-06-17 20:18:17 +05:30
Carol Willing a26d27e7ee
Update the documentation howto index page and group docs into 3 logical sections (GH-119366)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2024-06-17 16:37:33 +02:00
Bénédikt Tran 4bf17c381f
gh-119933: Improve ``SyntaxError`` message for invalid type parameters expressions (#119976)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-06-17 06:51:03 -07:00
Mark Shannon 274f844830
GH-120619: Clean up `RETURN_VALUE` instruction (GH-120624)
* Rename _POP_FRAME to _RETURN_VALUE as it returns a value as well as popping a frame.

* Remove remaining _POP_FRAMEs
2024-06-17 14:40:11 +01:00
Frank Dana 79e09e60d8
itertools doc: examples for groupby() and tee() (#120618) 2024-06-17 08:19:14 -05:00
Ruben Vorderman 945a89b48f
gh-120196: Reuse find_max_char() for bytes objects (#120497) 2024-06-17 12:21:58 +02:00
Irit Katriel 21866c8ed2
gh-120367: fix removal of redundant NOPs and jumps after reordering hot-cold blocks (#120425) 2024-06-17 10:10:06 +00:00
Victor Stinner c2d5df5787
gh-83754: Use the Py_TYPE() macro (#120599)
Don't access directly PyObject.ob_type, but use the Py_TYPE() macro
instead.
2024-06-17 10:34:29 +02:00
Nikita Sobolev 3df2022931
gh-120586: Fix several "unused function" warnings in `posixmodule.c` (#120588) 2024-06-17 09:44:13 +03:00
Gregory P. Smith bac4edad69
gh-112346: Document the OS byte in `gzip.compress` output change in 3.11 (#120480)
gh-112346: Describe the "os" byte in gzip output change.
2024-06-16 22:47:10 -07:00
Terry Jan Reedy bd4516d9ef
gh-120567: Clarify weekday return in calendar.monthrange docstring (#120570)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-06-16 16:43:57 -04:00
mm-matthias 4f59f86382
gh-118596: Add thread-safety clarifications to the SSLContext documentation (#118597)
Add thread-safety clarifications to the SSLContext documentation. Per the issue:

This issue has also come up [here](https://github.com/psf/requests/pull/6667) where the matter was clarified by @tiran in [this comment](https://github.com/psf/requests/pull/6667):
> `SSLContext` is designed to be shared and used for multiple connections. It is thread safe as long as you don't reconfigure it once it is used by a connection. Adding new certs to the internal trust store is fine, but changing ciphers, verification settings, or mTLS certs can lead to surprising behavior. The problem is unrelated to threads and can even occur in a single-threaded program.
2024-06-16 13:27:44 -07:00
Carson Radtke 92cebaa491
gh-120568: fix file leak in PyUnstable_CopyPerfMapFile (#120569) 2024-06-16 17:51:52 +00:00
Nikita Sobolev b337aefd3e
gh-120584: Fix "unused thread_critical_sections" warning in `test_critical_sections` (#120585) 2024-06-16 20:13:56 +03:00
Hugo van Kemenade b8484c6ad7
Docs: remove temporary hardcoded links (#120348) 2024-06-16 06:51:17 -06:00
Idan Kapustian 192d17c3fd
gh-120485: Add an override of `allow_reuse_port` on classes subclassing `socketserver.TCPServer` (GH-120488)
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
2024-06-16 13:15:03 +01:00
Nikita Sobolev 0c0348adbf
gh-120579: Guard `_testcapi` import in `test_free_threading` (#120580) 2024-06-16 11:26:13 +03:00
Terry Jan Reedy cf49ef78f8
gh-120360: Add self as IDLE doc owner (#120571)
Add self as IDLE doc owner
2024-06-16 01:55:47 -04:00
Nyuan Zhang 1fa595963e
gh-120572: add missing parentheses in TypeIs documentation (#120573) 2024-06-15 22:36:10 -07:00
Ruben Vorderman 08d09cf5ba
gh-112346: Always set OS byte to 255, simpler gzip.compress function. (GH-120486)
This matches the output behavior in 3.10 and earlier; the optimization in 3.11 allowed the zlib library's "os" value to be filled in instead in the circumstance when mtime was 0.  this keeps things consistent.
2024-06-15 18:46:39 +00:00
Serhiy Storchaka 31d1d72d7e
gh-120541: Improve the "less" prompt in pydoc (GH-120543)
When help() is called with non-string argument, use __qualname__ or
__name__ if available, otherwise use "{typename} object".
2024-06-15 20:56:40 +03:00
Jelle Zijlstra 9e0b11eb21
annotations: expand documentation on "simple" assignment targets (#120535)
This behavior is rather surprising and it was not clearly specified.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-06-15 15:18:16 +00:00
Ken Jin 6f63dfff6f
gh-117657: Make PyType_HasFeature (exported version) atomic (#120484)
Make PyType_HasFeature (exported version) atomic
2024-06-15 22:39:22 +08:00
Alex Waygood 99d62f902e
Add some more edge-case tests for `inspect.get_annotations` with `eval_str=True` (#120550) 2024-06-15 12:51:58 +00:00
Wulian233 c501261c91
gh-120495: Fix incorrect exception handling in Tab Nanny (#120498)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-06-15 05:04:14 -06:00
Nikita Sobolev 42ebdd83bb
gh-120544: Add `else: fail()` to tests where exception is expected (#120545) 2024-06-15 10:33:14 +00:00
Adam Williamson d4039d3f6f
gh-120526: Correct signature of map() builtin (GH-120528)
map() requires at least one iterable arg.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-06-15 05:33:09 +00:00
Russell Keith-Magee 5c58e728b1
gh-117398: Use the correct module loader for iOS in datetime CAPI test. (#120477)
Use the correct loader for iOS.
2024-06-15 08:05:30 +08:00
Russell Keith-Magee 92f6d400f7
gh-119819: Conditional skip of logging tests that require multiprocessing subprocess support (#120476)
Skip tests that require multiprocessing subprocess support.
2024-06-15 08:05:18 +08:00