diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | download.lst | 4 | ||||
-rw-r--r-- | external/python3/ExternalPackage_python3.mk | 22 | ||||
-rw-r--r-- | external/python3/UnpackedTarball_python3.mk | 2 | ||||
-rw-r--r-- | external/python3/init-sys-streams-cant-initialize-stdin.patch.0 | 6 | ||||
-rw-r--r-- | external/python3/py_deprecated_warning.patch.0 | 20 | ||||
-rw-r--r-- | external/python3/python-3.3.3-elf-rpath.patch.1 | 4 | ||||
-rw-r--r-- | external/python3/python-3.8-msvc-sdk.patch.1 | 173 |
8 files changed, 45 insertions, 188 deletions
diff --git a/configure.ac b/configure.ac index edd8191c1e26..8b4a7d0f9560 100644 --- a/configure.ac +++ b/configure.ac @@ -10201,7 +10201,7 @@ 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_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]) diff --git a/download.lst b/download.lst index d2803ea98a8f..944601fee9a4 100644 --- a/download.lst +++ b/download.lst @@ -555,8 +555,8 @@ POSTGRESQL_TARBALL := postgresql-13.15.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts -PYTHON_SHA256SUM := d2807ac69f69b84fd46a0b93bbd02a4fa48d3e70f4b2835ff0f72a2885040076 -PYTHON_TARBALL := Python-3.8.19.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 cbb85e14e405..5822940e9924 100644 --- a/external/python3/UnpackedTarball_python3.mk +++ b/external/python3/UnpackedTarball_python3.mk @@ -24,11 +24,11 @@ endif $(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" |