configure.ac | 2 download.lst | 4 external/python3/ExternalPackage_python3.mk | 22 - external/python3/UnpackedTarball_python3.mk | 2 external/python3/init-sys-streams-cant-initialize-stdin.patch.0 | 6 external/python3/py_deprecated_warning.patch.0 | 20 + external/python3/python-3.3.3-elf-rpath.patch.1 | 4 external/python3/python-3.8-msvc-sdk.patch.1 | 173 ---------- 8 files changed, 45 insertions(+), 188 deletions(-)
New commits: commit b6bc59f2c15f7243e6814510db5ac19a21e5d5c2 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Fri Sep 6 23:28:04 2024 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Tue Feb 4 21:12:54 2025 +0100 Python: upgrade to 3.9.20 Downloaded from: https://www.python.org/ftp/python/3.9.20/Python-3.9.20.tar.xz Change-Id: Ib75d0cd0e92fa56304a43d4b425e961e65d69c98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172981 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Tested-by: Jenkins (cherry picked from commit ccd96054b5c168b032ffa7d0e24513a165fafe54) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181042 Reviewed-by: Andras Timar <andras.ti...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/configure.ac b/configure.ac index 7c6d290eb778..3935201f2c2a 100644 --- a/configure.ac +++ b/configure.ac @@ -10115,7 +10115,7 @@ if test \( "$cross_compiling" = yes -a -z "$PYTHON_FOR_BUILD" \) -o "$enable_pyt SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=9 - PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.19 + PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.20 if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in download.lst]) fi diff --git a/download.lst b/download.lst index 37f7125b82cb..36dfcc69a8b4 100644 --- a/download.lst +++ b/download.lst @@ -658,8 +658,8 @@ POSTGRESQL_TARBALL := postgresql-13.16.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts -PYTHON_SHA256SUM := d4892cd1618f6458cb851208c030df1482779609d0f3939991bd38184f8c679e -PYTHON_TARBALL := Python-3.9.19.tar.xz +PYTHON_SHA256SUM := 6b281279efd85294d2d6993e173983a57464c0133956fbbb5536ec9646beaf0c +PYTHON_TARBALL := Python-3.9.20.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts commit 29b123cf1803e0719178e174a7d0dbde91264718 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Fri Jun 7 14:35:57 2024 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Tue Feb 4 21:12:44 2025 +0100 python3: upgrade to 3.9.19 Downloaded from https://www.python.org/ftp/python/3.9.19/Python-3.9.19.tar.xz * python-3.8-msvc-sdk.patch.1 is no longer needed * Comment out deprecated warnings for now: C:/cygwin64/home/tdf/jenkins/workspace/gerrit_windows/pyuno/source/module/pyuno_util.cxx(42): error C2220: the following warning is treated as an error C:/cygwin64/home/tdf/jenkins/workspace/gerrit_windows/pyuno/source/module/pyuno_util.cxx(42): warning C4996: 'PyUnicode_FromUnicode': deprecated in 3.3 C:/cygwin64/home/tdf/jenkins/workspace/gerrit_windows/pyuno/source/module/pyuno_util.cxx(64): warning C4996: 'PyUnicode_AsUnicode': deprecated in 3.3 Conflicts: configure.ac download.lst Change-Id: Iaa358ffaaea63cf6ec47914759d0469e70e1cc65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168551 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> (cherry picked from commit 19e9e49bdaeebc314c892c000385ec778edf759b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181041 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/configure.ac b/configure.ac index 85a8476948ca..7c6d290eb778 100644 --- a/configure.ac +++ b/configure.ac @@ -10114,8 +10114,8 @@ fi if test \( "$cross_compiling" = yes -a -z "$PYTHON_FOR_BUILD" \) -o "$enable_python" = internal; then SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 - PYTHON_VERSION_MINOR=8 - PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.20 + PYTHON_VERSION_MINOR=9 + PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.19 if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in download.lst]) fi diff --git a/download.lst b/download.lst index 0c4679e5b4ac..37f7125b82cb 100644 --- a/download.lst +++ b/download.lst @@ -658,8 +658,8 @@ POSTGRESQL_TARBALL := postgresql-13.16.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts -PYTHON_SHA256SUM := 6fb89a7124201c61125c0ab4cf7f6894df339a40c02833bfd28ab4d7691fafb4 -PYTHON_TARBALL := Python-3.8.20.tar.xz +PYTHON_SHA256SUM := d4892cd1618f6458cb851208c030df1482779609d0f3939991bd38184f8c679e +PYTHON_TARBALL := Python-3.9.19.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/python3/ExternalPackage_python3.mk b/external/python3/ExternalPackage_python3.mk index 907b0b530c46..775056db220c 100644 --- a/external/python3/ExternalPackage_python3.mk +++ b/external/python3/ExternalPackage_python3.mk @@ -185,11 +185,12 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p LICENSE \ Lib/__future__.py \ Lib/__phello__.foo.py \ + Lib/_aix_support.py \ Lib/_bootlocale.py \ + Lib/_bootsubprocess.py \ Lib/_collections_abc.py \ Lib/_compat_pickle.py \ Lib/_compression.py \ - Lib/_dummy_thread.py \ Lib/_markupbase.py \ Lib/_osx_support.py \ Lib/_py_abc.py \ @@ -235,7 +236,6 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/difflib.py \ Lib/dis.py \ Lib/doctest.py \ - Lib/dummy_threading.py \ Lib/enum.py \ Lib/filecmp.py \ Lib/fileinput.py \ @@ -249,6 +249,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/getpass.py \ Lib/gettext.py \ Lib/glob.py \ + Lib/graphlib.py \ Lib/gzip.py \ Lib/hashlib.py \ Lib/heapq.py \ @@ -381,6 +382,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/asyncio/streams.py \ Lib/asyncio/subprocess.py \ Lib/asyncio/tasks.py \ + Lib/asyncio/threads.py \ Lib/asyncio/transports.py \ Lib/asyncio/trsock.py \ Lib/asyncio/unix_events.py \ @@ -615,7 +617,6 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/encodings/kz1048.py \ Lib/encodings/latin_1.py \ Lib/encodings/mac_arabic.py \ - Lib/encodings/mac_centeuro.py \ Lib/encodings/mac_croatian.py \ Lib/encodings/mac_cyrillic.py \ Lib/encodings/mac_farsi.py \ @@ -670,6 +671,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/importlib/__init__.py \ Lib/importlib/_bootstrap.py \ Lib/importlib/_bootstrap_external.py \ + Lib/importlib/_common.py \ Lib/importlib/abc.py \ Lib/importlib/machinery.py \ Lib/importlib/metadata.py \ @@ -824,6 +826,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/unittest,\ Lib/unittest/__init__.py \ Lib/unittest/__main__.py \ + Lib/unittest/_log.py \ Lib/unittest/async_case.py \ Lib/unittest/case.py \ Lib/unittest/loader.py \ @@ -859,22 +862,22 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p )) $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/xml/dom,\ + Lib/xml/dom/NodeFilter.py \ Lib/xml/dom/__init__.py \ Lib/xml/dom/domreg.py \ Lib/xml/dom/expatbuilder.py \ Lib/xml/dom/minicompat.py \ Lib/xml/dom/minidom.py \ - Lib/xml/dom/NodeFilter.py \ Lib/xml/dom/pulldom.py \ Lib/xml/dom/xmlbuilder.py \ )) $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/xml/etree,\ - Lib/xml/etree/__init__.py \ - Lib/xml/etree/cElementTree.py \ Lib/xml/etree/ElementInclude.py \ Lib/xml/etree/ElementPath.py \ Lib/xml/etree/ElementTree.py \ + Lib/xml/etree/__init__.py \ + Lib/xml/etree/cElementTree.py \ )) $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/xml/parsers,\ @@ -897,6 +900,13 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/xmlrpc/server.py \ )) +$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/zoneinfo,\ + Lib/zoneinfo/__init__.py \ + Lib/zoneinfo/_common.py \ + Lib/zoneinfo/_tzpath.py \ + Lib/zoneinfo/_zoneinfo.py \ +)) + $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/site-packages,\ Lib/site-packages/README.txt \ )) diff --git a/external/python3/UnpackedTarball_python3.mk b/external/python3/UnpackedTarball_python3.mk index 6eaa4ca82784..18981b66c488 100644 --- a/external/python3/UnpackedTarball_python3.mk +++ b/external/python3/UnpackedTarball_python3.mk @@ -19,11 +19,11 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,python3,\ $(eval $(call gb_UnpackedTarball_add_patches,python3,\ external/python3/i100492-freebsd.patch.1 \ external/python3/python-3.3.0-darwin.patch.1 \ - external/python3/python-3.8-msvc-sdk.patch.1 \ external/python3/python-3.8-msvc-libffi.patch.1 \ external/python3/python-3.7.6-msvc-ssl.patch.1 \ external/python3/python-3.5.4-msvc-disable.patch.1 \ external/python3/ubsan.patch.0 \ + external/python3/py_deprecated_warning.patch.0 \ external/python3/python-3.5.tweak.strip.soabi.patch \ external/python3/darwin.patch.0 \ external/python3/macos-11.patch.0 \ diff --git a/external/python3/init-sys-streams-cant-initialize-stdin.patch.0 b/external/python3/init-sys-streams-cant-initialize-stdin.patch.0 index 61b2464ab4b8..1a3ae8969479 100644 --- a/external/python3/init-sys-streams-cant-initialize-stdin.patch.0 +++ b/external/python3/init-sys-streams-cant-initialize-stdin.patch.0 @@ -1,6 +1,6 @@ --- Python/pylifecycle.c 2024-03-27 14:34:43.905367358 +0000 +++ Python/pylifecycle.c 2024-03-27 14:40:16.339134322 +0000 -@@ -1723,6 +1723,20 @@ +@@ -1789,6 +1789,20 @@ if (!is_valid_fd(fd)) Py_RETURN_NONE; @@ -21,9 +21,9 @@ /* stdin is always opened in buffered mode, first because it shouldn't make a difference in common use cases, second because TextIOWrapper depends on the presence of a read1() method which only exists on -@@ -1854,19 +1868,6 @@ +@@ -1971,19 +1971,6 @@ PyStatus res = _PyStatus_OK(); - PyConfig *config = &interp->config; + const PyConfig *config = _PyInterpreterState_GetConfig(tstate->interp); - /* Check that stdin is not a directory - Using shell redirection, you can redirect stdin to a directory, diff --git a/external/python3/py_deprecated_warning.patch.0 b/external/python3/py_deprecated_warning.patch.0 new file mode 100644 index 000000000000..2deefa6e531f --- /dev/null +++ b/external/python3/py_deprecated_warning.patch.0 @@ -0,0 +1,20 @@ +--- Include/cpython/unicodeobject.h 2024-06-10 10:53:20.049824821 +0200 ++++ Include/cpython/unicodeobject.h 2024-06-10 10:54:50.776970835 +0200 +@@ -548,7 +548,7 @@ + only allowed if u was set to NULL. + + The buffer is copied into the new object. */ +-Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode( ++/*Py_DEPRECATED(3.3)*/ PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode( + const Py_UNICODE *u, /* Unicode buffer */ + Py_ssize_t size /* size of buffer */ + ); +@@ -577,7 +577,7 @@ + Py_UNICODE buffer. + If the wchar_t/Py_UNICODE representation is not yet available, this + function will calculate it. */ +-Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode( ++/*Py_DEPRECATED(3.3)*/ PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode( + PyObject *unicode /* Unicode object */ + ); + diff --git a/external/python3/python-3.3.3-elf-rpath.patch.1 b/external/python3/python-3.3.3-elf-rpath.patch.1 index a408858f5917..b248db33ef17 100644 --- a/external/python3/python-3.3.3-elf-rpath.patch.1 +++ b/external/python3/python-3.3.3-elf-rpath.patch.1 @@ -5,10 +5,10 @@ set RPATH (only to be used on ELF platforms) diff -ru python3.orig/Makefile.pre.in python3/Makefile.pre.in --- python3.orig/Makefile.pre.in 2015-07-26 20:29:07.126194320 +0200 +++ python3/Makefile.pre.in 2015-07-26 20:37:21.814227530 +0200 -@@ -566,7 +566,7 @@ +@@ -589,7 +589,7 @@ # Build the interpreter - $(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) + $(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) $(EXPORTSYMS) - $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) + $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) -Wl,-rpath,\$$ORIGIN diff --git a/external/python3/python-3.8-msvc-sdk.patch.1 b/external/python3/python-3.8-msvc-sdk.patch.1 deleted file mode 100644 index fabdbb53ea63..000000000000 --- a/external/python3/python-3.8-msvc-sdk.patch.1 +++ /dev/null @@ -1,173 +0,0 @@ -diff --git a/PC/pylauncher.rc b/PC/pylauncher.rc -index 92987af713..d21f9b6e9d 100644 ---- a/PC/pylauncher.rc -+++ b/PC/pylauncher.rc -@@ -4,7 +4,6 @@ - - // Include the manifest file that indicates we support all - // current versions of Windows. --#include <winuser.h> - 1 RT_MANIFEST "python.manifest" - - #if defined(PY_ICON) -diff --git a/PC/pyshellext.rc b/PC/pyshellext.rc -index e5924a42da..fc607e9784 100644 ---- a/PC/pyshellext.rc -+++ b/PC/pyshellext.rc -@@ -4,7 +4,6 @@ - - // Include the manifest file that indicates we support all - // current versions of Windows. --#include <winuser.h> - 1 RT_MANIFEST "python.manifest" - - ///////////////////////////////////////////////////////////////////////////// -diff --git a/PC/python_exe.rc b/PC/python_exe.rc -index ae0b029b80..5eba89962b 100644 ---- a/PC/python_exe.rc -+++ b/PC/python_exe.rc -@@ -4,7 +4,6 @@ - - // Include the manifest file that indicates we support all - // current versions of Windows. --#include <winuser.h> - 1 RT_MANIFEST "python.manifest" - - 1 ICON DISCARDABLE "icons\python.ico" -diff --git a/PC/python_nt.rc b/PC/python_nt.rc -index fac6105d8a..33cee42cb7 100644 ---- a/PC/python_nt.rc -+++ b/PC/python_nt.rc -@@ -4,7 +4,6 @@ - - // Include the manifest file that indicates we support all - // current versions of Windows. --#include <winuser.h> - 2 RT_MANIFEST "python.manifest" - - // String Tables -diff --git a/PC/pythonw_exe.rc b/PC/pythonw_exe.rc -index 88bf3592e1..562652be18 100644 ---- a/PC/pythonw_exe.rc -+++ b/PC/pythonw_exe.rc -@@ -4,7 +4,6 @@ - - // Include the manifest file that indicates we support all - // current versions of Windows. --#include <winuser.h> - 1 RT_MANIFEST "python.manifest" - - 1 ICON DISCARDABLE "icons\pythonw.ico" -diff --git a/PC/sqlite3.rc b/PC/sqlite3.rc -index 84bd87d9d5..d2c18f8add 100644 ---- a/PC/sqlite3.rc -+++ b/PC/sqlite3.rc -@@ -4,7 +4,6 @@ - - // Include the manifest file that indicates we support all - // current versions of Windows. --#include <winuser.h> - 2 RT_MANIFEST "python.manifest" - - ///////////////////////////////////////////////////////////////////////////// -diff --git a/PC/pylauncher.rc b/PC/pylauncher.rc -index d21f9b6e9d..ff7e71e0fd 100644 ---- a/PC/pylauncher.rc -+++ b/PC/pylauncher.rc -@@ -2,6 +2,11 @@ - - #include "python_ver_rc.h" - -+#ifndef RT_MANIFEST -+// bpo-45220: Cannot reliably #include RT_MANIFEST from -+// anywhere, so we hardcode it -+#define RT_MANIFEST 24 -+#endif - // Include the manifest file that indicates we support all - // current versions of Windows. - 1 RT_MANIFEST "python.manifest" -diff --git a/PC/pyshellext.rc b/PC/pyshellext.rc -index fc607e9784..af797ce95d 100644 ---- a/PC/pyshellext.rc -+++ b/PC/pyshellext.rc -@@ -2,6 +2,12 @@ - - #include "python_ver_rc.h" - -+#ifndef RT_MANIFEST -+// bpo-45220: Cannot reliably #include RT_MANIFEST from -+// anywhere, so we hardcode it -+#define RT_MANIFEST 24 -+#endif -+ - // Include the manifest file that indicates we support all - // current versions of Windows. - 1 RT_MANIFEST "python.manifest" -diff --git a/PC/python_exe.rc b/PC/python_exe.rc -index 5eba89962b..c3d3bff019 100644 ---- a/PC/python_exe.rc -+++ b/PC/python_exe.rc -@@ -2,6 +2,12 @@ - - #include "python_ver_rc.h" - -+#ifndef RT_MANIFEST -+// bpo-45220: Cannot reliably #include RT_MANIFEST from -+// anywhere, so we hardcode it -+#define RT_MANIFEST 24 -+#endif -+ - // Include the manifest file that indicates we support all - // current versions of Windows. - 1 RT_MANIFEST "python.manifest" -diff --git a/PC/python_nt.rc b/PC/python_nt.rc -index 33cee42cb7..539362cdc2 100644 ---- a/PC/python_nt.rc -+++ b/PC/python_nt.rc -@@ -2,6 +2,12 @@ - - #include "python_ver_rc.h" - -+#ifndef RT_MANIFEST -+// bpo-45220: Cannot reliably #include RT_MANIFEST from -+// anywhere, so we hardcode it -+#define RT_MANIFEST 24 -+#endif -+ - // Include the manifest file that indicates we support all - // current versions of Windows. - 2 RT_MANIFEST "python.manifest" -diff --git a/PC/pythonw_exe.rc b/PC/pythonw_exe.rc -index 562652be18..38570b74fa 100644 ---- a/PC/pythonw_exe.rc -+++ b/PC/pythonw_exe.rc -@@ -2,6 +2,12 @@ - - #include "python_ver_rc.h" - -+#ifndef RT_MANIFEST -+// bpo-45220: Cannot reliably #include RT_MANIFEST from -+// anywhere, so we hardcode it -+#define RT_MANIFEST 24 -+#endif -+ - // Include the manifest file that indicates we support all - // current versions of Windows. - 1 RT_MANIFEST "python.manifest" -diff --git a/PC/sqlite3.rc b/PC/sqlite3.rc -index d2c18f8add..9ae2aa0f6f 100644 ---- a/PC/sqlite3.rc -+++ b/PC/sqlite3.rc -@@ -2,6 +2,12 @@ - - #include <winver.h> - -+#ifndef RT_MANIFEST -+// bpo-45220: Cannot reliably #include RT_MANIFEST from -+// anywhere, so we hardcode it -+#define RT_MANIFEST 24 -+#endif -+ - // Include the manifest file that indicates we support all - // current versions of Windows. - 2 RT_MANIFEST "python.manifest"