Pablo Galindo Salgado
b743eb03d8
Merge pull request #19 from DinoV/lazy_tests_dunder
2025-11-09 12:40:47 -05:00
Dino Viehland
8d57aca95a
Merge remote-tracking branch 'origin/main' into HEAD
2025-11-03 10:10:28 -08:00
Jelle Zijlstra
b1027d4762
gh-138151: Fix annotationlib handling of multiple nonlocals ( #138164 )
2025-11-03 07:22:32 -08:00
Jelle Zijlstra
7a9437d986
gh-140348: Fix using | on unusual objects plus Unions ( #140383 )
2025-11-03 06:50:37 -08:00
AN Long
248ce9fa8c
gh-140826: Compare winreg.HKEYType by the internal handle value (GH-140843)
2025-11-03 10:14:22 +02:00
Jelle Zijlstra
349de57839
Revert "gh-137969: Fix evaluation of ref.evaluate(format=Format.FORWARDREF) objects ( #138075 )" ( #140930 )
...
This reverts commit 63e01d6bae .
2025-11-02 21:35:15 -08:00
dr-carlos
63e01d6bae
gh-137969: Fix evaluation of ref.evaluate(format=Format.FORWARDREF) objects ( #138075 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2025-11-02 17:20:30 -08:00
dr-carlos
e66f87ca73
gh-138425: Correctly partially evaluate global generics with undefined params in ref.evaluate(format=Format.FORWARDREF) ( #138430 )
...
Co-authored-by: sobolevn <mail@sobolevn.me>
2025-11-02 15:15:47 -08:00
Sebastian Rittau
9e5628ad68
gh-140808: Remove __class_getitem__ from mailbox._ProxyFile ( #140838 )
...
Co-authored-by: Emma Smith <emma@emmatyping.dev>
2025-11-02 13:56:59 -08:00
Jiucheng(Oliver)
6d45cd8dbb
gh-135307: Fix email error when policy max_line_length is set to 0 or None ( #135367 )
...
RDM: Like the change made in a earlier PR to the folder, we can/must use 'maxlen' as a stand in for 'unlimited' when computing line lengths when max_line_length is 0 or None; otherwise the computation results in a traceback.
2025-11-02 09:32:14 -05:00
Sergey Miryanov
da65f38a94
gh-134786: raise error if Py_TPFLAGS_MANAGED_WEAKREF or Py_TPFLAGS_MANAGED_DICT is used without Py_TPFLAGS_HAVE_GC set ( #135863 )
2025-11-02 16:34:49 +05:30
Serhiy Storchaka
a17c57eee5
gh-137836: Support more RAWTEXT and PLAINTEXT elements in HTMLParser (GH-137837)
...
* the "plaintext" element
* the RAWTEXT elements "xmp", "iframe", "noembed" and "noframes"
* optionally RAWTEXT (if scripting=True) element "noscript"
2025-10-31 17:44:02 +02:00
Pål Grønås Drange
07912f8632
gh-140212: Add html for year-month option in Calendar ( #140230 )
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-10-31 17:28:53 +02:00
Serhiy Storchaka
dcf3cc5796
gh-81313: Add the math.integer module (PEP-791) (GH-133909)
2025-10-31 16:13:43 +02:00
Bénédikt Tran
680a5d070f
gh-136063: fix quadratic-complexity parsing in email.message._parseparam (GH-136072)
2025-10-31 14:50:40 +01:00
Serhiy Storchaka
f029e8db62
gh-136065: Fix quadratic complexity in os.path.expandvars() (GH-134952)
...
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-10-31 14:49:51 +01:00
Mikhail Efimov
d17f28fed5
gh-140373: Correctly emit PY_UNWIND event when generator is closed (GH-140767)
2025-10-31 10:09:22 +00:00
Guo Ci
e4deefbb2f
gh-140766: [Enum] add show_flag_values and bin to enum.__all__ (GH-140765)
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-10-30 10:32:55 -07:00
yihong
4e6dba0ef7
gh-139246: zero-width word paste can be wrong in default repl (GH-139254)
...
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: grayjk <grayjk@gmail.com>
2025-10-30 16:14:06 +01:00
Serhiy Storchaka
6826166280
gh-135801: Improve filtering by module in warn_explicit() without module argument (GH-140151)
...
* Try to match the module name pattern with module names constructed
starting from different parent directories of the filename.
E.g., for "/path/to/package/module" try to match with
"path.to.package.module", "to.package.module", "package.module" and
"module".
* Ignore trailing "/__init__.py".
* Ignore trailing ".pyw" on Windows.
* Keep matching with the full filename (without optional ".py" extension)
for compatibility.
* Only ignore the case of the ".py" extension on Windows.
2025-10-30 15:55:39 +02:00
Petr Viktorin
75a1cbdd38
gh-140748: socket_helper.transient_internet: Unwrap UrlError.__cause__ (GH-140749)
2025-10-30 12:14:17 +01:00
Serhiy Storchaka
09b1f10ef7
gh-140481: Improve error message when trying to iterate a Tk widget, image or font (GH-140501)
2025-10-30 13:11:56 +02:00
Serhiy Storchaka
ad0a3f733b
gh-131927: Do not emit PEP 765 warnings in ast.parse() (GH-139642)
...
ast.parse() no longer emits syntax warnings for
return/break/continue in finally (see PEP-765) -- they are only
emitted during compilation.
2025-10-30 13:00:42 +02:00
Serhiy Storchaka
327dbbedff
gh-138162: Fix logging.LoggerAdapter with merge_extra=True and without the extra argument (GH-140511)
2025-10-30 12:52:02 +02:00
Donghee Na
c45e6e1bb3
gh-137821: Improve Argument Clinic definitions in the `_json` module ( #140780 )
2025-10-30 10:32:08 +00:00
Stan Ulbrych
dbe3950a76
gh-129117: Add unicodedata.isxidstart() function ( #140269 )
...
Expose `_PyUnicode_IsXidContinue/Start` in `unicodedata`:
add isxidstart() and isxidcontinue() functions.
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-10-30 10:18:12 +00:00
Stan Ulbrych
c74793c450
gh-140741: Fix test added in gh-140745 ( #140760 )
...
Commit
2025-10-29 16:10:58 +00:00
Mikhail Efimov
8706167474
gh-140576: Fixed crash produced by lexer in case of dedented zero byte ( #140583 )
2025-10-29 13:27:35 +00:00
Cody Maloney
6ff62ac4fb
gh-140082: Forward colorizing from libregrtest to unittest ( #140083 )
...
libregrtest redirects test output to a file as part of its operation.
When `unittest` checks to see if it should colorize with
`isatty(sys.stdout)` that fails resulting in no colorizing of the
unittest output.
Update `libregrtest` to set `FORCE_COLOR=1` when redirecting test output
so that unittest will do color printing.
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-10-29 13:33:44 +01:00
Victor Stinner
376559bf54
gh-140702: Log color and GHA env vars in test.pythoninfo ( #140747 )
2025-10-29 13:29:10 +01:00
Stan Ulbrych
d3aa5f689c
gh-140741: Fix profiling.sampling handling of error raised by target ( #140745 )
2025-10-29 11:38:28 +00:00
Mikhail Efimov
02202c117b
gh-140551: Fix dict crash if clear is called at lookup stage ( #140558 )
...
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2025-10-29 14:36:23 +05:30
Russell Keith-Magee
9f8d005d29
gh-140702: Add test skip for Unix Datagram tests on iOS when on Github Actions ( #140740 )
...
Exposes the GITHUB_ACTIONS environment variable to iOS simulator test runs, and
uses this variable to skip a Unix Datagram socketserver test that is unreliable
in the iOS GitHub Actions environment.
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-10-29 08:33:04 +00:00
Frost Ming
058bc182b9
gh-139940: Handle RuntimeError when attaching to a non-existing process in pdb. ( #139941 )
2025-10-28 23:12:12 -07:00
Victor Stinner
c6d4c79c9a
gh-140657: Don't rerun test_import single phase init test (GH-140712)
...
test_basic_multiple_interpreters_main_no_reset() leaks memory:
import_in_subinterp() is called with postcleanup=False.
2025-10-28 18:05:03 +01:00
Mikhail Efimov
88ad41fa34
gh-139951: Tests on tuple GC tracking ( #140575 )
2025-10-28 10:55:41 +01:00
Sergey Miryanov
d26686a7f8
GH-140590: Fix setstate for functools.partial C-module (GH-140671)
...
Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
2025-10-28 10:28:32 +01:00
Serhiy Storchaka
364ae607d8
gh-140634: Fix a reference counting bug in os.sched_param.__reduce__() (GH-140667)
2025-10-27 21:42:32 +02:00
Ken Jin
a716091227
gh-140104: Set next_instr properly in the JIT during exceptions (GH-140233)
...
Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
2025-10-27 18:26:47 +00:00
Cody Maloney
0f0a362768
gh-140607: Validate returned byte count in RawIOBase.read ( #140611 )
...
While `RawIOBase.readinto` should return a count of bytes between 0 and
the length of the given buffer, it is not required to. Add validation
inside RawIOBase.read() that the returned byte count is valid.
Co-authored-by: Shamil <ashm.tech@proton.me>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-10-27 18:06:46 +00:00
Dino Viehland
aeda7ac09f
Add tests for __lazy_import__
2025-10-27 10:13:38 -07:00
Stan Ulbrych
e03d8e4f50
gh-79922: Remove always false test skips in test_time ( #136202 )
2025-10-27 15:09:25 +00:00
Alper
9479a62a51
gh-116738: Use PyMutex for bz2 module (gh-140555)
...
The methods are already wrapped with a lock, which makes them thread-safe in
free-threaded build. This replaces `PyThread_acquire_lock` with `PyMutex` and
removes some macros and allocation handling code.
Also add a test for free-threading to ensure we aren't getting data races and
that the locking is working.
2025-10-27 09:52:30 -04:00
Brian Schubert
3dab11f888
gh-138944: Fix SyntaxError message for invalid syntax following valid import-as statement ( #138945 )
2025-10-26 22:35:21 +00:00
Bartosz Sławecki
06c779474c
gh-137568: Ignore startup file in test_dumb_terminal_exits_cleanly (GH-140295)
2025-10-26 10:48:03 -04:00
Sebastian Pipping
e34a5e3304
gh-140593: Fix a memory leak in function my_ElementDeclHandler of pyexpat ( #140602 )
...
Ensure that the memory allocated for the content model
passed to `my_ElementDeclHandler` is freed in all error
paths.
2025-10-26 13:45:32 +00:00
Bénédikt Tran
37827c1752
gh-133346: add tests for _colorize.Theme ( #139687 )
2025-10-26 12:07:31 +00:00
Stan Ulbrych
00026d19c2
gh-76007: Deprecate __version__ attribute in decimal ( #140302 )
...
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-10-26 12:01:04 +01:00
Tapeline
4f8e7b5ac5
gh-136327: Fix inconsistent `TypeError` messages regarding invalid values after * and ** ( #136395 )
2025-10-24 19:12:49 +00:00
Barry Warsaw
b3c713a0af
gh-140482: Preserve and restore stty echo as a test environment ( #140519 )
...
gh-140482: Restore `stty echo` as a test environment
2025-10-24 11:07:08 -07:00