| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
Use `ma_used` instead of `ma_keys->dk_nentries` for modification check
so that we only check if the dictionary is modified, not if new keys are
added to a different dictionary that shared the same keys object.
|
|
|
|
|
|
| |
_CHECK_FUNCTION_VERSION_INLINE (GH-135022)
Signed-off-by: Manjusaka <me@manjusaka.me>
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and suggest email.headerregistry.HeaderRegistry as a sane alternative (#92900)
* gh-67022: Document bytes/str inconsistency in email.header.decode_header()
This function's possible return types have been surprising and error-prone
for the entirety of its Python 3.x history. It can return either:
1. `typing.List[typing.Tuple[bytes, typing.Optional[str]]]` of length >1
2. or `typing.List[typing.Tuple[str, None]]`, of length exactly 1
This means that any user of this function must be prepared to accept either
`bytes` or `str` for the first member of the 2-tuples it returns, which is a
very surprising behavior in Python 3.x, particularly given that the second
member of the tuple is supposed to represent the charset/encoding of the
first member.
This patch documents the behavior of this function, and adds test cases
to demonstrate it.
As discussed in bpo-22833, this cannot be changed in a backwards-compatible
way, and some users of this function depend precisely on the existing
behavior.
Add warnings about obsolescence of 'email.header.decode_header' and 'email.header.make_header' functions.
Recommend use of `email.headerregistry.HeaderRegistry` instead, as suggested
in https://github.com/python/cpython/pull/92900#discussion_r1112472177
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-135405)
Prior to issue #120485 these servers did not allow port reuse, which
makes sense as the behavior of port reuse is surprising if you're not
expecting it. It's unclear to me why these services were switched to
allow port reuse, but I believe the desired behavior (unless subclasses
opt in) is to not allow port reuse.
See also: https://bugzilla.redhat.com/show_bug.cgi?id=2323170
|
|
|
|
| |
chains (#135436)
|
|
|
|
|
|
|
|
|
| |
* gh-135368: Fix mocks on dataclass specs with `instance=True`
* Extend dataclass mock_methods
---------
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
|
| |
|
|
|
|
| |
(gh-135438)
|
|
|
|
|
|
| |
HTMLParser (GH-135464)
End-of-file errors are now handled according to the HTML5 specs --
comments and declarations are automatically closed, tags are ignored.
|
|
|
|
|
| |
(#135412)" (#135439)
This reverts commit e6c3039cb39e68ae9af9ddcaca341c5af8f9cf23.
|
| |
|
|
|
|
|
| |
(GH-135292)
Co-authored-by: Tan Long <tanloong@foxmail.com>
|
| |
|
|
|
|
|
|
| |
PEP-734 has been accepted (for 3.14).
(FTR, I'm opposed to putting this under the concurrent package, but
doing so is the SC condition under which the module can land in 3.14.)
|
|
|
|
| |
* Make casts explicit in the instruction definitions
|
|
|
|
|
| |
0x7fffffff in pickle (GH-135322)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
abnormally (GH-133222)
When shutdown is called with wait=False, the executor thread keeps running
even after the ProcessPoolExecutor's state is reset. The executor then tries
to replenish the worker processes pool resulting in an error and a potential hang
when it comes across a worker that has died. Fixed the issue by having
_adjust_process_count() return without doing anything if the ProcessPoolExecutor's
state has been reset.
Added unit tests to validate two scenarios:
max_workers < num_tasks (exception)
max_workers > num_tasks (exception + hang)
|
|
|
|
|
|
|
| |
Use critical sections to make heapq methods that update the heap thread-safe when the GIL is disabled.
---------
Co-authored-by: mpage <mpage@meta.com>
|
|
|
|
| |
`calendar.HTMLCalendar` as 'utf-8' (#135002)
|
| |
|
|
|
|
| |
Apply changes from zipp 3.23
|
|
|
|
|
|
| |
2231 continuations (#134687)
- Fix sorting logic in `email.utils.decode_params` to handle None values.
- Update tests for RFC 2231 continuation sorting.
|
| |
|
|
|
|
|
|
| |
temporarily (GH-135232)
This reverts commit 62b3d2d443785c4ea5262edb4f9f7040440f9463,
which broke buildbots
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
(#134194)
Append the defect to defects instead of to the parse tree.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Set sys.stdout encoder error handler to backslashreplace in regrtest
workers to avoid UnicodeEncodeError when printing a traceback
or any other non-encodable character.
Move the code from the Regrtest class to setup_process().
Call setup_process() earlier, before displaying regrtest headers.
|
|
|
| |
We were incorrectly handling a few opcodes that leave their operands on the stack. Treat all of these conservatively; assume that they always leave operands on the stack.
|
|
|
|
|
|
| |
The `test_ssl_in_multiple_threads` test failed because `test_check_hostname_idn()`
modified the global warnings filters via `warnings_helper.check_no_resource_warning()`.
Only check for warnings when the context aware warnings feature is enabled, which makes
the warnings filter context-local and thread-safe.
|
| |
|
|
|
|
|
|
|
| |
(#134871)
When sanity checking against gettotalrefcount(), we exclude the blocks for
immortalized strings since their references are not tracked/reported. This
now matches refleak.py's book-keeping using the same functions.
|
|
|
|
|
|
|
|
|
|
|
| |
`os.path.realpath(strict='allow_missing')` (#135037)
Addresses CVEs 2024-12718, 2025-4138, 2025-4330, and 2025-4517.
Signed-off-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
| |
skipkeys=True (GH-132200)
|
| |
|
|
|
|
|
|
| |
csv.Dialog attributes (GH-133241)
Make them similar to PyArg_Parse error messages, mention None as
a possible value, show a wrong type and the string length.
|
|
|
| |
50 producer and 50 consumer threads need more than 5GB of memory.
|
|
|
|
| |
This may harm performance, but improve crash tolerance.
|
|
|
|
| |
The `textiowrapper_iternext` function called `_textiowrapper_writeflush`, but did not
use a critical section, making it racy in free-threaded builds.
|
| |
|