Skip to content

Commit

Permalink
More patch cleanups.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill-Sommerfeld committed Feb 5, 2024
1 parent c8b7a89 commit dedb6b3
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 137 deletions.
9 changes: 9 additions & 0 deletions components/python/python-312/TODO
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ done:
fix modules that aren't loading due to undefined symbols.

----
probably unnecessary (fixes applied differently upstream):
19-pty.patch

patches needing another look:
20-test_fixes.patch
discarded a patch to test_pyexpat.py that patched something that had been deleted?
double-check that test still passes.

patches needing significant work:

Expand Down Expand Up @@ -70,6 +77,8 @@ patches not needed:

15-gethostname.patch; the spurious declaration of gethostname isn't present in 3.12.1

29-Setup.patch: we fix curses libraries differently

42-mod-socket-xpg6.patch: specified options already on command line due to autoconf-based build of modules.

45-system-64-libs.patch: library detection is via autoconf now and doesn't need help
Expand Down
63 changes: 0 additions & 63 deletions components/python/python-312/patches-todo/19-pty.patch

This file was deleted.

11 changes: 0 additions & 11 deletions components/python/python-312/patches-todo/29-Setup.patch

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,6 @@ https://github.com/python/cpython/commit/aa967ec4d4c2fc844f8f16b339140b050ae4d5e

test_pkgutil doesn't expect that pkg module exists. [Not for upstream]

--- Python-3.9.2/Lib/test/test_gdb.py
+++ Python-3.9.2/Lib/test/test_gdb.py
@@ -52,6 +52,9 @@ if gdb_major_version < 7:
% (gdb_major_version, gdb_minor_version,
gdb_version))

+if sys.platform.startswith("sunos"):
+ raise unittest.SkipTest("test doesn't work well on Solaris")
+
if not sysconfig.is_python_build():
raise unittest.SkipTest("test_gdb only works on source builds at the moment.")

--- Python-3.9.2/Lib/test/test_unicodedata.py
+++ Python-3.9.2/Lib/test/test_unicodedata.py
@@ -324,6 +324,8 @@ class NormalizationTest(unittest.TestCas
Expand All @@ -50,33 +38,6 @@ test_pkgutil doesn't expect that pkg module exists. [Not for upstream]
# Hit the exception early
try:
testdata = open_urlresource(TESTDATAURL, encoding="utf-8",
--- Python-3.9.2/Lib/test/test_re.py
+++ Python-3.9.2/Lib/test/test_re.py
@@ -1,5 +1,6 @@
from test.support import (gc_collect, bigmemtest, _2G,
cpython_only, captured_stdout)
+import sys
import locale
import re
import sre_compile
@@ -1918,6 +1919,8 @@ ELSE
self.assertTrue(re.match(b'(?Li)\xc5', b'\xe5'))
self.assertTrue(re.match(b'(?Li)\xe5', b'\xc5'))

+ @unittest.skipIf(sys.platform.startswith("sunos"),
+ "test doesn't work well on sparc Solaris")
def check_en_US_utf8(self):
locale.setlocale(locale.LC_CTYPE, 'en_US.utf8')
self.assertTrue(re.match(b'\xc5\xe5', b'\xc5\xe5', re.L|re.I))
@@ -1927,6 +1930,8 @@ ELSE
self.assertIsNone(re.match(b'(?Li)\xc5', b'\xe5'))
self.assertIsNone(re.match(b'(?Li)\xe5', b'\xc5'))

+ @unittest.skipIf(sys.platform.startswith("sunos"),
+ "test doesn't work well on sparc Solaris")
def test_locale_compiled(self):
oldlocale = locale.setlocale(locale.LC_CTYPE)
self.addCleanup(locale.setlocale, locale.LC_CTYPE, oldlocale)
--- Python-3.9.2/Lib/test/test_time.py
+++ Python-3.9.2/Lib/test/test_time.py
@@ -613,7 +613,7 @@ class _TestStrftimeYear:
Expand Down Expand Up @@ -131,19 +92,6 @@ test_pkgutil doesn't expect that pkg module exists. [Not for upstream]
@unittest.skipIf(AIX, "skipping, see issue #22397")
def _testFDPassSeparateMinSpace(self):
fd0, fd1 = self.newFDs(2)
--- Python-3.9.2/Lib/test/test_pyexpat.py
+++ Python-3.9.2/Lib/test/test_pyexpat.py
@@ -466,8 +466,8 @@ class HandlerExceptionTest(unittest.Test
"pyexpat.c", "StartElement")
self.check_traceback_entry(entries[2],
"test_pyexpat.py", "StartElementHandler")
- if sysconfig.is_python_build() and not (sys.platform == 'win32' and platform.machine() == 'ARM'):
- self.assertIn('call_with_frame("StartElement"', entries[1][3])
+ #if sysconfig.is_python_build() and not (sys.platform == 'win32' and platform.machine() == 'ARM'):
+ # self.assertIn('call_with_frame("StartElement"', entries[1][3])


# Test Current* members:
--- Python-3.9.2/Lib/test/test_tcl.py
+++ Python-3.9.2/Lib/test/test_tcl.py
@@ -198,6 +198,7 @@ class TclTest(unittest.TestCase):
Expand Down Expand Up @@ -188,3 +136,35 @@ test_pkgutil doesn't expect that pkg module exists. [Not for upstream]
import pkg.subpkg
self.addCleanup(unload, 'pkg.subpkg')
self.assertEqual(len(pkg.subpkg.__path__), 2)
--- Python-3.12.1/Lib/test/test_gdb/__init__.py.~1~ Thu Dec 7 12:45:44 2023
+++ Python-3.12.1/Lib/test/test_gdb/__init__.py Mon Feb 5 11:44:20 2024
@@ -15,6 +15,9 @@
# debug symbol files.
raise unittest.SkipTest("test_gdb doesn't work on Windows")

+if sys.platform.startswith("sunos"):
+ raise unittest.SkipTest("test doesn't work well on Solaris")
+
if support.PGO:
raise unittest.SkipTest("test_gdb is not useful for PGO")

--- Python-3.12.1/Lib/test/test_re.py.~1~ Thu Dec 7 12:45:44 2023
+++ Python-3.12.1/Lib/test/test_re.py Mon Feb 5 11:47:36 2024
@@ -1952,6 +1952,8 @@
self.assertTrue(re.match(b'(?Li)\xc5', b'\xe5'))
self.assertTrue(re.match(b'(?Li)\xe5', b'\xc5'))

+ @unittest.skipIf(sys.platform.startswith("sunos"),
+ "test doesn't work well on sparc Solaris")
def check_en_US_utf8(self):
locale.setlocale(locale.LC_CTYPE, 'en_US.utf8')
self.assertTrue(re.match(b'\xc5\xe5', b'\xc5\xe5', re.L|re.I))
@@ -1965,6 +1967,8 @@
is_emscripten or is_wasi,
"musl libc issue on Emscripten/WASI, bpo-46390"
)
+ @unittest.skipIf(sys.platform.startswith("sunos"),
+ "test doesn't work well on sparc Solaris")
def test_locale_compiled(self):
oldlocale = locale.setlocale(locale.LC_CTYPE)
self.addCleanup(locale.setlocale, locale.LC_CTYPE, oldlocale)
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,20 @@ https://bugs.python.org/issue16258
This is not for upstream as the idea is from the bug itself and was rejected
for use on all platforms.

--- Python-3.9.1/Modules/_localemodule.c
+++ Python-3.9.1/Modules/_localemodule.c
@@ -363,9 +363,10 @@ Return a string that can be used as a ke
static PyObject*
PyLocale_strxfrm(PyObject* self, PyObject* args)
--- Python-3.12.1/Modules/_localemodule.c.~1~ Thu Dec 7 12:45:44 2023
+++ Python-3.12.1/Modules/_localemodule.c Mon Feb 5 13:40:46 2024
@@ -393,8 +393,9 @@
_locale_strxfrm_impl(PyObject *module, PyObject *str)
/*[clinic end generated code: output=3081866ebffc01af input=1378bbe6a88b4780]*/
{
+ unsigned int i, j;
PyObject *str;
Py_ssize_t n1;
- wchar_t *s = NULL, *buf = NULL;
+ wchar_t *s = NULL, *buf = NULL, *solbuf = NULL;
size_t n2;
PyObject *result = NULL;

@@ -409,8 +410,23 @@ PyLocale_strxfrm(PyObject* self, PyObjec
@@ -435,8 +436,23 @@
goto exit;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ On illumos, the os.utime() call raises:
OSError: [Errno 79] Value too large for defined data type

diff -wpruN '--exclude=*.orig' a~/Lib/test/test_zipfile.py a/Lib/test/test_zipfile.py
--- a~/Lib/test/test_zipfile.py 1970-01-01 00:00:00
+++ a/Lib/test/test_zipfile.py 1970-01-01 00:00:00
@@ -616,7 +616,7 @@ class StoredTestsWithSourceFile(Abstract
--- Python-3.12.1/Lib/test/test_zipfile/test_core.py.~1~ Thu Dec 7 12:45:44 2023
+++ Python-3.12.1/Lib/test/test_zipfile/test_core.py Mon Feb 5 12:03:34 2024
@@ -622,7 +622,7 @@
self.skipTest(f'time.localtime({ts}) raises OverflowError')
try:
os.utime(TESTFN, (ts, ts))
- except OverflowError:
+ except (OverflowError, OSError):
+ except (OverflowError, OSerror):
self.skipTest('Host fs cannot set timestamp to required value.')

mtime_ns = os.stat(TESTFN).st_mtime_ns

0 comments on commit dedb6b3

Please sign in to comment.