repo
stringclasses
1 value
instance_id
stringlengths
20
22
problem_statement
stringlengths
126
60.8k
merge_commit
stringlengths
40
40
base_commit
stringlengths
40
40
python/cpython
python__cpython-134281
# `test_strftime` incorrectly calculates expected week # Bug report ### Bug description: This is not a duplicate of other IST related issues, <strike>this is just a bug in the test itself from a quick look.</strike> After further investigation it appears this is indeed just a IST bug but the test also calculates it wrong. From [buildbot run](https://buildbot.python.org/#/builders/1678/builds/37) (on IST): ``` ====================================================================== FAIL: test_strftime (test.test_strftime.StrftimeTest.test_strftime) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/stan/buildarea/3.x.stan-raspbian/build/Lib/test/test_strftime.py", line 65, in test_strftime self.strftest1(now) ~~~~~~~~~~~~~~^^^^^ File "/home/stan/buildarea/3.x.stan-raspbian/build/Lib/test/test_strftime.py", line 124, in strftest1 self.fail("Conflict for %s (%s): expected %s, but got %s" ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ % (e[0], e[2], e[1], result)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: Conflict for %W (week number of the year (Mon 1st)): expected 18, but got 19 Stdout: strftime test for Mon May 12 18:08:48 2025 ---------------------------------------------------------------------- Ran 4 tests in 0.049s ``` It seems both the expected and returned are wrong, according to this [website](https://www.epochconverter.com/weeknumbers) it should be week 20. Week 0 is days before the first week, so it would exist in our case, if it is counted, then the returned value is correct, but the test is wrong. Test passes in UTC however. ### CPython versions tested on: CPython main branch ### Operating systems tested on: Linux <!-- gh-linked-prs --> ### Linked PRs * gh-134281 * gh-134301 * gh-134302 <!-- /gh-linked-prs -->
e3dda8f81832008adf19906004f0cd53de95dd0b
66aaad61037785639aec393be7618cb54b1372dc
python/cpython
python__cpython-134244
# segfault in gc with 3.14.0b1, trio and pytest # Crash report ### What happened? I'm encountering a segfault during garbage collection since 3.14.0b1 (I have not been able to reproduce it on 3.14.0a6), and while I've so far been able to minify the repro somewhat it still requires both pytest and trio ```python import trio from contextlib import suppress import gc def test_error_in_run_loop() -> None: # Blow stuff up real good to check we at least get a TrioInternalError async def main() -> None: task = trio.lowlevel.current_task() task._schedule_points = "hello!" # type: ignore await trio.lowlevel.checkpoint() with suppress(trio.TrioInternalError): trio.run(main) gc.collect() gc.collect() # removing this line makes the segfault disappear ``` ``` $ tox -e repro_crash ===================================== test session starts ===================================== platform linux -- Python 3.14.0b1, pytest-8.3.5, pluggy-1.5.0 cachedir: .tox/crash/.pytest_cache rootdir: /home/h/Git/trio/unbreak_314 configfile: pyproject.toml collected 1 item Fatal Python error: Segmentation fault Current thread 0x00007fc3244b0bc0 [pytest] (most recent call first): Garbage-collecting File "./foo.py", line 14 in test_error_in_run_loop File ".../site-packages/_pytest/python.py", line 159 in pytest_pyfunc_call File ".../site-packages/pluggy/_callers.py", line 103 in _multicall File ".../site-packages/pluggy/_manager.py", line 120 in _hookexec File ".../site-packages/pluggy/_hooks.py", line 513 in __call__ File ".../site-packages/_pytest/python.py", line 1627 in runtest File ".../site-packages/_pytest/runner.py", line 174 in pytest_runtest_call File ".../site-packages/pluggy/_callers.py", line 103 in _multicall File ".../site-packages/pluggy/_manager.py", line 120 in _hookexec File ".../site-packages/pluggy/_hooks.py", line 513 in __call__ File ".../site-packages/_pytest/runner.py", line 242 in <lambda> File ".../site-packages/_pytest/runner.py", line 341 in from_call File ".../site-packages/_pytest/runner.py", line 241 in call_and_report File ".../site-packages/_pytest/runner.py", line 132 in runtestprotocol File ".../site-packages/_pytest/runner.py", line 113 in pytest_runtest_protocol File ".../site-packages/pluggy/_callers.py", line 103 in _multicall File ".../site-packages/pluggy/_manager.py", line 120 in _hookexec File ".../site-packages/pluggy/_hooks.py", line 513 in __call__ File ".../site-packages/_pytest/main.py", line 362 in pytest_runtestloop File ".../site-packages/pluggy/_callers.py", line 103 in _multicall File ".../site-packages/pluggy/_manager.py", line 120 in _hookexec File ".../site-packages/pluggy/_hooks.py", line 513 in __call__ File ".../site-packages/_pytest/main.py", line 337 in _main File ".../site-packages/_pytest/main.py", line 283 in wrap_session File ".../site-packages/_pytest/main.py", line 330 in pytest_cmdline_main File ".../site-packages/pluggy/_callers.py", line 103 in _multicall File ".../site-packages/pluggy/_manager.py", line 120 in _hookexec File ".../site-packages/pluggy/_hooks.py", line 513 in __call__ File ".../site-packages/_pytest/config/__init__.py", line 175 in main File ".../site-packages/_pytest/config/__init__.py", line 201 in console_main File "./.tox/crash/bin/pytest", line 10 in <module> Current thread's C stack trace (most recent call first): Binary file "/usr/lib/libpython3.14.so.1.0", at _Py_DumpStack+0x4d [0x7fc324096a8d] Binary file "/usr/lib/libpython3.14.so.1.0", at +0x2a778c [0x7fc3240a778c] Binary file "/usr/lib/libc.so.6", at +0x3dcd0 [0x7fc323c4bcd0] Binary file "/usr/lib/libpython3.14.so.1.0", at +0x23a40a [0x7fc32403a40a] Binary file "/usr/lib/libpython3.14.so.1.0", at +0xd8d80 [0x7fc323ed8d80] Binary file "/usr/lib/libpython3.14.so.1.0", at _Py_Dealloc+0x75 [0x7fc323f21745] Binary file "/usr/lib/libpython3.14.so.1.0", at +0x1436c1 [0x7fc323f436c1] Binary file "/usr/lib/libpython3.14.so.1.0", at +0x143e65 [0x7fc323f43e65] Binary file "/usr/lib/libpython3.14.so.1.0", at +0x2379db [0x7fc3240379db] Binary file "/usr/lib/libpython3.14.so.1.0", at +0x237e6c [0x7fc324037e6c] Binary file "/usr/lib/libpython3.14.so.1.0", at +0x2a4df8 [0x7fc3240a4df8] Binary file "/usr/lib/libpython3.14.so.1.0", at PyObject_Vectorcall+0x5d [0x7fc323ebbc4d] Binary file "/usr/lib/libpython3.14.so.1.0", at _PyEval_EvalFrameDefault+0x13ba [0x7fc323fef17a] Binary file "/usr/lib/libpython3.14.so.1.0", at +0x201237 [0x7fc324001237] Binary file "/usr/lib/libpython3.14.so.1.0", at +0xbb926 [0x7fc323ebb926] Binary file "/usr/lib/libpython3.14.so.1.0", at +0xbbbc0 [0x7fc323ebbbc0] Binary file "/usr/lib/libpython3.14.so.1.0", at +0x1437c9 [0x7fc323f437c9] Binary file "/usr/lib/libpython3.14.so.1.0", at _PyObject_MakeTpCall+0x9f [0x7fc323ebb52f] Binary file "/usr/lib/libpython3.14.so.1.0", at _PyEval_EvalFrameDefault+0x4bbf [0x7fc323ff297f] Binary file "/usr/lib/libpython3.14.so.1.0", at +0x201237 [0x7fc324001237] Binary file "/usr/lib/libpython3.14.so.1.0", at +0xbb926 [0x7fc323ebb926] Binary file "/usr/lib/libpython3.14.so.1.0", at +0xbbbc0 [0x7fc323ebbbc0] Binary file "/usr/lib/libpython3.14.so.1.0", at +0x1437c9 [0x7fc323f437c9] Binary file "/usr/lib/libpython3.14.so.1.0", at +0xbb231 [0x7fc323ebb231] Binary file "/usr/lib/libpython3.14.so.1.0", at _PyEval_EvalFrameDefault+0x1cae [0x7fc323fefa6e] Binary file "/usr/lib/libpython3.14.so.1.0", at +0x201237 [0x7fc324001237] Binary file "/usr/lib/libpython3.14.so.1.0", at +0xbb926 [0x7fc323ebb926] Binary file "/usr/lib/libpython3.14.so.1.0", at +0xbbbc0 [0x7fc323ebbbc0] Binary file "/usr/lib/libpython3.14.so.1.0", at +0x1437c9 [0x7fc323f437c9] Binary file "/usr/lib/libpython3.14.so.1.0", at _PyObject_MakeTpCall+0x9f [0x7fc323ebb52f] Binary file "/usr/lib/libpython3.14.so.1.0", at _PyEval_EvalFrameDefault+0x4bbf [0x7fc323ff297f] Binary file "/usr/lib/libpython3.14.so.1.0", at +0x201237 [0x7fc324001237] <truncated rest of calls> foo.py crash: exit -11 (1.06 seconds) .> pytest foo.py pid=781607 crash: FAIL code -11 (2.11 seconds) evaluation failed :( (2.22 seconds) ``` I also reproduced it in a clean 3.14.0b1 venv with trio==0.30.0; pytest==8.3.5 without relying on tox, but idr how to get it to print the stack trace that way. It's not 100% reliable, so I suspect there's some thread race condition going on. ### CPython versions tested on: 3.14 ### Operating systems tested on: Linux ### Output from running 'python -VV' on the command line: Python 3.14.0b1 (main, May 9 2025, 13:04:07) [GCC 14.2.1 20250207] <!-- gh-linked-prs --> ### Linked PRs * gh-134244 * gh-134494 <!-- /gh-linked-prs -->
29f6dc6323759ab89ddc33096bf075037db5de5a
1f0a294e8c2ff009c6b74ca5aa71da6269aec0dd
python/cpython
python__cpython-134377
# Make generator methods `gen_set_name` and `gen_set_qualname` thread-safe in free-threaded builds # Feature or enhancement ### Proposal: When my PR was reviewed, some problem was found: https://github.com/python/cpython/pull/133373#discussion_r2072630853 But my code on _GeneratorWrapper was simply copied from [`gen_set_name`](https://github.com/python/cpython/blob/27ed64575d34f04029ba1d353810f3db4f4f045b/Objects/genobject.c#L711) method. So, it seems that there is no critical section in `genobject.c` at all. But there is a possibility to change `name` or `qualname` for generator/async generator/coroutine. IMO, some simple code (`Py_BEGIN_CRITICAL_SECTION` and `Py_END_CRITICAL_SECTION`) should be added to these two methods. Also, `function object` seems to have exactly the same [problem](https://github.com/python/cpython/blob/27ed64575d34f04029ba1d353810f3db4f4f045b/Objects/funcobject.c#L716). <!-- gh-linked-prs --> ### Linked PRs * gh-134377 <!-- /gh-linked-prs -->
52be7f445e454ccb44e368a22fe70a0fa6cab7c0
cb394101110e13a27e08bbf2fe9f38d847db004c
python/cpython
python__cpython-133952
# PyManager shebangs do not document auto-install behaviour At https://docs.python.org/dev/using/windows.html#shebang-lines it should mention that if a shebang is included but not installed, a matching runtime will be installed automatically (unless configured off). <!-- gh-linked-prs --> ### Linked PRs * gh-133952 * gh-133977 <!-- /gh-linked-prs -->
fc3cddd90a1674a71c1abe6a78dde14c935b1de4
e575190abbd9409adad3e7fd95424f827236bed9
python/cpython
python__cpython-133933
# pdb: Pass debug commands directly via set_trace() instead of rcLines.extend() # Feature or enhancement ### Proposal: Currently, when attaching a remote PDB session in _connect(), debug commands are passed indirectly by extending the rcLines list before calling set_trace(): ```python remote_pdb.rcLines.extend(commands.splitlines()) # Indirect remote_pdb.set_trace(frame=frame) ``` https://github.com/python/cpython/blob/main/Lib/pdb.py#L3386C1-L3387C42 we can use the following statement: ```python remote_pdb.set_trace(frame=frame, commands=commands.splitlines()) ``` This change preserves the existing functionality, while improving interface consistency with pdb. <!-- gh-linked-prs --> ### Linked PRs * gh-133933 <!-- /gh-linked-prs -->
ae74e3f8636382efdac441c1bc6e69aa66694927
86c1d439e0ccbe6baeda69322f1f8c0e6a80464c
python/cpython
python__cpython-133929
# `typing._UnionGenericAlias` is unhashable in 3.14 # Bug report ### Bug description: `typing._UnionGenericAlias)` became unshable somewhere between 3.13 and 3.14.0b1 (most likely in gh-105511) ```py import typing hash(typing._UnionGenericAlias) ``` ```python-traceback Traceback (most recent call last): File "<python-input-0>", line 2, in <module> hash(typing._UnionGenericAlias) ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: unhashable type: '_UnionGenericAliasMeta' ``` This was hit in a doctest from `astropy`: xref https://github.com/astropy/astropy/issues/18126 To be clear, the test in question doesn't necessarily correspond to a real-life application; we're testing that our `itersubclasses` utility function works in a very broad case where we try to retrieve all defined subclasses of `object`, and do a bit of internal book-keeping using a `set` of already-visited classes. This used to work in Python 3.13 (and seems to have worked with no interruption for 10+ years), so it still seemed worth a shot to see if that would be considered a bug here. Otherwise, it should be possible to fix the function on our side to either special case this exact class, ignore any unhashable class, or avoid reequiring hashability altogether. ### CPython versions tested on: 3.14 ### Operating systems tested on: Linux <!-- gh-linked-prs --> ### Linked PRs * gh-133929 * gh-133936 <!-- /gh-linked-prs -->
8d478c79539ed0ec7071766b7a0afe62fb11f7d4
27ed64575d34f04029ba1d353810f3db4f4f045b
python/cpython
python__cpython-134725
# Regression in 3.14: setting __dict__ on custom type broken (mypyc, pybind11) # Bug report ### Bug description: The work in #115776 by @markshannon broke mypyc and pybind11's tests related to pickling and setting `__dict__` on custom types. Specially, #117750 introduced the regression for pybind11, I tested all the released for 3.14 then bisected between the commit after the fork point and 3.14.0a1 to find the commit in the PR above introduced the issue. More types are now inlined, but this breaks dict setting. * https://github.com/python/mypy/issues/17973 * https://github.com/mypyc/mypyc/issues/1091 * https://github.com/pybind/pybind11/pull/5646 I've prepared a MWE without pybind11 or mypyc: ### src/main.c ```c #define PY_SSIZE_T_CLEAN #include <Python.h> typedef struct { PyObject_VAR_HEAD } ManagedDictObject; int ManagedDict_traverse(PyObject *self, visitproc visit, void *arg) { PyObject_VisitManagedDict(self, visit, arg); Py_VISIT(Py_TYPE(self)); return 0; } int ManagedDict_clear(PyObject *self) { PyObject_ClearManagedDict(self); return 0; } static PyGetSetDef ManagedDict_getset[] = { {"__dict__", PyObject_GenericGetDict, PyObject_GenericSetDict, NULL, NULL}, {NULL, NULL, NULL, NULL, NULL}, }; static PyType_Slot ManagedDict_slots[] = { {Py_tp_new, (void *)PyType_GenericNew}, {Py_tp_getset, (void *)ManagedDict_getset}, {Py_tp_traverse, (void *)ManagedDict_traverse}, {Py_tp_clear, (void *)ManagedDict_clear}, {0} }; static PyType_Spec ManagedDict_spec = { "manageddictbug.ManagedDict", sizeof(ManagedDictObject), 0, // itemsize Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_MANAGED_DICT | Py_TPFLAGS_HEAPTYPE | Py_TPFLAGS_HAVE_GC, ManagedDict_slots }; static PyModuleDef manageddictbugmodule = { PyModuleDef_HEAD_INIT, "manageddictbug", NULL, -1, NULL, }; PyMODINIT_FUNC PyInit_manageddictbug(void) { PyObject *m = PyModule_Create(&manageddictbugmodule); if (m == NULL) return NULL; PyObject *ManagedDictType = PyType_FromSpec(&ManagedDict_spec); if (ManagedDictType == NULL) { Py_DECREF(m); return NULL; } if (PyModule_AddObject(m, "ManagedDict", ManagedDictType) < 0) { Py_DECREF(ManagedDictType); Py_DECREF(m); return NULL; } return m; } ``` ### pyproject.toml ```toml [build-system] requires = ["scikit-build-core"] build-backend = "scikit_build_core.build" [project] name = "example-broken" version = "0.1.0" ``` ### CMakeLists.txt ```cmake cmake_minimum_required(VERSION 3.15...4.0) project(${SKBUILD_PROJECT_NAME} LANGUAGES C) find_package(Python REQUIRED COMPONENTS Development.Module) python_add_library(manageddictbug MODULE WITH_SOABI src/main.c) install(TARGETS manageddictbug DESTINATION .) ``` ### example.py ```python import manageddictbug obj = manageddictbug.ManagedDict() obj.foo = 42 print(obj.foo) print(obj.__dict__) obj.__dict__ = {"bar": 3} print(obj.__dict__) print(obj.bar) ``` ```console $ uv venv -p 3.13 -q && uv pip install . -q && .venv/bin/python example.py 42 {'foo': 42} {'bar': 3} 3 $ uv venv -p ~/git/software/pybind11/.venv/bin/python3.14 -q && uv pip install . -q && .venv/bin/python example.py 42 {'foo': 42} {'bar': 3} Traceback (most recent call last): File "/Users/henryschreiner/git/scikit-build-proj/example_broken/example.py", line 13, in <module> print(obj.bar) ^^^^^^^ AttributeError: 'manageddictbug.ManagedDict' object has no attribute 'bar' ``` There is custom code in `PyObject_GenericSetDict` that is supposed to be handling the inline case, but maybe it wasn't hit before and is faulty? ### CPython versions tested on: 3.14.0b1 (and back to 3.14.0a1) ### Operating systems tested on: macOS (and Linux in CI too; Windows CI broken due to https://gitlab.kitware.com/cmake/cmake/-/issues/26926, which I haven't opened a CPython issue for yet). <!-- gh-linked-prs --> ### Linked PRs * gh-134725 * gh-134859 <!-- /gh-linked-prs -->
9fbd66a93d526c49fac8e1427c25e8f7f4154e29
f6324bc7eedc615c3c961fe368a8c56697d42936
python/cpython
python__cpython-133907
# Invalid error type in math.factorial sphinx docs/docstring Documentation says: Raises [ValueError](https://docs.python.org/3.15/library/exceptions.html#ValueError) if n is not integral or is negative. Docstring: Raise a ValueError if x is negative or non-integral. State of art: ```pycon >>> math.factorial(1.0) Traceback (most recent call last): File "<python-input-2>", line 1, in <module> math.factorial(1.0) ~~~~~~~~~~~~~~^^^^^ TypeError: 'float' object cannot be interpreted as an integer >>> math.factorial(-1.0) Traceback (most recent call last): File "<python-input-3>", line 1, in <module> math.factorial(-1.0) ~~~~~~~~~~~~~~^^^^^^ TypeError: 'float' object cannot be interpreted as an integer >>> math.factorial(-1) Traceback (most recent call last): File "<python-input-4>", line 1, in <module> math.factorial(-1) ~~~~~~~~~~~~~~^^^^ ValueError: factorial() not defined for negative values ``` Documentation should be fixed to state, that TypeError is raised for non-integral arguments. Or just omit description of exceptions and reduce docs to: "Return factorial of the nonnegative integer n." <!-- gh-linked-prs --> ### Linked PRs * gh-133907 * gh-133913 * gh-133918 * gh-133922 <!-- /gh-linked-prs -->
27ed64575d34f04029ba1d353810f3db4f4f045b
c2989b7070b18c0b7c51521fed8bc11c159ea5b8
python/cpython
python__cpython-133894
# asyncio.graph.format_call_graph() should use io.Writer instead of typing.TextIO # Feature or enhancement ### Proposal: The `file` argument to `format_call_graph()` gets forwarded to `print(file)`, which is annotated as `_typeshed.SupportsWrite[str]` in typeshed. `SupportsWrite` is typeshed's legacy variant of `io.Writer`. ### Has this already been discussed elsewhere? This is a minor feature, which does not need previous discussion elsewhere ### Links to previous discussion of this feature: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133894 * gh-133901 <!-- /gh-linked-prs -->
1d3eacedb8cc51256a5350c6d421fb85e2b21f18
13cb8ca3da75d6fe2a1114e58c24ca681fee411f
python/cpython
python__cpython-133892
# Missing error handling in `SET_COUNT` macro in `_testinternalcapi.c` # Bug report Refs https://github.com/python/cpython/pull/133265 Right here `PyLong_FromLong` can in theory (unlikely in practice) return `NULL`. It is missing this check. I understand that this is a test code, but I also don't see a reason why we should not be explicit about it. https://github.com/python/cpython/blob/13cb8ca3da75d6fe2a1114e58c24ca681fee411f/Modules/_testinternalcapi.c#L1045 cc @ericsnowcurrently I have a PR ready. <!-- gh-linked-prs --> ### Linked PRs * gh-133892 * gh-134988 <!-- /gh-linked-prs -->
cebae977a63f32c3c03d14c040df3cea55b8f585
3704171415c1ea6ebbeb2f992758b6565f42e378
python/cpython
python__cpython-134147
# TarFile filters fail in non-UTF-8 locales # Bug report `test_tarfile` files in non-UTF-8 locales. For example: ``` $ LC_ALL=uk_UA ./python -m test -vuall test_tarfile -m 'NoneInfoExtractTests_*' -m test_data_filter -m test_tar_filter ``` <details> ``` ====================================================================== ERROR: setUpClass (test.test_tarfile.NoneInfoExtractTests_Data) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_tarfile.py", line 3264, in setUpClass tar.extractall(cls.control_dir, filter=cls.extraction_filter) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/serhiy/py/cpython/Lib/tarfile.py", line 2389, in extractall tarinfo = self._get_extract_tarinfo(member, filter_function, path) File "/home/serhiy/py/cpython/Lib/tarfile.py", line 2441, in _get_extract_tarinfo tarinfo = filter_function(tarinfo, path) File "/home/serhiy/py/cpython/Lib/tarfile.py", line 842, in data_filter new_attrs = _get_filtered_attrs(member, dest_path, True) File "/home/serhiy/py/cpython/Lib/tarfile.py", line 782, in _get_filtered_attrs target_path = os.path.realpath(os.path.join(dest_path, name)) File "/home/serhiy/py/cpython/Lib/posixpath.py", line 405, in realpath return _realpath(filename, strict, sep, curdir, pardir, getcwd) File "/home/serhiy/py/cpython/Lib/posixpath.py", line 452, in _realpath st_mode = lstat(newpath).st_mode ~~~~~^^^^^^^^^ File "/home/serhiy/py/cpython/Lib/encodings/koi8_u.py", line 12, in encode return codecs.charmap_encode(input,errors,encoding_table) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeEncodeError: 'charmap' codec can't encode characters in position 112-118: character maps to <undefined> encoding with 'koi8-u' codec failed ====================================================================== ERROR: setUpClass (test.test_tarfile.NoneInfoExtractTests_Default) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_tarfile.py", line 3264, in setUpClass tar.extractall(cls.control_dir, filter=cls.extraction_filter) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/serhiy/py/cpython/Lib/tarfile.py", line 2389, in extractall tarinfo = self._get_extract_tarinfo(member, filter_function, path) File "/home/serhiy/py/cpython/Lib/tarfile.py", line 2441, in _get_extract_tarinfo tarinfo = filter_function(tarinfo, path) File "/home/serhiy/py/cpython/Lib/tarfile.py", line 842, in data_filter new_attrs = _get_filtered_attrs(member, dest_path, True) File "/home/serhiy/py/cpython/Lib/tarfile.py", line 782, in _get_filtered_attrs target_path = os.path.realpath(os.path.join(dest_path, name)) File "/home/serhiy/py/cpython/Lib/posixpath.py", line 405, in realpath return _realpath(filename, strict, sep, curdir, pardir, getcwd) File "/home/serhiy/py/cpython/Lib/posixpath.py", line 452, in _realpath st_mode = lstat(newpath).st_mode ~~~~~^^^^^^^^^ File "/home/serhiy/py/cpython/Lib/encodings/koi8_u.py", line 12, in encode return codecs.charmap_encode(input,errors,encoding_table) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeEncodeError: 'charmap' codec can't encode characters in position 112-118: character maps to <undefined> encoding with 'koi8-u' codec failed ====================================================================== ERROR: setUpClass (test.test_tarfile.NoneInfoExtractTests_FullyTrusted) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_tarfile.py", line 3264, in setUpClass tar.extractall(cls.control_dir, filter=cls.extraction_filter) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/serhiy/py/cpython/Lib/tarfile.py", line 2397, in extractall self._extract_one(tarinfo, path, set_attrs=not tarinfo.isdir(), ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ numeric_owner=numeric_owner) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/serhiy/py/cpython/Lib/tarfile.py", line 2460, in _extract_one self._extract_member(tarinfo, os.path.join(path, tarinfo.name), ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ set_attrs=set_attrs, ^^^^^^^^^^^^^^^^^^^^ numeric_owner=numeric_owner) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/serhiy/py/cpython/Lib/tarfile.py", line 2543, in _extract_member self.makefile(tarinfo, targetpath) ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ File "/home/serhiy/py/cpython/Lib/tarfile.py", line 2589, in makefile with bltn_open(targetpath, "wb") as target: ~~~~~~~~~^^^^^^^^^^^^^^^^^^ File "/home/serhiy/py/cpython/Lib/encodings/koi8_u.py", line 12, in encode return codecs.charmap_encode(input,errors,encoding_table) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeEncodeError: 'charmap' codec can't encode characters in position 112-118: character maps to <undefined> encoding with 'koi8-u' codec failed ====================================================================== ERROR: setUpClass (test.test_tarfile.NoneInfoExtractTests_Tar) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_tarfile.py", line 3264, in setUpClass tar.extractall(cls.control_dir, filter=cls.extraction_filter) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/serhiy/py/cpython/Lib/tarfile.py", line 2389, in extractall tarinfo = self._get_extract_tarinfo(member, filter_function, path) File "/home/serhiy/py/cpython/Lib/tarfile.py", line 2441, in _get_extract_tarinfo tarinfo = filter_function(tarinfo, path) File "/home/serhiy/py/cpython/Lib/tarfile.py", line 836, in tar_filter new_attrs = _get_filtered_attrs(member, dest_path, False) File "/home/serhiy/py/cpython/Lib/tarfile.py", line 782, in _get_filtered_attrs target_path = os.path.realpath(os.path.join(dest_path, name)) File "/home/serhiy/py/cpython/Lib/posixpath.py", line 405, in realpath return _realpath(filename, strict, sep, curdir, pardir, getcwd) File "/home/serhiy/py/cpython/Lib/posixpath.py", line 452, in _realpath st_mode = lstat(newpath).st_mode ~~~~~^^^^^^^^^ File "/home/serhiy/py/cpython/Lib/encodings/koi8_u.py", line 12, in encode return codecs.charmap_encode(input,errors,encoding_table) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeEncodeError: 'charmap' codec can't encode characters in position 112-118: character maps to <undefined> encoding with 'koi8-u' codec failed ====================================================================== ERROR: test_data_filter (test.test_tarfile.TestExtractionFilters.test_data_filter) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_tarfile.py", line 4086, in test_data_filter filtered = tarfile.data_filter(tarinfo, '') File "/home/serhiy/py/cpython/Lib/tarfile.py", line 842, in data_filter new_attrs = _get_filtered_attrs(member, dest_path, True) File "/home/serhiy/py/cpython/Lib/tarfile.py", line 782, in _get_filtered_attrs target_path = os.path.realpath(os.path.join(dest_path, name)) File "/home/serhiy/py/cpython/Lib/posixpath.py", line 405, in realpath return _realpath(filename, strict, sep, curdir, pardir, getcwd) File "/home/serhiy/py/cpython/Lib/posixpath.py", line 452, in _realpath st_mode = lstat(newpath).st_mode ~~~~~^^^^^^^^^ File "/home/serhiy/py/cpython/Lib/encodings/koi8_u.py", line 12, in encode return codecs.charmap_encode(input,errors,encoding_table) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeEncodeError: 'charmap' codec can't encode characters in position 69-75: character maps to <undefined> encoding with 'koi8-u' codec failed ====================================================================== ERROR: test_tar_filter (test.test_tarfile.TestExtractionFilters.test_tar_filter) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_tarfile.py", line 4076, in test_tar_filter filtered = tarfile.tar_filter(tarinfo, '') File "/home/serhiy/py/cpython/Lib/tarfile.py", line 836, in tar_filter new_attrs = _get_filtered_attrs(member, dest_path, False) File "/home/serhiy/py/cpython/Lib/tarfile.py", line 782, in _get_filtered_attrs target_path = os.path.realpath(os.path.join(dest_path, name)) File "/home/serhiy/py/cpython/Lib/posixpath.py", line 405, in realpath return _realpath(filename, strict, sep, curdir, pardir, getcwd) File "/home/serhiy/py/cpython/Lib/posixpath.py", line 452, in _realpath st_mode = lstat(newpath).st_mode ~~~~~^^^^^^^^^ File "/home/serhiy/py/cpython/Lib/encodings/koi8_u.py", line 12, in encode return codecs.charmap_encode(input,errors,encoding_table) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeEncodeError: 'charmap' codec can't encode characters in position 69-75: character maps to <undefined> encoding with 'koi8-u' codec failed ---------------------------------------------------------------------- ``` </details> This happens because they use `os.path.realpath()` for paths in a tar archive, which uses `os.stat()`, which fails with unexpected `UnicodeEncodeError` if the path in a tar archive can't be encoded in the current filesystem encoding. This error should be handled at some level, either in `os.path.realpath()` or in `tarfile`. `os.stat()` can also raise `ValueError` if the path contain null bytes. Don't know if this is relevant here, we should test. <!-- gh-linked-prs --> ### Linked PRs * gh-134147 * gh-134195 * gh-134196 <!-- /gh-linked-prs -->
9983c7d4416cac8deb2fded1ec9c7daf786c3a02
5cbc8c632e860941602e8f7da9aab52fae40aca6
python/cpython
python__cpython-133887
# sys.remote_exec() doesn't work with non-UTF-8 paths # Bug report There are two symptoms: 1. It does not work with non-ASCII names in non-UTF-8 locale. All related `test_sys` tests are failed on in non-UTF-8 locale. For example: ``` $ LC_ALL=uk_UA ./python -m test -vuall test_sys -m test_remote_exec ====================================================================== ERROR: test_remote_exec (test.test_sys.TestRemoteExec.test_remote_exec) Test basic remote exec functionality ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_sys.py", line 2078, in test_remote_exec returncode, stdout, stderr = self._run_remote_exec_test(script) ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^ File "/home/serhiy/py/cpython/Lib/test/test_sys.py", line 2052, in _run_remote_exec_test sys.remote_exec(proc.pid, script_path) ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: Script file does not exist ---------------------------------------------------------------------- ``` 2. Even in UTF-8 locale it fails if the path contains non-UTF-8 bytes. The issue is twofold. On one side, `sys.remote_exec()` encodes the path to UTF-8 (even if the bytes path was decoded using the filesystem encoding). It fails because `os.access()` can't find file using the wrong path. It can accidentally success if other file exists with such path. On other side, `PyFile_OpenFile()` which interprets the path as UTF-8 is used to open the file. <!-- gh-linked-prs --> ### Linked PRs * gh-133887 * gh-133963 <!-- /gh-linked-prs -->
c09cec5d69f2ef6ab5e64c7e0579fbd9dcb2ca45
8cf4947b0f2d37f7ffeca136ac4f99cb4cb70e5c
python/cpython
python__cpython-133943
# `test_zstd` failed on ubuntu with free-threading # Crash report Link: https://github.com/python/cpython/actions/runs/14954410814/job/42008158034?pr=133876 ``` 0:00:11 load avg: 57.89 [ 12/491/1] test_zstd worker non-zero exit code (Exit code -11 (SIGSEGV)) test_compress_empty (test.test_zstd.CompressorTestCase.test_compress_empty) ... ok test_compress_flushblock (test.test_zstd.CompressorTestCase.test_compress_flushblock) ... ok test_compress_flushframe (test.test_zstd.CompressorTestCase.test_compress_flushframe) ... ok test_compress_parameters (test.test_zstd.CompressorTestCase.test_compress_parameters) ... ok test_simple_compress_bad_args (test.test_zstd.CompressorTestCase.test_simple_compress_bad_args) ... ok test_unknown_compression_parameter (test.test_zstd.CompressorTestCase.test_unknown_compression_parameter) ... ok test_zstd_multithread_compress (test.test_zstd.CompressorTestCase.test_zstd_multithread_compress) ... skipped "zstd build doesn't support multi-threaded compression" test_decompressor_1 (test.test_zstd.DecompressorFlagsTestCase.test_decompressor_1) ... ok test_decompressor_skippable (test.test_zstd.DecompressorFlagsTestCase.test_decompressor_skippable) ... ok test_function_decompress (test.test_zstd.DecompressorFlagsTestCase.test_function_decompress) ... ok test_function_skippable (test.test_zstd.DecompressorFlagsTestCase.test_function_skippable) ... ok test_decompress_empty (test.test_zstd.DecompressorTestCase.test_decompress_empty) ... ok test_decompress_empty_content_frame (test.test_zstd.DecompressorTestCase.test_decompress_empty_content_frame) ... ok test_decompress_epilogue_flags (test.test_zstd.DecompressorTestCase.test_decompress_epilogue_flags) ... ok test_decompress_parameters (test.test_zstd.DecompressorTestCase.test_decompress_parameters) ... ok test_decompressor_1 (test.test_zstd.DecompressorTestCase.test_decompressor_1) ... ok test_decompressor_arg (test.test_zstd.DecompressorTestCase.test_decompressor_arg) ... ok test_decompressor_chunks_read_3 (test.test_zstd.DecompressorTestCase.test_decompressor_chunks_read_3) ... ok test_decompressor_chunks_read_300 (test.test_zstd.DecompressorTestCase.test_decompressor_chunks_read_300) ... ok test_simple_decompress_bad_args (test.test_zstd.DecompressorTestCase.test_simple_decompress_bad_args) ... ok test_unknown_decompression_parameter (test.test_zstd.DecompressorTestCase.test_unknown_decompression_parameter) ... ok test_UnsupportedOperation (test.test_zstd.FileTestCase.test_UnsupportedOperation) ... ok test_append_new_file (test.test_zstd.FileTestCase.test_append_new_file) ... ok test_close (test.test_zstd.FileTestCase.test_close) ... ok test_closed (test.test_zstd.FileTestCase.test_closed) ... ok test_decompress_limited (test.test_zstd.FileTestCase.test_decompress_limited) ... ok test_file_dict (test.test_zstd.FileTestCase.test_file_dict) ... ok test_file_prefix (test.test_zstd.FileTestCase.test_file_prefix) ... ok test_fileno (test.test_zstd.FileTestCase.test_fileno) ... ok test_init (test.test_zstd.FileTestCase.test_init) ... ok test_init_bad_check (test.test_zstd.FileTestCase.test_init_bad_check) ... ok test_init_bad_mode (test.test_zstd.FileTestCase.test_init_bad_mode) ... ok test_init_close_fp (test.test_zstd.FileTestCase.test_init_close_fp) ... ok test_init_mode (test.test_zstd.FileTestCase.test_init_mode) ... ok test_init_with_PathLike_filename (test.test_zstd.FileTestCase.test_init_with_PathLike_filename) ... ok test_init_with_filename (test.test_zstd.FileTestCase.test_init_with_filename) ... ok test_init_with_x_mode (test.test_zstd.FileTestCase.test_init_with_x_mode) ... ok test_iterator (test.test_zstd.FileTestCase.test_iterator) ... ok test_name (test.test_zstd.FileTestCase.test_name) ... ok test_peek (test.test_zstd.FileTestCase.test_peek) ... ok test_peek_bad_args (test.test_zstd.FileTestCase.test_peek_bad_args) ... ok test_read1 (test.test_zstd.FileTestCase.test_read1) ... ok test_read1_0 (test.test_zstd.FileTestCase.test_read1_0) ... ok test_read1_10 (test.test_zstd.FileTestCase.test_read1_10) ... ok test_read1_bad_args (test.test_zstd.FileTestCase.test_read1_bad_args) ... ok test_read1_multistream (test.test_zstd.FileTestCase.test_read1_multistream) ... ok test_read_0 (test.test_zstd.FileTestCase.test_read_0) ... ok test_read_10 (test.test_zstd.FileTestCase.test_read_10) ... ok test_read_bad_args (test.test_zstd.FileTestCase.test_read_bad_args) ... ok test_read_bad_data (test.test_zstd.FileTestCase.test_read_bad_data) ... ok test_read_exception (test.test_zstd.FileTestCase.test_read_exception) ... ok test_read_incomplete (test.test_zstd.FileTestCase.test_read_incomplete) ... ok test_read_multistream (test.test_zstd.FileTestCase.test_read_multistream) ... ok test_read_readinto_readinto1 (test.test_zstd.FileTestCase.test_read_readinto_readinto1) ... ok test_read_truncated (test.test_zstd.FileTestCase.test_read_truncated) ... ok test_readable (test.test_zstd.FileTestCase.test_readable) ... ok test_readinto (test.test_zstd.FileTestCase.test_readinto) ... ok test_seek_backward (test.test_zstd.FileTestCase.test_seek_backward) ... ok test_seek_backward_across_streams (test.test_zstd.FileTestCase.test_seek_backward_across_streams) ... ok test_seek_backward_relative_to_end (test.test_zstd.FileTestCase.test_seek_backward_relative_to_end) ... ok test_seek_bad_args (test.test_zstd.FileTestCase.test_seek_bad_args) ... ok test_seek_forward (test.test_zstd.FileTestCase.test_seek_forward) ... ok test_seek_forward_across_streams (test.test_zstd.FileTestCase.test_seek_forward_across_streams) ... ok test_seek_forward_relative_to_current (test.test_zstd.FileTestCase.test_seek_forward_relative_to_current) ... ok test_seek_forward_relative_to_end (test.test_zstd.FileTestCase.test_seek_forward_relative_to_end) ... ok test_seek_not_seekable (test.test_zstd.FileTestCase.test_seek_not_seekable) ... ok test_seek_past_end (test.test_zstd.FileTestCase.test_seek_past_end) ... ok test_seek_past_start (test.test_zstd.FileTestCase.test_seek_past_start) ... ok test_seekable (test.test_zstd.FileTestCase.test_seekable) ... ok test_tell (test.test_zstd.FileTestCase.test_tell) ... ok test_tell_bad_args (test.test_zstd.FileTestCase.test_tell_bad_args) ... ok test_writable (test.test_zstd.FileTestCase.test_writable) ... ok test_write (test.test_zstd.FileTestCase.test_write) ... ok test_write_101 (test.test_zstd.FileTestCase.test_write_101) ... ok test_write_append (test.test_zstd.FileTestCase.test_write_append) ... ok test_write_bad_args (test.test_zstd.FileTestCase.test_write_bad_args) ... ok test_write_empty_block (test.test_zstd.FileTestCase.test_write_empty_block) ... ok test_write_empty_frame (test.test_zstd.FileTestCase.test_write_empty_frame) ... ok test_writelines (test.test_zstd.FileTestCase.test_writelines) ... ok test_zstdfile_flush (test.test_zstd.FileTestCase.test_zstdfile_flush) ... ok test_zstdfile_flush_mode (test.test_zstd.FileTestCase.test_zstdfile_flush_mode) ... ok test_zstdfile_iter_issue45475 (test.test_zstd.FileTestCase.test_zstdfile_iter_issue45475) ... ok test_zstdfile_truncate (test.test_zstd.FileTestCase.test_zstdfile_truncate) ... ok test_compress_locking (test.test_zstd.FreeThreadingMethodTests.test_compress_locking) ... Fatal Python error: Segmentation fault <Cannot show all threads while the GIL is disabled> Stack (most recent call first): File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/test_zstd.py", line 2450 in run_method File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/threading.py" ``` <!-- gh-linked-prs --> ### Linked PRs * gh-133943 * gh-133949 * gh-134253 * gh-134289 * gh-134560 <!-- /gh-linked-prs -->
e8665d4d46921623745ca5d2b32dc576339ea53f
ae74e3f8636382efdac441c1bc6e69aa66694927
python/cpython
python__cpython-133910
# introduce `list.sort()` but no details before # Documentation A example of [lambda expressions](https://docs.python.org/3.15/tutorial/controlflow.html#lambda-expressions) introduces `list.sort()`, but there aren't details of `list.sort()` before. ```python >>> pairs = [(1, 'one'), (2, 'two'), (3, 'three'), (4, 'four')] >>> pairs.sort(key=lambda pair: pair[1]) >>> pairs [(4, 'four'), (1, 'one'), (3, 'three'), (2, 'two')] ``` We shoud link [more on lists](https://docs.python.org/3.15/tutorial/datastructures.html#more-on-lists) after this example or in [tutorial 3.1.3 lists](https://docs.python.org/3.15/tutorial/datastructures.html#more-on-lists). <!-- gh-linked-prs --> ### Linked PRs * gh-133910 * gh-134126 * gh-134127 <!-- /gh-linked-prs -->
c1c9ad1d5a62a591eb2f0f0d29f3fa02e0949f14
faac627e47f72797f5b7a65134bf4cdce6575ee9
python/cpython
python__cpython-133876
# Remove deprecated `is_reserved` from `pathlib` # Feature or enhancement It was deprecated in 3.13: ```rst * :mod:`pathlib`: * Deprecate :meth:`.PurePath.is_reserved`, to be removed in Python 3.15. Use :func:`os.path.isreserved` to detect reserved paths on Windows. (Contributed by Barney Gale in :gh:`88569`.) ``` https://github.com/python/cpython/blob/9b9cdb644056572aeab531662427230bccfd77f8/Lib/pathlib/__init__.py#L521-L531 I have a PR ready. <!-- gh-linked-prs --> ### Linked PRs * gh-133876 <!-- /gh-linked-prs -->
67036f1ee1c23257d320a80c152090235b8ca892
7ae4749d064bd49b0dd96172fee20c1f1678d9e9
python/cpython
python__cpython-133874
# Remove deprecated mark interface for `wave.Wave_{read,write}` classes # Feature or enhancement The methods `getmark`, `setmark` and `getmarkers` were deprecated in https://github.com/python/cpython/issues/105096 and are slated for removal in Python 3.15. <!-- gh-linked-prs --> ### Linked PRs * gh-133874 <!-- /gh-linked-prs -->
3f61ea3add0d432345a58f4be2229074f9f191c2
319acf3d6cb05f5429422fda5c15bbd64fe9bd28
python/cpython
python__cpython-133863
# Remove deprecated implicit empty sequence argument for `typing.TypedDict` # Feature or enhancement ### Proposal: It was deprecated in 3.13 but there was no removal notice in the docs: see #105570 and https://github.com/python/cpython/pull/105780. I don't know whether it's better to delay it a bit more just to have a deprecation notice or to first add a deprecation notice for 3.13 and 3.14, but still remove it in 3.15. cc @AlexWaygood ### Has this already been discussed elsewhere? This is a minor feature, which does not need previous discussion elsewhere ### Links to previous discussion of this feature: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133863 * gh-133864 * gh-133870 * gh-133871 <!-- /gh-linked-prs -->
87312119dab72f23cf337bcd9c30889513f050ee
add828951e34988d2a75743a98ee0711b8dcfabf
python/cpython
python__cpython-133822
# Remove undocumented deprecated keyword argument syntax for `typing.NamedTuple` # Feature or enhancement ### Proposal: Do not use ``Point = NamedTuple("Point", x=int, y=int)``, but use the class or functional syntax instead. ### Has this already been discussed elsewhere? This is a minor feature, which does not need previous discussion elsewhere ### Links to previous discussion of this feature: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133822 <!-- /gh-linked-prs -->
c5e1775825236d94e0537e79e05187390b05dc55
92337f666e8a076a68305a8d6dc8bc9c095000e9
python/cpython
python__cpython-133811
# Remove `http.server.CGIHTTPRequestHandler` and `--cgi` flag support # Feature or enhancement ### Proposal: This class is insecure, barely used and as we said "*Anything* is better than CGI to interface a web server with a request handler". ### Has this already been discussed elsewhere? This is a minor feature, which does not need previous discussion elsewhere ### Links to previous discussion of this feature: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133811 <!-- /gh-linked-prs -->
faac627e47f72797f5b7a65134bf4cdce6575ee9
2f1ecb3bc474a5895dce090cca7b8afe7b560040
python/cpython
python__cpython-133797
# `__replace__` on manually created AST objects has too many required arguments # Bug report ### Bug description: This should work but doesn't: ``` >>> fd=ast.FunctionDef(name="hi", args=[]) >>> fd FunctionDef(name='hi', args=[], body=[], decorator_list=[], returns=None, type_comment=None, type_params=[]) >>> fd.__replace__() Traceback (most recent call last): File "<python-input-16>", line 1, in <module> fd.__replace__() ~~~~~~~~~~~~~~^^ TypeError: FunctionDef.__replace__ missing 2 keyword arguments: 'returns', 'type_comment'. ``` cc @srittau ### CPython versions tested on: 3.14 ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133797 * gh-133842 <!-- /gh-linked-prs -->
7dddb4e667b5eb76cbe11755051ec139b0f437a9
47f1722d8053fb4f79e68cba07cbf08fb58a511c
python/cpython
python__cpython-133966
# Python 3.14.0-beta.1 C-extension builds try to link against `python314t.lib` on non-threaded python # Bug report ### Bug description: I'm completely unsure where the issue stems from (it could be setuptools, https://github.com/actions/setup-python, an actual issue in the first beta, or due to one of pywin32's numerous build hacks which I've been reducing over the years). But since https://discuss.python.org/t/python-3-14-0-beta-1-is-here/91117 mentions > We *strongly encourage* maintainers of third-party Python projects to test with 3.14 during the beta phase and report issues found to [the Python bug tracker](https://github.com/python/cpython/issues) as soon as possible. And this wasn't happening in alphas, and now does with the first beta. I figured I may as well take a note here. Mostly copied from https://github.com/pypa/setuptools/discussions/4988: --- Ever since the Python 3.14 beta 1, pywin32's 3.14 dev builds have started failing. It was working fine in alphas. Here's the full log: https://github.com/mhammond/pywin32/actions/runs/14912683012/job/41890682321?pr=2582 [github build log.txt](https://github.com/user-attachments/files/20126198/github.build.log.txt) <details> ``` Using pip 25.1.1 from C:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\Lib\site-packages\pip (python 3.14) Processing d:\a\pywin32\pywin32 Installing build dependencies: started Running command pip subprocess to install build dependencies Using pip 25.1.1 from C:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\Lib\site-packages\pip (python 3.14) Ignoring setuptools: markers 'python_version < "3.9"' don't match your environment Collecting setuptools>=77.0.3 Obtaining dependency information for setuptools>=77.0.3 from https://files.pythonhosted.org/packages/53/7e/5d8af3317ddbf9519b687bd1c39d8737fde07d97f54df65553faca5cffb1/setuptools-80.3.1-py3-none-any.whl.metadata Using cached setuptools-80.3.1-py3-none-any.whl.metadata (6.5 kB) Using cached setuptools-80.3.1-py3-none-any.whl (1.2 MB) Installing collected packages: setuptools Successfully installed setuptools-80.3.1 Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Running command Getting requirements to build wheel C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-ho0txake\overlay\Lib\site-packages\setuptools\dist.py:761: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: Python Software Foundation License See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! self._finalize_license_expression() Building pywin32 3.14.310.1 INFO:root:running egg_info INFO:root:creating pywin32.egg-info INFO:root:writing pywin32.egg-info\PKG-INFO INFO:root:writing dependency_links to pywin32.egg-info\dependency_links.txt INFO:root:writing entry points to pywin32.egg-info\entry_points.txt INFO:root:writing top-level names to pywin32.egg-info\top_level.txt INFO:root:writing manifest file 'pywin32.egg-info\SOURCES.txt' INFO:root:reading manifest file 'pywin32.egg-info\SOURCES.txt' INFO:root:writing manifest file 'pywin32.egg-info\SOURCES.txt' All extension modules built OK Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Running command Preparing metadata (pyproject.toml) C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-ho0txake\overlay\Lib\site-packages\setuptools\dist.py:761: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: Python Software Foundation License See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! self._finalize_license_expression() Building pywin32 3.14.310.1 INFO:root:running dist_info INFO:root:creating C:\Users\runneradmin\AppData\Local\Temp\pip-modern-metadata-cx55e6qz\pywin32.egg-info INFO:root:writing C:\Users\runneradmin\AppData\Local\Temp\pip-modern-metadata-cx55e6qz\pywin32.egg-info\PKG-INFO INFO:root:writing dependency_links to C:\Users\runneradmin\AppData\Local\Temp\pip-modern-metadata-cx55e6qz\pywin32.egg-info\dependency_links.txt INFO:root:writing entry points to C:\Users\runneradmin\AppData\Local\Temp\pip-modern-metadata-cx55e6qz\pywin32.egg-info\entry_points.txt INFO:root:writing top-level names to C:\Users\runneradmin\AppData\Local\Temp\pip-modern-metadata-cx55e6qz\pywin32.egg-info\top_level.txt INFO:root:writing manifest file 'C:\Users\runneradmin\AppData\Local\Temp\pip-modern-metadata-cx55e6qz\pywin32.egg-info\SOURCES.txt' INFO:root:reading manifest file 'C:\Users\runneradmin\AppData\Local\Temp\pip-modern-metadata-cx55e6qz\pywin32.egg-info\SOURCES.txt' INFO:root:writing manifest file 'C:\Users\runneradmin\AppData\Local\Temp\pip-modern-metadata-cx55e6qz\pywin32.egg-info\SOURCES.txt' INFO:root:creating 'C:\Users\runneradmin\AppData\Local\Temp\pip-modern-metadata-cx55e6qz\pywin32-310.1.dist-info' All extension modules built OK Preparing metadata (pyproject.toml): finished with status 'done' Building wheels for collected packages: pywin32 Building wheel for pywin32 (pyproject.toml): started Running command Building wheel for pywin32 (pyproject.toml) C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-ho0txake\overlay\Lib\site-packages\setuptools\dist.py:761: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: Python Software Foundation License See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! self._finalize_license_expression() Building pywin32 3.14.310.1 INFO:root:running bdist_wheel INFO:root:running build INFO:root:running build_py INFO:root:creating build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\afxres.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\commctrl.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\mmsystem.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\netbios.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\ntsecuritycon.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\pywin32_bootstrap.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\pywin32_testutil.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\pywintypes.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\rasutil.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\regcheck.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\regutil.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\sspi.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\sspicon.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\win2kras.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\win32con.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\win32cryptcon.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\win32evtlogutil.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\win32gui_struct.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\win32inetcon.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\win32netcon.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\win32pdhquery.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\win32pdhutil.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\win32rcparser.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\win32serviceutil.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\win32timezone.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\win32traceutil.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\win32verstamp.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\winerror.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\winioctlcon.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\winnt.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\winperf.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\winxptheme.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\lib\_win32verstamp_pywin32ctypes.py -> build\lib.win-amd64-cpython-314\win32\lib INFO:root:copying win32\winxpgui.py -> build\lib.win-amd64-cpython-314\win32 INFO:root:creating build\lib.win-amd64-cpython-314\win32com INFO:root:copying com\win32com\olectl.py -> build\lib.win-amd64-cpython-314\win32com INFO:root:copying com\win32com\storagecon.py -> build\lib.win-amd64-cpython-314\win32com INFO:root:copying com\win32com\universal.py -> build\lib.win-amd64-cpython-314\win32com INFO:root:copying com\win32com\util.py -> build\lib.win-amd64-cpython-314\win32com INFO:root:copying com\win32com\__init__.py -> build\lib.win-amd64-cpython-314\win32com INFO:root:creating build\lib.win-amd64-cpython-314\win32com\client INFO:root:copying com\win32com\client\build.py -> build\lib.win-amd64-cpython-314\win32com\client INFO:root:copying com\win32com\client\CLSIDToClass.py -> build\lib.win-amd64-cpython-314\win32com\client INFO:root:copying com\win32com\client\combrowse.py -> build\lib.win-amd64-cpython-314\win32com\client INFO:root:copying com\win32com\client\connect.py -> build\lib.win-amd64-cpython-314\win32com\client INFO:root:copying com\win32com\client\dynamic.py -> build\lib.win-amd64-cpython-314\win32com\client INFO:root:copying com\win32com\client\gencache.py -> build\lib.win-amd64-cpython-314\win32com\client INFO:root:copying com\win32com\client\genpy.py -> build\lib.win-amd64-cpython-314\win32com\client INFO:root:copying com\win32com\client\makepy.py -> build\lib.win-amd64-cpython-314\win32com\client INFO:root:copying com\win32com\client\selecttlb.py -> build\lib.win-amd64-cpython-314\win32com\client INFO:root:copying com\win32com\client\tlbrowse.py -> build\lib.win-amd64-cpython-314\win32com\client INFO:root:copying com\win32com\client\util.py -> build\lib.win-amd64-cpython-314\win32com\client INFO:root:copying com\win32com\client\__init__.py -> build\lib.win-amd64-cpython-314\win32com\client INFO:root:creating build\lib.win-amd64-cpython-314\win32com\demos INFO:root:copying com\win32com\demos\connect.py -> build\lib.win-amd64-cpython-314\win32com\demos INFO:root:copying com\win32com\demos\dump_clipboard.py -> build\lib.win-amd64-cpython-314\win32com\demos INFO:root:copying com\win32com\demos\eventsApartmentThreaded.py -> build\lib.win-amd64-cpython-314\win32com\demos INFO:root:copying com\win32com\demos\eventsFreeThreaded.py -> build\lib.win-amd64-cpython-314\win32com\demos INFO:root:copying com\win32com\demos\excelAddin.py -> build\lib.win-amd64-cpython-314\win32com\demos INFO:root:copying com\win32com\demos\excelRTDServer.py -> build\lib.win-amd64-cpython-314\win32com\demos INFO:root:copying com\win32com\demos\iebutton.py -> build\lib.win-amd64-cpython-314\win32com\demos INFO:root:copying com\win32com\demos\ietoolbar.py -> build\lib.win-amd64-cpython-314\win32com\demos INFO:root:copying com\win32com\demos\outlookAddin.py -> build\lib.win-amd64-cpython-314\win32com\demos INFO:root:copying com\win32com\demos\trybag.py -> build\lib.win-amd64-cpython-314\win32com\demos INFO:root:copying com\win32com\demos\__init__.py -> build\lib.win-amd64-cpython-314\win32com\demos INFO:root:creating build\lib.win-amd64-cpython-314\win32com\makegw INFO:root:copying com\win32com\makegw\makegw.py -> build\lib.win-amd64-cpython-314\win32com\makegw INFO:root:copying com\win32com\makegw\makegwenum.py -> build\lib.win-amd64-cpython-314\win32com\makegw INFO:root:copying com\win32com\makegw\makegwparse.py -> build\lib.win-amd64-cpython-314\win32com\makegw INFO:root:copying com\win32com\makegw\__init__.py -> build\lib.win-amd64-cpython-314\win32com\makegw INFO:root:creating build\lib.win-amd64-cpython-314\win32com\server INFO:root:copying com\win32com\server\connect.py -> build\lib.win-amd64-cpython-314\win32com\server INFO:root:copying com\win32com\server\dispatcher.py -> build\lib.win-amd64-cpython-314\win32com\server INFO:root:copying com\win32com\server\exception.py -> build\lib.win-amd64-cpython-314\win32com\server INFO:root:copying com\win32com\server\factory.py -> build\lib.win-amd64-cpython-314\win32com\server INFO:root:copying com\win32com\server\localserver.py -> build\lib.win-amd64-cpython-314\win32com\server INFO:root:copying com\win32com\server\policy.py -> build\lib.win-amd64-cpython-314\win32com\server INFO:root:copying com\win32com\server\register.py -> build\lib.win-amd64-cpython-314\win32com\server INFO:root:copying com\win32com\server\util.py -> build\lib.win-amd64-cpython-314\win32com\server INFO:root:copying com\win32com\server\__init__.py -> build\lib.win-amd64-cpython-314\win32com\server INFO:root:creating build\lib.win-amd64-cpython-314\win32com\servers INFO:root:copying com\win32com\servers\dictionary.py -> build\lib.win-amd64-cpython-314\win32com\servers INFO:root:copying com\win32com\servers\interp.py -> build\lib.win-amd64-cpython-314\win32com\servers INFO:root:copying com\win32com\servers\perfmon.py -> build\lib.win-amd64-cpython-314\win32com\servers INFO:root:copying com\win32com\servers\PythonTools.py -> build\lib.win-amd64-cpython-314\win32com\servers INFO:root:copying com\win32com\servers\test_pycomtest.py -> build\lib.win-amd64-cpython-314\win32com\servers INFO:root:copying com\win32com\servers\__init__.py -> build\lib.win-amd64-cpython-314\win32com\servers INFO:root:creating build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\daodump.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\errorSemantics.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\GenTestScripts.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\pippo_server.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\policySemantics.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testAccess.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testADOEvents.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testall.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testArrays.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testAXScript.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testClipboard.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testCollections.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testConversionErrors.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testDates.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testDCOM.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testDictionary.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testDynamic.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testExchange.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testExplorer.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testGatewayAddresses.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testGIT.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testIterators.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testmakepy.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testMarshal.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testMSOffice.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testMSOfficeEvents.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testPersist.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testPippo.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testPyComTest.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testROT.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testServers.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testShell.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testStorage.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testStreams.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testvb.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testvbscript_regexp.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testWMI.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\testxslt.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\util.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:copying com\win32com\test\__init__.py -> build\lib.win-amd64-cpython-314\win32com\test INFO:root:creating build\lib.win-amd64-cpython-314\win32comext\adsi INFO:root:copying com\win32comext\adsi\adsicon.py -> build\lib.win-amd64-cpython-314\win32comext\adsi INFO:root:copying com\win32comext\adsi\__init__.py -> build\lib.win-amd64-cpython-314\win32comext\adsi INFO:root:creating build\lib.win-amd64-cpython-314\win32comext\axscript INFO:root:copying com\win32comext\axscript\asputil.py -> build\lib.win-amd64-cpython-314\win32comext\axscript INFO:root:copying com\win32comext\axscript\__init__.py -> build\lib.win-amd64-cpython-314\win32comext\axscript INFO:root:creating build\lib.win-amd64-cpython-314\win32comext\axscript\client INFO:root:copying com\win32comext\axscript\client\debug.py -> build\lib.win-amd64-cpython-314\win32comext\axscript\client INFO:root:copying com\win32comext\axscript\client\error.py -> build\lib.win-amd64-cpython-314\win32comext\axscript\client INFO:root:copying com\win32comext\axscript\client\framework.py -> build\lib.win-amd64-cpython-314\win32comext\axscript\client INFO:root:copying com\win32comext\axscript\client\pydumper.py -> build\lib.win-amd64-cpython-314\win32comext\axscript\client INFO:root:copying com\win32comext\axscript\client\pyscript.py -> build\lib.win-amd64-cpython-314\win32comext\axscript\client INFO:root:copying com\win32comext\axscript\client\pyscript_rexec.py -> build\lib.win-amd64-cpython-314\win32comext\axscript\client INFO:root:copying com\win32comext\axscript\client\scriptdispatch.py -> build\lib.win-amd64-cpython-314\win32comext\axscript\client INFO:root:copying com\win32comext\axscript\client\__init__.py -> build\lib.win-amd64-cpython-314\win32comext\axscript\client INFO:root:creating build\lib.win-amd64-cpython-314\win32comext\axscript\server INFO:root:copying com\win32comext\axscript\server\axsite.py -> build\lib.win-amd64-cpython-314\win32comext\axscript\server INFO:root:copying com\win32comext\axscript\server\__init__.py -> build\lib.win-amd64-cpython-314\win32comext\axscript\server INFO:root:creating build\lib.win-amd64-cpython-314\win32comext\axdebug INFO:root:copying com\win32comext\axdebug\adb.py -> build\lib.win-amd64-cpython-314\win32comext\axdebug INFO:root:copying com\win32comext\axdebug\codecontainer.py -> build\lib.win-amd64-cpython-314\win32comext\axdebug INFO:root:copying com\win32comext\axdebug\contexts.py -> build\lib.win-amd64-cpython-314\win32comext\axdebug INFO:root:copying com\win32comext\axdebug\debugger.py -> build\lib.win-amd64-cpython-314\win32comext\axdebug INFO:root:copying com\win32comext\axdebug\documents.py -> build\lib.win-amd64-cpython-314\win32comext\axdebug INFO:root:copying com\win32comext\axdebug\dump.py -> build\lib.win-amd64-cpython-314\win32comext\axdebug INFO:root:copying com\win32comext\axdebug\expressions.py -> build\lib.win-amd64-cpython-314\win32comext\axdebug INFO:root:copying com\win32comext\axdebug\gateways.py -> build\lib.win-amd64-cpython-314\win32comext\axdebug INFO:root:copying com\win32comext\axdebug\stackframe.py -> build\lib.win-amd64-cpython-314\win32comext\axdebug INFO:root:copying com\win32comext\axdebug\util.py -> build\lib.win-amd64-cpython-314\win32comext\axdebug INFO:root:copying com\win32comext\axdebug\__init__.py -> build\lib.win-amd64-cpython-314\win32comext\axdebug INFO:root:creating build\lib.win-amd64-cpython-314\win32comext\propsys INFO:root:copying com\win32comext\propsys\pscon.py -> build\lib.win-amd64-cpython-314\win32comext\propsys INFO:root:copying com\win32comext\propsys\__init__.py -> build\lib.win-amd64-cpython-314\win32comext\propsys INFO:root:creating build\lib.win-amd64-cpython-314\win32comext\shell INFO:root:copying com\win32comext\shell\shellcon.py -> build\lib.win-amd64-cpython-314\win32comext\shell INFO:root:copying com\win32comext\shell\__init__.py -> build\lib.win-amd64-cpython-314\win32comext\shell INFO:root:creating build\lib.win-amd64-cpython-314\win32comext\mapi INFO:root:copying com\win32comext\mapi\emsabtags.py -> build\lib.win-amd64-cpython-314\win32comext\mapi INFO:root:copying com\win32comext\mapi\mapitags.py -> build\lib.win-amd64-cpython-314\win32comext\mapi INFO:root:copying com\win32comext\mapi\mapiutil.py -> build\lib.win-amd64-cpython-314\win32comext\mapi INFO:root:copying com\win32comext\mapi\__init__.py -> build\lib.win-amd64-cpython-314\win32comext\mapi INFO:root:creating build\lib.win-amd64-cpython-314\win32comext\ifilter INFO:root:copying com\win32comext\ifilter\ifiltercon.py -> build\lib.win-amd64-cpython-314\win32comext\ifilter INFO:root:copying com\win32comext\ifilter\__init__.py -> build\lib.win-amd64-cpython-314\win32comext\ifilter INFO:root:creating build\lib.win-amd64-cpython-314\win32comext\internet INFO:root:copying com\win32comext\internet\inetcon.py -> build\lib.win-amd64-cpython-314\win32comext\internet INFO:root:copying com\win32comext\internet\__init__.py -> build\lib.win-amd64-cpython-314\win32comext\internet INFO:root:creating build\lib.win-amd64-cpython-314\win32comext\axcontrol INFO:root:copying com\win32comext\axcontrol\__init__.py -> build\lib.win-amd64-cpython-314\win32comext\axcontrol INFO:root:creating build\lib.win-amd64-cpython-314\win32comext\taskscheduler INFO:root:copying com\win32comext\taskscheduler\__init__.py -> build\lib.win-amd64-cpython-314\win32comext\taskscheduler INFO:root:creating build\lib.win-amd64-cpython-314\win32comext\directsound INFO:root:copying com\win32comext\directsound\__init__.py -> build\lib.win-amd64-cpython-314\win32comext\directsound INFO:root:creating build\lib.win-amd64-cpython-314\win32comext\directsound\test INFO:root:copying com\win32comext\directsound\test\ds_record.py -> build\lib.win-amd64-cpython-314\win32comext\directsound\test INFO:root:copying com\win32comext\directsound\test\ds_test.py -> build\lib.win-amd64-cpython-314\win32comext\directsound\test INFO:root:copying com\win32comext\directsound\test\__init__.py -> build\lib.win-amd64-cpython-314\win32comext\directsound\test INFO:root:creating build\lib.win-amd64-cpython-314\win32comext\authorization INFO:root:copying com\win32comext\authorization\__init__.py -> build\lib.win-amd64-cpython-314\win32comext\authorization INFO:root:creating build\lib.win-amd64-cpython-314\win32comext\bits INFO:root:copying com\win32comext\bits\__init__.py -> build\lib.win-amd64-cpython-314\win32comext\bits INFO:root:creating build\lib.win-amd64-cpython-314\pythonwin\pywin INFO:root:copying pythonwin\pywin\__init__.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin INFO:root:creating build\lib.win-amd64-cpython-314\pythonwin\pywin\debugger INFO:root:copying pythonwin\pywin\debugger\configui.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\debugger INFO:root:copying pythonwin\pywin\debugger\dbgcon.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\debugger INFO:root:copying pythonwin\pywin\debugger\dbgpyapp.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\debugger INFO:root:copying pythonwin\pywin\debugger\debugger.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\debugger INFO:root:copying pythonwin\pywin\debugger\fail.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\debugger INFO:root:copying pythonwin\pywin\debugger\__init__.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\debugger INFO:root:creating build\lib.win-amd64-cpython-314\pythonwin\pywin\dialogs INFO:root:copying pythonwin\pywin\dialogs\ideoptions.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\dialogs INFO:root:copying pythonwin\pywin\dialogs\list.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\dialogs INFO:root:copying pythonwin\pywin\dialogs\login.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\dialogs INFO:root:copying pythonwin\pywin\dialogs\status.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\dialogs INFO:root:copying pythonwin\pywin\dialogs\__init__.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\dialogs INFO:root:creating build\lib.win-amd64-cpython-314\pythonwin\pywin\docking INFO:root:copying pythonwin\pywin\docking\DockingBar.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\docking INFO:root:copying pythonwin\pywin\docking\__init__.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\docking INFO:root:creating build\lib.win-amd64-cpython-314\pythonwin\pywin\framework INFO:root:copying pythonwin\pywin\framework\app.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework INFO:root:copying pythonwin\pywin\framework\bitmap.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework INFO:root:copying pythonwin\pywin\framework\cmdline.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework INFO:root:copying pythonwin\pywin\framework\dbgcommands.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework INFO:root:copying pythonwin\pywin\framework\dlgappcore.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework INFO:root:copying pythonwin\pywin\framework\help.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework INFO:root:copying pythonwin\pywin\framework\interact.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework INFO:root:copying pythonwin\pywin\framework\intpyapp.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework INFO:root:copying pythonwin\pywin\framework\intpydde.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework INFO:root:copying pythonwin\pywin\framework\scriptutils.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework INFO:root:copying pythonwin\pywin\framework\sgrepmdi.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework INFO:root:copying pythonwin\pywin\framework\startup.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework INFO:root:copying pythonwin\pywin\framework\stdin.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework INFO:root:copying pythonwin\pywin\framework\toolmenu.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework INFO:root:copying pythonwin\pywin\framework\window.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework INFO:root:copying pythonwin\pywin\framework\winout.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework INFO:root:copying pythonwin\pywin\framework\__init__.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework INFO:root:creating build\lib.win-amd64-cpython-314\pythonwin\pywin\framework\editor INFO:root:copying pythonwin\pywin\framework\editor\configui.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework\editor INFO:root:copying pythonwin\pywin\framework\editor\document.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework\editor INFO:root:copying pythonwin\pywin\framework\editor\editor.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework\editor INFO:root:copying pythonwin\pywin\framework\editor\frame.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework\editor INFO:root:copying pythonwin\pywin\framework\editor\ModuleBrowser.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework\editor INFO:root:copying pythonwin\pywin\framework\editor\template.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework\editor INFO:root:copying pythonwin\pywin\framework\editor\vss.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework\editor INFO:root:copying pythonwin\pywin\framework\editor\__init__.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework\editor INFO:root:creating build\lib.win-amd64-cpython-314\pythonwin\pywin\framework\editor\color INFO:root:copying pythonwin\pywin\framework\editor\color\coloreditor.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework\editor\color INFO:root:copying pythonwin\pywin\framework\editor\color\__init__.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\framework\editor\color INFO:root:creating build\lib.win-amd64-cpython-314\pythonwin\pywin\idle INFO:root:copying pythonwin\pywin\idle\AutoExpand.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\idle INFO:root:copying pythonwin\pywin\idle\AutoIndent.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\idle INFO:root:copying pythonwin\pywin\idle\CallTips.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\idle INFO:root:copying pythonwin\pywin\idle\FormatParagraph.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\idle INFO:root:copying pythonwin\pywin\idle\IdleHistory.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\idle INFO:root:copying pythonwin\pywin\idle\PyParse.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\idle INFO:root:copying pythonwin\pywin\idle\__init__.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\idle INFO:root:creating build\lib.win-amd64-cpython-314\pythonwin\pywin\mfc INFO:root:copying pythonwin\pywin\mfc\activex.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\mfc INFO:root:copying pythonwin\pywin\mfc\afxres.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\mfc INFO:root:copying pythonwin\pywin\mfc\dialog.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\mfc INFO:root:copying pythonwin\pywin\mfc\docview.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\mfc INFO:root:copying pythonwin\pywin\mfc\object.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\mfc INFO:root:copying pythonwin\pywin\mfc\thread.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\mfc INFO:root:copying pythonwin\pywin\mfc\window.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\mfc INFO:root:copying pythonwin\pywin\mfc\__init__.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\mfc INFO:root:creating build\lib.win-amd64-cpython-314\pythonwin\pywin\scintilla INFO:root:copying pythonwin\pywin\scintilla\bindings.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\scintilla INFO:root:copying pythonwin\pywin\scintilla\config.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\scintilla INFO:root:copying pythonwin\pywin\scintilla\configui.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\scintilla INFO:root:copying pythonwin\pywin\scintilla\control.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\scintilla INFO:root:copying pythonwin\pywin\scintilla\document.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\scintilla INFO:root:copying pythonwin\pywin\scintilla\find.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\scintilla INFO:root:copying pythonwin\pywin\scintilla\formatter.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\scintilla INFO:root:copying pythonwin\pywin\scintilla\IDLEenvironment.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\scintilla INFO:root:copying pythonwin\pywin\scintilla\keycodes.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\scintilla INFO:root:copying pythonwin\pywin\scintilla\scintillacon.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\scintilla INFO:root:copying pythonwin\pywin\scintilla\view.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\scintilla INFO:root:copying pythonwin\pywin\scintilla\__init__.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\scintilla INFO:root:creating build\lib.win-amd64-cpython-314\pythonwin\pywin\tools INFO:root:copying pythonwin\pywin\tools\browseProjects.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\tools INFO:root:copying pythonwin\pywin\tools\browser.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\tools INFO:root:copying pythonwin\pywin\tools\hierlist.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\tools INFO:root:copying pythonwin\pywin\tools\regedit.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\tools INFO:root:copying pythonwin\pywin\tools\regpy.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\tools INFO:root:copying pythonwin\pywin\tools\TraceCollector.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\tools INFO:root:copying pythonwin\pywin\tools\__init__.py -> build\lib.win-amd64-cpython-314\pythonwin\pywin\tools INFO:root:creating build\lib.win-amd64-cpython-314\isapi INFO:root:copying isapi\install.py -> build\lib.win-amd64-cpython-314\isapi INFO:root:copying isapi\isapicon.py -> build\lib.win-amd64-cpython-314\isapi INFO:root:copying isapi\simple.py -> build\lib.win-amd64-cpython-314\isapi INFO:root:copying isapi\threaded_extension.py -> build\lib.win-amd64-cpython-314\isapi INFO:root:copying isapi\__init__.py -> build\lib.win-amd64-cpython-314\isapi INFO:root:creating build\lib.win-amd64-cpython-314\adodbapi INFO:root:copying adodbapi\adodbapi.py -> build\lib.win-amd64-cpython-314\adodbapi INFO:root:copying adodbapi\ado_consts.py -> build\lib.win-amd64-cpython-314\adodbapi INFO:root:copying adodbapi\apibase.py -> build\lib.win-amd64-cpython-314\adodbapi INFO:root:copying adodbapi\is64bit.py -> build\lib.win-amd64-cpython-314\adodbapi INFO:root:copying adodbapi\process_connect_string.py -> build\lib.win-amd64-cpython-314\adodbapi INFO:root:copying adodbapi\schema_table.py -> build\lib.win-amd64-cpython-314\adodbapi INFO:root:copying adodbapi\setup.py -> build\lib.win-amd64-cpython-314\adodbapi INFO:root:copying adodbapi\__init__.py -> build\lib.win-amd64-cpython-314\adodbapi INFO:root:running build_ext INFO:root:building 'pywintypes' extension INFO:root:creating build\temp.win-amd64-cpython-314\Release\win32\src INFO:root:"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DDISTUTILS_BUILD -D_CRT_SECURE_NO_WARNINGS -DCRYPT_DECRYPT_MESSAGE_PARA_HAS_EXTRA_FIELDS -D_WIN32_WINNT=0x601 -DWINVER=0x601 -Icom/win32com/src/include -Iwin32/src -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\include -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpwin32/src/PyACL.cpp /Fobuild\temp.win-amd64-cpython-314\Release\win32\src\PyACL.obj -DBUILD_PYWINTYPES /Zi /Fdbuild\temp.win-amd64-cpython-314\Release\pywintypes_vc.pdb /EHsc /wd4163 -DUNICODE -D_UNICODE -DWINNT PyACL.cpp INFO:root:"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DDISTUTILS_BUILD -D_CRT_SECURE_NO_WARNINGS -DCRYPT_DECRYPT_MESSAGE_PARA_HAS_EXTRA_FIELDS -D_WIN32_WINNT=0x601 -DWINVER=0x601 -Icom/win32com/src/include -Iwin32/src -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\include -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpwin32/src/PyDEVMODE.cpp /Fobuild\temp.win-amd64-cpython-314\Release\win32\src\PyDEVMODE.obj -DBUILD_PYWINTYPES /Zi /Fdbuild\temp.win-amd64-cpython-314\Release\pywintypes_vc.pdb /EHsc /wd4163 -DUNICODE -D_UNICODE -DWINNT PyDEVMODE.cpp INFO:root:"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DDISTUTILS_BUILD -D_CRT_SECURE_NO_WARNINGS -DCRYPT_DECRYPT_MESSAGE_PARA_HAS_EXTRA_FIELDS -D_WIN32_WINNT=0x601 -DWINVER=0x601 -Icom/win32com/src/include -Iwin32/src -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\include -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpwin32/src/PyHANDLE.cpp /Fobuild\temp.win-amd64-cpython-314\Release\win32\src\PyHANDLE.obj -DBUILD_PYWINTYPES /Zi /Fdbuild\temp.win-amd64-cpython-314\Release\pywintypes_vc.pdb /EHsc /wd4163 -DUNICODE -D_UNICODE -DWINNT PyHANDLE.cpp win32/src/PyHANDLE.cpp(291): warning C4996: '_Py_HashPointer': deprecated in 3.14 INFO:root:"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DDISTUTILS_BUILD -D_CRT_SECURE_NO_WARNINGS -DCRYPT_DECRYPT_MESSAGE_PARA_HAS_EXTRA_FIELDS -D_WIN32_WINNT=0x601 -DWINVER=0x601 -Icom/win32com/src/include -Iwin32/src -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\include -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpwin32/src/PyIID.cpp /Fobuild\temp.win-amd64-cpython-314\Release\win32\src\PyIID.obj -DBUILD_PYWINTYPES /Zi /Fdbuild\temp.win-amd64-cpython-314\Release\pywintypes_vc.pdb /EHsc /wd4163 -DUNICODE -D_UNICODE -DWINNT PyIID.cpp INFO:root:"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DDISTUTILS_BUILD -D_CRT_SECURE_NO_WARNINGS -DCRYPT_DECRYPT_MESSAGE_PARA_HAS_EXTRA_FIELDS -D_WIN32_WINNT=0x601 -DWINVER=0x601 -Icom/win32com/src/include -Iwin32/src -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\include -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpwin32/src/PyLARGE_INTEGER.cpp /Fobuild\temp.win-amd64-cpython-314\Release\win32\src\PyLARGE_INTEGER.obj -DBUILD_PYWINTYPES /Zi /Fdbuild\temp.win-amd64-cpython-314\Release\pywintypes_vc.pdb /EHsc /wd4163 -DUNICODE -D_UNICODE -DWINNT PyLARGE_INTEGER.cpp INFO:root:"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DDISTUTILS_BUILD -D_CRT_SECURE_NO_WARNINGS -DCRYPT_DECRYPT_MESSAGE_PARA_HAS_EXTRA_FIELDS -D_WIN32_WINNT=0x601 -DWINVER=0x601 -Icom/win32com/src/include -Iwin32/src -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\include -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpwin32/src/PyOVERLAPPED.cpp /Fobuild\temp.win-amd64-cpython-314\Release\win32\src\PyOVERLAPPED.obj -DBUILD_PYWINTYPES /Zi /Fdbuild\temp.win-amd64-cpython-314\Release\pywintypes_vc.pdb /EHsc /wd4163 -DUNICODE -D_UNICODE -DWINNT PyOVERLAPPED.cpp win32/src/PyOVERLAPPED.cpp(185): warning C4996: '_PyUnicode_AsString': deprecated in 3.14 win32/src/PyOVERLAPPED.cpp(2[13](https://github.com/mhammond/pywin32/actions/runs/14912683012/job/41890682321?pr=2582#step:5:14)): warning C4996: '_PyUnicode_AsString': deprecated in 3.[14](https://github.com/mhammond/pywin32/actions/runs/14912683012/job/41890682321?pr=2582#step:5:15) win32/src/PyOVERLAPPED.cpp(254): warning C4996: '_Py_HashPointer': deprecated in 3.14 INFO:root:"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DDISTUTILS_BUILD -D_CRT_SECURE_NO_WARNINGS -DCRYPT_DECRYPT_MESSAGE_PARA_HAS_EXTRA_FIELDS -D_WIN32_WINNT=0x601 -DWINVER=0x601 -Icom/win32com/src/include -Iwin32/src -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\include -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpwin32/src/PySECURITY_ATTRIBUTES.cpp /Fobuild\temp.win-amd64-cpython-314\Release\win32\src\PySECURITY_ATTRIBUTES.obj -DBUILD_PYWINTYPES /Zi /Fdbuild\temp.win-amd64-cpython-314\Release\pywintypes_vc.pdb /EHsc /wd4[16](https://github.com/mhammond/pywin32/actions/runs/14912683012/job/41890682321?pr=2582#step:5:17)3 -DUNICODE -D_UNICODE -DWINNT PySECURITY_ATTRIBUTES.cpp win32/src/PySECURITY_ATTRIBUTES.cpp(160): warning C4996: '_PyUnicode_AsString': deprecated in 3.14 INFO:root:"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DDISTUTILS_BUILD -D_CRT_SECURE_NO_WARNINGS -DCRYPT_DECRYPT_MESSAGE_PARA_HAS_EXTRA_FIELDS -D_WIN32_WINNT=0x601 -DWINVER=0x601 -Icom/win32com/src/include -Iwin32/src -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\include -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\Include "-IC:\Program Files\Microsoft Visual Studio\[20](https://github.com/mhammond/pywin32/actions/runs/14912683012/job/41890682321?pr=2582#step:5:21)22\Enterprise\VC\Tools\MSVC\14.43.34808\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\20[22](https://github.com/mhammond/pywin32/actions/runs/14912683012/job/41890682321?pr=2582#step:5:23)\Enterprise\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.[26](https://github.com/mhammond/pywin32/actions/runs/14912683012/job/41890682321?pr=2582#step:5:27)100.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpwin32/src/PySECURITY_DESCRIPTOR.cpp /Fobuild\temp.win-amd64-cpython-314\Release\win32\src\PySECURITY_DESCRIPTOR.obj -DBUILD_PYWINTYPES /Zi /Fdbuild\temp.win-amd64-cpython-[31](https://github.com/mhammond/pywin32/actions/runs/14912683012/job/41890682321?pr=2582#step:5:32)4\Release\pywintypes_vc.pdb /EHsc /wd4163 -DUNICODE -D_UNICODE -DWINNT PySECURITY_DESCRIPTOR.cpp INFO:root:"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DDISTUTILS_BUILD -D_CRT_SECURE_NO_WARNINGS -DCRYPT_DECRYPT_MESSAGE_PARA_HAS_EXTRA_FIELDS -D_WIN[32](https://github.com/mhammond/pywin32/actions/runs/14912683012/job/41890682321?pr=2582#step:5:33)_WINNT=0x601 -DWINVER=0x601 -Icom/win32com/src/include -Iwin32/src -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\include -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.[34](https://github.com/mhammond/pywin32/actions/runs/14912683012/job/41890682321?pr=2582#step:5:35)808\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpwin32/src/PySID.cpp /Fobuild\temp.win-amd64-cpython-314\Release\win32\src\PySID.obj -DBUILD_PYWINTYPES /Zi /Fdbuild\temp.win-amd64-cpython-314\Release\pywintypes_vc.pdb /EHsc /wd4163 -DUNICODE -D_UNICODE -DWINNT PySID.cpp INFO:root:"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DDISTUTILS_BUILD -D_CRT_SECURE_NO_WARNINGS -DCRYPT_DECRYPT_MESSAGE_PARA_HAS_EXTRA_FIELDS -D_WIN32_WINNT=0x601 -DWINVER=0x601 -Icom/win32com/src/include -Iwin32/src -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\include -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpwin32/src/PyTime.cpp /Fobuild\temp.win-amd64-cpython-314\Release\win32\src\PyTime.obj -DBUILD_PYWINTYPES /Zi /Fdbuild\temp.win-amd64-cpython-314\Release\pywintypes_vc.pdb /EHsc /wd4163 -DUNICODE -D_UNICODE -DWINNT PyTime.cpp INFO:root:"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DDISTUTILS_BUILD -D_CRT_SECURE_NO_WARNINGS -DCRYPT_DECRYPT_MESSAGE_PARA_HAS_EXTRA_FIELDS -D_WIN32_WINNT=0x601 -DWINVER=0x601 -Icom/win32com/src/include -Iwin32/src -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\include -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpwin32/src/PyUnicode.cpp /Fobuild\temp.win-amd64-cpython-314\Release\win32\src\PyUnicode.obj -DBUILD_PYWINTYPES /Zi /Fdbuild\temp.win-amd64-cpython-314\Release\pywintypes_vc.pdb /EHsc /wd4163 -DUNICODE -D_UNICODE -DWINNT PyUnicode.cpp INFO:root:"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DDISTUTILS_BUILD -D_CRT_SECURE_NO_WARNINGS -DCRYPT_DECRYPT_MESSAGE_PARA_HAS_EXTRA_FIELDS -D_WIN32_WINNT=0x601 -DWINVER=0x601 -Icom/win32com/src/include -Iwin32/src -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\include -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpwin32/src/PyWAVEFORMATEX.cpp /Fobuild\temp.win-amd64-cpython-314\Release\win32\src\PyWAVEFORMATEX.obj -DBUILD_PYWINTYPES /Zi /Fdbuild\temp.win-amd64-cpython-314\Release\pywintypes_vc.pdb /EHsc /wd4163 -DUNICODE -D_UNICODE -DWINNT PyWAVEFORMATEX.cpp INFO:root:"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DDISTUTILS_BUILD -D_CRT_SECURE_NO_WARNINGS -DCRYPT_DECRYPT_MESSAGE_PARA_HAS_EXTRA_FIELDS -D_WIN32_WINNT=0x601 -DWINVER=0x601 -Icom/win32com/src/include -Iwin32/src -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\include -IC:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpwin32/src/PyWinTypesmodule.cpp /Fobuild\temp.win-amd64-cpython-314\Release\win32\src\PyWinTypesmodule.obj -DBUILD_PYWINTYPES /Zi /Fdbuild\temp.win-amd64-cpython-314\Release\pywintypes_vc.pdb /EHsc /wd4163 -DUNICODE -D_UNICODE -DWINNT PyWinTypesmodule.cpp INFO:root:creating D:\a\pywin32\pywin32\build\lib.win-amd64-cpython-314\pywin32_system32 INFO:root:"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:NO /MANIFESTUAC:NO /LIBPATH:C:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\libs /LIBPATH:C:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64 /LIBPATH:C:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\PCbuild\amd64 /LIBPATH:build\temp.win-amd64-cpython-314\Release "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.26100.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\\lib\10.0.26100.0\\um\x64" advapi32.lib user32.lib ole32.lib oleaut32.lib /EXPORT:PyInit_pywintypes build\temp.win-amd64-cpython-314\Release\win32\src\PyACL.obj build\temp.win-amd64-cpython-314\Release\win32\src\PyDEVMODE.obj build\temp.win-amd64-cpython-314\Release\win32\src\PyHANDLE.obj build\temp.win-amd64-cpython-314\Release\win32\src\PyIID.obj build\temp.win-amd64-cpython-314\Release\win32\src\PyLARGE_INTEGER.obj build\temp.win-amd64-cpython-314\Release\win32\src\PyOVERLAPPED.obj build\temp.win-amd64-cpython-314\Release\win32\src\PySECURITY_ATTRIBUTES.obj build\temp.win-amd64-cpython-314\Release\win32\src\PySECURITY_DESCRIPTOR.obj build\temp.win-amd64-cpython-314\Release\win32\src\PySID.obj build\temp.win-amd64-cpython-314\Release\win32\src\PyTime.obj build\temp.win-amd64-cpython-314\Release\win32\src\PyUnicode.obj build\temp.win-amd64-cpython-314\Release\win32\src\PyWAVEFORMATEX.obj build\temp.win-amd64-cpython-314\Release\win32\src\PyWinTypesmodule.obj /OUT:build\lib.win-amd64-cpython-314\pywin32_system32\pywintypes314.dll /IMPLIB:build\temp.win-amd64-cpython-314\Release\win32\src\pywintypes314.lib /MACHINE:amd64 /DEBUG /PDB:build\temp.win-amd64-cpython-314\Release\pywintypes.pdb LINK : warning LNK[40](https://github.com/mhammond/pywin32/actions/runs/14912683012/job/41890682321?pr=2582#step:5:41)75: ignoring '/MANIFESTUAC' due to '/MANIFEST:NO' specification LINK : fatal error LNK1104: cannot open file 'python314t.lib' -- distutils hack to expose all include & lib dirs -- orig compiler.include_dirs: ['C:\\hostedtoolcache\\windows\\Python\\3.14.0-beta.1\\x64\\include', 'C:\\hostedtoolcache\\windows\\Python\\3.14.0-beta.1\\x64\\Include'] -- orig compiler.library_dirs: ['C:\\hostedtoolcache\\windows\\Python\\3.14.0-beta.1\\x64\\libs', 'C:\\hostedtoolcache\\windows\\Python\\3.14.0-beta.1\\x64', 'C:\\hostedtoolcache\\windows\\Python\\3.14.0-beta.1\\x64\\PCbuild\\amd64', 'build\\temp.win-amd64-cpython-314\\Release'] error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.[43](https://github.com/mhammond/pywin32/actions/runs/14912683012/job/41890682321?pr=2582#step:5:44).34808\\bin\\HostX86\\x64\\link.exe' failed with exit code 1104 error: subprocess-exited-with-error Building wheel for pywin32 (pyproject.toml) did not run successfully. exit code: 1 See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. full command: 'C:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\python.exe' 'C:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py' build_wheel 'C:\Users\RUNNER~1\AppData\Local\Temp\tmp7e13vpjr' cwd: D:\a\pywin32\pywin32 Building wheel for pywin32 (pyproject.toml): finished with status 'error' ERROR: Failed building wheel for pywin32 Failed to build pywin32 ERROR: Failed to build installable wheels for some pyproject.toml based projects (pywin32) Error: Process completed with exit code 1. ``` </details> Of interest is the following line: `LINK : fatal error LNK1104: cannot open file 'python314t.lib'`. I don't understand where `python314t.lib` comes from. Or how to go about debugging/investigating this. Relevant build files: - https://github.com/mhammond/pywin32/blob/main/.github/workflows/main.yml - https://github.com/mhammond/pywin32/blob/main/pyproject.toml - https://github.com/mhammond/pywin32/blob/main/setup.py ### CPython versions tested on: 3.14 ### Operating systems tested on: Windows <!-- gh-linked-prs --> ### Linked PRs * gh-133966 * gh-134211 * gh-134349 * gh-134359 <!-- /gh-linked-prs -->
986c3670285670558b6e6f77ff1507dfcc2c99fa
d55e11b8049e3abf3cc187b4958224b225a39897
python/cpython
python__cpython-133794
# assigning to __annotations__ has no effect in 3.14.0b1 under from __future__ import annotations # Bug report ### Bug description: ```python from __future__ import annotations import annotationlib class A: a: int A.__annotations__ = {"a": str} print(A.__annotations__) print(annotationlib.get_annotations(A)) ``` this works in 3.14.0a7, has no effect in 3.14.0b1. there seems to be a new attribute `__annotations_cache__` that the assignment goes into but it isn't returned from `__annotations__`: ``` # 3.14.0a7 $ ~/.venv314a7/bin/python test4.py {'a': <class 'str'>} {'a': <class 'str'>} # 3.14.0b1 $ ~/.venv314/bin/python test4.py {'a': 'int'} {'a': 'int'} ``` If there's a way to get annotationlib.get_annotations() to pick up the change I can use that as a workaround cc @JelleZijlstra ### CPython versions tested on: 3.14 ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133794 * gh-134655 <!-- /gh-linked-prs -->
4443110c3409ecba9f0fd49495d039030cb7ed58
91b48868a82821c1cbfd2245212699b57d3a24c7
python/cpython
python__cpython-129648
# Use-after-free in `unicode_escape` decoder with error handler # Crash report ### What happened? When using `.decode("unicode_escape")` with an error handler there is a use-after-free segfault. ### CPython versions tested on: CPython main branch ### Operating systems tested on: _No response_ ### Output from running 'python -VV' on the command line: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-129648 * gh-133942 * gh-133944 * gh-134255 * gh-134337 * gh-134341 * gh-134345 * gh-134346 <!-- /gh-linked-prs -->
9f69a58623bd01349a18ba0c7a9cb1dad6a51e8e
734e15b70dc044f57df4049a22dd769dffdb7d18
python/cpython
python__cpython-133746
# test_multiprocessing_spawn: test_interrupt() fails randomly On a Free Threading build when tests are run in parallel (`-F -j14`) to stress the test: ``` vstinner@mona$ /opt/py314b1-ft/bin/python3.14td -m test test_multiprocessing_spawn.test_processes -W -m test_interrupt -F -j14 Using random seed: 1851856330 0:00:00 load avg: 1.58 Run tests in parallel using 14 worker processes 0:00:03 load avg: 1.58 [ 1/1] test_multiprocessing_spawn.test_processes failed (1 failure) test_interrupt (test.test_multiprocessing_spawn.test_processes.WithProcessesTestProcess.test_interrupt) ... Traceback (most recent call last): File "<string>", line 1, in <module> from multiprocessing.spawn import spawn_main; spawn_main(tracker_fd=5, pipe_handle=7) ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/py314b1-ft/lib/python3.14t/multiprocessing/spawn.py", line 122, in spawn_main exitcode = _main(fd, parent_sentinel) File "/opt/py314b1-ft/lib/python3.14t/multiprocessing/spawn.py", line 132, in _main self = reduction.pickle.load(from_parent) File "/opt/py314b1-ft/lib/python3.14t/test/test_multiprocessing_spawn/test_processes.py", line 2, in <module> from test._test_multiprocessing import install_tests_in_module_dict File "/opt/py314b1-ft/lib/python3.14t/test/_test_multiprocessing.py", line 53, in <module> import multiprocessing.managers File "/opt/py314b1-ft/lib/python3.14t/multiprocessing/managers.py", line 32, in <module> from . import pool File "<frozen importlib._bootstrap>", line 1371, in _find_and_load File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 938, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 758, in exec_module File "<frozen importlib._bootstrap_external>", line 891, in get_code File "<frozen importlib._bootstrap_external>", line 516, in _compile_bytecode File "<frozen importlib._bootstrap>", line 494, in _verbose_message KeyboardInterrupt FAIL ====================================================================== FAIL: test_interrupt (test.test_multiprocessing_spawn.test_processes.WithProcessesTestProcess.test_interrupt) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/py314b1-ft/lib/python3.14t/test/_test_multiprocessing.py", line 578, in test_interrupt self.assertEqual(exitcode, 1) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ AssertionError: -2 != 1 ``` Python installed from the Python-3.14.0b1 tarball with: ``` $ ./configure --disable-gil --prefix /opt/py314b1-ft --with-pydebug $ make $ make install ``` <!-- gh-linked-prs --> ### Linked PRs * gh-133746 * gh-133916 * gh-133917 <!-- /gh-linked-prs -->
c2989b7070b18c0b7c51521fed8bc11c159ea5b8
d29ddbd90c5eb9eb83bb5bbbe9fd616514ccfc21
python/cpython
python__cpython-136987
# test_sysconfig fails if executed from a relocated place # Bug report ### Bug description: The json and the sysconfig value differ in `srcdir` ```python [2025-05-08T15:37:25.722Z] - 'srcdir': '/someplace/python/workspace/python_python3.14-debian_PR-1/distro/refroot/amd64/opt/bb/lib64/python3.14/config-3.14-x86_64-linux-gnu'} [2025-05-08T15:37:25.722Z] + 'srcdir': '/opt/someplace/lib64/python3.14/config-3.14-x86_64-linux-gnu'} [2025-05-08T15:37:25.722Z] [2025-05-08T15:37:25.722Z] ---------------------------------------------------------------------- [2025-05-08T15:37:25.722Z] Ran 37 tests in 0.134s [2025-05-08T15:37:25.722Z] [2025-05-08T15:37:25.722Z] FAILED (failures=1, skipped=3)``` ``` ### CPython versions tested on: 3.14 ### Operating systems tested on: Linux <!-- gh-linked-prs --> ### Linked PRs * gh-136987 * gh-136990 <!-- /gh-linked-prs -->
aafbdb5df5439adc1106ced068cf87683ae68b9e
4d02f31cdd45d81b95540d9076222b709d4f2335
python/cpython
python__cpython-134468
# test_alt_digits_nl_langinfo fails for locale uk_UA # Bug report ### Bug description: ```python test_alt_digits_nl_langinfo (test.test__locale._LocaleTests.test_alt_digits_nl_langinfo) ... test_alt_digits_nl_langinfo (test.test__locale._LocaleTests.test_alt_digits_nl_langinfo) (locale='sr_YU') ... skipped "no locale 'sr_YU'" test_alt_digits_nl_langinfo (test.test__locale._LocaleTests.test_alt_digits_nl_langinfo) (locale='uk_UA') ... ERROR test_alt_digits_nl_langinfo (test.test__locale._LocaleTests.test_alt_digits_nl_langinfo) (locale='lzh_TW.UTF-8') ... skipped "no locale 'lzh_TW.UTF-8'" test_alt_digits_nl_langinfo (test.test__locale._LocaleTests.test_alt_digits_nl_langinfo) (locale='shn_MM.UTF-8') ... skipped "no locale 'shn_MM.UTF-8'" test_alt_digits_nl_langinfo (test.test__locale._LocaleTests.test_alt_digits_nl_langinfo) (locale='ar_AE.UTF-8') ... skipped "ALT_DIGITS is not set for locale 'ar_AE.UTF-8' on this platform" test_alt_digits_nl_langinfo (test.test__locale._LocaleTests.test_alt_digits_nl_langinfo) (locale='bn_IN.UTF-8') ... skipped "ALT_DIGITS is not set for locale 'bn_IN.UTF-8' on this platform" test_era_nl_langinfo (test.test__locale._LocaleTests.test_era_nl_langinfo) ... test_era_nl_langinfo (test.test__locale._LocaleTests.test_era_nl_langinfo) (locale='sr_YU') ... skipped "no locale 'sr_YU'" test_era_nl_langinfo (test.test__locale._LocaleTests.test_era_nl_langinfo) (locale='lzh_TW.UTF-8') ... skipped "no locale 'lzh_TW.UTF-8'" test_era_nl_langinfo (test.test__locale._LocaleTests.test_era_nl_langinfo) (locale='shn_MM.UTF-8') ... skipped "no locale 'shn_MM.UTF-8'" test_float_parsing (test.test__locale._LocaleTests.test_float_parsing) ... ok test_lc_numeric_basic (test.test__locale._LocaleTests.test_lc_numeric_basic) ... ok test_lc_numeric_localeconv (test.test__locale._LocaleTests.test_lc_numeric_localeconv) ... ok test_lc_numeric_nl_langinfo (test.test__locale._LocaleTests.test_lc_numeric_nl_langinfo) ... ok ====================================================================== ERROR: test_alt_digits_nl_langinfo (test.test__locale._LocaleTests.test_alt_digits_nl_langinfo) (locale='uk_UA') ---------------------------------------------------------------------- Traceback (most recent call last): File "/bb/data/tmp/314/refroot/amd64/opt/bb/lib64/python3.14/test/test__locale.py", line 220, in test_alt_digits_nl_langinfo alt_digits = nl_langinfo(locale.ALT_DIGITS) UnicodeDecodeError: 'locale' codec can't decode byte 0xde in position 4: decoding error ---------------------------------------------------------------------- Ran 6 tests in 0.012s ``` This is in a Red Hat Enterprise Linux Server release 7.6 (Maipo) machine ### CPython versions tested on: CPython main branch, 3.14 ### Operating systems tested on: Linux <!-- gh-linked-prs --> ### Linked PRs * gh-134468 * gh-134512 * gh-136237 * gh-136240 <!-- /gh-linked-prs -->
899c7dc283cb899fdfd79fb479b38352f48e454a
8c5e5557c64a8d6310b2a958f576d5eb245cb1b6
python/cpython
python__cpython-133725
# Add a `color: bool` arg to `difflib.unified_diff` # Feature or enhancement ### Proposal: What are people's thoughts on adding a `color: bool` arg to `difflib.unified_diff` so that it injects ANSI terminal codes to color things in the way that `git diff` would? New API: ```python difflib.unified_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\n', color=False) ``` Open questions: 1. Should the colors be configurable? Eg via dict `colors={"equal": "\033[31;1;4m", "delete": "...", "insert": "...", "header": "...", "hunk": "..."}` + The default would be the basic 4bit colors used by `git diff`.: + header: bold `\033[1m` + hunk lines: cyan `\033[36m` + removed: red `\033[31m` + added: green `\033[32m` + equal: no formatting + This might be useful for nonstandard terminal colors? 2. Should this be added to other functions like `ndiff` and `contextdiff`? I'd be happy to tackle this. Excluding tests, it looks to be O(20 LOC) changes. --- ![Image](https://github.com/user-attachments/assets/071e3c07-a33e-42b0-8e5a-b7bf71671b97) ``` $ cat python mydiff.py cat: python: No such file or directory import difflib import pathlib file1 = pathlib.Path("a.txt") file2 = pathlib.Path("b.txt") udiff = difflib.unified_diff( file1.read_text().splitlines(), file2.read_text().splitlines(), fromfile=str(file1), tofile=str(file2), ) for line in udiff: print(line) $ python mydiff.py --- a.txt +++ b.txt @@ -1,3 +1,3 @@ 1a -2b 3c +4d ``` ### Has this already been discussed elsewhere? This is a minor feature, which does not need previous discussion elsewhere ### Links to previous discussion of this feature: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133725 <!-- /gh-linked-prs -->
34d7351ac770ac49875fc39396b2a97828ba05ad
64ee1babfb971ddbc00fd8711cccebfbddf6e4ee
python/cpython
python__cpython-133714
# Compare the `f->stackpointer` to the result of `_PyFrame_Stackbase(f)` I think we should compare `f->stackpointer` to the result of the `_PyFrame_Stackbase(f)` in the `_PyFrame_StackPeek` and in the `_PyFrame_StackPop` rather than repeat the offset calculation in both of them. https://github.com/python/cpython/blob/c492ac72525ea5887082ee991b45cc237cd02a40/Include/internal/pycore_interpframe.h#L46-L60 <!-- gh-linked-prs --> ### Linked PRs * gh-133714 <!-- /gh-linked-prs -->
832058274dd99e30321a5f9a3773038cd0424c11
50b53706646cc130dcc71496f4a5bee14e9a1d9a
python/cpython
python__cpython-133809
# `calculate_log2_keysize` in `dictobject.c` incorrect # Bug report ### Bug description: Originally reported by @ThomasBr0 in https://github.com/python/cpython/issues/132762 The `_Py_bit_length()` and `_BitScanReverse64()` code paths are incorrect and don't always return the smallest log2 key size to fit the desired number of items. The bug is benign in the sense that the dictionaries are sometimes too big, but they're never too small. For example `calculate_log2_keysize(7) = 4` but `calculate_log2_keysize(8) = 3`. https://github.com/python/cpython/blob/9546eeea90c8deb8570a0ef621f075c3c766bc12/Objects/dictobject.c#L545-L566 cc @methane @markshannon ### CPython versions tested on: CPython main branch ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133809 * gh-133861 * gh-133862 <!-- /gh-linked-prs -->
92337f666e8a076a68305a8d6dc8bc9c095000e9
878e0fb8b43de62449b6d7974fb503498e1c0cf7
python/cpython
python__cpython-133772
# multi-level hierarchies of TypedDict no longer return superclass elements in __annotations__ as of 3.14.0b1 when future annotations enabled # Bug report ### Bug description: using `get_annotations()` or accessing `__annotations__` directly on a `TypedDict` subclass previously returned a dictionary of all attributes in the TypedDict hierarchy, now only returns for the sub-most class. only happens when `from __future__ import annotations` is used; when not used, then it works as previously. there's no workaround here because the typeddict subclass does not include declared superclasses in its `__mro__`. ```python from __future__ import annotations from typing import TypedDict import annotationlib class Base(TypedDict,total=False): a: int b: int class Sub(Base,total=False): c: float d: int # for both, py3.14.0a7 has all four, py3.14.0b1 has only c, d # py3.14.0a7: {'a': ForwardRef('int', module='__main__'), 'b': ForwardRef('int', module='__main__'), 'c': ForwardRef('float', module='__main__'), 'd': ForwardRef('int', module='__main__')} # py3.14.0b1: {'c': 'float', 'd': 'int'} print(Sub.__annotations__) print(annotationlib.get_annotations(Sub)) # there's no way to traverse the ``__mro__`` of the Sub class to find # these annotations since Base is not there; prints # (<class '__main__.Sub'>, <class 'dict'>, <class 'object'>) print(Sub.__mro__) ``` ### CPython versions tested on: 3.14 ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133772 * gh-134003 <!-- /gh-linked-prs -->
9836503b48e047db117b3bef3a812c40ed3e988a
5d118d0a922334e47db5159089d74dda21329b74
python/cpython
python__cpython-133795
# surprising new behavior in inspect/annotationlib get_annotations as of 3.14.0b1, not in 3.14.0a7. intended change? # Bug report ### Bug description: 3.14.0b1 seems to be interpreting the annotations of a metaclass into a new format that is also interfering with the correct annotations of subclasses of that class. The subclass reports the annotations of the parent class, if it does not itself have any annotations. this only occurs if superclass is from a custom metaclass. if the subclass does have annotations, then the superclass annotations *are not* reported. this behavior is inconsistent with previous python versions including 3.14.0a7 and is also inconsistent with itself. see script below ```python from __future__ import annotations import inspect # a metaclass with an annotation class MyMetaClass(type): metadata: dict[str, str] # dynamic class based on metaclass MyNewClass = MyMetaClass("MyNewClass", (object,), {"metadata": {}}) # this seems new, but maybe intentional. annotations are shown for the # dynamic class that come from the metaclass. OK # 3.13.3: {} # 3.14.0a7: {} # 3.14.0b1: {'metadata': 'dict[str, str]'} print(inspect.get_annotations(MyNewClass)) # declared class based on metaclass. Add another anno to it. class MyOtherNewClass(metaclass=MyMetaClass): metadata: dict[str, str] = {} someint: int # both pythons look good and this agrees with older pythons too. # 3.13.3: {'metadata': 'dict[str, str]', 'someint': 'int'} # 3.14.0a7: {'metadata': 'dict[str, str]', 'someint': 'int'} # 3.14.0b1: {'metadata': 'dict[str, str]', 'someint': 'int'} print(inspect.get_annotations(MyOtherNewClass)) # a control, a normal class without special metaclass. class YetAnotherClass: metadata: dict[str, str] = {} someint: int # here's where it goes wrong. If we make new classes from these # bases that have *no* annotations, the *superclass annotations leak into the subclass* class MySubClass(MyNewClass): pass # 3.13.3: {} # 3.14.0a7: {} # 3.14.0b1: {'metadata': 'dict[str, str]', 'someint': 'int'} # this has to be wrong print(inspect.get_annotations(MySubClass)) # if we add *any* annotations to MySubClass, the above annos *disappear* class MySubClass(MyNewClass): foobar: float # these look all correct. but 3.14.0b1's seems to be inconsistent with itself # 3.13.3: {'foobar': 'float'} # 3.14.0a7: {'foobar': 'float'} # 3.14.0b1: {'foobar': 'float'} # wait what? What happened to metadata/someint from above? print(inspect.get_annotations(MySubClass)) class MyOtherSubClass(MyOtherNewClass): pass # similar behaviors for declared class # 3.13.3: {} # 3.14.0a7: {} # 3.14.0b1: {'metadata': 'dict[str, str]', 'someint': 'int'} print(inspect.get_annotations(MyOtherSubClass)) # behavior does not seem to occur at all without a metaclass. # YetAnotherClass has annotations but we do not see them from subclasses # of that class class MyYetAnotherSubClass(YetAnotherClass): pass # 3.13.3: {} # 3.14.0a7: {} # 3.14.0b1: {} print(inspect.get_annotations(MyYetAnotherSubClass)) ``` outputs: ``` $ python test4.py # python 3.13.3 {} {'metadata': 'dict[str, str]', 'someint': 'int'} {} {'foobar': 'float'} {} {} $ ~/.venv314a7/bin/python test4.py # python 3.14.0a7 {} {'metadata': 'dict[str, str]', 'someint': 'int'} {} {'foobar': 'float'} {} {} $ ~/.venv314/bin/python test4.py # python 3.14.0b1 {'metadata': 'dict[str, str]'} {'metadata': 'dict[str, str]', 'someint': 'int'} {'metadata': 'dict[str, str]'} {'foobar': 'float'} {'metadata': 'dict[str, str]', 'someint': 'int'} {} ``` ### CPython versions tested on: 3.14 ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133795 * gh-134656 <!-- /gh-linked-prs -->
3e562b394252ff75d9809b7940020a775e4df68b
4443110c3409ecba9f0fd49495d039030cb7ed58
python/cpython
python__cpython-133702
# test.test_annotationlib.TestStringFormat.test_displays shouldn't rely on set's order of elements # Bug report ### Bug description: We've hit a failure during Python's 3.14.0b1 build - test apparently checks for an exact order of elements in a set which will sometimes fail: ```pytb FAIL: test_displays (test.test_annotationlib.TestStringFormat.test_displays) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/python3.14-3.14.0_b1-build/Python-3.14.0b1/Lib/test/test_annotationlib.py", line 349, in test_displays self.assertEqual( ~~~~~~~~~~~~~~~~^ anno, ^^^^^ ...<5 lines>... }, ^^ ) ^ AssertionError: {'w':[29 chars] 'a[{str, int}, 3]', 'y': 'a[{int: str}, 4]', [19 chars] 5]'} != {'w':[29 chars] 'a[{int, str}, 3]', 'y': 'a[{int: str}, 4]', [19 chars] 5]'} {'w': 'a[[int, str], float]', - 'x': 'a[{str, int}, 3]', ? ----- + 'x': 'a[{int, str}, 3]', ? +++++ 'y': 'a[{int: str}, 4]', 'z': 'a[(int, str), 5]'} ``` ### CPython versions tested on: 3.14 ### Operating systems tested on: Linux <!-- gh-linked-prs --> ### Linked PRs * gh-133702 * gh-133754 <!-- /gh-linked-prs -->
a2a0fa91c483964a280b7b788418217b3d6d1411
3ed8d6fdd1145c48ec7c3e668636cc301de8959e
python/cpython
python__cpython-133642
# concurrent.futures is missing link to InterpreterPoolExecutor sources # Documentation https://docs.python.org/3.14/library/concurrent.futures.html only links `process.py` and `thread.py`, but not `interpreter.py`. <!-- gh-linked-prs --> ### Linked PRs * gh-133642 * gh-133643 <!-- /gh-linked-prs -->
4fcd37756382206e5a4a387cec9266815adca007
8679c8d5ccf657835a88de5095d4fc6e2eb47633
python/cpython
python__cpython-133640
# `TestPyReplAutoindent.test_auto_indent_default()` misses `self.assertEqual()` # Bug report ### Bug description: The [test_auto_indent_default()](https://github.com/python/cpython/blob/main/Lib/test/test_pyrepl/test_pyrepl.py#L441-L453) forgets to run the `input_code`. ### CPython versions tested on: 3.14, 3.15 ### Operating systems tested on: Linux <!-- gh-linked-prs --> ### Linked PRs * gh-133640 * gh-133646 * gh-133647 <!-- /gh-linked-prs -->
4617d68d73409e83d6ab31106d10421d44048787
afed5f88359c73f798ff6f0064e37ac1a1f0759b
python/cpython
python__cpython-133693
# Python 3.14.0b1 full installer does not install `pip.exe` # Bug report ### Bug description: Using the `python-3.14.0b1-amd64.exe` installer no longer creates `pip.exe` when using `include_pip=1` with `PrependPath=1`. Is this expected behavior? The `python-3.14.0a7-amd64.exe` installer worked fine. I thought it could be related to pep-0773, but that only deprecates the "full installer" which should still work as it has (until removed in 3.16). Install command used: ```powershell Start-Process python-3.14.0b1-amd64.exe -Wait -NoNewWindow -PassThru \ -ArgumentList @( \ '/quiet', \ 'InstallAllUsers=1', \ 'TargetDir=C:\Python', \ 'PrependPath=1', \ 'Shortcuts=0', \ 'Include_doc=0', \ 'Include_pip=1', \ 'Include_test=0' \ ) ``` Then trying to run `python` and `pip`: ```console $ # the installer updated PATH in the registry, refresh our local value $ $env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); $ python --version Python 3.14.0b1 $ pip --version pip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + pip --version + ~~~ + CategoryInfo : ObjectNotFound: (pip:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException ``` Alpha 7 was successful ```console $ # after an install with python-3.14.0a7-amd64.exe using the same CLI installer options as above and PATH refresh $ python --version Python 3.14.0a7 $ pip --version pip 25.0.1 from C:\Python\Lib\site-packages\pip (python 3.14) ``` ### CPython versions tested on: 3.14 ### Operating systems tested on: Windows <!-- gh-linked-prs --> ### Linked PRs * gh-133693 * gh-133705 * gh-133707 <!-- /gh-linked-prs -->
6ce469dcba482772bc94c4048e90fa9598897c4a
9546eeea90c8deb8570a0ef621f075c3c766bc12
python/cpython
python__cpython-133624
# Add ssl.HAS_PSK_TLS13 to detect libssl external TLS 1.3 PSK support ### Proposal: Due to [security concerns](https://www.rfc-editor.org/rfc/rfc9258.html#section-1), neither AWS-LC [nor BoringSSL](https://issues.chromium.org/issues/369963041) support "External PSK" (as defined [here](https://www.rfc-editor.org/rfc/rfc9258.html#section-3)) in TLS 1.3. This issue proposes the addition of a boolean property `ssl.HAS_PSK_TLS13` to indicate whether the crypto library CPython is built against supports External PSK, allowing python's test suite and consuming modules to branch accordingly. This feature has precedent in the `ssl.HAS_PSK` and `ssl.HAS_PHA` flags indicating support (or lack thereof) for other TLS features that are not universally implemented across TLS libraries. #### [One Hard Thing](https://martinfowler.com/bliki/TwoHardThings.html): Naming Concerns I'm not sure that `HAS_PSK_TLS13` is the best name. While AWS-LC doesn't support "External PSKs" in TLS 1.3 (i.e. "PSK" is only used for session resumption), it [does](https://github.com/aws/aws-lc/blob/8233b4bbaf7b186639a76084f37d49b2c0bebf3c/ssl/handshake_server.cc#L1421-L1446) for earlier TLS versions. However, the "external" terminology established in RFC 9258 pertains specifically to TLS 1.3. So do we include `EXTERNAL` instead of `TLS13` in the `ssl` module property name? My thought is "no" because it's somewhat imprecise. A further complication is that AWS-LC does notionally support PSK in TLS 1.3, but [only for session resumption](https://github.com/aws/aws-lc/blob/main/ssl/tls13_enc.cc#L374) (this is fine security-wise, as sessions can't span protocol versions). This makes the current suggestion of `HAS_PSK_TLS13` somewhat disingenuous, as the [PreSharedKeyExtension](https://datatracker.ietf.org/doc/html/rfc8446#section-4.2.11) is indeed used. Something like `ssl.HAS_TLS13_EXTERNAL_PSK` "feels" like an abomination, but is probably the most accurate. Anyway, I don't see a clear choice and am very open to suggestions. ### Has this already been discussed elsewhere? This is a minor feature, which does not need previous discussion elsewhere ### Links to previous discussion of this feature: Related changes to increase libcrypto/libssl compatibility (specifically with AWS-LC) have been discussed with the community [here](https://discuss.python.org/t/support-building-ssl-and-hashlib-modules-against-aws-lc/44505/2). <!-- gh-linked-prs --> ### Linked PRs * gh-133624 <!-- /gh-linked-prs -->
6801bd32cb9bd2bfa87b52d46fb453557d9568ed
f77dac66e1867cfdf6f7549822dd64416f6063bc
python/cpython
python__cpython-133612
# Remove deprecated `PyUnicode_AsDecoded/Encoded` functions Implementation will be kept as planned. Scheduled for removal in https://github.com/python/cpython/issues/132798. PR soon <!-- gh-linked-prs --> ### Linked PRs * gh-133612 <!-- /gh-linked-prs -->
4fd10952800413ce615bba067cf5dfb7899a42c8
f34ec09ba51070b0693d7ced8e57e77d71beb48d
python/cpython
python__cpython-133888
# Remove deprecated `platform.java_ver` Refs: #116349 PR from new contributors is very welcome! An example of PR with removal of deprecated feature: #133602 <!-- gh-linked-prs --> ### Linked PRs * gh-133888 <!-- /gh-linked-prs -->
7a4a6cf2b8d48b302c734a5cee59f42973c8fd36
62f66caa8c963bdf45d1e22456aea985e74fa2d5
python/cpython
python__cpython-133598
# Possible memory leak on error path in _sys_getwindowsversion_from_kernel32 # Bug report ### Bug description: If `GetFileVersionInfoW` or `VerQueryValueW` fails inside `_sys_getwindowsversion_from_kernel32` then allocated `verblock` not freed. ### CPython versions tested on: CPython main branch ### Operating systems tested on: Windows <!-- gh-linked-prs --> ### Linked PRs * gh-133598 * gh-133659 * gh-133660 <!-- /gh-linked-prs -->
0ec8fc83a83914d2ae97e52529e98ce63aaf831c
45bb5ba61a8d6dcaa44312b67fe6bade5e2ad992
python/cpython
python__cpython-133605
# Finish deprecation period for some sqlite3.Connection APIs This is a continuation of #108278. Passing some arguments by keyword or as positional was deprecated in 3.13. It is time to finish the deprecation period. <!-- gh-linked-prs --> ### Linked PRs * gh-133605 <!-- /gh-linked-prs -->
dcf93c4c93b741e84fa75d2b0d00a156aaf07ecf
2561e148ec985755baa3984b91fd0bfc089b283c
python/cpython
python__cpython-133681
# Initialize the `linenumber_borrow` field of the `TableEntry` struct I think we should add the missing initialization of the `TableEntry.linenumber_borrow` field to the `make_table_entry` function. https://github.com/python/cpython/blob/5ea24116b001a6a407ece203c2d3061ce6ffba18/Python/stackrefs.c#L22 <!-- gh-linked-prs --> ### Linked PRs * gh-133681 * gh-133872 <!-- /gh-linked-prs -->
c838e21fda21bb3ff91f586374e0da776c1c567b
f91127ae1a8bb233aa23b449e87da6df763f85b2
python/cpython
python__cpython-133584
# Add converters for standard fixed size unsigned integers in Argument Clinic Several modules use converters to unsigned integers of fixed size: uint16_t, uint32_t, uint64_t. We could add support for these types in Argument Clinic and add the private C API for reuse the code. A larger part of the work was already done in #132987 to support unsigned_int, etc converters. We can now just make the code even more general. <!-- gh-linked-prs --> ### Linked PRs * gh-133584 * gh-133650 <!-- /gh-linked-prs -->
4c914e7a36033d5e8d52cdef3a4063eb9b012ed2
3224b99872d8ed030181e5d009ea64e8672a68ee
python/cpython
python__cpython-133635
# t-strings: AST unparsing does not reproduce original formatting # Bug report ### Bug description: The AST unparsing of `Interpolation` objects does not reproduce formatting within interpolations. This is true both for `ast.unparse` in Python: ``` >>> ast.unparse(ast.parse('t"{a + b}"')) "t'{a + b}'" ``` And for the C unparse that is used by `from __future__ import annotations`: ``` >>> ns = {} >>> exec(""" ... from __future__ import annotations ... def f(x: t"{a + b}"): ... ... """, ns) >>> ns["f"].__annotations__ {'x': "t'{a + b}'"} ``` In general, we can't recover the original source exactly, but in this case we do have the original source available: ``` >>> ast.parse('t"{a + b}"').body[0].value.values[0].str 'a + b' ``` Let's use it. ### CPython versions tested on: 3.14 ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133635 * gh-133666 * gh-133724 * gh-133731 <!-- /gh-linked-prs -->
bfac7d2edc6e461e21b4762f8db03fca85f3a0be
a2c4467d06028e3dbf79edd1d6c0cc2e7f11be85
python/cpython
python__cpython-133574
# `sys.getwindowsversion` can fail without setting an exception on some WinAPI partitions # Bug report ### Bug description: `_sys_getwindowsversion_from_kernel32` doesn't set an exception when it's called for WinAPI partitions that don't support the call. This leads to `sys.getwindowsversion` failing without setting an exception. ### CPython versions tested on: 3.13 ### Operating systems tested on: Windows <!-- gh-linked-prs --> ### Linked PRs * gh-133574 <!-- /gh-linked-prs -->
5d118d0a922334e47db5159089d74dda21329b74
b44c824856a351472a9627da066bfbde9d8ae64e
python/cpython
python__cpython-134327
# Exact reporting of `curses` C function failures When calling some curses C functions, we ignore their return values. Those are: - in `PyCursesWindow_dealloc`, we ignore `delwin()` errors - in `_curses_initscr_impl`, we ignore `wrefresh()` errors - in `_curses_window_addstr_impl`, we ignore `wattrset()` errors and prefer reporting errors due to adding strings. Same for the `insstr*` functions - in `_curses_window_box_impl`, we ignore the error returned by `box()`. This is correct because the manual says (for `box`): > All routines return the integer OK. The SVr4.0 manual says "or a non-negative integer if immedok is set", but this appears to be an error. X/Open does not define any error conditions. This implementation returns an error if the window pointer is null. In this case, I think it's better to explicitly suppress the return value and link the manpage. The question now is: - What should we do for a failing `delwin()` in the destructor? - What should we do for `wattrset()` when this routine is not the "important" one? cc @encukou --- > [!NOTE] > We will not backport these fixes as they could break existing code that could be surprised by a new exception. <!-- gh-linked-prs --> ### Linked PRs * gh-134327 * gh-134629 <!-- /gh-linked-prs -->
30dde1eeb3fa1e0e7417f9cdded8fd90766f2559
604f83550bc4fd5507019969247c12a6a6454ded
python/cpython
python__cpython-133578
# `logging.basicConfig` should support parameter `formatter_class` (currently instantiates hardcoded `logging.Formatter`) Hi! :wave: Currently `logging.basicConfig` instantiates `logging.Formatter` as a formatter: https://github.com/python/cpython/blob/3dfed230928de0f649061782a36691066a0ef058/Lib/logging/__init__.py#L2111 Now if the developer wants a different formatter class, they have to let `logging.basicConfig` create the default formatter first and then replace it passing the same parameters: ```python import logging class CustomFormatter(logging.Formatter): ... # custom code here format_ = "......." # arbitrary logging.basicConfig(format=format_) formatter = CustomFormatter(fmt=format_) for handler in logging.root.handlers: handler.setFormatter(formatter) ``` A version of that with the blanks filled in can be seen at https://gist.github.com/hartwork/8b5963b5e9a698a3d6d352c657418af3 . A brittle alternative would be use of `inittest.mock.patch`: ```python import logging from inittest.mock import patch class CustomFormatter(logging.Formatter): ... # custom code here with patch("logging.Formatter", CustomFormatter): logging.basicConfig(format=".......") ``` None of that is ideal. With a new parameter `formatter_class`, the code would be written as this: ```python import logging class CustomFormatter(logging.Formatter): ... # custom code here logging.basicConfig(format=".......", formatter_class=CustomFormatter) ``` I hope that you are open to this suggestion, and I will open a related pull request in a minute. Thanks! :pray: <!-- gh-linked-prs --> ### Linked PRs * gh-133578 <!-- /gh-linked-prs -->
2eb49d278e081b0cde057c1ffc2e8cd24ae39225
9ad0c7b0f14c5fcda6bfae6692c88abb95502d38
python/cpython
python__cpython-133576
# Eliminate legacy checks in `curses.__init__` # Feature or enhancement ### Proposal: Some checks in `curses.__init__` are now obsolete, essentially because of how the C functions are now implemented. For instance, `start_color()` checks for whether `_curses.COLORS` exists, but it will always exist if the call to `_curses.start_color()` succeeds. ### Has this already been discussed elsewhere? This is a minor feature, which does not need previous discussion elsewhere ### Links to previous discussion of this feature: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133576 <!-- /gh-linked-prs -->
a054af6edd8b21c931afa05f51c856dbabd7a40c
d9b0b07098ec4bdb47151948c77bcbbf3e796a5d
python/cpython
python__cpython-133573
# invalid memory error reporting for windows is unsupported on some WinAPI partitions # Bug report ### Bug description: The error reporting for invalid memory access (`HANDLE_INVALID_MEM` and `HANDLE_INVALID_MEM_METHOD`) is using `NTSTATUS` and `LsaNtStatusToWinError` which aren't available in all WinAPI partitions. This leads to a compilation failure. ### CPython versions tested on: 3.13 ### Operating systems tested on: Windows <!-- gh-linked-prs --> ### Linked PRs * gh-133573 <!-- /gh-linked-prs -->
43410953c26153b48554218cbe35ba5f1167b08e
54a6875adbc9091909b1473c49595c0cc84dc438
python/cpython
python__cpython-133569
# rpc runtime library isn't available in all WinAPI partitions # Bug report ### Bug description: On Windows we always set `HAVE_AF_HYPERV`. However the rpc runtime library isn't available in all WinAPI partitions. This leads to a compilation failure. ### CPython versions tested on: 3.13 ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133569 <!-- /gh-linked-prs -->
e7ad59bd73078c2f4cdcfddadacb51c43338fe93
e528aef7e2952a11119cf95c9198ad183dc7af7f
python/cpython
python__cpython-133566
# `test_pdb` times out on FreeBSD # Bug report `test.test_pdb.PdbTestReadline.test_multiline_indent_completion` times out, e.g. [here](https://buildbot.python.org/#/builders/1223/builds/6144). @gaogaotiantian said: > the test needs to backspace a few times to simulate dedent and `\x08` is not picked up in FreeBSD. It's more of a "how can we simulate backspace(delete) on FreeBSD for tests" problem. The code itself is fine. <!-- gh-linked-prs --> ### Linked PRs * gh-133566 * gh-133616 <!-- /gh-linked-prs -->
79b8a32fcb30b2c6549bacecdc7081ebd50d6e17
14291faa52dfb97179ce747ec9ef91d97f5ab2ab
python/cpython
python__cpython-133557
# "python3 -m pegen python" got broken after v3.14.0a7 # Bug report ### Bug description: I am currently experimenting with the cpython parser/tokenizer (I want to propose a new feature at some point, but I want to come up with an implementation as well). Following the [parser documentation](https://github.com/python/cpython/blob/main/InternalDocs/parser.md), from the current main (3dfed230928de0f649061782a36691066a0ef058), I can generate a C parser from the `Tools/peg_generator` directory: ```bash $ python3.13 -m pegen c ../../Grammar/python.gram ../../Grammar/Tokens # parse.c generated, works fine ``` But the Python version is not working: ```bash $ python3.13 -m pegen python ../../Grammar/python.gram pegen.grammar.GrammarError: Dangling reference to rule 'TSTRING_START' For full traceback, use -v ``` On `v3.14.0a7` it works fine, so I guess this changed when PEP750 implementation was merged. After investigating a bit, it looks like this is caused by using Python3.13 to run this, when I should use the version compiled from main (that includes the new tokens). For f-strings, a workaround was merged in #125588 to add the missing tokens in [parser_generator.py](https://github.com/python/cpython/blob/main/Tools/peg_generator/pegen/parser_generator.py#L79), so if that is OK I will open a PR to do the same for t-strings. ### CPython versions tested on: CPython main branch ### Operating systems tested on: Linux <!-- gh-linked-prs --> ### Linked PRs * gh-133557 * gh-133630 <!-- /gh-linked-prs -->
b48599b8017f896c965e89c402bb70feef49808a
90f476e0f8dbb3a8603f67200c2422fb098c166c
python/cpython
python__cpython-133553
# t-strings in the annotation STRING format # Bug report ### Bug description: Currently t-strings are not recovered correctly in the STRING format in annotations: ``` >>> def f(x: t"a{int}"): pass ... >>> import annotationlib >>> annotationlib.get_annotations(f, format=annotationlib.Format.STRING) {'x': "Template(strings=('a', ''), interpolations=(Interpolation(int, 'int', None, ''),))"} ``` I think we can do better there. ### CPython versions tested on: 3.14 ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133553 * gh-133628 * gh-133634 * gh-133636 <!-- /gh-linked-prs -->
90f476e0f8dbb3a8603f67200c2422fb098c166c
2cc6de77bdf05e6550939856aafb9faf93795a6d
python/cpython
python__cpython-133606
# IndentationError in new repl # Bug report ### Bug description: Python version: Python 3.14.0a7+ (heads/main-dirty:8d0e07eb899. To reproduce type the following class definition in the REPL: ``` class C: def m ``` Then set the cursor to the space before ``m`` and press backspace to correct the incorrect newline. Behaviour: the REPL exits with an ``IndentationError``. Typing backspace works correctly when the cursor is on ``m``. The exit/crash does not happen in 3.14a7. ### CPython versions tested on: 3.14, CPython main branch ### Operating systems tested on: macOS <!-- gh-linked-prs --> ### Linked PRs * gh-133606 * gh-133709 <!-- /gh-linked-prs -->
b2fabce6abb24b2f2c3afae0edc5eb53729fc624
6ce469dcba482772bc94c4048e90fa9598897c4a
python/cpython
python__cpython-133538
# nt._supports_virtual_terminal missing guard for console io # Bug report ### Bug description: `nt._supports_virtual_terminal` uses windows console io calls even when they aren't available in the windows app partition. This leads to compilation failures ### CPython versions tested on: 3.13 ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133538 <!-- /gh-linked-prs -->
1460ccefd07f0d6d0e97409295796a5d5730a26e
427f8c366dcc1d9148b567c8b2cc74891abb3e98
python/cpython
python__cpython-133533
# Unit test test_incremental_gc_handles_fast_cycle_creation sometimes fails # Bug report ### Bug description: On a debug build on Linux AMD64, this fails for me: ```pytb ./python -m test -uall test___all__ test_atexit test_audit test_ast test_argparse test_gc [...] test test_gc failed -- Traceback (most recent call last): File "/home/nas/src/cpython/Lib/contextlib.py", line 85, in inner return func(*args, **kwds) File "/home/nas/src/cpython/Lib/test/test_gc.py", line 1184, in test_incremental_gc_handles_fast_cycle_creation self.assertLess(new_objects, 27_000, f"Heap growing. Reached limit after {i} iterations") ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: 27013 not less than 27000 : Heap growing. Reached limit after 6579 iterations ``` The exact set of tests required before `test_gc` seems to depend on other factors. More reliable command might be: ``` ./python -m test -uall test___all__ test_buffer test_atexit test_audit test_bigaddrspace test_bdb test_abc test_bufio test_ast test_base64 test_annotationlib test_baseexception test__colorize test__interpreters test_asyncgen test_augassign test_bigmem test_binascii test_bz2 test_abstract_numbers test__osx_support test_c_locale_coercion test_bool test_argparse test_gc ``` ### CPython versions tested on: CPython main branch ### Operating systems tested on: Linux <!-- gh-linked-prs --> ### Linked PRs * gh-133533 * gh-133716 <!-- /gh-linked-prs -->
8598e57942f26ca1feecc0aefb421935e4e9f2aa
751db4e64993b5af98aa1c12cc9d7c7c5882961b
python/cpython
python__cpython-133520
# `console` resource is missing in libregrtest We introduced the use of the `console` resource in tests in [https://github.com/python/cpython/pull/114565](https://github.com/python/cpython/pull/114565). However, `console` is not defined in `libregrtest`, so we can't enable it with `-u console`, and `-u all` still skips these tests. <!-- gh-linked-prs --> ### Linked PRs * gh-133520 * gh-133776 * gh-133777 <!-- /gh-linked-prs -->
4274b471562badc1462f520968d8e1e58ba9fe93
67086282fcc1fc944be2e723cfc05de16109793a
python/cpython
python__cpython-133518
# GetLogicalDriveStringsW is only available on windows desktop # Bug report ### Bug description: `os.listdrives` is currently available on any windows platform. However the underlying `GetLogicalDriveStringsW` is only available on windows desktop. This leads to a compilation failure on platforms like the xbox. ### CPython versions tested on: 3.13 ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133518 <!-- /gh-linked-prs -->
427f8c366dcc1d9148b567c8b2cc74891abb3e98
1a137bc320104bff2f392e4d8b3045c81ddb7ff2
python/cpython
python__cpython-133523
# Failed assertion in `codegen_nameop` # Crash report ### What happened? ``` >>> compile(source=b'Fal\xc5\xbfe', filename="<test>", mode="exec") python: Python/codegen.c:3189: int codegen_nameop(compiler *, location, identifier, expr_context_ty): Assertion `!_PyUnicode_EqualToASCIIString(name, "None") && !_PyUnicode_EqualToASCIIString(name, "True") && !_PyUnicode_EqualToASCIIString(name, "False")' failed. Aborted (core dumped) ``` The `_PyPegen_new_identifier` function normalizes to NFKC non-ASCII strings, which allows you to set keywords (None, True, False) with a different character representation as an identifier. Found by Linux Verification Center (portal.linuxtesting.ru) with libFuzzer Author S.Tereshin (s.tereshin@fobos-nt.ru) ### CPython versions tested on: CPython main branch ### Operating systems tested on: Linux ### Output from running 'python -VV' on the command line: Python 3.14.0a7+ (heads/main-dirty:3dfed2309, May 6 2025, 13:36:58) [Clang 18.1.8 (Fedora 18.1.8-1.fc40)] <!-- gh-linked-prs --> ### Linked PRs * gh-133523 * gh-133596 * gh-133615 <!-- /gh-linked-prs -->
d9b0b07098ec4bdb47151948c77bcbbf3e796a5d
942673ed194813015d98819cfae7eba78ba5e1f9
python/cpython
python__cpython-134081
# asyncio dev docs claim that asyncio debug mode checks for unawaited coroutines # Documentation asyncio-dev docs claim: > asyncio checks for [coroutines that were not awaited](https://docs.python.org/3/library/asyncio-dev.html#asyncio-coroutine-not-scheduled) and logs them; this mitigates the “forgotten await” pitfall. and the docs that points to claim: > When a coroutine function is called, but not awaited (e.g. coro() instead of await coro()) or the coroutine is not scheduled with [asyncio.create_task()](https://docs.python.org/3/library/asyncio-task.html#asyncio.create_task), asyncio will emit a [RuntimeWarning](https://docs.python.org/3/library/exceptions.html#RuntimeWarning): this isn't true, python will produce warnings when coroutines are not awaited regardless of the dev mode of asyncio. The flag to set is `-Werror` and then replace `sys.unraisablehook` to detect these I think this is a hold-over from when asyncio had generator based coroutines. <!-- gh-linked-prs --> ### Linked PRs * gh-134081 * gh-134093 * gh-134094 <!-- /gh-linked-prs -->
d94b1e9cac82143048031530e6c51e59f597bccd
7a4a6cf2b8d48b302c734a5cee59f42973c8fd36
python/cpython
python__cpython-134756
# compileall: `-s` surprisingly makes path relative # Documentation (Filing as a documentation issue, since I suspect the behavior is intentional and has its valid use cases.) In Gentoo, we install packages into a temporary directory whose contents resemble the actual filesystem prefix. For some packages that don't use PEP517 build systems, we invoke `python -m compileall` to byte-compile the installed modules. Today I wanted to switch our code to start using the `-s` option, and I've noticed that in addition to the path specified, it also strips the path separator following it. For example, consider the following example: ```console $ mkdir -p /tmp/destdir/usr/lib/python3.13/site-packages $ > /tmp/destdir/usr/lib/python3.13/site-packages/foo.py $ python3.13 -m compileall -s /tmp/destdir /tmp/destdir/usr/lib/python3.13/site-packages/foo.py Compiling '/tmp/destdir/usr/lib/python3.13/site-packages/foo.py'... $ strings /tmp/destdir/usr/lib/python3.13/site-packages/__pycache__/foo.cpython-313.pyc 'usr/lib/python3.13/site-packages/foo.py <module>r ``` Note that while I expeced it to strip `/tmp/destdir`, leaving `/usr/lib/python3.13/site-packages/foo.py`, it also stripped the following slash, making the path relative. Now, I can achieve the desired behavior by adding `-p /`: ```console $ rm /tmp/destdir/usr/lib/python3.13/site-packages/__pycache__/foo.cpython-313.pyc $ python3.13 -m compileall -s /tmp/destdir -p / /tmp/destdir/usr/lib/python3.13/site-packages/foo.py Compiling '/tmp/destdir/usr/lib/python3.13/site-packages/foo.py'... $ strings /tmp/destdir/usr/lib/python3.13/site-packages/__pycache__/foo.cpython-313.pyc (/usr/lib/python3.13/site-packages/foo.py <module>r ``` However, I found that behavior surprising and I think it should be documented better. Particularly, the current documentation states: https://github.com/python/cpython/blob/120c9d42f278297d373096fbae035767192006d7/Doc/library/compileall.rst?plain=1#L58-L63 which to me sounds like it would remove the specified string, rather than making the path relative. Perhaps it would make sense to specify explicitly that: 1. Removing the prefix makes paths relative to it. 2. `-s` and `-p` can be used simultaneously. 3. `-p /` can be used to make the path absolute. <!-- gh-linked-prs --> ### Linked PRs * gh-134756 * gh-134996 * gh-134997 <!-- /gh-linked-prs -->
fe6f8a3619242b287a793a5b5d8645f402482c71
965c48056633d3f4b41520c8cd07f0275f00fb4c
python/cpython
python__cpython-133491
# Remote PDB is never colorized # Bug report ### Bug description: When PDB is used in remote mode with `-p`, source code is never colorized, even though it's used interactively at a terminal. ### CPython versions tested on: CPython main branch ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133491 * gh-133494 <!-- /gh-linked-prs -->
982830ce564f1ed439c516533bbfeb03d655f6df
57c9810ba4a157f9f608e5b36dcb8a3dfa1628a2
python/cpython
python__cpython-133957
# Minor InterpreterPoolExecutor Issues # Bug report ### Bug description: * `__main__` handling isn't quite right * non-pickleable-but-shareable objects fail * common code with test.support.interpreters should be shared This has gh-132775 as a prerequisite. ### CPython versions tested on: CPython main branch ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133957 * gh-135695 <!-- /gh-linked-prs -->
725da50520c5cc3002f6f55bf67c56853507c604
15f2bac02c5e106f04a93ce73fd93cc305253405
python/cpython
python__cpython-133477
# Assert with the `PyStackRef_IsTaggedInt` function In the `_PyStackRef_AsPyObjectBorrow`, I think we should use the `PyStackRef_IsTaggedInt` rather than **asserting** the `ref.index` value directly from the function. However, the same thing applies to the `PyStackRef_UntagInt` function, which **asserts** the `i.bits` value rather than calling the `PyStackRef_IsTaggedInt` function. <!-- gh-linked-prs --> ### Linked PRs * gh-133477 <!-- /gh-linked-prs -->
6d5a8c2ec19f1c38b4558940d2444a7382bb0287
c492ac72525ea5887082ee991b45cc237cd02a40
python/cpython
python__cpython-133471
# Improve advanced install section of using/windows docs # Documentation Provide more actionable information on how to programmatically install the MSIX (e.g. the PowerShell cmdlets and native APIs). <!-- gh-linked-prs --> ### Linked PRs * gh-133471 <!-- /gh-linked-prs -->
f9b22bb79d8a233380bc5eb3820bf846404a7258
d270bb57923e1e319d7d701d7bcf97a31721e2be
python/cpython
python__cpython-133456
# Some tests consume too much memory Several years ago, all tests, except bigmem tests could be ran sequentially with just 650 MB of memory. There were issues with some buldbots (e.g. AIX) which small RAM, because excess memory consumption not always caused a quick test failure, but could cause swapping and failing tests at timeout 2 hours later. So all tests with high memory consumption were decorated with `bigmemtest`. Now, some tests need more than 1 GB of memory, or even more than 2 GB. Not all buildbots have such much. The main culprit is running too many threads. Every thread needs 35, 70 or even 90 MB, depending on test. There are two possible solutions: 1. Decrease the number of threads. Some tests can perform their function with fewer threads, but this must be decided individually so as not to make the test useless. 2. Decorate the test with `bigmemtest`. This will skip it on most buildbots. <!-- gh-linked-prs --> ### Linked PRs * gh-133456 * gh-133458 * gh-133663 * gh-133664 * gh-134575 * gh-134589 * gh-135046 * gh-135047 <!-- /gh-linked-prs -->
26839eae2079bd797491dfdcc00eaca1dbcbf77c
dcf93c4c93b741e84fa75d2b0d00a156aaf07ecf
python/cpython
python__cpython-133461
# Colorize sqlite3 CLI # Feature or enhancement ### Proposal: I will open a pr once https://github.com/python/cpython/pull/133393 is complete. General idea is to follow repl color scheme: `sqlite>`: repl magenta (i.e. `>>>`) keywords: repl keyword blue (i.e. `def`) `.quit`/`.help`: repl turquoise (i.e. `exit`) rest: no color ### Has this already been discussed elsewhere? This is a minor feature, which does not need previous discussion elsewhere ### Links to previous discussion of this feature: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133461 --- * gh-135224 * gh-136079 <!-- /gh-linked-prs -->
30b1d8f11d5905888f696db14867eb733e7b824c
116a9f9b3775c904c98e390d896200e1641498aa
python/cpython
python__cpython-133440
# sqlite3 CLI does not recognize dot commands with trailing spaces # Bug report ### Bug description: Dot commands with trailing spaces are mistaken for multi-line sqlite3 statements. ``` $ python -m sqlite3↵ sqlite> .version↵ 3.49.1 sqlite> .version␣↵ ... ↵ ... ↵ ``` ### CPython versions tested on: 3.14 ### Operating systems tested on: Linux <!-- gh-linked-prs --> ### Linked PRs * gh-133440 * gh-133738 * gh-133765 * gh-133807 * gh-135708 <!-- /gh-linked-prs -->
ebd4881db2e8448b238d8ca2f6fcf331826132dd
5044e85265dce38e8d649040e123f7f1af4d8312
python/cpython
python__cpython-133422
# `test_external_inspection` fails on Ubuntu # Bug report ### Bug description: Example: https://github.com/python/cpython/actions/runs/14827808058/job/41623568354?pr=133365 ``` 0:12:02 load avg: 6.85 [487/491/3] test_external_inspection failed (3 failures) -- running (2): test.test_concurrent_futures.test_process_pool (1 min 53 sec), test.test_multiprocessing_spawn.test_manager (1 min 10 sec) test_async_gather_remote_stack_trace (test.test_external_inspection.TestGetStackTrace.test_async_gather_remote_stack_trace) ... ok test_async_global_awaited_by (test.test_external_inspection.TestGetStackTrace.test_async_global_awaited_by) ... ok test_async_remote_stack_trace (test.test_external_inspection.TestGetStackTrace.test_async_remote_stack_trace) ... test_async_remote_stack_trace (test.test_external_inspection.TestGetStackTrace.test_async_remote_stack_trace) (task_factory_variant='asyncio.new_event_loop') ... FAIL test_async_remote_stack_trace (test.test_external_inspection.TestGetStackTrace.test_async_remote_stack_trace) (task_factory_variant='new_eager_loop') ... FAIL test_async_staggered_race_remote_stack_trace (test.test_external_inspection.TestGetStackTrace.test_async_staggered_race_remote_stack_trace) ... ok test_asyncgen_remote_stack_trace (test.test_external_inspection.TestGetStackTrace.test_asyncgen_remote_stack_trace) ... ok test_remote_stack_trace (test.test_external_inspection.TestGetStackTrace.test_remote_stack_trace) ... FAIL test_self_trace (test.test_external_inspection.TestGetStackTrace.test_self_trace) ... ok ====================================================================== FAIL: test_async_remote_stack_trace (test.test_external_inspection.TestGetStackTrace.test_async_remote_stack_trace) (task_factory_variant='asyncio.new_event_loop') ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/test_external_inspection.py", line 270, in test_async_remote_stack_trace self.assertEqual(stack_trace, expected_stack_trace) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: Lists differ: [[('c[62 chars]y', 10), ('c4', '/tmp/test_python_ckrn9tbc/tmp[1269 chars]]]]]] != [[('c[62 chars]y', 11), ('c4', '/tmp/test_python_ckrn9tbc/tmp[1284 chars]]]]]] First differing element 0: [('c5[61 chars]y', 10), ('c4', '/tmp/test_python_ckrn9tbc/tmp[179 chars] 21)] [('c5[61 chars]y', 11), ('c4', '/tmp/test_python_ckrn9tbc/tmp[179 chars] 21)] Diff is 1984 characters long. Set self.maxDiff to None to see it. ====================================================================== FAIL: test_async_remote_stack_trace (test.test_external_inspection.TestGetStackTrace.test_async_remote_stack_trace) (task_factory_variant='new_eager_loop') ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/test_external_inspection.py", line 270, in test_async_remote_stack_trace self.assertEqual(stack_trace, expected_stack_trace) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: Lists differ: [[('c[62 chars]y', 10), ('c4', '/tmp/test_python_ckrn9tbc/tmp[1269 chars]]]]]] != [[('c[62 chars]y', 11), ('c4', '/tmp/test_python_ckrn9tbc/tmp[1284 chars]]]]]] First differing element 0: [('c5[61 chars]y', 10), ('c4', '/tmp/test_python_ckrn9tbc/tmp[179 chars] 21)] [('c5[61 chars]y', 11), ('c4', '/tmp/test_python_ckrn9tbc/tmp[179 chars] 21)] Diff is 1984 characters long. Set self.maxDiff to None to see it. ====================================================================== FAIL: test_remote_stack_trace (test.test_external_inspection.TestGetStackTrace.test_remote_stack_trace) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/test_external_inspection.py", line 104, in test_remote_stack_trace self.assertEqual(stack_trace, expected_stack_trace) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: Lists differ: [('fo[62 chars]y', 14), ('baz', '/tmp/test_python_ckrn9tbc/tm[186 chars] 17)] != [('fo[62 chars]y', 15), ('baz', '/tmp/test_python_ckrn9tbc/tm[186 chars] 17)] First differing element 0: ('foo', '/tmp/test_python_ckrn9tbc/tmpf0v2rgso/script_pkg/script.py', 14) ('foo', '/tmp/test_python_ckrn9tbc/tmpf0v2rgso/script_pkg/script.py', 15) - [('foo', '/tmp/test_python_ckrn9tbc/tmpf0v2rgso/script_pkg/script.py', 14), ? ^ + [('foo', '/tmp/test_python_ckrn9tbc/tmpf0v2rgso/script_pkg/script.py', 15), ? ^ ('baz', '/tmp/test_python_ckrn9tbc/tmpf0v2rgso/script_pkg/script.py', 11), ('bar', '/tmp/test_python_ckrn9tbc/tmpf0v2rgso/script_pkg/script.py', 9), ('<module>', '/tmp/test_python_ckrn9tbc/tmpf0v2rgso/script_pkg/script.py', 17)] ---------------------------------------------------------------------- Ran 7 tests in 6.071s FAILED (failures=3) test test_external_inspection failed ``` Came across this failure in my PR to add zstd Python code. ### CPython versions tested on: CPython main branch ### Operating systems tested on: Linux <!-- gh-linked-prs --> ### Linked PRs * gh-133422 * gh-133433 <!-- /gh-linked-prs -->
c4cc5d58aee6a3be55a95efee6ec25d5774f7b5f
b64aa302d7bc09454ba8d5b19922ff6a4192dd96
python/cpython
python__cpython-133414
# Fix an example in the explanation of mock autospeccing # Documentation The autospeccing section, in the reference for the unittest.mock module, includes an example with request.Request. The has_data method of Request is used, but it was removed in Python 3.4. A Pull Request is provided to use the header_items method instead, so the reader will see the expected result if they run the example in their PC. <!-- gh-linked-prs --> ### Linked PRs * gh-133414 * gh-133945 * gh-133946 <!-- /gh-linked-prs -->
86c1d439e0ccbe6baeda69322f1f8c0e6a80464c
5dbd27db7d79af88fb3f9b47f8b80438a147d349
python/cpython
python__cpython-133708
# `inst` defintion and its optional `stack_effect` The DSL specification syntax definition of the `inst` shows that the `stack_effect` is optional, **including its parentheses**: ``` definition: "inst" "(" NAME ["," stack_effect] ")" "{" C-code "}" ... stack_effect: "(" [inputs] "--" [outputs] ")" ``` But if we defined a new instruction, let's say, `MY_INSTRUCTION` as: ```C inst(MY_INSTRUCTION) { /* implementation */ } ``` We will get the following error: ``` SyntaxError: Extra stuff at the end of ./Python/bytecodes.c ``` However, if we defined `MY_INSTRUCTION` with an **empty** `stack-effect`, it will work! ```C inst(MY_INSTRUCTION, ( -- )) { /* implementation */ } ``` <!-- gh-linked-prs --> ### Linked PRs * gh-133708 * gh-133729 * gh-133730 <!-- /gh-linked-prs -->
f77dac66e1867cfdf6f7549822dd64416f6063bc
8054184f9f32c7ba561e6e23b358074824e4928d
python/cpython
python__cpython-133382
# Parameter's error messages say `argument` instead of `parameter` # Bug report ### Bug description: Setting the same name parameters gets the error message saying `duplicate argument` as shown below: ```python def func(param, param): pass ``` > SyntaxError: duplicate argument 'param' in function definition Setting `*` after all the parameters gets the error message saying `at least one argument` as shown below: ```python def func(param1, param2, *): pass ``` > SyntaxError: named arguments must follow bare * So, `argument` should be replaced with `parameter` as shown below: > SyntaxError: duplicate parameter 'param' in function definition > SyntaxError: named parameters must follow bare * *You can also see [this issue](https://github.com/python/cpython/issues/133436). ### CPython versions tested on: 3.12 ### Operating systems tested on: Linux <!-- gh-linked-prs --> ### Linked PRs * gh-133382 <!-- /gh-linked-prs -->
dbca27cfca7da44cb102c1e10508a08cebddd9d7
f28cbc9fd3f37656ad55ef2488b65343b97fa902
python/cpython
python__cpython-133378
# Improve `make regen-pegen` DX on merge conflicts # Bug report Right now if you have a merge conflict in `parser.c` - the easiest way is to delete this file, merge grammars and then run `make regen-pegen` to regen the parser. But, it does not work until you run `touch Parser/parser.c`, which is not really useful. I propose to make this file by default, if it does not exist. ``` python3.13 ./Tools/build/update_file.py ./Parser/parser.c ./Parser/parser.c.new Traceback (most recent call last): File "/Users/sobolev/Desktop/cpython/./Tools/build/update_file.py", line 83, in <module> outcome = update_file_with_tmpfile(**kwargs) File "/Users/sobolev/Desktop/cpython/./Tools/build/update_file.py", line 51, in update_file_with_tmpfile targetfile = open(filename, 'rb') FileNotFoundError: [Errno 2] No such file or directory: './Parser/parser.c' make: *** [regen-pegen] Error 1 ``` @dura0ok said that he wants to work on it. <!-- gh-linked-prs --> ### Linked PRs * gh-133378 <!-- /gh-linked-prs -->
51d2459e4d70e9a6551d053b2492f9405a6d9f17
3f80165a26028e56f51f84dfe6663a31f8c169e2
python/cpython
python__cpython-133383
# segfault when deleting an object after returning it a slightly minimized segfault: ```python import asyncio async def asyncfn(): pass def create_task(loop, coro, **kwargs): task = asyncio.Task(coro, loop=loop, **kwargs) try: return task finally: # gh-128552: prevent a refcycle of # task.exception().__traceback__->BaseEventLoop.create_task->task del task async def main(): t = create_task(asyncio.get_running_loop(), asyncfn(), eager_start=True, name="example") assert t.done() await t asyncio.run(main(), loop_factory=asyncio.EventLoop) ``` _Originally posted by @graingert in https://github.com/python/cpython/issues/128306#issuecomment-2849141839_ <!-- gh-linked-prs --> ### Linked PRs * gh-133383 <!-- /gh-linked-prs -->
78adb63ee198c94c6ce2a1634aa7ea1d47c011ad
2bbcaedb75942389dacb51866948f40de5951c9c
python/cpython
python__cpython-133369
# Improve `ast` CLI with new options: `--feature-version`, `--optimize`, and `--show-empty` # Feature or enhancement Current options: ``` » ./python.exe -m ast --help usage: python.exe -m ast [-h] [-m {exec,single,eval,func_type}] [--no-type-comments] [-a] [-i INDENT] [infile] positional arguments: infile the file to parse; defaults to stdin options: -h, --help show this help message and exit -m, --mode {exec,single,eval,func_type} specify what kind of code must be parsed --no-type-comments don't add information about type comments -a, --include-attributes include attributes such as line numbers and column offsets -i, --indent INDENT indentation of nodes (number of spaces) ``` Basically, our CLI is an interface to `ast.dump` + `ast.parse`, `ast.parse`. But, `ast.parse` has several important options that are missing right now. I propose to add them: - `--feature-version` - and `--optimize` from `parse` - `--show-empty` from `dump` Docs: - https://docs.python.org/3/library/ast.html#ast.parse - https://docs.python.org/3/library/ast.html#ast.dump cc @donBarbos, will you be interested in working on this issue? If not, please, tell me about that - I want to have this in 3.14 and the feature freeze is in several days. <!-- gh-linked-prs --> ### Linked PRs * gh-133369 <!-- /gh-linked-prs -->
2b4e2b78303197dea9d3ffecfc0423fa09edf71f
5c245ffce71b5a23e0022bb5d1eaf645fe96ddbb
python/cpython
python__cpython-133364
# cmd.Cmd fails tab completion for lines beginning with `! ` (bang space) # Bug report ### Bug description: As noted in https://github.com/python/cpython/issues/133351#issuecomment-2848895066 PDB allows commands that start with `!`, but Cmd fails to tab complete them if there's a space after the `!`, because it falls down this code path: https://github.com/python/cpython/blob/2bc836523105a2197a1f987cc03911bece74b35e/Lib/cmd.py#L274-L280 which expects `cmd` to always be a string, but `parsecmd` is returning `None` instead when the line starts with `!` and `do_shell` is not defined. ### CPython versions tested on: CPython main branch ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133364 <!-- /gh-linked-prs -->
1d9406e426d95eb088e4a474fccf294cc106b2b6
3b4333583fb98e7d85a4cc47948da540b54281bd
python/cpython
python__cpython-133424
# the order of dict isn't documented in an example # Documentation I am reading the documentation of [dictionary](https://docs.python.org/3.14/library/stdtypes.html#mapping-types-dict). There is an example ```python >>> a = dict(one=1, two=2, three=3) >>> b = {'one': 1, 'two': 2, 'three': 3} >>> c = dict(zip(['one', 'two', 'three'], [1, 2, 3])) >>> d = dict([('two', 2), ('one', 1), ('three', 3)]) >>> e = dict({'three': 3, 'one': 1, 'two': 2}) >>> f = dict({'one': 1, 'three': 3}, two=2) >> a == b == c == d == e == f True ``` For new users, they might not know that the dictionary is unorderd in 3.7+ (not everyone reads [data model](https://docs.python.org/3.14/reference/datamodel.html#dictionaries) before reading this). So they might feel confused and think `{one: 1, two: 2}` shoudn't be equal to `{two:2, one:1}`. Maybe we could link date model for explaning. <!-- gh-linked-prs --> ### Linked PRs * gh-133424 * gh-133620 * gh-133621 <!-- /gh-linked-prs -->
61ac88c06e0286cfc6465a47552d41b7dd7e083e
79b8a32fcb30b2c6549bacecdc7081ebd50d6e17
python/cpython
python__cpython-133350
# Auto-indent for pdb's multi-line mode # Feature or enhancement ### Proposal: PyREPL has a nice auto-indent when working on a multiline code. We can't fully utilize that on pdb yet, but we can do something similar. Basically we can achieve this: ```python (Pdb) def f(): ... <auto-indent> ... <same-indent> ``` The only thing that we can't do as good as PyREPL is to intercept backspace and remove a full indent instead of a space - I think this would be a bit too complicated and nor worth it. Overall I believe this gives users a better experience. ### Has this already been discussed elsewhere? This is a minor feature, which does not need previous discussion elsewhere ### Links to previous discussion of this feature: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133350 <!-- /gh-linked-prs -->
0eeaa0ef8bf60fd3b1448a615b6b1662d558990e
4ac916ae33b962cb6b4f8849556403594b22a7f2
python/cpython
python__cpython-133347
# Theming support for _colorize As mentioned in #131507 and #130645, theming support is an important piece of the puzzle in introducing color to Python output in the terminal. ## Design goals ### Simplicity of use with type safety It should be as easy to use theming as to operate with colors by hand. ### User configurability through $PYTHONSTARTUP It should be trivially possible for the user to set up their own favorite colors in their `$PYTHONSTARTUP` script. ### Theme exchange through PyPI It should be possible for the user to `pip install theme-something` and `set_theme(theme_something.theme)` in their `$PYTHONSTARTUP` and be done with it. ### Forward-compatibility of old themes It should be possible for the user to keep using a theme from 3.14 in future versions of Python without changes. The new color definitions would be automatically taken from the default theme. ### Immutability of theme objects It should be impossible for user code to modify the default theme in place as this can lead to inconsistencies. ## Implementation ### Types The `_colorize` module contains a `Theme` dataclass, which groups theme sections together. It's immutable. Each theme section corresponds to a theming use case, like the REPL or Argparse. Each theme section is its own dataclass as it will contain keys unique to the use case. Every theme section is also immutable. For convenience, each theme section inherits from a `ThemeSection` mixin that provides the theme section with the capability to create a colorless variant or a copy with only some keys modified. The `_colorize` module also exposes a `default_theme` and `theme_no_color` globals. Those can be copied to create derivative themes. ### Using themes in stdlib code Python standard libraries using color themes should be using the `get_theme()` function exclusively. This function will return the currently configured theme. If the end user disabled colors or stdout is not a TTY, the returned theme will contain empty strings for every theme section key. This allows the standard library using color themes to program assuming colors everywhere, and they will turn into no-ops in environments where color should not be emitted. Implementations can optionally also directly call `can_colorize()` to avoid costly color-specific operations like parsing source code to syntax highlight it. Importantly, standard libraries should never cache output of `get_theme()` and `can_colorize()` as those values can change during the execution of the program: * the end user can switch out a theme after your standard library was already imported; * they can switch out a theme in the interactive shell or through PDB; * `can_colorize()` might return a different answer if `os.environ` changes or the console mode changes (possible on Windows). ## Configuration The end user can import `_colorize` in their `$PYTHONSTARTUP` script and use `set_theme()` to set it to a new value. This new value can be: * a theme created in-place using regular dataclass instantiation and the convenience `.copy_with()` methods; * a theme imported from another module, possibly installed from PyPI. In non-interactive use of Python, the `$PYTHONSTARTUP` file is not executed. For such use cases, customizing the theme can be achieved through a `sitecustomize` or a `usercustomize` module. ## Rejected Ideas ### Introduce a new configuration file There are already too many configuration files. Given Python's extensible nature, a format like TOML or INI would become insufficient. This would require a lengthy discussion, in which time no theming support would be available to users at all. ### Use simple dictionaries This is easier to implement but makes type-checking harder, allows user code to override color codes at will (which can lead to broken terminal output), and provides less conveniences for creating derivative themes from the default one. ### Introduce a theme like `$LS_COLORS` to `$PYTHON_COLORS` Since there are many theming sections, the resulting string format would have to be very human-unfriendly. Setting it would affect Python-based applications that might want to handle theming themselves. Priority would be unclear. ## Open issues ### Rename `_colorize` to `colorize` There's frankly very little time for this before Python 3.14 beta 1. I would rather keep the library name underscored for 3.14 and gather feedback from the community on the format and behavior, and introduce a stable API in Python 3.15, keeping `_colorize` for backward compatibility. <!-- gh-linked-prs --> ### Linked PRs * gh-133347 <!-- /gh-linked-prs -->
f610bbdf74ea580b14353c6bfd08fd00bcbfa11e
9cc77aaf9dce6ffa82786dc77f7f83387c857cad
python/cpython
python__cpython-133444
# Remove option "-J" from cmdline docs # Documentation File `Doc/using/cmdline.rst` mentions **Options you shouldn’t use**: ```rst Options you shouldn't use ~~~~~~~~~~~~~~~~~~~~~~~~~ .. option:: -J Reserved for use by Jython_. .. _Jython: https://www.jython.org/ ``` Option `-J` was added in Python 2.6. Since all Jython related things are being removed, I'd suggest to remove reference to this option from the docs as well. * #99482 <!-- gh-linked-prs --> ### Linked PRs * gh-133444 * gh-133821 * gh-133855 <!-- /gh-linked-prs -->
4c56563f7aaed8548b604b28d65ebdbcecde7a16
c336f1c3126203fd6c38050df94e9fe8c0d7f2e2
python/cpython
python__cpython-133314
# add \z as a synonym for \Z in Python REs for standardization # Feature or enhancement ### Proposal: Hello - I’m with the Austin Common Standards Revision Group - the joint technical working group established to develop and maintain the core open systems interfaces that are the POSIX™ 1003.1 (and former 1003.2) standards, ISO/IEC 9945, and the core of the Single UNIX Specification. We have had a request to unify/rationalize the regex behaviors for “anchor at string beginning” (^ is the closest in POSIX) and “anchor at string end” ($ is the closest in POSIX). A [description of this problem in depth can be found here](https://www.austingroupbugs.net/view.php?id=1919) and a [table that scopes the varied solutions across varying languages can be found here](https://best.openssf.org/Correctly-Using-Regular-Expressions). Our working group has come to the conclusion that \A and \z are widely implemented across many ecosystems and are the most “standard” solution to the issue. We are asking if the Python community would consider adding “\z” as a synonym for “\Z” in their regex lexicon. ### Has this already been discussed elsewhere? I have already discussed this feature proposal on Discourse ### Links to previous discussion of this feature: https://discuss.python.org/t/proposal-add-z-as-a-synonym-for-z-in-python-res-for-standardization/90378/1 <!-- gh-linked-prs --> ### Linked PRs * gh-133314 * gh-133337 * gh-133338 <!-- /gh-linked-prs -->
ac56f8cc8d36ed65228d7eaa245569f66ad16d2b
fe44fc4f4351bb4b457c01d94b4ae8b9eda501aa
python/cpython
python__cpython-133328
# test_pack_unpack_roundtrip_for_nans failing on RISC-V buildbot # Bug report ### Bug description: The `test_capi` module's `test_float` are failing on [RISC-V build bot](https://buildbot.python.org/all/?#/builders/1379/builds/2550/) ```python ====================================================================== FAIL: test_pack_unpack_roundtrip_for_nans (test.test_capi.test_float.CAPIFloatTest.test_pack_unpack_roundtrip_for_nans) (data=b'\x7f\x93\x16\x02', size=4, endian=0) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ubuntu/buildarea/3.x.onder-riscv64.installed/build/target/lib/python3.14/test/test_capi/test_float.py", line 216, in test_pack_unpack_roundtrip_for_nans self.assertTrue(math.isnan(value)) ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ AssertionError: False is not true ====================================================================== FAIL: test_pack_unpack_roundtrip_for_nans (test.test_capi.test_float.CAPIFloatTest.test_pack_unpack_roundtrip_for_nans) (data=b'\x7f\x93\x16\x02', size=4, endian=1) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ubuntu/buildarea/3.x.onder-riscv64.installed/build/target/lib/python3.14/test/test_capi/test_float.py", line 216, in test_pack_unpack_roundtrip_for_nans self.assertTrue(math.isnan(value)) ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ AssertionError: False is not true ====================================================================== FAIL: test_pack_unpack_roundtrip_for_nans (test.test_capi.test_float.CAPIFloatTest.test_pack_unpack_roundtrip_for_nans) (data=b'\xff\xd5n\x92', size=4, endian=0) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ubuntu/buildarea/3.x.onder-riscv64.installed/build/target/lib/python3.14/test/test_capi/test_float.py", line 217, in test_pack_unpack_roundtrip_for_nans self.assertEqual(data1, data2) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ AssertionError: b'\xff\xd5n\x92' != b'\x7f\xc0\x00\x00' ====================================================================== FAIL: test_pack_unpack_roundtrip_for_nans (test.test_capi.test_float.CAPIFloatTest.test_pack_unpack_roundtrip_for_nans) (data=b'\xff\xd5n\x92', size=4, endian=1) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ubuntu/buildarea/3.x.onder-riscv64.installed/build/target/lib/python3.14/test/test_capi/test_float.py", line 217, in test_pack_unpack_roundtrip_for_nans self.assertEqual(data1, data2) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ AssertionError: b'\x92n\xd5\xff' != b'\x00\x00\xc0\x7f' ====================================================================== FAIL: test_pack_unpack_roundtrip_for_nans (test.test_capi.test_float.CAPIFloatTest.test_pack_unpack_roundtrip_for_nans) (data=b'\xff\x94\x9e\x8f', size=4, endian=0) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ubuntu/buildarea/3.x.onder-riscv64.installed/build/target/lib/python3.14/test/test_capi/test_float.py", line 216, in test_pack_unpack_roundtrip_for_nans self.assertTrue(math.isnan(value)) ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ AssertionError: False is not true ====================================================================== ``` ### CPython versions tested on: CPython main branch ### Operating systems tested on: Linux <!-- gh-linked-prs --> ### Linked PRs * gh-133328 <!-- /gh-linked-prs -->
f16f06f336ed9e0a2f12a12b26f176cbe831d2b1
84a08f8629dffae355407cc3239c981a2b7a930a
python/cpython
python__cpython-133302
# argparse: make `suggest_on_error` a keyword-only parameter # Feature or enhancement ### Proposal: `argparse.ArgumentParser()` has a lot of parameters, `suggest_on_error` (added in 3.14) was its 15th. https://docs.python.org/3.14/library/argparse.html#argparse.ArgumentParser Many argparse CLIs I see already use keywords for most parameters, but I think we should make these new ones keyword-only, especially for new bools, as a long list of `(..., True, False, True, ...)` is best avoided. Parameter number 16 `color` (added in 3.14) is keyword-only. I suggest we make `suggest_on_error` keyword-only as well. ### Has this already been discussed elsewhere? This is a minor feature, which does not need previous discussion elsewhere ### Links to previous discussion of this feature: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133302 <!-- /gh-linked-prs -->
e6c518d2ebc6080710c8a1688d648bede28dad8d
f2379535fe2d2219b71653782d5e31defd9b5556
python/cpython
python__cpython-135899
# Expose `_PyCriticalSection_BeginMutex` as a public API # Feature or enhancement ### Proposal: It would be helpful to expose `_PyCriticalSection_BeginMutex` as a public API. There are times when one does not have really have a `PyObject`, but still might want to use a critical section. For example, we wanted to use a critical section to protect some initialization code in a C extension module, where we wanted to write something like this: ```c static PyMutex mu; static PyObject* mymodule = nullptr; // It is important that we use a critical section here rather than a regular // PyMutex, say 'M', because we need to avoid the following deadlock: // * thread T1 holds M and calls ImportModule, which attempts to acquire a // critical section C. // * thread T2 holds critical section C and attempts to call this code and // acquire M. // In general, if you're going to hold a lock while calling into Python code, it had better be a critical section. PyCriticalSection cs; _PyCriticalSection_BeginMutex(&cs, &mu); if (!mymodule) { PyObject *m = PyImport_ImportModule("mymodule"); // Importing may have released the critical section, so it is possible // another thread might have populated mymodule. Make sure we clean up after // ourselves in that case. std::swap(mymodule, m); Py_XDECREF(m); } PyCriticalSection_End(&cs); ``` Currently one would have to write something like the following instead: ```c static PyObject object_for_mu; // Not really an object, we just want its mutex. static PyObject* mymodule = nullptr; PyCriticalSection cs; PyCriticalSection_Begin(&cs, &object_for_mu); if (!mymodule) { PyObject *m = PyImport_ImportModule("mymodule"); std::swap(mymodule, m); Py_XDECREF(m); } PyCriticalSection_End(&cs); ``` @colesbury ### Has this already been discussed elsewhere? This is a minor feature, which does not need previous discussion elsewhere ### Links to previous discussion of this feature: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-135899 * gh-136969 * gh-137024 <!-- /gh-linked-prs -->
89c220b93c06059f623e2d232bd54f49be1be22d
f183996eb77fd2d5662c62667298c292c943ebf5
python/cpython
python__cpython-133292
# ctypes pointer set_type doesn't cache when setting _type_ # Bug report In #114314 (3.13) I introduced a regression: `set_type` misuses [`PyType_GetDict`](https://docs.python.org/3/c-api/type.html#c.PyType_GetDict) by modifying it. ```py import ctypes intptr = ctypes.POINTER(ctypes.c_int) print(intptr._type_) # uncomment to hide the issue print(intptr._type_) intptr.set_type(ctypes.c_float) # a bad idea, but, it should set _type_ print(intptr._type_) ``` <!-- gh-linked-prs --> ### Linked PRs * gh-133292 * gh-133295 <!-- /gh-linked-prs -->
2590774c9bb96ec75ca8a13b0c061fcc9db3eb65
df8a02b1e1ad04cda98c69ca84f8777a6a9d4cbd
python/cpython
python__cpython-133340
# Incomplete pathlib Pattern Language ("seq" undefined) # Documentation The [pathlib Pattern Language documentation](https://docs.python.org/3/library/pathlib.html#pattern-language) (notably used by `glob()`) lists a "seq" syntax (`[seq]`), but `seq` remains undefined throughout the page. It would arguably be very useful for new users to have the definition of this sequence at the location above. Thanks! <!-- gh-linked-prs --> ### Linked PRs * gh-133340 * gh-134105 * gh-134106 <!-- /gh-linked-prs -->
ac8df4b5892d2e4bd99731e7d87223a35c238f81
b5febf73b9b049822994b21b8f4ee9443aa2e777
python/cpython
python__cpython-133280
# Use HAS_TARGET in the codegen_addop_j function I think we should assert with `HAS_TARGET` in the definition of the `codegen_addop_j` function rather than using `OPCODE_HAS_JUMP` and `IS_BLOCK_PUSH_OPCODE` directly in the function itself. <!-- gh-linked-prs --> ### Linked PRs * gh-133280 <!-- /gh-linked-prs -->
20f8ed595d176d951a09eba045cd69ca62981b18
2590774c9bb96ec75ca8a13b0c061fcc9db3eb65
python/cpython
python__cpython-133320
# Keep instruction definitions in `bytecodes.c` and `optimizer_bytecodes.c` in sync # Feature or enhancement ### Proposal: Context: https://github.com/python/cpython/pull/132940#discussion_r2060401587 > [...] In fact, it was always my intention to validate it, but if you check out the validation function in Tools/cases_generator/optimizer_generator.py, it says TODO 😉 . I just had no time to get around to do it. This is the TODO: https://github.com/python/cpython/blob/main/Tools/cases_generator/optimizer_generator.py#L33 I already have something somewhat working, will try to open a PR tomorrow :) ### Has this already been discussed elsewhere? This is a minor feature, which does not need previous discussion elsewhere ### Links to previous discussion of this feature: https://github.com/python/cpython/pull/132940#discussion_r2060401587 <!-- gh-linked-prs --> ### Linked PRs * gh-133320 <!-- /gh-linked-prs -->
3f2f59a91dd895cf5cf7b58cf905fc5d5b87a644
5f3d3f2a6c8ddf7a6be340c3f4c696e2a5eb51f0
python/cpython
python__cpython-135337
# Py_Main and Py_RunMain SystemExit documentation does not match actual behavior A few months ago, #8023 added some details to the docs about how `Py_RunMain` determines its exit status. Specifically, it wrote that`Py_RunMain` exits the process on an unhandled `SystemExit`. But this isn't the case, at least not when running via the `pymain_run_module` path (the other paths aren't so clear to me). The relevant code is in `pymain_err_print`, which specifically checks for `SystemExit` in order to avoid passing it to `PyErr_Print`, which is where `exit` would actually be called. My understanding is that `Py_RunMain` was intended for an embedded context, in which case exiting the process is probably not desirable. The docs of `Py_Main` have specified the process exiting behavior for much longer, but right now it looks like both functions share the same implementation. @vstinner @ncoghlan <!-- gh-linked-prs --> ### Linked PRs * gh-135337 * gh-135394 * gh-135395 <!-- /gh-linked-prs -->
b706ff003c536c5bca24dfdd3a8917bffcfa3df1
c87b5b2cb665b6bc413bc3a13cc2d70da14dfd66
python/cpython
python__cpython-133269
# test_frame does crash randomly on Linux (x86-64, ppc64le, s390x) # Crash report Example: https://buildbot.python.org/#/builders/64/builds/9301 ``` test_repr_deep (test.test_frame.FrameLocalsProxyMappingTests.test_repr_deep) ... Fatal Python error: Segmentation fault Current thread 0x00007f2ed21d5400 [python] (most recent call first): File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.lto/build/Lib/unittest/case.py", line 247 in handle File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.lto/build/Lib/unittest/case.py", line 813 in assertRaises File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.lto/build/Lib/test/mapping_tests.py", line 634 in test_repr_deep File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.lto/build/Lib/unittest/case.py", line 615 in _callTestMethod File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.lto/build/Lib/unittest/case.py", line 669 in run File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.lto/build/Lib/unittest/case.py", line 725 in __call__ File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.lto/build/Lib/unittest/suite.py", line 122 in run ... ``` <!-- gh-linked-prs --> ### Linked PRs * gh-133269 * gh-133401 * gh-133431 * gh-133450 <!-- /gh-linked-prs -->
d10bd81b45b9fd066edc6f82675ed4305603c4f4
e5e51bd7f72639be6548c806cc14ea53995bf1b3
python/cpython
python__cpython-134213
# PyUnicode_InternFromString does not immortalize the string as the document claims # Documentation The document for `PyUnicode_InternFromString` currently claimed that ``` CPython implementation detail: Strings interned this way are made immortal. ``` However, testing with simple code like, ```c++ auto v = PyUnicode_InternFromString("abcdefg_aaaaa"); // PyUnicode_InternImmortal(&v); printf("immortalized? %d\n", _Py_IsImmortal(v)); ``` suggests that the returned value is not, which is expected based on the code since it calls `_PyUnicode_InternMortal` rather than `_PyUnicode_InternImmortal`. If a call to the internal API `PyUnicode_InternImmortal` was added (as in the commented out code above), then the string is indeed immortalized. This document was added in https://github.com/python/cpython/pull/121364 but that PR did not change the behavior of this function. AFAICT, `PyUnicode_InternFromString` never immortalize the string ever since it was added in https://github.com/python/cpython/pull/120520. The only public API that ever immortalized the input string appears to be `PyUnicode_InternInPlace` and that was changed in https://github.com/python/cpython/pull/121364 (the one that added the wrong doc) and there doesn't seem to be any public API that immortalize the string anymore. Although this is technically a document issue, I think it might be better to change the behavior of the function instead to match the document. <!-- gh-linked-prs --> ### Linked PRs * gh-134213 * gh-134883 * gh-134884 <!-- /gh-linked-prs -->
4109a9c6b33faa0032ffc95d96cd0db482af3ce2
cafbcd666a7488e9f72553708350b7091dc913fd
python/cpython
python__cpython-133268
# Make the python.sh script more discoverable # Feature or enhancement ### Proposal: (As discussed offline with @brettcannon)... It might be helpful to display the path to the `python.sh` script after a successful run of `py Tools/wasm/wasi.py make-host`. ### Has this already been discussed elsewhere? This is a minor feature, which does not need previous discussion elsewhere ### Links to previous discussion of this feature: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-133268 <!-- /gh-linked-prs -->
c14134020f44575635e11e4552cefcfd8cdbe22f
a4be3bc34f9d3671e42ef8a301dfbbc9bdac3421
python/cpython
python__cpython-133262
# Trying to ./python -m test -R: test_index crashes with a failed assertion # Bug report ### Bug description: ``` ❯ ./configure --with-pydebug ❯ make ❯ ./python.exe -m test -R: test_index Using random seed: 2250434908 0:00:00 load avg: 4.79 Run 1 test sequentially in a single process 0:00:00 load avg: 4.79 [1/1] test_index beginning 9 repetitions. Showing number of leaks (. for 0 or less, X for 10 or more) 12345:6789 XAssertion failed: (!_PyErr_Occurred(tstate)), function _PyEval_EvalFrameDefault, file generated_cases.c.h, line 12425. Fatal Python error: Aborted Current thread 0x000000020f324c80 (most recent call first): File "/Volumes/RAMDisk/cpython/Lib/test/test_index.py", line 7 in __index__ File "/Volumes/RAMDisk/cpython/Lib/test/test_index.py", line 216 in __getitem__ File "/Volumes/RAMDisk/cpython/Lib/test/test_index.py", line 158 in <lambda> File "/Volumes/RAMDisk/cpython/Lib/unittest/case.py", line 247 in handle File "/Volumes/RAMDisk/cpython/Lib/unittest/case.py", line 813 in assertRaises File "/Volumes/RAMDisk/cpython/Lib/test/test_index.py", line 159 in test_error File "/Volumes/RAMDisk/cpython/Lib/unittest/case.py", line 615 in _callTestMethod File "/Volumes/RAMDisk/cpython/Lib/unittest/case.py", line 669 in run File "/Volumes/RAMDisk/cpython/Lib/unittest/case.py", line 725 in __call__ File "/Volumes/RAMDisk/cpython/Lib/unittest/suite.py", line 122 in run File "/Volumes/RAMDisk/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/Volumes/RAMDisk/cpython/Lib/unittest/suite.py", line 122 in run File "/Volumes/RAMDisk/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/testresult.py", line 148 in run File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/single.py", line 84 in _run_suite File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/single.py", line 42 in run_unittest File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/single.py", line 162 in test_func File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/refleak.py", line 138 in runtest_refleak File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/single.py", line 114 in regrtest_runner File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/single.py", line 165 in _load_run_test File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/single.py", line 210 in _runtest_env_changed_exc File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/single.py", line 319 in _runtest File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/single.py", line 348 in run_single_test File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/main.py", line 389 in run_test File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/main.py", line 419 in run_tests_sequentially File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/main.py", line 561 in _run_tests File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/main.py", line 596 in run_tests File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/main.py", line 768 in main File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/main.py", line 776 in main File "/Volumes/RAMDisk/cpython/Lib/test/__main__.py", line 2 in <module> File "/Volumes/RAMDisk/cpython/Lib/runpy.py", line 88 in _run_code File "/Volumes/RAMDisk/cpython/Lib/runpy.py", line 198 in _run_module_as_main Current thread's C stack trace (most recent call first): Binary file "/Volumes/RAMDisk/cpython/python.exe", at _Py_DumpStack+0x44 [0x102e106a0] Binary file "/Volumes/RAMDisk/cpython/python.exe", at faulthandler_dump_c_stack+0x68 [0x102e2f06c] Binary file "/Volumes/RAMDisk/cpython/python.exe", at faulthandler_fatal_error+0x204 [0x102e2ee78] Binary file "/usr/lib/system/libsystem_platform.dylib", at _sigtramp+0x38 [0x1a048b624] Binary file "/usr/lib/system/libsystem_pthread.dylib", at pthread_kill+0x128 [0x1a045188c] Binary file "/usr/lib/system/libsystem_c.dylib", at abort+0x7c [0x1a035ac60] Binary file "/usr/lib/system/libsystem_c.dylib", at err+0x0 [0x1a0359eec] Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyEval_EvalFrameDefault+0x3cdc0 [0x102d20568] Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyEval_EvalFrame+0x3c [0x102ce3500] Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyEval_Vector+0x228 [0x102ce3448] Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyFunction_Vectorcall+0x13c [0x102af23f8] Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyObject_VectorcallTstate+0x13c [0x102bdd44c] Binary file "/Volumes/RAMDisk/cpython/python.exe", at vectorcall_unbound+0x70 [0x102bdd620] Binary file "/Volumes/RAMDisk/cpython/python.exe", at vectorcall_method+0xbc [0x102bdb5e8] Binary file "/Volumes/RAMDisk/cpython/python.exe", at slot_nb_index+0x44 [0x102bf3944] Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyNumber_Index+0xb8 [0x102ac49bc] Binary file "/Volumes/RAMDisk/cpython/python.exe", at PyNumber_AsSsize_t+0x1c [0x102ac07c0] Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyEval_SliceIndex+0x50 [0x102d285ec] Binary file "/Volumes/RAMDisk/cpython/python.exe", at PySlice_Unpack+0x124 [0x102bc6c80] Binary file "/Volumes/RAMDisk/cpython/python.exe", at list_slice_subscript+0xb0 [0x102b41ddc] Binary file "/Volumes/RAMDisk/cpython/python.exe", at list_subscript+0xc4 [0x102b49070] Binary file "/Volumes/RAMDisk/cpython/python.exe", at PyObject_GetItem+0x78 [0x102ac0524] Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyEval_EvalFrameDefault+0x4f4 [0x102ce3c9c] Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyEval_EvalFrame+0x3c [0x102ce3500] Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyEval_Vector+0x228 [0x102ce3448] Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyFunction_Vectorcall+0x13c [0x102af23f8] Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyObject_VectorcallTstate+0x13c [0x102bdd44c] Binary file "/Volumes/RAMDisk/cpython/python.exe", at vectorcall_unbound+0x70 [0x102bdd620] Binary file "/Volumes/RAMDisk/cpython/python.exe", at vectorcall_method+0xbc [0x102bdb5e8] Binary file "/Volumes/RAMDisk/cpython/python.exe", at slot_mp_subscript+0x50 [0x102bf3fe0] Binary file "/Volumes/RAMDisk/cpython/python.exe", at PyObject_GetItem+0x78 [0x102ac0524] Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyEval_EvalFrameDefault+0x4d80 [0x102ce8528] <truncated rest of calls> Extension modules: _testinternalcapi (total: 1) ``` Platforms reproduced: - Windows 11 AMD64 - macOS Sequoia 15.4.1 M1 Max - Ubuntu 22.04 M1 Max The crash is present on ad2f0884b16e6af4087ba078d2255d4c81ae8e96 (latest main at time of writing). Currently bisecting. ### CPython versions tested on: CPython main branch ### Operating systems tested on: macOS <!-- gh-linked-prs --> ### Linked PRs * gh-133262 <!-- /gh-linked-prs -->
a4be3bc34f9d3671e42ef8a301dfbbc9bdac3421
d10bd81b45b9fd066edc6f82675ed4305603c4f4
python/cpython
python__cpython-133257
# GCC 15 warnings: destination lacks 'nonstring' attribute Building Python 3.14 (main branch) with GCC 15 (on Fedora 42) emits the following compiler warnings: ``` In file included from ./Include/internal/pycore_runtime_structs.h:68, from ./Include/internal/pycore_runtime.h:11, from ./Include/internal/pycore_object.h:15, from ./Include/internal/pycore_dict.h:11, from Python/pylifecycle.c:9: ./Include/internal/pycore_debug_offsets.h:12:26: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (9 chars into 8 available) [-Wunterminated-string-initialization] 12 | #define _Py_Debug_Cookie "xdebugpy" | ^~~~~~~~~~ ./Include/internal/pycore_debug_offsets.h:225:15: note: in definition of macro '_Py_DebugOffsets_INIT' 225 | .cookie = debug_cookie, \ | ^~~~~~~~~~~~ Python/pylifecycle.c:114:3: note: in expansion of macro '_PyRuntimeState_INIT' 114 | = _PyRuntimeState_INIT(_PyRuntime, _Py_Debug_Cookie); | ^~~~~~~~~~~~~~~~~~~~ Python/pylifecycle.c:114:36: note: in expansion of macro '_Py_Debug_Cookie' 114 | = _PyRuntimeState_INIT(_PyRuntime, _Py_Debug_Cookie); | ^~~~~~~~~~~~~~~~ ./Modules/fcntlmodule.c:27:36: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (9 chars into 8 available) [-Wunterminated-string-initialization] 27 | static const char guard[GUARDSZ] = "\x00\xfa\x69\xc4\x67\xa3\x6c\x58"; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` <!-- gh-linked-prs --> ### Linked PRs * gh-133257 * gh-135135 <!-- /gh-linked-prs -->
e26bafd107aa86a4bdd6051848640f36a56d0efb
ad2f0884b16e6af4087ba078d2255d4c81ae8e96
python/cpython
python__cpython-133305
# Race in linecache under free-threading # Bug report ### Bug description: There is a time of check to time of use race under free-threading in linecache.py implementation: https://github.com/python/cpython/blob/ed039b801d66736f22508c71b258b8ace0c15ef4/Lib/linecache.py#L128-L129 Here are two reproducers: one with linecache and second with traceback (a similar usage was originally seen in JAX CI) 1) Reproducer with linecache ```python import linecache import concurrent.futures import threading if __name__ == "__main__": num_workers = 20 num_runs = 100 values = range(10, 15) for i in values: with open(f"test_{i}.py", "w") as h: h.write("import time\n") h.write("import system\n") barrier = threading.Barrier(num_workers) def closure(): barrier.wait() for _ in range(num_runs): for name in values: linecache.getline(f"test_{name}.py", 1) with concurrent.futures.ThreadPoolExecutor(max_workers=num_workers) as executor: futures = [] for i in range(num_workers): futures.append(executor.submit(closure)) assert len(list(f.result() for f in futures)) == num_workers ``` This gives: ``` Traceback (most recent call last): File "/project/playground/cpython_checks/linecache_race/repro.py", line 28, in <module> assert len(list(f.result() for f in futures)) == num_workers ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/project/playground/cpython_checks/linecache_race/repro.py", line 28, in <genexpr> assert len(list(f.result() for f in futures)) == num_workers ~~~~~~~~^^ File "/tmp/cpython-tsan/lib/python3.14t/concurrent/futures/_base.py", line 443, in result return self.__get_result() ~~~~~~~~~~~~~~~~~^^ File "/tmp/cpython-tsan/lib/python3.14t/concurrent/futures/_base.py", line 395, in __get_result raise self._exception File "/tmp/cpython-tsan/lib/python3.14t/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/tmp/cpython-tsan/lib/python3.14t/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/project/playground/cpython_checks/linecache_race/repro.py", line 22, in closure linecache.getline(f"test_{name}.py", 1) ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/cpython-tsan/lib/python3.14t/linecache.py", line 26, in getline lines = getlines(filename, module_globals) File "/tmp/cpython-tsan/lib/python3.14t/linecache.py", line 39, in getlines return cache[filename][2] ~~~~~^^^^^^^^^^ KeyError: 'test_11.py' ``` 2) Reproducer with traceback: ``` import traceback import concurrent.futures import threading if __name__ == "__main__": num_workers = 20 num_runs = 100 barrier = threading.Barrier(num_workers) def closure(): # import test_10 barrier.wait() for _ in range(num_runs): try: raise RuntimeError("STOP") except RuntimeError as e: tb = traceback.extract_stack(e.__traceback__.tb_frame) with concurrent.futures.ThreadPoolExecutor(max_workers=num_workers) as executor: futures = [] for i in range(num_workers): futures.append(executor.submit(closure)) assert len(list(f.result() for f in futures)) == num_workers ``` Gives the output: ``` Traceback (most recent call last): File "/project/playground/cpython_checks/linecache_race/repro_traceback.py", line 36, in closure raise RuntimeError("STOP") RuntimeError: STOP During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/project/playground/cpython_checks/linecache_race/repro_traceback.py", line 44, in <module> assert len(list(f.result() for f in futures)) == num_workers ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/project/playground/cpython_checks/linecache_race/repro_traceback.py", line 44, in <genexpr> assert len(list(f.result() for f in futures)) == num_workers ~~~~~~~~^^ File "/tmp/cpython-tsan/lib/python3.14t/concurrent/futures/_base.py", line 443, in result return self.__get_result() ~~~~~~~~~~~~~~~~~^^ File "/tmp/cpython-tsan/lib/python3.14t/concurrent/futures/_base.py", line 395, in __get_result raise self._exception File "/tmp/cpython-tsan/lib/python3.14t/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/tmp/cpython-tsan/lib/python3.14t/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/project/playground/cpython_checks/linecache_race/repro_traceback.py", line 38, in closure tb = traceback.extract_stack(e.__traceback__.tb_frame) File "/tmp/cpython-tsan/lib/python3.14t/traceback.py", line 264, in extract_stack stack = StackSummary.extract(walk_stack(f), limit=limit) File "/tmp/cpython-tsan/lib/python3.14t/traceback.py", line 457, in extract return klass._extract_from_extended_frame_gen( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ extended_frame_gen(), limit=limit, lookup_lines=lookup_lines, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ capture_locals=capture_locals) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/cpython-tsan/lib/python3.14t/traceback.py", line 508, in _extract_from_extended_frame_gen f.line File "/tmp/cpython-tsan/lib/python3.14t/traceback.py", line 377, in line self._set_lines() ~~~~~~~~~~~~~~~^^ File "/tmp/cpython-tsan/lib/python3.14t/traceback.py", line 355, in _set_lines line = linecache.getline(self.filename, lineno).rstrip() ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/cpython-tsan/lib/python3.14t/linecache.py", line 26, in getline lines = getlines(filename, module_globals) File "/tmp/cpython-tsan/lib/python3.14t/linecache.py", line 42, in getlines return updatecache(filename, module_globals) File "/tmp/cpython-tsan/lib/python3.14t/linecache.py", line 129, in updatecache if len(cache[filename]) != 1: ~~~~~^^^^^^^^^^ KeyError: '/tmp/cpython-tsan/lib/python3.14t/concurrent/futures/thread.py' ``` Context: failure in JAX CI, https://github.com/jax-ml/jax/actions/runs/14770168501/job/41468833801#step:18:4022 @hawkinsp ### CPython versions tested on: CPython main branch ### Operating systems tested on: Linux <!-- gh-linked-prs --> ### Linked PRs * gh-133305 <!-- /gh-linked-prs -->
8054184f9f32c7ba561e6e23b358074824e4928d
6d5a8c2ec19f1c38b4558940d2444a7382bb0287
python/cpython
python__cpython-133233
# Add JIT utilities in `sys._jit` # Feature or enhancement ...as discussed in https://discuss.python.org/t/an-api-for-controlling-and-introspecting-the-jit/73356. This will include (for 3.14): - `sys._jit.is_available() -> bool`: Return `True` if the current Python executable supports JIT compilation, and `False` otherwise. - `sys._jit.is_enabled() -> bool`: Return `True` if JIT compilation is enabled for the current Python process (implies `sys._jit.is_available()`), and `False` otherwise. - `sys._jit.is_active() -> bool`: Return `True` if the topmost Python frame is currently executing JIT code, and `False` otherwise. <!-- gh-linked-prs --> ### Linked PRs * gh-133233 * gh-133287 * gh-133539 <!-- /gh-linked-prs -->
b1aa515bd6b645202eda4ca07e85d92e19b1534d
f9b22bb79d8a233380bc5eb3820bf846404a7258
python/cpython
python__cpython-133215
# PEP 750: Improve `TemplateIter` tests # Bug report Right now there are some test that ensure that `t` string can be iterated over. But, we never test `TemplateIter` behavior in detail. I propose to add several test that this type behaves how we expect it to. <!-- gh-linked-prs --> ### Linked PRs * gh-133215 <!-- /gh-linked-prs -->
0e21ed7c09c687d62d6bf054022e66bccd1fa2bc
94b4fcd806e7b692955173d309ea3b70a193ad96
python/cpython
python__cpython-133212
# PEP750: test that `Template` and `Interpolation` types are final # Bug report They should be final, because a lot of places use `_PyInterpolation_CheckExact` and `_PyTemplate_CheckExact`. And they are final right now, we just need to test this. I have a PR ready. @lysnikolaou sorry that I am finding this issues just now, but it is better late than never :) <!-- gh-linked-prs --> ### Linked PRs * gh-133212 <!-- /gh-linked-prs -->
f7264ddea0ceea7eaf26d7b4b6aa7a144649e214
cc39b19f0fca8db0f881ecaf02f88d72d9f93776
python/cpython
python__cpython-133202
# Improve error message for strings with conflicting prefixes # Feature or enhancement Right now it is: ```python >>> ft'a' File "<python-input-3>", line 1 ft'a' ^^^ SyntaxError: invalid syntax ``` I propose: ```python >>> ft'a' File "<python-input-3>", line 1 ft'a' ^^^ SyntaxError: can't use both "f" and "t" prefixes for strings at the same time ``` cc @lysnikolaou I am working on the issue :) <!-- gh-linked-prs --> ### Linked PRs * gh-133202 * gh-133242 <!-- /gh-linked-prs -->
b451516aa69df357af829c6a9f773fb51862b5b8
c78216e42c7548f148708fc08cfefbcda9b3ae01
python/cpython
python__cpython-133202
# PEP 750 changes do no guard for usage with older versions like `ast.parse(t'', feature_version=(3, 13))` # Bug report Example: ```python >>> code = 't""' >>> import ast >>> ast.parse(code, feature_version=(3, 8)) Module(body=[Expr(value=TemplateStr(values=[]))], type_ignores=[]) ``` I would like to work on the fix. <!-- gh-linked-prs --> ### Linked PRs * gh-133202 * gh-133225 <!-- /gh-linked-prs -->
b451516aa69df357af829c6a9f773fb51862b5b8
c78216e42c7548f148708fc08cfefbcda9b3ae01
python/cpython
python__cpython-133195
# PEP 758 changes do not have `CHECK_VERSION` guard for usage with `ast.parse(..., feature_version=(3, 13))` # Bug report Right now this test passes: ```python def test_pep758_except_without_parens(self): code = textwrap.dedent(""" try: ... except ValueError, TypeError: ... """) ast.parse(code, feature_version=(3, 14)) with self.assertRaises(SyntaxError): ast.parse(code, feature_version=(3, 13)) ``` But, it should not pass. I have a PR ready. <!-- gh-linked-prs --> ### Linked PRs * gh-133195 * gh-133289 <!-- /gh-linked-prs -->
b1f893875bbbb37bdbc440886d464690999f6e3a
44e4c479fbf2c28605bd39303b1ce484753f6177