14
0

Accepting request 847574 from devel:languages:python

- Update to 1.3.1.
  - mainly accepting patches etree_import_in_tests.patch,
    factory_tests.patch, location_testing_script.patch, which are thus
    removed.
- Add the upstream etree_import_in_tests.patch to fix
  gh#sissaschool/xmlschema#210.
- 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
- Add patches 
  - factory_tests.patch rename tests_factory to tests so it is
    not recognized by pytest
  - remove_shebang.patch just cleaning superfluous shebang
  - location_testing_script.patch use actual Python executable

OBS-URL: https://build.opensuse.org/request/show/847574
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-xmlschema?expand=0&rev=10
This commit is contained in:
2020-11-13 17:55:44 +00:00
committed by Git OBS Bridge
6 changed files with 47 additions and 21 deletions

View File

@@ -1,3 +1,32 @@
-------------------------------------------------------------------
Tue Nov 10 13:49:08 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Update to 1.3.1.
- mainly accepting patches etree_import_in_tests.patch,
factory_tests.patch, location_testing_script.patch, which are thus
removed.
-------------------------------------------------------------------
Tue Nov 10 07:13:53 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Add the upstream etree_import_in_tests.patch to fix
gh#sissaschool/xmlschema#210.
-------------------------------------------------------------------
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
- Add patches
- factory_tests.patch rename tests_factory to tests so it is
not recognized by pytest
- remove_shebang.patch just cleaning superfluous shebang
- location_testing_script.patch use actual Python executable
-------------------------------------------------------------------
Sun Oct 11 16:18:52 UTC 2020 - Matej Cepl <mcepl@suse.com>

View File

@@ -19,17 +19,18 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-xmlschema
Version: 1.2.5
Version: 1.3.1
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
# PATCH-FIX-UPSTREAM remove_shebang.patch gh#sissaschool/xmlschema#210 mcepl@suse.com
# Remove superfluous shebang
Patch0: remove_shebang.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
@@ -68,10 +69,8 @@ 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
%pytest tests/
%post
%python_install_alternative xmlschema-json2xml

8
remove_shebang.patch Normal file
View File

@@ -0,0 +1,8 @@
--- a/xmlschema/testing/builders.py
+++ b/xmlschema/testing/builders.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
# Copyright (c), 2016-2020, SISSA (International School for Advanced Studies).
# All rights reserved.
# This file is distributed under the terms of the MIT License.

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.1.tar.gz Normal file
View File

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