Kumar Aditya
ab6333f7f5
gh-128002: fix tsan race in closing socket in test_sslproto
( #131399 )
2025-03-18 16:20:47 +05:30
Sergey Miryanov
812074e291
gh-131311: Consolidate reference handling in PyCStructUnionType_update_stginfo to fix memory leak (GH-131312)
2025-03-18 11:50:22 +01:00
Max Bachmann
3453b5c1d6
gh-114917: add support for AI_NUMERICSERV in getaddrinfo emulation ( #114918 )
2025-03-18 11:26:51 +01:00
Kumar Aditya
b0a4f6599a
gh-128002: fix tsan race in closing socket in test_ssl
( #131397 )
2025-03-18 15:41:43 +05:30
Kanishk Pachauri
77d2fd4413
gh-130132: properly free resources in urrlib.urlopen
examples ( #130280 )
...
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-03-18 09:27:05 +00:00
Guy Jacoby
3f50f96586
gh-131094: Refine math.isclose
docs ( #131139 )
2025-03-18 10:13:26 +01:00
Tian Gao
a936af924e
gh-120144: Make it possible to use sys.monitoring
for bdb and make it default for pdb ( #124533 )
2025-03-17 18:34:37 -04:00
Erlend E. Aasland
f48887fb97
gh-131002: clarify how to enforce sqlite3 column types for generated fields ( #131006 )
2025-03-17 22:26:27 +00:00
Nybblista
149fbb01f2
gh-119786: Fix _PyExecutorObject link at jit.md file ( #131382 )
2025-03-17 21:22:12 +00:00
Irit Katriel
ffc2f1dd1c
gh-130080: implement PEP 765 ( #130087 )
2025-03-17 20:48:54 +00:00
Chris Eibl
468a7aaeb4
GH-131278: Add option to build with computed gotos on Windows with clang-cl (GH-131279)
2025-03-17 20:32:23 +00:00
Kumar Aditya
94f4d87aeb
gh-131325: fix sendfile fallback implementation to drain data after writing to transport ( #131376 )
2025-03-18 00:52:57 +05:30
Kumar Aditya
46e88540e6
gh-116738: remove multiprocessing suppressions ( #131319 )
2025-03-18 00:29:18 +05:30
R. David Murray
a09c2b2ba6
Fix test_pyrepl.TestDumbTerminal if PYTHON_BASIC_REPL set. ( #131332 )
...
Most of the tests that care already adjust PYTHON_BASIC_REPL as needed,
but this one doesn't, and it fails if the developer has the variable set.
2025-03-17 18:56:21 +01:00
Mark Shannon
fd545d735d
GH-127705: Move mortal decrefs to internal header and make sure _PyReftracerTrack is called
2025-03-17 17:23:50 +00:00
Mark Shannon
9881fc5483
GH-125174: Make immortality "sticky" (GH-131355)
...
* Use a higher threshold for immortality for INCREF than DECREF
2025-03-17 17:22:35 +00:00
Victor Stinner
aabab76c8a
gh-131268: Adjust _PYTHREAD_NAME_MAXLEN on BSD ( #131345 )
...
Adjust _PYTHREAD_NAME_MAXLEN constant on FreeBSD and NetBSD.
Initial patch by Xavier G.
2025-03-17 16:52:59 +00:00
Ken Jin
b2ed7a6d6a
gh-131281: Add include for pystats builds ( #131369 )
...
Add include to for pystats builds
2025-03-18 00:36:06 +08:00
Chris Eibl
ef4fe70785
GH-131291: Suppress clang-specific warning in python_uwp.cpp (GH-131292)
2025-03-17 16:22:25 +00:00
Petr Viktorin
30d5205849
gh-116666: Add "token" glossary term (GH-130888)
...
Add glossary entry for `token`, and link to it.
Avoid talking about tokens in the SyntaxError intro (errors.rst); at this point
tokenization is too much of a technical detail. (Even to an advanced reader,
the fact that a *single* token is highlighted isn't too relevant. Also, we don't
need to guarantee that it's a single token.)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-03-17 17:05:47 +01:00
Tomasz Pytel
863d54cbaf
gh-126895: Fix readline module in free-threaded build ( #131208 )
...
The underlying readline library is not thread-safe so this adds `@critical_section` to functions that use it.
2025-03-17 11:57:11 -04:00
Yuki Kobayashi
9a634c5c0c
Docs: Fix incorrect sphinx markup for a class member (GH-130970)
2025-03-17 16:28:56 +01:00
Bénédikt Tran
e708ac8dd4
gh-111178: fix UBSan failures in Modules/_ssl.c
(GH-130719)
...
* fix UBSan failures for `PySSLContext`, `PySSLSocket`, `PySSLMemoryBIO`, `PySSLSession`
2025-03-17 16:25:28 +01:00
Mark Shannon
a45f25361d
GH-131238: More refactoring of core header files (GH-131351)
...
Adds new pycore_stats.h header file to help break dependencies involving the pycore_code.h header.
2025-03-17 14:41:05 +00:00
Gregory P. Smith
bb0268f60d
gh-131261: Update libexpat to 2.7.0 (CVE-2024-8176) ( #131272 )
2025-03-17 14:55:02 +01:00
Victor Stinner
978e37bb5f
gh-131238: Add explicit includes to pycore headers ( #131257 )
2025-03-17 12:32:43 +01:00
Victor Stinner
0453e494b6
gh-131238: Convert pycore_pystate.h static inline to functions ( #131352 )
...
Convert static inline functions to functions:
* _Py_IsMainThread()
* _PyInterpreterState_Main()
* _Py_IsMainInterpreterFinalizing()
* _Py_GetMainConfig()
2025-03-17 12:31:55 +01:00
Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి)
80e00ecc39
gh-129843: fix pure Python implementation of warnings.warn_explicit
( #129848 )
...
The pure Python implementation of `warnings.warn_explicit` constructs a `WarningMessage`
with an incorrect source (it incorrectly sets the WarningMessage's line to the given `source`).
2025-03-17 10:49:53 +00:00
Bénédikt Tran
ac50ece6ce
gh-127667: refactor and improve _hashopenssl.c
error branches ( #131145 )
...
Refactor `_setException()` into different helpers that can be used separately:
- set_ssl_exception_from_errcode(): set an exception from an explicit SSL error code.
- raise_ssl_error(): set an exception from the last SSL error code or use a user-defined message.
- notify_ssl_error_occurred(): same as raise_ssl_error() but with a generic default message.
2025-03-17 11:12:55 +01:00
Bénédikt Tran
261633bd3f
gh-131316: handle NULL values returned by HACL* functions ( #131324 )
...
- Handle NULL returned by allocation functions.
- Handle NULL returned by copy functions.
- Suppress unused impossible return codes.
2025-03-17 11:10:39 +01:00
Bénédikt Tran
de8890f5ab
gh-130149: cleanup refactorization of test_hmac.py
( #131318 )
...
New features:
* refactor `hashlib_helper.requires_hashdigest` in prevision of a future
`hashlib_helper.requires_builtin_hashdigest` for built-in hashes only
* add `hashlib_helper.requires_openssl_hashdigest` to request OpenSSL
hashes, assuming that `_hashlib` exists.
Refactoring:
* split hmac.copy() test by implementation
* update how algorithms are discovered for RFC test cases
* simplify how OpenSSL hash digests are requested
* refactor hexdigest tests for RFC test vectors
* typo fix: `assert_hmac_hexdigest_by_new` -> `assert_hmac_hexdigest_by_name`
Improvements:
* strengthen contract on `hmac_new_by_name` and `hmac_digest_by_name`
* rename mixin classes to better match their responsibility
2025-03-17 11:10:03 +01:00
Semyon Moroz
85c04f80fd
gh-93096: Update and document pickletools
CLI ( #131273 )
2025-03-17 09:36:30 +00:00
Mark Shannon
a1aeec61c4
GH-131238: Core header refactor (GH-131250)
...
* Moves most structs in pycore_ header files into pycore_structs.h and pycore_runtime_structs.h
* Removes many cross-header dependencies
2025-03-17 09:19:04 +00:00
Nybblista
3ae67ba97e
gh-131339: test PyBytes_Size for a zero-size bytes object ( #131340 )
2025-03-17 11:38:37 +03:00
Hood Chatham
cf288e3c25
gh-127146: Update test skips for Emscripten 4.0.2 ( #129474 )
...
Updates test skips to reflect capabilities of Emscripten 4.0.2.
2025-03-17 06:02:27 +08:00
Nybblista
23cda58348
gh-119786: add JUMP_BACKWARD
macro to the Jumps section ( #131213 )
...
add JUMP_BACKWARD opcode macro to the Jumps section
JUMP_BACKWARD opcode macro added to the Jumps section in
interpreter.md file at InternalDocs.
2025-03-16 20:04:39 +00:00
Tomas R.
d07e9ebbe8
gh-131306: Remove unused code related to BINARY_SUBSCR
( #131307 )
2025-03-16 16:37:29 +00:00
AN Long
bf4c1bf344
gh-131327: Document winsound.SND_APPLICATION ( #131328 )
...
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-03-16 16:27:24 +01:00
Bénédikt Tran
9b6cef0f5d
gh-131254: ensure that BROWSER
is not set for test_webbrowser
on macOS ( #131276 )
2025-03-16 15:39:30 +01:00
Bénédikt Tran
3185e3115c
gh-131277: allow EnvironmentVarGuard
to unset more than one environment variable at once ( #131280 )
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-03-16 14:09:33 +01:00
donBarbos
9558d22ac3
gh-130160: use .. program::
directive for documenting doctest
CLI ( #131034 )
...
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-03-16 11:53:22 +00:00
Barney Gale
563ab5cefe
GH-130614: pathlib ABCs: improve support for receiving path metadata ( #131259 )
...
In the private pathlib ABCs, replace `_WritablePath._write_info()` with
`_WritablePath._copy_from()`. This provides the target path object with
more control over the copying process, including support for querying and
setting metadata *before* the path is created.
Adjust `_ReadablePath.copy()` so that it forwards its keyword arguments to
`_WritablePath._copy_from()` of the target path object. This allows us to
remove the unimplemented *preserve_metadata* argument in the ABC method,
making it a `Path` exclusive.
2025-03-16 06:11:20 +00:00
Chris Eibl
e82c2ca2a5
GH-131296: fix clang-cl warnings on Windows in pyshellext.cpp (GH-131300)
...
fix unused warnings in pyshellext.cpp
2025-03-15 18:55:00 +00:00
Chris Eibl
f104c19a94
GH-131296: fix clang-cl warning on Windows in pytime.c (GH-131297)
...
fix warning : integer literal is too large
to be represented in a signed integer type,
interpreting as unsigned [-Wimplicitly-unsigned-literal]
2025-03-15 11:41:34 -07:00
Chris Eibl
faa80fcf46
GH-131296: fix clang-cl warnings on Windows in blake2module.c ( #131299 )
...
work around unimportant clang-cl warnings in blake2module.c
2025-03-15 11:37:53 -07:00
Chris Eibl
0ce056d265
gh-130213: update hacl_star_rev to 322f6d58290e0ed7f4ecb84fcce12917aa0f594b (GH-130960)
...
Updates the HACL* implementation used by hashlib from upstream sources.
2025-03-15 10:42:27 -07:00
donBarbos
7ae9c5dd25
gh-130160: use .. program::
directive for documenting http.server
CLI ( #131010 )
2025-03-15 18:28:56 +02:00
Xuanteng Huang
1821f8f10c
gh-131281: fix compile error due to BINARY_SUBSCR
(GH-131283)
...
* fix compile error due to `BINARY_SUBSCR`
* replace stat_inc with `BINARY_OP`
2025-03-15 23:38:46 +08:00
Yan Yanchii
55815a6474
gh-130480: Move duplicate LOAD_SMALL_INT
optimization from codegen to CFG ( #130481 )
2025-03-14 21:23:27 +00:00
Tian Gao
26511993e6
gh-121468: Fix the doctest failure for asyncio test on pdb ( #131258 )
2025-03-14 16:23:21 -04:00