forked from pool/python-xmlschema
- Update to 3.4.2
* Extended ModelVisitor to make it usable as an helper class for generating content * Fix failing URL normalization tests * Disable protocols checking with elementpath v4.5.0 * Avoid the use of sys.version_info for checking results, better to extend the check to more values. - Drop support-new-python-3.12.patch, fixed upstream OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-xmlschema?expand=0&rev=56
This commit is contained in:
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