forked from pool/python-xmlschema
Accepting request 1195977 from devel:languages:python
- Add patch support-new-python-3.12.patch: * Support pickle exception changes in Python 3.12.5 and later. OBS-URL: https://build.opensuse.org/request/show/1195977 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-xmlschema?expand=0&rev=26
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 26 02:42:14 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Add patch support-new-python-3.12.patch:
|
||||||
|
* Support pickle exception changes in Python 3.12.5 and later.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jul 29 17:31:54 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
Mon Jul 29 17:31:54 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||||
|
|
||||||
|
@@ -24,6 +24,8 @@ Summary: An XML Schema validator and decoder
|
|||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/sissaschool/xmlschema
|
URL: https://github.com/sissaschool/xmlschema
|
||||||
Source: https://files.pythonhosted.org/packages/source/x/xmlschema/xmlschema-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/x/xmlschema/xmlschema-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-OPENSUSE Based on https://github.com/sissaschool/xmlschema/issues/412
|
||||||
|
Patch0: support-new-python-3.12.patch
|
||||||
BuildRequires: %{python_module elementpath >= 3.0.0}
|
BuildRequires: %{python_module elementpath >= 3.0.0}
|
||||||
BuildRequires: %{python_module lxml}
|
BuildRequires: %{python_module lxml}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
|
24
support-new-python-3.12.patch
Normal file
24
support-new-python-3.12.patch
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
Index: xmlschema-3.3.2/tests/validators/test_schemas.py
|
||||||
|
===================================================================
|
||||||
|
--- xmlschema-3.3.2.orig/tests/validators/test_schemas.py
|
||||||
|
+++ xmlschema-3.3.2/tests/validators/test_schemas.py
|
||||||
|
@@ -8,6 +8,7 @@
|
||||||
|
#
|
||||||
|
# @author Davide Brunato <brunato@sissa.it>
|
||||||
|
#
|
||||||
|
+import sys
|
||||||
|
import unittest
|
||||||
|
import logging
|
||||||
|
import warnings
|
||||||
|
@@ -702,7 +703,10 @@ class TestXMLSchema10(XsdValidatorTestCa
|
||||||
|
|
||||||
|
with self.assertRaises((pickle.PicklingError, AttributeError)) as ec:
|
||||||
|
pickle.dumps(schema)
|
||||||
|
- self.assertIn("Can't pickle", str(ec.exception))
|
||||||
|
+ message = "Can't pickle"
|
||||||
|
+ if sys.version_info >= (3, 12, 5):
|
||||||
|
+ message = "Can't get local object"
|
||||||
|
+ self.assertIn(message, str(ec.exception))
|
||||||
|
|
||||||
|
def test_meta_schema_validation(self):
|
||||||
|
self.assertTrue(self.schema_class.meta_schema.is_valid(self.vh_xsd_file))
|
Reference in New Issue
Block a user