Hello community,

here is the log from the commit of package python-zipp for openSUSE:Factory 
checked in at 2019-05-07 23:12:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-zipp (Old)
 and      /work/SRC/openSUSE:Factory/.python-zipp.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-zipp"

Tue May  7 23:12:18 2019 rev:2 rq:701008 version:0.4.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-zipp/python-zipp.changes  2019-02-02 
21:49:33.923964388 +0100
+++ /work/SRC/openSUSE:Factory/.python-zipp.new.5148/python-zipp.changes        
2019-05-07 23:12:20.084087736 +0200
@@ -1,0 +2,6 @@
+Mon May  6 08:52:42 UTC 2019 - pgaj...@suse.com
+
+- version update to 0.4.0
+  * #4: Add support for zip files with implied directories.
+
+-------------------------------------------------------------------

Old:
----
  zipp-0.3.3.tar.gz

New:
----
  zipp-0.4.0.tar.gz

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

Other differences:
------------------
++++++ python-zipp.spec ++++++
--- /var/tmp/diff_new_pack.SUBwHn/_old  2019-05-07 23:12:20.704088955 +0200
+++ /var/tmp/diff_new_pack.SUBwHn/_new  2019-05-07 23:12:20.704088955 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-zipp
-Version:        0.3.3
+Version:        0.4.0
 Release:        0
 Summary:        Pathlib-compatible object wrapper for zip files
 License:        MIT

++++++ zipp-0.3.3.tar.gz -> zipp-0.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.3.3/.flake8 new/zipp-0.4.0/.flake8
--- old/zipp-0.3.3/.flake8      2018-12-27 17:37:51.000000000 +0100
+++ new/zipp-0.4.0/.flake8      2019-04-28 19:12:35.000000000 +0200
@@ -2,6 +2,8 @@
 ignore =
        # Allow tabs for indentation
        W191
+       # Workaround for https://github.com/PyCQA/pycodestyle/issues/836
+       E117
        # W503 violates spec https://github.com/PyCQA/pycodestyle/issues/513
        W503
        # W504 has issues 
https://github.com/OCA/maintainer-quality-tools/issues/545
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.3.3/.travis.yml new/zipp-0.4.0/.travis.yml
--- old/zipp-0.3.3/.travis.yml  2018-12-27 17:37:51.000000000 +0100
+++ new/zipp-0.4.0/.travis.yml  2019-04-28 19:12:35.000000000 +0200
@@ -1,5 +1,4 @@
 dist: xenial
-sudo: false
 language: python
 
 python:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.3.3/CHANGES.rst new/zipp-0.4.0/CHANGES.rst
--- old/zipp-0.3.3/CHANGES.rst  2018-12-27 17:37:51.000000000 +0100
+++ new/zipp-0.4.0/CHANGES.rst  2019-04-28 19:12:35.000000000 +0200
@@ -1,3 +1,8 @@
+v0.4.0
+======
+
+#4: Add support for zip files with implied directories.
+
 v0.3.3
 ======
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.3.3/PKG-INFO new/zipp-0.4.0/PKG-INFO
--- old/zipp-0.3.3/PKG-INFO     2018-12-27 17:38:11.000000000 +0100
+++ new/zipp-0.4.0/PKG-INFO     2019-04-28 19:12:54.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: zipp
-Version: 0.3.3
+Version: 0.4.0
 Summary: Pathlib-compatible object wrapper for zip files
 Home-page: https://github.com/jaraco/zipp
 Author: Jason R. Coombs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.3.3/conftest.py new/zipp-0.4.0/conftest.py
--- old/zipp-0.3.3/conftest.py  2018-12-27 17:37:51.000000000 +0100
+++ new/zipp-0.4.0/conftest.py  2019-04-28 19:12:35.000000000 +0200
@@ -2,13 +2,41 @@
 
 import io
 import zipfile
-
+import posixpath
 
 import pytest
+from more_itertools import consume
+
+
+def add_dirs(zipfile):
+    """
+    Given a writable zipfile, inject directory entries for
+    any directories implied by the presence of children.
+    """
+    names = zipfile.namelist()
+    consume(
+        zipfile.writestr(name + '/', '')
+        for name in map(posixpath.dirname, names)
+        if name
+        and name + '/' not in names
+    )
+    return zipfile
+
+
+@pytest.fixture(params=[add_dirs, lambda x: x])
+def zipfile_abcde(request):
+    """
+    Build the abcde zipfile with and without dir entries.
+    """
+    return request.param(build_abcde_files())
 
 
 @pytest.fixture
-def zipfile_abcde():
+def zipfile_abcde_full():
+    return add_dirs(build_abcde_files())
+
+
+def build_abcde_files():
     """
     Create a zip file with this structure:
 
@@ -22,9 +50,7 @@
     data = io.BytesIO()
     zf = zipfile.ZipFile(data, 'w')
     zf.writestr('a.txt', 'content of a')
-    zf.writestr('b/', '')
     zf.writestr('b/c.txt', 'content of c')
-    zf.writestr('b/d/', '')
     zf.writestr('b/d/e.txt', 'content of e')
     zf.filename = 'abcde.zip'
     return zf
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.3.3/pin-pip.py new/zipp-0.4.0/pin-pip.py
--- old/zipp-0.3.3/pin-pip.py   1970-01-01 01:00:00.000000000 +0100
+++ new/zipp-0.4.0/pin-pip.py   2019-04-28 19:12:35.000000000 +0200
@@ -0,0 +1,20 @@
+"""
+Downgrade to pip 19.0 before installing requirements, working
+around limitations introduced in 19.1 (ref
+https://github.com/pypa/pip/issues/6434)
+"""
+
+import sys
+import subprocess
+import shlex
+
+
+def main():
+       subprocess.check_call(shlex.split(
+               'python -m pip install pip<19.1'
+       ))
+       subprocess.check_call(shlex.split(
+               'python -m pip install') + sys.argv[1:])
+
+
+__name__ == '__main__' and main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.3.3/pyproject.toml 
new/zipp-0.4.0/pyproject.toml
--- old/zipp-0.3.3/pyproject.toml       2018-12-27 17:37:51.000000000 +0100
+++ new/zipp-0.4.0/pyproject.toml       2019-04-28 19:12:35.000000000 +0200
@@ -1,3 +1,3 @@
 [build-system]
 requires = ["setuptools>=34.4", "wheel", "setuptools_scm>=1.15"]
-build-backend = 'setuptools.build_meta'
+build-backend = "setuptools.build_meta"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.3.3/pytest.ini new/zipp-0.4.0/pytest.ini
--- old/zipp-0.3.3/pytest.ini   2018-12-27 17:37:51.000000000 +0100
+++ new/zipp-0.4.0/pytest.ini   2019-04-28 19:12:35.000000000 +0200
@@ -7,3 +7,5 @@
        ignore:Using or importing the ABCs::flake8:410
        # workaround for https://sourceforge.net/p/docutils/bugs/348/
        ignore:'U' mode is deprecated::docutils.io
+       # workaround for https://gitlab.com/pycqa/flake8/issues/275
+       ignore:You passed a bytestring as `filenames`.::flake8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.3.3/setup.cfg new/zipp-0.4.0/setup.cfg
--- old/zipp-0.3.3/setup.cfg    2018-12-27 17:38:11.000000000 +0100
+++ new/zipp-0.4.0/setup.cfg    2019-04-28 19:12:54.000000000 +0200
@@ -31,6 +31,7 @@
        pytest-flake8
        
        pathlib2
+       more_itertools
 docs = 
        sphinx
        jaraco.packaging >= 3.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.3.3/skeleton.md new/zipp-0.4.0/skeleton.md
--- old/zipp-0.3.3/skeleton.md  2018-12-27 17:37:51.000000000 +0100
+++ new/zipp-0.4.0/skeleton.md  2019-04-28 19:12:35.000000000 +0200
@@ -10,6 +10,8 @@
 
 The primary advantage to using an SCM for maintaining these techniques is that 
those tools help facilitate the merge between the template and its adopting 
projects.
 
+Another advantage to using an SCM-managed approach is that tools like GitHub 
recognize that a change in the skeleton is the _same change_ across all 
projects that merge with that skeleton. Without the ancestry, with a 
traditional copy/paste approach, a [commit like 
this](https://github.com/jaraco/skeleton/commit/12eed1326e1bc26ce256e7b3f8cd8d3a5beab2d5)
 would produce notifications in the upstream project issue for each and every 
application, but because it's centralized, GitHub provides just the one 
notification when the change is added to the skeleton.
+
 # Usage
 
 ## new projects
@@ -68,7 +70,7 @@
 - Supplies two 'extras':
   - testing: requirements for running tests
   - docs: requirements for building docs
-  - these extras split the declaration into "upstream" (requirements as 
declared by the skeleton) and "local" (those specific to the local project)
+  - these extras split the declaration into "upstream" (requirements as 
declared by the skeleton) and "local" (those specific to the local project); 
these markers help avoid merge conflicts
 - Placeholder for defining entry points
 
 Additionally, the setup.py file declares `use_scm_version` which relies on 
[setuptools_scm](https://pypi.org/project/setuptools_scm) to do two things:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.3.3/tox.ini new/zipp-0.4.0/tox.ini
--- old/zipp-0.3.3/tox.ini      2018-12-27 17:37:51.000000000 +0100
+++ new/zipp-0.4.0/tox.ini      2019-04-28 19:12:35.000000000 +0200
@@ -1,8 +1,11 @@
 [tox]
 envlist = python
-minversion = 2.4
+minversion = 3.2
+# https://github.com/jaraco/skeleton/issues/6
+tox_pip_extensions_ext_venv_update = true
 
 [testenv]
+install_command = python pin-pip.py {opts} {packages}
 deps =
        setuptools>=31.0.1
 commands =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.3.3/zipp.egg-info/PKG-INFO 
new/zipp-0.4.0/zipp.egg-info/PKG-INFO
--- old/zipp-0.3.3/zipp.egg-info/PKG-INFO       2018-12-27 17:38:10.000000000 
+0100
+++ new/zipp-0.4.0/zipp.egg-info/PKG-INFO       2019-04-28 19:12:53.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: zipp
-Version: 0.3.3
+Version: 0.4.0
 Summary: Pathlib-compatible object wrapper for zip files
 Home-page: https://github.com/jaraco/zipp
 Author: Jason R. Coombs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.3.3/zipp.egg-info/SOURCES.txt 
new/zipp-0.4.0/zipp.egg-info/SOURCES.txt
--- old/zipp-0.3.3/zipp.egg-info/SOURCES.txt    2018-12-27 17:38:11.000000000 
+0100
+++ new/zipp-0.4.0/zipp.egg-info/SOURCES.txt    2019-04-28 19:12:53.000000000 
+0200
@@ -6,6 +6,7 @@
 README.rst
 appveyor.yml
 conftest.py
+pin-pip.py
 pyproject.toml
 pytest.ini
 setup.cfg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.3.3/zipp.egg-info/requires.txt 
new/zipp-0.4.0/zipp.egg-info/requires.txt
--- old/zipp-0.3.3/zipp.egg-info/requires.txt   2018-12-27 17:38:10.000000000 
+0100
+++ new/zipp-0.4.0/zipp.egg-info/requires.txt   2019-04-28 19:12:53.000000000 
+0200
@@ -9,3 +9,4 @@
 pytest-checkdocs
 pytest-flake8
 pathlib2
+more_itertools
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.3.3/zipp.py new/zipp-0.4.0/zipp.py
--- old/zipp-0.3.3/zipp.py      2018-12-27 17:37:51.000000000 +0100
+++ new/zipp-0.4.0/zipp.py      2019-04-28 19:12:35.000000000 +0200
@@ -1,5 +1,5 @@
 """
->>> root = Path(getfixture('zipfile_abcde'))
+>>> root = Path(getfixture('zipfile_abcde_full'))
 >>> a, b = root.iterdir()
 >>> a
 Path('abcde.zip', 'a.txt')
@@ -28,7 +28,6 @@
 import sys
 import posixpath
 import zipfile
-import operator
 import functools
 
 __metaclass__ = type
@@ -82,13 +81,12 @@
         return not self.is_dir()
 
     def exists(self):
-        return self.at in self.root.namelist()
+        return self.at in self._names()
 
     def iterdir(self):
         if not self.is_dir():
             raise ValueError("Can't listdir a file")
-        names = map(operator.attrgetter('filename'), self.root.infolist())
-        subs = map(self._next, names)
+        subs = map(self._next, self._names())
         return filter(self._is_child, subs)
 
     def __str__(self):
@@ -101,10 +99,22 @@
         add = self._pathlib_compat(add)
         next = posixpath.join(self.at, add)
         next_dir = posixpath.join(self.at, add, '')
-        names = self.root.namelist()
+        names = self._names()
         return self._next(
             next_dir if next not in names and next_dir in names else next
         )
 
+    @staticmethod
+    def _add_implied_dirs(names):
+        return names + [
+            name + '/'
+            for name in map(posixpath.dirname, names)
+            if name
+            and name + '/' not in names
+        ]
+
+    def _names(self):
+        return self._add_implied_dirs(self.root.namelist())
+
     if sys.version_info < (3,):
         __div__ = __truediv__


Reply via email to