From 0f78d2c2783ea08619106f3134e0c0f2b4f99a2d Mon Sep 17 00:00:00 2001 From: Christian Grasser Date: Fri, 22 May 2026 10:46:20 +0200 Subject: [PATCH] update to python 3.14.5 --- .github/workflows/CI_build.yml | 6 +- PythonLib/full/_pyrepl/reader.py | 1 + PythonLib/full/_pyrepl/unix_console.py | 1 - PythonLib/full/annotationlib.py | 36 +- PythonLib/full/argparse.py | 2 +- PythonLib/full/asyncio/__main__.py | 12 +- PythonLib/full/asyncio/windows_utils.py | 3 +- PythonLib/full/configparser.py | 17 +- PythonLib/full/dataclasses.py | 26 +- PythonLib/full/email/_header_value_parser.py | 15 +- PythonLib/full/email/generator.py | 2 +- PythonLib/full/email/quoprimime.py | 2 +- PythonLib/full/ensurepip/__init__.py | 2 +- ...ne-any.whl => pip-26.1.1-py3-none-any.whl} | Bin 1787723 -> 1812777 bytes PythonLib/full/http/client.py | 11 +- PythonLib/full/http/cookies.py | 8 +- .../full/idlelib/idle_test/test_squeezer.py | 1 + PythonLib/full/inspect.py | 2 +- PythonLib/full/json/tool.py | 3 +- PythonLib/full/multiprocessing/connection.py | 7 +- PythonLib/full/multiprocessing/popen_fork.py | 12 +- .../full/multiprocessing/resource_tracker.py | 89 ++- PythonLib/full/pdb.py | 4 + PythonLib/full/pickle.py | 12 +- PythonLib/full/pydoc_data/module_docs.py | 2 +- PythonLib/full/pydoc_data/topics.py | 23 +- PythonLib/full/random.py | 17 +- PythonLib/full/runpy.py | 25 +- PythonLib/full/shutil.py | 24 +- PythonLib/full/smtplib.py | 2 +- PythonLib/full/socket.py | 28 +- PythonLib/full/timeit.py | 2 +- PythonLib/full/typing.py | 4 + PythonLib/full/urllib/robotparser.py | 209 ++++--- PythonLib/full/uuid.py | 10 +- .../full/venv/scripts/common/Activate.ps1 | 514 +++++++++--------- PythonLib/full/webbrowser.py | 5 +- PythonLib/full/zipfile/__init__.py | 21 +- PythonLib/full_dll/_asyncio.pyd | Bin 68440 -> 68320 bytes PythonLib/full_dll/_bz2.pyd | Bin 84312 -> 83328 bytes PythonLib/full_dll/_ctypes.pyd | Bin 126808 -> 126688 bytes PythonLib/full_dll/_decimal.pyd | Bin 250200 -> 250080 bytes PythonLib/full_dll/_elementtree.pyd | Bin 124760 -> 124640 bytes PythonLib/full_dll/_hashlib.pyd | Bin 55128 -> 54144 bytes PythonLib/full_dll/_lzma.pyd | Bin 148824 -> 148704 bytes PythonLib/full_dll/_multiprocessing.pyd | Bin 33624 -> 33504 bytes PythonLib/full_dll/_overlapped.pyd | Bin 47448 -> 46464 bytes PythonLib/full_dll/_queue.pyd | Bin 32088 -> 31968 bytes PythonLib/full_dll/_remote_debugging.pyd | Bin 71000 -> 77696 bytes PythonLib/full_dll/_socket.pyd | Bin 77144 -> 77024 bytes PythonLib/full_dll/_sqlite3.pyd | Bin 104792 -> 103808 bytes PythonLib/full_dll/_ssl.pyd | Bin 164184 -> 164064 bytes PythonLib/full_dll/_uuid.pyd | Bin 26456 -> 25472 bytes PythonLib/full_dll/_wmi.pyd | Bin 35672 -> 34688 bytes PythonLib/full_dll/_zoneinfo.pyd | Bin 45400 -> 45280 bytes PythonLib/full_dll/_zstd.pyd | Bin 416600 -> 416480 bytes PythonLib/full_dll/libcrypto-3.dll | Bin 3505520 -> 3508472 bytes PythonLib/full_dll/libssl-3.dll | Bin 639856 -> 639736 bytes PythonLib/full_dll/pyexpat.pyd | Bin 193880 -> 193408 bytes PythonLib/full_dll/select.pyd | Bin 30552 -> 30432 bytes PythonLib/full_dll/sqlite3.dll | Bin 1297240 -> 1297120 bytes PythonLib/full_dll/unicodedata.pyd | Bin 749912 -> 748928 bytes PythonLib/full_dll/winsound.pyd | Bin 30544 -> 30432 bytes PythonLib/full_dll_arm64/_asyncio.pyd | Bin 80216 -> 80096 bytes PythonLib/full_dll_arm64/_bz2.pyd | Bin 84816 -> 84704 bytes PythonLib/full_dll_arm64/_ctypes.pyd | Bin 142680 -> 142560 bytes PythonLib/full_dll_arm64/_decimal.pyd | Bin 277848 -> 277728 bytes PythonLib/full_dll_arm64/_elementtree.pyd | Bin 138584 -> 138976 bytes PythonLib/full_dll_arm64/_hashlib.pyd | Bin 67416 -> 67296 bytes PythonLib/full_dll_arm64/_lzma.pyd | Bin 151384 -> 151264 bytes PythonLib/full_dll_arm64/_multiprocessing.pyd | Bin 37720 -> 37600 bytes PythonLib/full_dll_arm64/_overlapped.pyd | Bin 55640 -> 55520 bytes PythonLib/full_dll_arm64/_queue.pyd | Bin 35672 -> 35552 bytes .../full_dll_arm64/_remote_debugging.pyd | Bin 79192 -> 88800 bytes PythonLib/full_dll_arm64/_socket.pyd | Bin 86872 -> 86752 bytes PythonLib/full_dll_arm64/_sqlite3.pyd | Bin 133464 -> 133344 bytes PythonLib/full_dll_arm64/_ssl.pyd | Bin 190296 -> 190176 bytes PythonLib/full_dll_arm64/_uuid.pyd | Bin 27992 -> 27872 bytes PythonLib/full_dll_arm64/_wmi.pyd | Bin 40272 -> 40160 bytes PythonLib/full_dll_arm64/_zoneinfo.pyd | Bin 52056 -> 51936 bytes PythonLib/full_dll_arm64/_zstd.pyd | Bin 448344 -> 448224 bytes .../full_dll_arm64/libcrypto-3-arm64.dll | Bin 5938544 -> 5943032 bytes PythonLib/full_dll_arm64/libssl-3-arm64.dll | Bin 1031024 -> 1030904 bytes PythonLib/full_dll_arm64/pyexpat.pyd | Bin 202584 -> 202976 bytes PythonLib/full_dll_arm64/select.pyd | Bin 32088 -> 31968 bytes PythonLib/full_dll_arm64/sqlite3.dll | Bin 1421144 -> 1421024 bytes PythonLib/full_dll_arm64/unicodedata.pyd | Bin 757080 -> 756960 bytes PythonLib/full_dll_arm64/winsound.pyd | Bin 32088 -> 31968 bytes PythonLib/full_dll_arm64/zlib1.dll | Bin 107808 -> 109792 bytes PythonLib/full_dll_x64/_asyncio.pyd | Bin 78160 -> 78048 bytes PythonLib/full_dll_x64/_bz2.pyd | Bin 87896 -> 88288 bytes PythonLib/full_dll_x64/_ctypes.pyd | Bin 142680 -> 142560 bytes PythonLib/full_dll_x64/_decimal.pyd | Bin 291160 -> 290016 bytes PythonLib/full_dll_x64/_elementtree.pyd | Bin 138584 -> 138464 bytes PythonLib/full_dll_x64/_hashlib.pyd | Bin 69464 -> 69344 bytes PythonLib/full_dll_x64/_lzma.pyd | Bin 161112 -> 160992 bytes PythonLib/full_dll_x64/_multiprocessing.pyd | Bin 38744 -> 38624 bytes PythonLib/full_dll_x64/_overlapped.pyd | Bin 58200 -> 58080 bytes PythonLib/full_dll_x64/_queue.pyd | Bin 36696 -> 36576 bytes PythonLib/full_dll_x64/_remote_debugging.pyd | Bin 76632 -> 84704 bytes PythonLib/full_dll_x64/_socket.pyd | Bin 87888 -> 87776 bytes PythonLib/full_dll_x64/_sqlite3.pyd | Bin 132432 -> 132320 bytes PythonLib/full_dll_x64/_ssl.pyd | Bin 184664 -> 184544 bytes PythonLib/full_dll_x64/_uuid.pyd | Bin 28504 -> 28384 bytes PythonLib/full_dll_x64/_wmi.pyd | Bin 40280 -> 40160 bytes PythonLib/full_dll_x64/_zoneinfo.pyd | Bin 52048 -> 51936 bytes PythonLib/full_dll_x64/_zstd.pyd | Bin 503128 -> 503520 bytes PythonLib/full_dll_x64/libcrypto-3.dll | Bin 5231984 -> 5235960 bytes PythonLib/full_dll_x64/libssl-3.dll | Bin 794992 -> 794872 bytes PythonLib/full_dll_x64/pyexpat.pyd | Bin 218968 -> 219360 bytes PythonLib/full_dll_x64/select.pyd | Bin 33624 -> 33504 bytes PythonLib/full_dll_x64/sqlite3.dll | Bin 1584984 -> 1584864 bytes PythonLib/full_dll_x64/unicodedata.pyd | Bin 758616 -> 758496 bytes PythonLib/full_dll_x64/winsound.pyd | Bin 33112 -> 32992 bytes PythonLib/min/annotationlib.py | 36 +- PythonLib/min/argparse.py | 2 +- PythonLib/min/configparser.py | 17 +- PythonLib/min/dataclasses.py | 26 +- PythonLib/min/inspect.py | 2 +- PythonLib/min/pdb.py | 4 + PythonLib/min/pickle.py | 12 +- PythonLib/min/random.py | 17 +- PythonLib/min/runpy.py | 25 +- PythonLib/min/shutil.py | 24 +- PythonLib/min/smtplib.py | 2 +- PythonLib/min/socket.py | 28 +- PythonLib/min/timeit.py | 2 +- PythonLib/min/typing.py | 4 + PythonLib/min/uuid.py | 10 +- PythonLib/min/webbrowser.py | 5 +- PythonLib/tcl_dll/_tkinter.pyd | Bin 62808 -> 62688 bytes PythonLib/tcl_dll_arm64/_tkinter.pyd | Bin 70488 -> 70368 bytes PythonLib/tcl_dll_arm64/tcl86t.dll | Bin 1821464 -> 1823456 bytes PythonLib/tcl_dll_arm64/tk86t.dll | Bin 1521952 -> 1523936 bytes PythonLib/tcl_dll_x64/_tkinter.pyd | Bin 69464 -> 69344 bytes PythonScript/project/PythonSettings.props | 6 +- PythonScript/project/packages.config | 6 +- appveyor.yml | 6 +- 138 files changed, 849 insertions(+), 545 deletions(-) rename PythonLib/full/ensurepip/_bundled/{pip-26.0.1-py3-none-any.whl => pip-26.1.1-py3-none-any.whl} (73%) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index 9b04c85a6..5d066cc5c 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -44,9 +44,9 @@ jobs: if: matrix.build_configuration == 'Release' working-directory: installer run: | - $env:PYTHONBUILDDIR_ARM64='${{ github.workspace }}\packages\pythonarm64.3.14.4\tools' - $env:PYTHONBUILDDIR_X64='${{ github.workspace }}\packages\python.3.14.4\tools' - $env:PYTHONBUILDDIR='${{ github.workspace }}\packages\pythonx86.3.14.4\tools' + $env:PYTHONBUILDDIR_ARM64='${{ github.workspace }}\packages\pythonarm64.3.14.5\tools' + $env:PYTHONBUILDDIR_X64='${{ github.workspace }}\packages\python.3.14.5\tools' + $env:PYTHONBUILDDIR='${{ github.workspace }}\packages\pythonx86.3.14.5\tools' Rename-Item -Path ".\buildPaths.bat.orig" -NewName "buildPaths.bat" dotnet tool install --global wix --version 7.0.0 .\buildAll.bat ${{ matrix.build_platform }} diff --git a/PythonLib/full/_pyrepl/reader.py b/PythonLib/full/_pyrepl/reader.py index 9ab92f64d..f0116e742 100644 --- a/PythonLib/full/_pyrepl/reader.py +++ b/PythonLib/full/_pyrepl/reader.py @@ -644,6 +644,7 @@ def update_screen(self) -> None: def refresh(self) -> None: """Recalculate and refresh the screen.""" + self.console.height, self.console.width = self.console.getheightwidth() # this call sets up self.cxy, so call it first. self.screen = self.calc_screen() self.console.refresh(self.screen, self.cxy) diff --git a/PythonLib/full/_pyrepl/unix_console.py b/PythonLib/full/_pyrepl/unix_console.py index 937b5df6f..639d16db3 100644 --- a/PythonLib/full/_pyrepl/unix_console.py +++ b/PythonLib/full/_pyrepl/unix_console.py @@ -776,7 +776,6 @@ def __move_tall(self, x, y): self.__write_code(self._cup, y - self.__offset, x) def __sigwinch(self, signum, frame): - self.height, self.width = self.getheightwidth() self.event_queue.insert(Event("resize", None)) def __hide_cursor(self): diff --git a/PythonLib/full/annotationlib.py b/PythonLib/full/annotationlib.py index 9fee25641..5c9a08126 100644 --- a/PythonLib/full/annotationlib.py +++ b/PythonLib/full/annotationlib.py @@ -47,6 +47,7 @@ class Format(enum.IntEnum): "__cell__", "__owner__", "__stringifier_dict__", + "__resolved_str_cache__", ) @@ -94,6 +95,7 @@ def __init__( # value later. self.__code__ = None self.__ast_node__ = None + self.__resolved_str_cache__ = None def __init_subclass__(cls, /, *args, **kwds): raise TypeError("Cannot subclass ForwardRef") @@ -113,7 +115,7 @@ def evaluate( """ match format: case Format.STRING: - return self.__forward_arg__ + return self.__resolved_str__ case Format.VALUE: is_forwardref_format = False case Format.FORWARDREF: @@ -258,6 +260,24 @@ def __forward_arg__(self): "Attempted to access '__forward_arg__' on an uninitialized ForwardRef" ) + @property + def __resolved_str__(self): + # __forward_arg__ with any names from __extra_names__ replaced + # with the type_repr of the value they represent + if self.__resolved_str_cache__ is None: + resolved_str = self.__forward_arg__ + names = self.__extra_names__ + + if names: + visitor = _ExtraNameFixer(names) + ast_expr = ast.parse(resolved_str, mode="eval").body + node = visitor.visit(ast_expr) + resolved_str = ast.unparse(node) + + self.__resolved_str_cache__ = resolved_str + + return self.__resolved_str_cache__ + @property def __forward_code__(self): if self.__code__ is not None: @@ -321,7 +341,7 @@ def __repr__(self): extra.append(", is_class=True") if self.__owner__ is not None: extra.append(f", owner={self.__owner__!r}") - return f"ForwardRef({self.__forward_arg__!r}{''.join(extra)})" + return f"ForwardRef({self.__resolved_str__!r}{''.join(extra)})" _Template = type(t"") @@ -357,6 +377,7 @@ def __init__( self.__cell__ = cell self.__owner__ = owner self.__stringifier_dict__ = stringifier_dict + self.__resolved_str_cache__ = None # Needed for ForwardRef def __convert_to_ast(self, other): if isinstance(other, _Stringifier): @@ -1163,3 +1184,14 @@ def _get_dunder_annotations(obj): if not isinstance(ann, dict): raise ValueError(f"{obj!r}.__annotations__ is neither a dict nor None") return ann + + +class _ExtraNameFixer(ast.NodeTransformer): + """Fixer for __extra_names__ items in ForwardRef __repr__ and string evaluation""" + def __init__(self, extra_names): + self.extra_names = extra_names + + def visit_Name(self, node: ast.Name): + if (new_name := self.extra_names.get(node.id, _sentinel)) is not _sentinel: + node = ast.Name(id=type_repr(new_name)) + return node diff --git a/PythonLib/full/argparse.py b/PythonLib/full/argparse.py index 8cf856943..24f474056 100644 --- a/PythonLib/full/argparse.py +++ b/PythonLib/full/argparse.py @@ -2678,7 +2678,7 @@ def _check_value(self, action, value): if value not in choices: args = {'value': str(value), - 'choices': ', '.join(map(str, action.choices))} + 'choices': ', '.join(repr(str(choice)) for choice in action.choices)} msg = _('invalid choice: %(value)r (choose from %(choices)s)') if self.suggest_on_error and isinstance(value, str): diff --git a/PythonLib/full/asyncio/__main__.py b/PythonLib/full/asyncio/__main__.py index 0e1003580..44e14771b 100644 --- a/PythonLib/full/asyncio/__main__.py +++ b/PythonLib/full/asyncio/__main__.py @@ -98,11 +98,15 @@ def run(self): if not sys.flags.isolated and (startup_path := os.getenv("PYTHONSTARTUP")): sys.audit("cpython.run_startup", startup_path) - - import tokenize - with tokenize.open(startup_path) as f: - startup_code = compile(f.read(), startup_path, "exec") + try: + import tokenize + with tokenize.open(startup_path) as f: + startup_code = compile(f.read(), startup_path, "exec") exec(startup_code, console.locals) + except SystemExit: + raise + except BaseException: + console.showtraceback() ps1 = getattr(sys, "ps1", ">>> ") if CAN_USE_PYREPL: diff --git a/PythonLib/full/asyncio/windows_utils.py b/PythonLib/full/asyncio/windows_utils.py index acd494411..d6393f0b1 100644 --- a/PythonLib/full/asyncio/windows_utils.py +++ b/PythonLib/full/asyncio/windows_utils.py @@ -111,8 +111,9 @@ def fileno(self): def close(self, *, CloseHandle=_winapi.CloseHandle): if self._handle is not None: - CloseHandle(self._handle) + handle = self._handle self._handle = None + CloseHandle(handle) def __del__(self, _warn=warnings.warn): if self._handle is not None: diff --git a/PythonLib/full/configparser.py b/PythonLib/full/configparser.py index d435a5c2f..a53ac8727 100644 --- a/PythonLib/full/configparser.py +++ b/PythonLib/full/configparser.py @@ -315,12 +315,15 @@ def __init__(self, source, *args): def append(self, lineno, line): self.errors.append((lineno, line)) - self.message += '\n\t[line %2d]: %s' % (lineno, repr(line)) + self.message += f'\n\t[line {lineno:2d}]: {line!r}' def combine(self, others): + messages = [self.message] for other in others: - for error in other.errors: - self.append(*error) + for lineno, line in other.errors: + self.errors.append((lineno, line)) + messages.append(f'\n\t[line {lineno:2d}]: {line!r}') + self.message = "".join(messages) return self @staticmethod @@ -613,7 +616,9 @@ class RawConfigParser(MutableMapping): \] # ] """ _OPT_TMPL = r""" - (?P