14
0

- Update to 1.3.0:

- Drop support for Python 3.5
  - Add XmlDocument and Wsdl11Document classes
  - Refactoring of XMLResource to support ElementTree-like XPath
    API on both full and lazy modes
- Remove skip_network_tests.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-xmlschema?expand=0&rev=20
This commit is contained in:
2020-11-09 15:50:31 +00:00
committed by Git OBS Bridge
parent dfae7bfecf
commit a646dc083c
5 changed files with 25 additions and 21 deletions

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon Nov 9 15:32:59 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Update to 1.3.0:
- Drop support for Python 3.5
- Add XmlDocument and Wsdl11Document classes
- Refactoring of XMLResource to support ElementTree-like XPath
API on both full and lazy modes
- Remove skip_network_tests.patch
-------------------------------------------------------------------
Sun Oct 11 16:18:52 UTC 2020 - Matej Cepl <mcepl@suse.com>

View File

@@ -19,17 +19,15 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-xmlschema
Version: 1.2.5
Version: 1.3.0
Release: 0
Summary: An XML Schema validator and decoder
License: MIT
URL: https://github.com/brunato/xmlschema
URL: https://github.com/sissaschool/xmlschema
Source: https://files.pythonhosted.org/packages/source/x/xmlschema/xmlschema-%{version}.tar.gz
# PATCH-FIX-UPSTREAM skip_network_tests.patch gh#sissaschool/xmlschema#206 mcepl@suse.com
# Just skip test_export_remote__issue_187 test when not connected to the network.
Patch0: skip_network_tests.patch
BuildRequires: %{python_module elementpath >= 1.4.0}
BuildRequires: %{python_module lxml}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
@@ -54,6 +52,8 @@ sed -i -e 's:~=:>=:' setup.py
rm tests/check_memory.py
rm tests/test_memory.py
sed -i -e '1s@/usr/bin/env python@/usr/bin/python@' xmlschema/testing/builders.py
%build
export LANG="en_US.UTF8"
%python_build
@@ -68,10 +68,14 @@ for p in json2xml validate xml2json; do
done
%check
# test_element_tree_import_script is (easily workaroundable) https://github.com/sissaschool/xmlschema/issues/167
# tests_factory setup is broken
export LANG="en_US.UTF8"
%pytest -k "not (test_element_tree_import_script or tests_factory)" tests
# test_element_tree_import_script is (easily workaroundable) gh#sissaschool/xmlschema#167
# tests_factory setup is broken
SKIP_TESTS="test_element_tree_import_script or tests_factory"
# gh#sissaschool/xmlschema#210
SKIP_TESTS="$SKIP_TESTS or test_imported_element_tree or test_xml_resource_defuse"
SKIP_TESTS="$SKIP_TESTS or test_xml_resource_from_string"
%pytest -k "not ($SKIP_TESTS)" tests
%post
%python_install_alternative xmlschema-json2xml

View File

@@ -1,10 +0,0 @@
--- a/tests/validators/test_schema_class.py
+++ b/tests/validators/test_schema_class.py
@@ -261,6 +261,7 @@ class TestXMLSchema10(XsdValidatorTestCa
self.assertFalse(os.path.isdir(dirname))
+ @unittest.skipIf(SKIP_REMOTE_TESTS, "Remote networks are not accessible.")
def test_export_remote__issue_187(self):
vh_schema_file = self.casepath('issues/issue_187/issue_187_2.xsd')
vh_schema = self.schema_class(vh_schema_file)

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1c4515dd16b5b556dac27cae70bdb3c863e1448e9d58896326ff468ff55e4246
size 290750

3
xmlschema-1.3.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:638eddd3150b8214397eddeb9402457678b63a343c468a96042f56438b6ff1d8
size 319713