Hello community,

here is the log from the commit of package python-elementpath for 
openSUSE:Factory checked in at 2020-11-13 18:52:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-elementpath (Old)
 and      /work/SRC/openSUSE:Factory/.python-elementpath.new.24930 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-elementpath"

Fri Nov 13 18:52:54 2020 rev:7 rq:847302 version:2.0.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-elementpath/python-elementpath.changes    
2020-10-29 09:46:43.096078622 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-elementpath.new.24930/python-elementpath.changes
 2020-11-13 18:53:02.393710046 +0100
@@ -1,0 +2,6 @@
+Mon Nov  9 15:01:31 UTC 2020 - Matej Cepl <mc...@suse.com>
+
+- Update to 2.0.4:
+  * Lazy tokenizer for parser classes in order to minimize import time
+
+-------------------------------------------------------------------

Old:
----
  v2.0.3.tar.gz

New:
----
  v2.0.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-elementpath.spec ++++++
--- /var/tmp/diff_new_pack.4gJLWz/_old  2020-11-13 18:53:04.521712295 +0100
+++ /var/tmp/diff_new_pack.4gJLWz/_new  2020-11-13 18:53:04.521712295 +0100
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-elementpath
-Version:        2.0.3
+Version:        2.0.4
 Release:        0
 Summary:        XPath 1.0/20 parsers and selectors for ElementTree and lxml
 License:        MIT

++++++ v2.0.3.tar.gz -> v2.0.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elementpath-2.0.3/.travis.yml 
new/elementpath-2.0.4/.travis.yml
--- old/elementpath-2.0.3/.travis.yml   2020-09-13 11:20:47.000000000 +0200
+++ new/elementpath-2.0.4/.travis.yml   2020-10-30 17:55:45.000000000 +0100
@@ -1,9 +1,9 @@
 language: python
 python:
-  - "3.5"
   - "3.6"
   - "3.7"
   - "3.8"
+  - "3.9"
   - "pypy3"
 before_install:
   - sudo apt-get update && sudo apt-get --reinstall install -qq 
language-pack-en language-pack-de language-pack-it
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elementpath-2.0.3/CHANGELOG.rst 
new/elementpath-2.0.4/CHANGELOG.rst
--- old/elementpath-2.0.3/CHANGELOG.rst 2020-09-13 11:20:47.000000000 +0200
+++ new/elementpath-2.0.4/CHANGELOG.rst 2020-10-30 17:55:45.000000000 +0100
@@ -2,6 +2,10 @@
 CHANGELOG
 *********
 
+`v2.0.4`_ (2020-10-30)
+======================
+* Lazy tokenizer for parser classes in order to minimize import time
+
 `v2.0.3`_ (2020-09-13)
 ======================
 * Fix context handling in cycle statements
@@ -250,3 +254,4 @@
 .. _v2.0.1: https://github.com/sissaschool/elementpath/compare/v2.0.0...v2.0.1
 .. _v2.0.2: https://github.com/sissaschool/elementpath/compare/v2.0.1...v2.0.2
 .. _v2.0.3: https://github.com/sissaschool/elementpath/compare/v2.0.2...v2.0.3
+.. _v2.0.4: https://github.com/sissaschool/elementpath/compare/v2.0.3...v2.0.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elementpath-2.0.3/README.rst 
new/elementpath-2.0.4/README.rst
--- old/elementpath-2.0.3/README.rst    2020-09-13 11:20:47.000000000 +0200
+++ new/elementpath-2.0.4/README.rst    2020-10-30 17:55:45.000000000 +0100
@@ -31,7 +31,7 @@
 Installation and usage
 ======================
 
-You can install the package with *pip* in a Python 3.5+ environment::
+You can install the package with *pip* in a Python 3.6+ environment::
 
     pip install elementpath
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elementpath-2.0.3/doc/conf.py 
new/elementpath-2.0.4/doc/conf.py
--- old/elementpath-2.0.3/doc/conf.py   2020-09-13 11:20:47.000000000 +0200
+++ new/elementpath-2.0.4/doc/conf.py   2020-10-30 17:55:45.000000000 +0100
@@ -31,7 +31,7 @@
 # The short X.Y version
 version = '2.0'
 # The full version, including alpha/beta/rc tags
-release = '2.0.3'
+release = '2.0.4'
 
 
 # -- General configuration ---------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elementpath-2.0.3/elementpath/__init__.py 
new/elementpath-2.0.4/elementpath/__init__.py
--- old/elementpath-2.0.3/elementpath/__init__.py       2020-09-13 
11:20:47.000000000 +0200
+++ new/elementpath-2.0.4/elementpath/__init__.py       2020-10-30 
17:55:45.000000000 +0100
@@ -7,7 +7,7 @@
 #
 # @author Davide Brunato <brun...@sissa.it>
 #
-__version__ = '2.0.3'
+__version__ = '2.0.4'
 __author__ = "Davide Brunato"
 __contact__ = "brun...@sissa.it"
 __copyright__ = "Copyright 2018-2020, SISSA"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elementpath-2.0.3/elementpath/tdop.py 
new/elementpath-2.0.4/elementpath/tdop.py
--- old/elementpath-2.0.3/elementpath/tdop.py   2020-09-13 11:20:47.000000000 
+0200
+++ new/elementpath-2.0.4/elementpath/tdop.py   2020-10-30 17:55:45.000000000 
+0100
@@ -377,7 +377,7 @@
 
     def __init__(self):
         if self.tokenizer is None:
-            raise ValueError("The parser %r is not built!" % self.__class__)
+            self.build()
         self.source = ''
         self.tokens = iter(())
         self.match = None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elementpath-2.0.3/elementpath/xpath1/xpath1_axes.py 
new/elementpath-2.0.4/elementpath/xpath1/xpath1_axes.py
--- old/elementpath-2.0.3/elementpath/xpath1/xpath1_axes.py     2020-09-13 
11:20:47.000000000 +0200
+++ new/elementpath-2.0.4/elementpath/xpath1/xpath1_axes.py     2020-10-30 
17:55:45.000000000 +0100
@@ -129,4 +129,3 @@
 
 
 register = XPath1Parser.register('(end)')
-XPath1Parser.build()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/elementpath-2.0.3/elementpath/xpath1/xpath1_functions.py 
new/elementpath-2.0.4/elementpath/xpath1/xpath1_functions.py
--- old/elementpath-2.0.3/elementpath/xpath1/xpath1_functions.py        
2020-09-13 11:20:47.000000000 +0200
+++ new/elementpath-2.0.4/elementpath/xpath1/xpath1_functions.py        
2020-10-30 17:55:45.000000000 +0100
@@ -295,9 +295,12 @@
             lang = context.item.attrib[XML_LANG].strip()
         except KeyError:
             for elem in context.iter_ancestors():
-                if XML_LANG in elem.attrib:
-                    lang = elem.attrib[XML_LANG]
-                    break
+                try:
+                    if XML_LANG in elem.attrib:
+                        lang = elem.attrib[XML_LANG]
+                        break
+                except AttributeError:
+                    pass  # is a document node
             else:
                 return False
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/elementpath-2.0.3/elementpath/xpath2/xpath2_constructors.py 
new/elementpath-2.0.4/elementpath/xpath2/xpath2_constructors.py
--- old/elementpath-2.0.3/elementpath/xpath2/xpath2_constructors.py     
2020-09-13 11:20:47.000000000 +0200
+++ new/elementpath-2.0.4/elementpath/xpath2/xpath2_constructors.py     
2020-10-30 17:55:45.000000000 +0100
@@ -576,6 +576,3 @@
         return arg
     else:
         return self.cast(arg)
-
-
-XPath2Parser.build()  # XPath 2.0 definition complete, can build the parser 
class.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/elementpath-2.0.3/elementpath/xpath2/xpath2_functions.py 
new/elementpath-2.0.4/elementpath/xpath2/xpath2_functions.py
--- old/elementpath-2.0.3/elementpath/xpath2/xpath2_functions.py        
2020-09-13 11:20:47.000000000 +0200
+++ new/elementpath-2.0.4/elementpath/xpath2/xpath2_functions.py        
2020-10-30 17:55:45.000000000 +0100
@@ -1229,9 +1229,12 @@
             return False
 
         for elem in context.iter_ancestors():
-            if XML_LANG in elem.attrib:
-                lang = elem.attrib[XML_LANG]
-                break
+            try:
+                if XML_LANG in elem.attrib:
+                    lang = elem.attrib[XML_LANG]
+                    break
+            except AttributeError:
+                pass  # is a document node
         else:
             return False
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elementpath-2.0.3/elementpath/xpath_context.py 
new/elementpath-2.0.4/elementpath/xpath_context.py
--- old/elementpath-2.0.3/elementpath/xpath_context.py  2020-09-13 
11:20:47.000000000 +0200
+++ new/elementpath-2.0.4/elementpath/xpath_context.py  2020-10-30 
17:55:45.000000000 +0100
@@ -65,7 +65,7 @@
             else:
                 self.item, self._elem = item, root
         elif is_document_node(root):
-            self.item = None if item is None else item
+            self.item = item
         else:
             msg = "invalid root {!r}, an Element or an ElementTree instance 
required"
             raise ElementPathTypeError(msg.format(root))
@@ -142,7 +142,10 @@
         try:
             return self._parent_map[elem]
         except (KeyError, TypeError):
-            self._parent_map = {child: elem for elem in self.root.iter() for 
child in elem}
+            self._parent_map = {child: e for e in self.root.iter() for child 
in e}
+            if is_document_node(self.root):
+                self._parent_map[self.root.getroot()] = self.root
+
             try:
                 return self._parent_map[elem]
             except KeyError:
@@ -164,8 +167,12 @@
             item = item[0]
 
         while True:
+            try:
+                path.append(item.tag)
+            except AttributeError:
+                pass  # is a document node
+
             parent = self.get_parent(item)
-            path.append(item.tag)
             if parent is None:
                 return '/{}'.format('/'.join(reversed(path)))
             item = parent
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elementpath-2.0.3/publiccode.yml 
new/elementpath-2.0.4/publiccode.yml
--- old/elementpath-2.0.3/publiccode.yml        2020-09-13 11:20:47.000000000 
+0200
+++ new/elementpath-2.0.4/publiccode.yml        2020-10-30 17:55:45.000000000 
+0100
@@ -6,8 +6,8 @@
 name: elementpath
 url: 'https://github.com/sissaschool/elementpath'
 landingURL: 'https://github.com/sissaschool/elementpath'
-releaseDate: '2020-09-13'
-softwareVersion: v2.0.3
+releaseDate: '2020-10-30'
+softwareVersion: v2.0.4
 developmentStatus: stable
 platforms:
   - linux
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/elementpath-2.0.3/setup.py 
new/elementpath-2.0.4/setup.py
--- old/elementpath-2.0.3/setup.py      2020-09-13 11:20:47.000000000 +0200
+++ new/elementpath-2.0.4/setup.py      2020-10-30 17:55:45.000000000 +0100
@@ -15,7 +15,7 @@
 
 setup(
     name='elementpath',
-    version='2.0.3',
+    version='2.0.4',
     packages=find_packages(include=['elementpath', 'elementpath.*']),
     author='Davide Brunato',
     author_email='brun...@sissa.it',
@@ -38,10 +38,10 @@
         'Programming Language :: Python',
         'Programming Language :: Python :: 3',
         'Programming Language :: Python :: 3 :: Only',
-        'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
         'Programming Language :: Python :: 3.7',
         'Programming Language :: Python :: 3.8',
+        'Programming Language :: Python :: 3.9',
         'Programming Language :: Python :: Implementation :: CPython',
         'Programming Language :: Python :: Implementation :: PyPy',
         'Topic :: Software Development :: Libraries',
_______________________________________________
openSUSE Commits mailing list -- commit@lists.opensuse.org
To unsubscribe, email commit-le...@lists.opensuse.org
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/commit@lists.opensuse.org

Reply via email to