Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-elementpath for openSUSE:Factory checked in at 2023-07-03 17:41:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-elementpath (Old) and /work/SRC/openSUSE:Factory/.python-elementpath.new.13546 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-elementpath" Mon Jul 3 17:41:29 2023 rev:18 rq:1096318 version:4.1.4 Changes: -------- --- /work/SRC/openSUSE:Factory/python-elementpath/python-elementpath.changes 2023-06-26 18:15:31.322317937 +0200 +++ /work/SRC/openSUSE:Factory/.python-elementpath.new.13546/python-elementpath.changes 2023-07-03 17:41:30.324266422 +0200 @@ -1,0 +2,7 @@ +Sat Jul 1 20:32:48 UTC 2023 - Dirk Müller <[email protected]> + +- update to 4.1.4: + * Fix select of prefixed names + * Fix zero length *xs:base64Binary* + +------------------------------------------------------------------- Old: ---- v4.1.3.tar.gz New: ---- v4.1.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-elementpath.spec ++++++ --- /var/tmp/diff_new_pack.rZAoez/_old 2023-07-03 17:41:30.972270236 +0200 +++ /var/tmp/diff_new_pack.rZAoez/_new 2023-07-03 17:41:30.980270284 +0200 @@ -20,7 +20,7 @@ %define skip_python36 1 %{?sle15_python_module_pythons} Name: python-elementpath -Version: 4.1.3 +Version: 4.1.4 Release: 0 Summary: XPath 1.0/20 parsers and selectors for ElementTree and lxml License: MIT ++++++ v4.1.3.tar.gz -> v4.1.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/elementpath-4.1.3/.github/workflows/test-elementpath.yml new/elementpath-4.1.4/.github/workflows/test-elementpath.yml --- old/elementpath-4.1.3/.github/workflows/test-elementpath.yml 2023-06-17 19:30:54.000000000 +0200 +++ new/elementpath-4.1.4/.github/workflows/test-elementpath.yml 2023-06-26 15:50:26.000000000 +0200 @@ -42,7 +42,7 @@ - name: Lint with mypy if Python version != 3.7 if: ${{ matrix.python-version != '3.7' }} run: | - pip install mypy==1.3.0 xmlschema lxml-stubs + pip install mypy==1.4.1 xmlschema lxml-stubs mypy --show-error-codes --strict elementpath - name: Test with unittest run: | diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/elementpath-4.1.3/CHANGELOG.rst new/elementpath-4.1.4/CHANGELOG.rst --- old/elementpath-4.1.3/CHANGELOG.rst 2023-06-17 19:30:54.000000000 +0200 +++ new/elementpath-4.1.4/CHANGELOG.rst 2023-06-26 15:50:26.000000000 +0200 @@ -2,6 +2,11 @@ CHANGELOG ********* +`v4.1.4`_ (2023-06-26) +====================== +* Fix select of prefixed names (issue #68) +* Fix zero length *xs:base64Binary* (pull request #69) + `v4.1.3`_ (2023-06-17) ====================== * Fix XP30+ fn:path (issue #67) @@ -424,3 +429,4 @@ .. _v4.1.1: https://github.com/sissaschool/elementpath/compare/v4.1.0...v4.1.1 .. _v4.1.2: https://github.com/sissaschool/elementpath/compare/v4.1.1...v4.1.2 .. _v4.1.3: https://github.com/sissaschool/elementpath/compare/v4.1.2...v4.1.3 +.. _v4.1.4: https://github.com/sissaschool/elementpath/compare/v4.1.3...v4.1.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/elementpath-4.1.3/doc/conf.py new/elementpath-4.1.4/doc/conf.py --- old/elementpath-4.1.3/doc/conf.py 2023-06-17 19:30:54.000000000 +0200 +++ new/elementpath-4.1.4/doc/conf.py 2023-06-26 15:50:26.000000000 +0200 @@ -31,7 +31,7 @@ # The short X.Y version version = '4.1' # The full version, including alpha/beta/rc tags -release = '4.1.3' +release = '4.1.4' # -- General configuration --------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/elementpath-4.1.3/elementpath/__init__.py new/elementpath-4.1.4/elementpath/__init__.py --- old/elementpath-4.1.3/elementpath/__init__.py 2023-06-17 19:30:54.000000000 +0200 +++ new/elementpath-4.1.4/elementpath/__init__.py 2023-06-26 15:50:26.000000000 +0200 @@ -7,7 +7,7 @@ # # @author Davide Brunato <[email protected]> # -__version__ = '4.1.3' +__version__ = '4.1.4' __author__ = "Davide Brunato" __contact__ = "[email protected]" __copyright__ = "Copyright 2018-2023, SISSA" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/elementpath-4.1.3/elementpath/datatypes/binary.py new/elementpath-4.1.4/elementpath/datatypes/binary.py --- old/elementpath-4.1.3/elementpath/datatypes/binary.py 2023-06-17 19:30:54.000000000 +0200 +++ new/elementpath-4.1.4/elementpath/datatypes/binary.py 2023-06-26 15:50:26.000000000 +0200 @@ -144,11 +144,14 @@ return hash(self.value) def __len__(self) -> int: - if self.value[-2] == ord('='): - return len(self.value) // 4 * 3 - 2 + length = len(self.value) + if length == 0: + return 0 + elif self.value[-2] == ord('='): + return length // 4 * 3 - 2 elif self.value[-1] == ord('='): - return len(self.value) // 4 * 3 - 1 - return len(self.value) // 4 * 3 + return length // 4 * 3 - 1 + return length // 4 * 3 @staticmethod def encoder(value: bytes) -> bytes: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/elementpath-4.1.3/elementpath/xpath1/_xpath1_operators.py new/elementpath-4.1.4/elementpath/xpath1/_xpath1_operators.py --- old/elementpath-4.1.3/elementpath/xpath1/_xpath1_operators.py 2023-06-17 19:30:54.000000000 +0200 +++ new/elementpath-4.1.4/elementpath/xpath1/_xpath1_operators.py 2023-06-26 15:50:26.000000000 +0200 @@ -218,7 +218,7 @@ name = '{%s}%s' % (self.get_namespace(self[0].value), self[1].value) if context is None: - yield name + raise self.missing_context() elif isinstance(context, XPathSchemaContext): yield from self.select_xsd_nodes(context, name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/elementpath-4.1.3/publiccode.yml new/elementpath-4.1.4/publiccode.yml --- old/elementpath-4.1.3/publiccode.yml 2023-06-17 19:30:54.000000000 +0200 +++ new/elementpath-4.1.4/publiccode.yml 2023-06-26 15:50:26.000000000 +0200 @@ -6,8 +6,8 @@ name: elementpath url: 'https://github.com/sissaschool/elementpath' landingURL: 'https://github.com/sissaschool/elementpath' -releaseDate: '2023-06-17' -softwareVersion: v4.1.3 +releaseDate: '2023-06-26' +softwareVersion: v4.1.4 developmentStatus: stable platforms: - linux diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/elementpath-4.1.3/setup.py new/elementpath-4.1.4/setup.py --- old/elementpath-4.1.3/setup.py 2023-06-17 19:30:54.000000000 +0200 +++ new/elementpath-4.1.4/setup.py 2023-06-26 15:50:26.000000000 +0200 @@ -15,7 +15,7 @@ setup( name='elementpath', - version='4.1.3', + version='4.1.4', packages=find_packages(include=['elementpath', 'elementpath.*']), package_data={ 'elementpath': ['py.typed'], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/elementpath-4.1.3/tests/test_datatypes.py new/elementpath-4.1.4/tests/test_datatypes.py --- old/elementpath-4.1.3/tests/test_datatypes.py 2023-06-17 19:30:54.000000000 +0200 +++ new/elementpath-4.1.4/tests/test_datatypes.py 2023-06-26 15:50:26.000000000 +0200 @@ -1440,7 +1440,8 @@ self.assertEqual(hash(HexBinary(b'F859')), hash(b'F859')) def test_length(self): - self.assertEqual(len(Base64Binary(b'ZQ==')), 1) + self.assertEqual(len(Base64Binary(b'')), 0) + self.assertEqual(len(Base64Binary(b'ZQ==')), 1), self.assertEqual(len(Base64Binary(b'YWxwaGE=')), 5) self.assertEqual(len(Base64Binary(b'bGNlbmdnamh4eXBy')), 12) self.assertEqual(len(HexBinary(b'F859')), 2) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/elementpath-4.1.3/tests/test_xpath2_constructors.py new/elementpath-4.1.4/tests/test_xpath2_constructors.py --- old/elementpath-4.1.3/tests/test_xpath2_constructors.py 2023-06-17 19:30:54.000000000 +0200 +++ new/elementpath-4.1.4/tests/test_xpath2_constructors.py 2023-06-26 15:50:26.000000000 +0200 @@ -18,7 +18,7 @@ except ImportError: lxml_etree = None -from elementpath import XPathContext, AttributeNode +from elementpath import XPathContext, AttributeNode, select from elementpath.datatypes import Timezone, DateTime10, DateTime, DateTimeStamp, \ GregorianDay, GregorianMonth, GregorianMonthDay, GregorianYear10, GregorianYearMonth10, \ Duration, YearMonthDuration, DayTimeDuration, Date10, Time, QName, UntypedAtomic, \ @@ -702,6 +702,25 @@ 'no constructor function exists for xs:NOTATION') self.wrong_name('"A120" castable as xs:NOTATION', 'XPST0080') + def test_missing_context_on_namespaced_name__issue_068(self): + namespaces = { + 'test': "urn:example:names:common-test-names" + } + + root = self.etree.XML(""" + <A xmlns:test="urn:example:names:common-test-names"> + <B> + <test:number>1</test:number> + </B> + </A> + """) + + context_node = select(root, "B", namespaces=namespaces)[0] + result = select(root, "xs:decimal(./test:number)", namespaces, item=context_node) + self.assertEqual(result, 1) + result = select(root, "xs:decimal(test:number)", namespaces, item=context_node) + self.assertEqual(result, 1) + @unittest.skipIf(lxml_etree is None, "The lxml library is not installed") class LxmlXPath2ConstructorsTest(XPath2ConstructorsTest): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/elementpath-4.1.3/tox.ini new/elementpath-4.1.4/tox.ini --- old/elementpath-4.1.3/tox.ini 2023-06-17 19:30:54.000000000 +0200 +++ new/elementpath-4.1.4/tox.ini 2023-06-26 15:50:26.000000000 +0200 @@ -47,7 +47,7 @@ [testenv:mypy-py{38,39,310,311,312,py3}] deps = - mypy==1.3.0 + mypy==1.4.1 xmlschema lxml-stubs commands =
