Accepting request 965121 from devel:languages:python:Factory
- Update to 3.9.12: - bpo-46968: Check for the existence of the “sys/auxv.h” header in faulthandler to avoid compilation problems in systems where this header doesn’t exist. Patch by Pablo Galindo - bpo-47101: hashlib.algorithms_available now lists only algorithms that are provided by activated crypto providers on OpenSSL 3.0. Legacy algorithms are not listed unless the legacy provider has been loaded into the default OSSL context. - bpo-23691: Protect the re.finditer() iterator from re-entering. - bpo-42369: Fix thread safety of zipfile._SharedFile.tell() to avoid a “zipfile.BadZipFile: Bad CRC-32 for file” exception when reading a ZipFile from multiple threads. - bpo-38256: Fix binascii.crc32() when it is compiled to use zlib’c crc32 to work properly on inputs 4+GiB in length instead of returning the wrong result. The workaround prior to this was to always feed the function data in increments smaller than 4GiB or to just call the zlib module function. - bpo-39394: A warning about inline flags not at the start of the regular expression now contains the position of the flag. - bpo-47061: Deprecate the various modules listed by PEP 594: - aifc, asynchat, asyncore, audioop, cgi, cgitb, chunk, crypt, imghdr, msilib, nntplib, nis, ossaudiodev, pipes, smtpd, sndhdr, spwd, sunau, telnetlib, uu, xdrlib - bpo-2604: Fix bug where doctests using globals would fail when run multiple times. - bpo-45997: Fix asyncio.Semaphore re-aquiring FIFO order. - bpo-47022: The asynchat, asyncore and smtpd modules have been deprecated since at least Python 3.6. Their documentation has OBS-URL: https://build.opensuse.org/request/show/965121 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python39?expand=0&rev=28
This commit is contained in:
commit
77b5437185
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0a8fbfb5287ebc3a13e9baf3d54e08fa06778ffeccf6311aef821bb3a6586cc8
|
||||
size 19154136
|
@ -1,16 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCgAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAmHgts4ACgkQsmmV4xAl
|
||||
BWiDfQ/6A6ALwx3xrU5ks0Fec91x56ixg+S91cMGDwHM78/KT+gOSva0FxLlpVDO
|
||||
OD0yLoBOwVjSaiFAZC9wH2tf6xWLujVeBscrVX3Di1DZznZGgusDhP+gWpugULrF
|
||||
WCr1ZLxnerhOMmBU9hSOx1ObBc91CIsagqafeMuAWoEwsQpkG0hDHuRN8QeJn79s
|
||||
mFt4/X6/2NQEw/ucxftwoLIfqDbeP468wthOBgr9TrYfseSojnnYCxOiitC8k2GS
|
||||
ieLq1RQu6ZjSYtHyL+mvXwTy2tEyc6v/3s+3lJCcM6uK+vyAvwP4QwIXwpjwHMDW
|
||||
0YdyB812pWUleAt7P+BvVbumjGCs3hFHydMm6iA1eiONQk5Z0QQv0qrh+rqorXkJ
|
||||
aUgjiXjbNkx93m+hftUXXEcKWm6hi8CikcajBPbTZt6PlOCL2ZbN5NclTDpG3JMK
|
||||
8WHFpeFF1uaKcsDF5L9QU+ilXR0wxrh99DePQiLqsMvzbocB3cd5x8Ws1MNX/5tU
|
||||
6p88qUf1Zdg3EA7VQD7m90cTOHcskH8o+Bw+Jd+uDo+H8Pg9Yz9yHik6rHe8OwiA
|
||||
ol7eiEO07WePwqX4PqHozRtCVNSOZtrSSoWK2LNQdK9Z+EhVhQvDDk3hFQiE7ymM
|
||||
ZXHYHATjmGFN7WSThMR/8IFgTSqpuird+RXEkVZKorYPsA0P55I=
|
||||
=KRy4
|
||||
-----END PGP SIGNATURE-----
|
3
Python-3.9.12.tar.xz
Normal file
3
Python-3.9.12.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2cd94b20670e4159c6d9ab57f91dbf255b97d8c1a1451d1c35f4ec1968adf971
|
||||
size 19740524
|
16
Python-3.9.12.tar.xz.asc
Normal file
16
Python-3.9.12.tar.xz.asc
Normal file
@ -0,0 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCgAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAmI7k3sACgkQsmmV4xAl
|
||||
BWjA7g/+KOCcopdD/n5DPko/icuTArjMX/uqiCWjInaJ3w4weN36PhU0BaU/DHuM
|
||||
Yl1Xc28Kb5FtwlSoVfOhTuCJexvWl4fGtBYZHrArplDic38y7pbmsAlaazeYkMsw
|
||||
VX+jhuyRM9k9B3tgO4pCRjhfTwBEJ33+Gd6dOvCfqlIHPik1OSgb1cSZIhicMgds
|
||||
Mx88zmkwB/FCIBla098z6pKKna5affScHzVhx9cCASjs6QnUmmHjbsf3+KFe8FZQ
|
||||
iA5AJ/sBTysf9Xq7vAz0GHcdrqdMngLHfI7BzRAbxkdpbfOTpTtDgUW+5OWBZdLE
|
||||
RpmbHCfC5z+EnnC4VRMyf0mX7FpY1FVc7zcblBTEYugLQ2UI1lPWON1OhQR7RVqJ
|
||||
1d/z1SbK5npyfkqoWYO7mezHGxzslgZMYIjLJ/AMQWNyi4X6fbejP6OFQl7Sr2vw
|
||||
3yYKmAIYnJfe2nVT+JkhlGraglcZPe+86Z/lbqQQY0mrCbp2K4jeoZuZVC5Y3uoF
|
||||
I56gp3ltk3s0rM5+yWWArdgX3OVuPwbi2yLmzfjT9gf2ZNI3dcUr3b4yzMVnIxin
|
||||
SLz6COy/0V6/IRb2wiUVOlxyaZi6nCjXB13m0SRtqIzpUe3IJYyQE8fmzPZX0Lzv
|
||||
H0ANUeudQUQT2LinAZA5kOZ5/d6Th9AItNyE0w06Uyr9FncgNQQ=
|
||||
=rytF
|
||||
-----END PGP SIGNATURE-----
|
@ -25,7 +25,7 @@
|
||||
if (sep == NULL) {
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -2203,7 +2203,7 @@ class PyBuildExt(build_ext):
|
||||
@@ -2205,7 +2205,7 @@ class PyBuildExt(build_ext):
|
||||
undef_macros = []
|
||||
if '--with-system-libmpdec' in sysconfig.get_config_var("CONFIG_ARGS"):
|
||||
include_dirs = []
|
||||
|
@ -1,6 +1,10 @@
|
||||
---
|
||||
Lib/test/test_posix.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/Lib/test/test_posix.py
|
||||
+++ b/Lib/test/test_posix.py
|
||||
@@ -421,7 +421,7 @@ class PosixTester(unittest.TestCase):
|
||||
@@ -422,7 +422,7 @@ class PosixTester(unittest.TestCase):
|
||||
def test_posix_fadvise(self):
|
||||
fd = os.open(support.TESTFN, os.O_RDONLY)
|
||||
try:
|
||||
|
220
python39.changes
220
python39.changes
@ -1,3 +1,223 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 26 22:22:24 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Update to 3.9.12:
|
||||
- bpo-46968: Check for the existence of the “sys/auxv.h” header
|
||||
in faulthandler to avoid compilation problems in systems
|
||||
where this header doesn’t exist. Patch by Pablo Galindo
|
||||
- bpo-47101: hashlib.algorithms_available now lists only
|
||||
algorithms that are provided by activated crypto providers on
|
||||
OpenSSL 3.0. Legacy algorithms are not listed unless the
|
||||
legacy provider has been loaded into the default OSSL
|
||||
context.
|
||||
- bpo-23691: Protect the re.finditer() iterator from
|
||||
re-entering.
|
||||
- bpo-42369: Fix thread safety of zipfile._SharedFile.tell() to
|
||||
avoid a “zipfile.BadZipFile: Bad CRC-32 for file” exception
|
||||
when reading a ZipFile from multiple threads.
|
||||
- bpo-38256: Fix binascii.crc32() when it is compiled to use
|
||||
zlib’c crc32 to work properly on inputs 4+GiB in length
|
||||
instead of returning the wrong result. The workaround prior
|
||||
to this was to always feed the function data in increments
|
||||
smaller than 4GiB or to just call the zlib module function.
|
||||
- bpo-39394: A warning about inline flags not at the start of
|
||||
the regular expression now contains the position of the flag.
|
||||
- bpo-47061: Deprecate the various modules listed by PEP 594:
|
||||
- aifc, asynchat, asyncore, audioop, cgi, cgitb, chunk, crypt,
|
||||
imghdr, msilib, nntplib, nis, ossaudiodev, pipes, smtpd,
|
||||
sndhdr, spwd, sunau, telnetlib, uu, xdrlib
|
||||
- bpo-2604: Fix bug where doctests using globals would fail
|
||||
when run multiple times.
|
||||
- bpo-45997: Fix asyncio.Semaphore re-aquiring FIFO order.
|
||||
- bpo-47022: The asynchat, asyncore and smtpd modules have been
|
||||
deprecated since at least Python 3.6. Their documentation has
|
||||
now been updated to note they will removed in Python 3.12
|
||||
(PEP 594).
|
||||
- bpo-46421: Fix a unittest issue where if the command was
|
||||
invoked as python -m unittest and the filename(s) began with
|
||||
a dot (.), a ValueError is returned.
|
||||
- bpo-40296: Fix supporting generic aliases in pydoc.
|
||||
- bpo-14156: argparse.FileType now supports an argument of ‘-’
|
||||
in binary mode, returning the .buffer attribute of
|
||||
sys.stdin/sys.stdout as appropriate. Modes including ‘x’ and
|
||||
‘a’ are treated equivalently to ‘w’ when argument is ‘-’.
|
||||
Patch contributed by Josh Rosenberg
|
||||
|
||||
- Update to 3.9.11:
|
||||
- bpo-46852: Rename the private undocumented
|
||||
float.__set_format__() method to float.__setformat__() to fix
|
||||
a typo introduced in Python 3.7. The method is only used by
|
||||
test_float. Patch by Victor Stinner.
|
||||
- bpo-46794: Bump up the libexpat version into 2.4.6
|
||||
- bpo-46762: Fix an assert failure in debug builds when a ‘<’,
|
||||
‘>’, or ‘=’ is the last character in an f-string that’s
|
||||
missing a closing right brace.
|
||||
- bpo-46732: Correct the docstring for the __bool__() method.
|
||||
Patch by Jelle Zijlstra.
|
||||
- bpo-40479: Add a missing call to va_end() in
|
||||
Modules/_hashopenssl.c.
|
||||
- bpo-46615: When iterating over sets internally in
|
||||
setobject.c, acquire strong references to the resulting items
|
||||
from the set. This prevents crashes in corner-cases of
|
||||
various set operations where the set gets mutated.
|
||||
- bpo-43721: Fix docstrings of getter, setter, and deleter to
|
||||
clarify that they create a new copy of the property.
|
||||
- bpo-46503: Fix an assert when parsing some invalid N escape
|
||||
sequences in f-strings.
|
||||
- bpo-46417: Fix a race condition on setting a type __bases__
|
||||
attribute: the internal function add_subclass() now gets the
|
||||
PyTypeObject.tp_subclasses member after calling
|
||||
PyWeakref_NewRef() which can trigger a garbage collection
|
||||
which can indirectly modify PyTypeObject.tp_subclasses. Patch
|
||||
by Victor Stinner.
|
||||
- bpo-46383: Fix invalid signature of _zoneinfo’s module_free
|
||||
function to resolve a crash on wasm32-emscripten platform.
|
||||
- bpo-43253: Fix a crash when closing transports where the
|
||||
underlying socket handle is already invalid on the Proactor
|
||||
event loop.
|
||||
- bpo-47004: Apply bugfixes from importlib_metadata 4.11.3,
|
||||
including bugfix for EntryPoint.extras, which was returning
|
||||
match objects and not the extras strings.
|
||||
- bpo-46985: Upgrade pip wheel bundled with ensurepip (pip
|
||||
22.0.4)
|
||||
- bpo-46968: faulthandler: On Linux 5.14 and newer, dynamically
|
||||
determine size of signal handler stack size CPython allocates
|
||||
using getauxval(AT_MINSIGSTKSZ). This changes allows for
|
||||
Python extension’s request to Linux kernel to use AMX_TILE
|
||||
instruction set on Sapphire Rapids Xeon processor to succeed,
|
||||
unblocking use of the ISA in frameworks.
|
||||
- bpo-46955: Expose asyncio.base_events.Server as
|
||||
asyncio.Server. Patch by Stefan Zabka.
|
||||
- bpo-46932: Update bundled libexpat to 2.4.7
|
||||
- bpo-25707: Fixed a file leak in
|
||||
xml.etree.ElementTree.iterparse() when the iterator is not
|
||||
exhausted. Patch by Jacob Walls.
|
||||
- bpo-44886: Inherit asyncio proactor datagram transport from
|
||||
asyncio.DatagramTransport.
|
||||
- bpo-46827: Support UDP sockets in asyncio.loop.sock_connect()
|
||||
for selector-based event loops. Patch by Thomas Grainger.
|
||||
- bpo-46811: Make test suite support Expat >=2.4.5
|
||||
- bpo-46252: Raise TypeError if ssl.SSLSocket is passed to
|
||||
transport-based APIs.
|
||||
- bpo-46784: Fix libexpat symbols collisions with user
|
||||
dynamically loaded or statically linked libexpat in embedded
|
||||
Python.
|
||||
- bpo-39327: shutil.rmtree() can now work with VirtualBox
|
||||
shared folders when running from the guest operating-system.
|
||||
- bpo-46756: Fix a bug in
|
||||
urllib.request.HTTPPasswordMgr.find_user_password() and
|
||||
urllib.request.HTTPPasswordMgrWithPriorAuth.is_authenticated()
|
||||
which allowed to bypass authorization. For example, access to
|
||||
URI example.org/foobar was allowed if the user was authorized
|
||||
for URI example.org/foo.
|
||||
- bpo-45863: When the tarfile module creates a pax format
|
||||
archive, it will put an integer representation of timestamps
|
||||
in the ustar header (if possible) for the benefit of older
|
||||
unarchivers, in addition to the existing full-precision
|
||||
timestamps in the pax extended header.
|
||||
- bpo-46672: Fix NameError in asyncio.gather() when initial
|
||||
type check fails.
|
||||
- bpo-45948: Fixed a discrepancy in the C implementation of the
|
||||
xml.etree.ElementTree module. Now, instantiating an
|
||||
xml.etree.ElementTree.XMLParser with a target=None keyword
|
||||
provides a default xml.etree.ElementTree.TreeBuilder target
|
||||
as the Python implementation does.
|
||||
- bpo-46591: Make the IDLE doc URL on the About IDLE dialog
|
||||
clickable.
|
||||
- bpo-46400: expat: Update libexpat from 2.4.1 to 2.4.4
|
||||
- bpo-46487: Add the get_write_buffer_limits method to
|
||||
asyncio.transports.WriteTransport and to the SSL transport.
|
||||
- bpo-46539: In typing.get_type_hints(), support evaluating
|
||||
stringified ClassVar and Final annotations inside Annotated.
|
||||
Patch by Gregory Beauregard.
|
||||
- bpo-46491: Allow typing.Annotated to wrap typing.Final and
|
||||
typing.ClassVar. Patch by Gregory Beauregard.
|
||||
- bpo-46436: Fix command-line option -d/--directory in module
|
||||
http.server which is ignored when combined with command-line
|
||||
option --cgi. Patch by Géry Ogam.
|
||||
- bpo-41403: Make mock.patch() raise a TypeError with
|
||||
a relevant error message on invalid arg. Previously it
|
||||
allowed a cryptic AttributeError to escape.
|
||||
- bpo-46474: In importlib.metadata.EntryPoint.pattern, avoid
|
||||
potential REDoS by limiting ambiguity in consecutive
|
||||
whitespace.
|
||||
- bpo-46469: asyncio generic classes now return
|
||||
types.GenericAlias in __class_getitem__ instead of the same
|
||||
class.
|
||||
- bpo-46434: pdb now gracefully handles help when __doc__ is
|
||||
missing, for example when run with pregenerated optimized
|
||||
.pyc files.
|
||||
- bpo-46333: The __eq__() and __hash__() methods of
|
||||
typing.ForwardRef now honor the module parameter of
|
||||
typing.ForwardRef. Forward references from different modules
|
||||
are now differentiated.
|
||||
- bpo-43118: Fix a bug in inspect.signature() that was causing
|
||||
it to fail on some subclasses of classes with
|
||||
a __text_signature__ referencing module globals. Patch by
|
||||
Weipeng Hong.
|
||||
- bpo-21987: Fix an issue with tarfile.TarFile.getmember()
|
||||
getting a directory name with a trailing slash.
|
||||
- bpo-20392: Fix inconsistency with uppercase file extensions
|
||||
in MimeTypes.guess_type(). Patch by Kumar Aditya.
|
||||
- bpo-46080: Fix exception in argparse help text generation if
|
||||
a argparse.BooleanOptionalAction argument’s default is
|
||||
argparse.SUPPRESS and it has help specified. Patch by Felix
|
||||
Fontein.
|
||||
- bpo-44439: Fix .write() method of a member file in ZipFile,
|
||||
when the input data is an object that supports the buffer
|
||||
protocol, the file length may be wrong.
|
||||
- bpo-45703: When a namespace package is imported before
|
||||
another module from the same namespace is created/installed
|
||||
in a different sys.path location while the program is
|
||||
running, calling the importlib.invalidate_caches() function
|
||||
will now also guarantee the new module is noticed.
|
||||
- bpo-24959: Fix bug where unittest sometimes drops frames from
|
||||
tracebacks of exceptions raised in tests.
|
||||
- bpo-46463: Fixes escape4chm.py script used when building the
|
||||
CHM documentation file
|
||||
- bpo-46913: Fix test_faulthandler.test_sigfpe() if Python is
|
||||
built with undefined behavior sanitizer (UBSAN): disable
|
||||
UBSAN on the faulthandler_sigfpe() function. Patch by Victor
|
||||
Stinner.
|
||||
- bpo-46708: Prevent default asyncio event loop policy
|
||||
modification warning after test_asyncio execution.
|
||||
- bpo-46616: Ensures test_importlib.test_windows cleans up
|
||||
registry keys after completion.
|
||||
- bpo-44359: test_ftplib now silently ignores socket errors to
|
||||
prevent logging unhandled threading exceptions. Patch by
|
||||
Victor Stinner.
|
||||
- bpo-46542: Fix a Python crash in test_lib2to3 when using
|
||||
Python built in debug mode: limit the recursion limit. Patch
|
||||
by Victor Stinner.
|
||||
- bpo-46576: test_peg_generator now disables compiler
|
||||
optimization when testing compilation of its own C extensions
|
||||
to significantly speed up the testing on non-debug builds of
|
||||
CPython.
|
||||
- bpo-46542: Fix test_json tests checking for RecursionError:
|
||||
modify these tests to use support.infinite_recursion(). Patch
|
||||
by Victor Stinner.
|
||||
- bpo-13886: Skip test_builtin PTY tests on non-ASCII
|
||||
characters if the readline module is loaded. The readline
|
||||
module changes input() behavior, but test_builtin is not
|
||||
intented to test the readline module. Patch by Victor
|
||||
Stinner.
|
||||
- bpo-38472: Fix GCC detection in setup.py when
|
||||
cross-compiling. The C compiler is now run with LC_ALL=C.
|
||||
Previously, the detection failed with a German locale.
|
||||
- bpo-46513: configure no longer uses AC_C_CHAR_UNSIGNED macro
|
||||
and pyconfig.h no longer defines reserved symbol
|
||||
__CHAR_UNSIGNED__.
|
||||
- bpo-45925: Update Windows installer to use SQLite 3.37.2.
|
||||
- bpo-45296: Clarify close, quit, and exit in IDLE. In the File
|
||||
menu, ‘Close’ and ‘Exit’ are now ‘Close Window’ (the current
|
||||
one) and ‘Exit’ is now ‘Exit IDLE’ (by closing all windows).
|
||||
In Shell, ‘quit()’ and ‘exit()’ mean ‘close Shell’. If there
|
||||
are no other windows, this also exits IDLE.
|
||||
- bpo-45447: Apply IDLE syntax highlighting to pyi files. Patch
|
||||
by Alex Waygood and Terry Jan Reedy.
|
||||
- Removed upstreamed patches:
|
||||
- support-expat-245.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 22 05:53:06 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
|
@ -53,7 +53,7 @@
|
||||
# Will do the /usr/bin/python3 and all the core links
|
||||
%define primary_interpreter 0
|
||||
# We don't process beta signs well
|
||||
%define folderversion 3.9.10
|
||||
%define folderversion 3.9.12
|
||||
%define tarname Python-%{tarversion}
|
||||
%define sitedir %{_libdir}/python%{python_version}
|
||||
# three possible ABI kinds: m - pymalloc, d - debug build; see PEP 3149
|
||||
@ -89,7 +89,7 @@
|
||||
%define dynlib() %{sitedir}/lib-dynload/%{1}.cpython-%{abi_tag}-%{archname}-%{_os}%{?_gnu}%{?armsuffix}.so
|
||||
%bcond_without profileopt
|
||||
Name: %{python_pkg_name}%{psuffix}
|
||||
Version: 3.9.10
|
||||
Version: 3.9.12
|
||||
Release: 0
|
||||
Summary: Python 3 Interpreter
|
||||
License: Python-2.0
|
||||
@ -151,8 +151,6 @@ Patch33: no-skipif-doctests.patch
|
||||
# PATCH-FIX-SLE skip-test_pyobject_freed_is_freed.patch mcepl@suse.com
|
||||
# skip a test failing on SLE-15
|
||||
Patch34: skip-test_pyobject_freed_is_freed.patch
|
||||
# PATCH-FIX-UPSTREAM bpo-46811 gh#python/cpython#336a916f75642dfe2d87e237981686051d5d51f8
|
||||
Patch35: support-expat-245.patch
|
||||
BuildRequires: autoconf-archive
|
||||
BuildRequires: automake
|
||||
BuildRequires: fdupes
|
||||
@ -412,7 +410,6 @@ other applications.
|
||||
%if %{with mpdecimal}
|
||||
%patch05 -p1
|
||||
%endif
|
||||
%patch35 -p1
|
||||
|
||||
# drop Autoconf version requirement
|
||||
sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac
|
||||
|
@ -1,103 +0,0 @@
|
||||
From 336a916f75642dfe2d87e237981686051d5d51f8 Mon Sep 17 00:00:00 2001
|
||||
From: "Miss Islington (bot)"
|
||||
<31488909+miss-islington@users.noreply.github.com>
|
||||
Date: Mon, 21 Feb 2022 08:16:23 -0800
|
||||
Subject: [PATCH] bpo-46811: Make test suite support Expat >=2.4.5 (GH-31453)
|
||||
(GH-31469)
|
||||
|
||||
Curly brackets were never allowed in namespace URIs
|
||||
according to RFC 3986, and so-called namespace-validating
|
||||
XML parsers have the right to reject them a invalid URIs.
|
||||
|
||||
libexpat >=2.4.5 has become strcter in that regard due to
|
||||
related security issues; with ET.XML instantiating a
|
||||
namespace-aware parser under the hood, this test has no
|
||||
future in CPython.
|
||||
|
||||
References:
|
||||
- https://datatracker.ietf.org/doc/html/rfc3968
|
||||
- https://www.w3.org/TR/xml-names/
|
||||
|
||||
Also, test_minidom.py: Support Expat >=2.4.5
|
||||
(cherry picked from commit 2cae93832f46b245847bdc252456ddf7742ef45e)
|
||||
|
||||
Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
|
||||
|
||||
Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
|
||||
---
|
||||
Lib/test/test_minidom.py | 17 +++++++++++++++--
|
||||
Lib/test/test_xml_etree.py | 6 ------
|
||||
.../2022-02-20-21-03-31.bpo-46811.8BxgdQ.rst | 1 +
|
||||
3 files changed, 16 insertions(+), 8 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Library/2022-02-20-21-03-31.bpo-46811.8BxgdQ.rst
|
||||
|
||||
diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py
|
||||
index 1663b1f1143dd..97620258d82f6 100644
|
||||
--- a/Lib/test/test_minidom.py
|
||||
+++ b/Lib/test/test_minidom.py
|
||||
@@ -6,10 +6,12 @@
|
||||
from test import support
|
||||
import unittest
|
||||
|
||||
+import pyexpat
|
||||
import xml.dom.minidom
|
||||
|
||||
from xml.dom.minidom import parse, Node, Document, parseString
|
||||
from xml.dom.minidom import getDOMImplementation
|
||||
+from xml.parsers.expat import ExpatError
|
||||
|
||||
|
||||
tstfile = support.findfile("test.xml", subdir="xmltestdata")
|
||||
@@ -1147,7 +1149,13 @@ def testEncodings(self):
|
||||
|
||||
# Verify that character decoding errors raise exceptions instead
|
||||
# of crashing
|
||||
- self.assertRaises(UnicodeDecodeError, parseString,
|
||||
+ if pyexpat.version_info >= (2, 4, 5):
|
||||
+ self.assertRaises(ExpatError, parseString,
|
||||
+ b'<fran\xe7ais></fran\xe7ais>')
|
||||
+ self.assertRaises(ExpatError, parseString,
|
||||
+ b'<franais>Comment \xe7a va ? Tr\xe8s bien ?</franais>')
|
||||
+ else:
|
||||
+ self.assertRaises(UnicodeDecodeError, parseString,
|
||||
b'<fran\xe7ais>Comment \xe7a va ? Tr\xe8s bien ?</fran\xe7ais>')
|
||||
|
||||
doc.unlink()
|
||||
@@ -1609,7 +1617,12 @@ def testEmptyXMLNSValue(self):
|
||||
self.confirm(doc2.namespaceURI == xml.dom.EMPTY_NAMESPACE)
|
||||
|
||||
def testExceptionOnSpacesInXMLNSValue(self):
|
||||
- with self.assertRaisesRegex(ValueError, 'Unsupported syntax'):
|
||||
+ if pyexpat.version_info >= (2, 4, 5):
|
||||
+ context = self.assertRaisesRegex(ExpatError, 'syntax error')
|
||||
+ else:
|
||||
+ context = self.assertRaisesRegex(ValueError, 'Unsupported syntax')
|
||||
+
|
||||
+ with context:
|
||||
parseString('<element xmlns:abc="http:abc.com/de f g/hi/j k"><abc:foo /></element>')
|
||||
|
||||
def testDocRemoveChild(self):
|
||||
diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py
|
||||
index 8cdf451fbdbac..762b0bfed2c33 100644
|
||||
--- a/Lib/test/test_xml_etree.py
|
||||
+++ b/Lib/test/test_xml_etree.py
|
||||
@@ -2168,12 +2168,6 @@ def test_issue6233(self):
|
||||
b"<?xml version='1.0' encoding='ascii'?>\n"
|
||||
b'<body>tãg</body>')
|
||||
|
||||
- def test_issue3151(self):
|
||||
- e = ET.XML('<prefix:localname xmlns:prefix="${stuff}"/>')
|
||||
- self.assertEqual(e.tag, '{${stuff}}localname')
|
||||
- t = ET.ElementTree(e)
|
||||
- self.assertEqual(ET.tostring(e), b'<ns0:localname xmlns:ns0="${stuff}" />')
|
||||
-
|
||||
def test_issue6565(self):
|
||||
elem = ET.XML("<body><tag/></body>")
|
||||
self.assertEqual(summarize_list(elem), ['tag'])
|
||||
diff --git a/Misc/NEWS.d/next/Library/2022-02-20-21-03-31.bpo-46811.8BxgdQ.rst b/Misc/NEWS.d/next/Library/2022-02-20-21-03-31.bpo-46811.8BxgdQ.rst
|
||||
new file mode 100644
|
||||
index 0000000000000..6969bd1898f65
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Library/2022-02-20-21-03-31.bpo-46811.8BxgdQ.rst
|
||||
@@ -0,0 +1 @@
|
||||
+Make test suite support Expat >=2.4.5
|
Loading…
Reference in New Issue
Block a user