Hello community,

here is the log from the commit of package python-zipp for openSUSE:Factory 
checked in at 2020-04-19 21:40:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-zipp (Old)
 and      /work/SRC/openSUSE:Factory/.python-zipp.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-zipp"

Sun Apr 19 21:40:01 2020 rev:8 rq:784549 version:3.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-zipp/python-zipp.changes  2019-09-04 
08:56:38.695086012 +0200
+++ /work/SRC/openSUSE:Factory/.python-zipp.new.2738/python-zipp.changes        
2020-04-19 21:40:03.054946893 +0200
@@ -1,0 +2,28 @@
+Fri Mar 13 07:52:03 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Drop not-removed py2 dependencies
+
+-------------------------------------------------------------------
+Mon Mar  9 12:20:53 UTC 2020 - [email protected]
+
+- version update to 3.1.0
+  * #47: ``.open`` now raises ``FileNotFoundError`` and
+    ``IsADirectoryError`` when appropriate.
+  * #44: ``zipp.Path.open()`` now supports a compatible signature
+    as ``pathlib.Path.open()``, accepting text (default) or binary
+    modes and soliciting keyword parameters passed through to
+    ``io.TextIOWrapper`` (encoding, newline, etc). The stream is
+    opened in text-mode by default now. ``open`` no
+    longer accepts ``pwd`` as a positional argument and does not
+    accept the ``force_zip64`` parameter at all. This change is
+    a backward-incompatible change for that single function.
+  * #43: Restored performance of implicit dir computation.
+  * #36: Rebuild package with minimum Python version declared both
+    in package metadata and in the python tag.
+  * #32: For read-only zip files, complexity of ``.exists`` and
+    ``joinpath`` is now constant time instead of ``O(n)``, preventing
+    quadratic time in common use-cases and rendering large
+    zip files unusable for Path. Big thanks to Benjy Weinberger
+    for the bug report and contributed fix (#33).
+
+-------------------------------------------------------------------

Old:
----
  zipp-0.6.0.tar.gz

New:
----
  zipp-3.1.0.tar.gz

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

Other differences:
------------------
++++++ python-zipp.spec ++++++
--- /var/tmp/diff_new_pack.iuJ0si/_old  2020-04-19 21:40:06.102953009 +0200
+++ /var/tmp/diff_new_pack.iuJ0si/_new  2020-04-19 21:40:06.106953017 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-zipp
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,6 +17,7 @@
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define skip_python2 1
 %global flavor @BUILD_FLAVOR@%{nil}
 %if "%{flavor}" == "test"
 %define psuffix -test
@@ -26,7 +27,7 @@
 %bcond_with test
 %endif
 Name:           python-zipp%{psuffix}
-Version:        0.6.0
+Version:        3.1.0
 Release:        0
 Summary:        Pathlib-compatible object wrapper for zip files
 License:        MIT
@@ -35,16 +36,15 @@
 Source:         
https://files.pythonhosted.org/packages/source/z/zipp/zipp-%{version}.tar.gz
 BuildRequires:  %{python_module setuptools_scm >= 1.15.0}
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module toml}
 BuildRequires:  fdupes
-BuildRequires:  python-contextlib2
-BuildRequires:  python-rpm-macros
-BuildRequires:  python-unittest2
+Requires:       python-more-itertools
 BuildArch:      noarch
 %if %{with test}
+BuildRequires:  %{python_module jaraco.itertools}
 BuildRequires:  %{python_module more-itertools}
 BuildRequires:  %{python_module pytest >= 3.5}
 %endif
-Requires:       python-more-itertools
 %python_subpackages
 
 %description
@@ -66,6 +66,10 @@
 
 %if %{with test}
 %check
+# skip performance test (we do not have func_timeout sofar)
+sed -i -e 's:import func_timeout::' \
+       -e 's:@func_timeout.func_set_timeout(.):@unittest.skip("skip 
performance test"):' \
+       test_zipp.py
 %pytest
 %endif
 

++++++ zipp-0.6.0.tar.gz -> zipp-3.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.6.0/.coveragerc new/zipp-3.1.0/.coveragerc
--- old/zipp-0.6.0/.coveragerc  1970-01-01 01:00:00.000000000 +0100
+++ new/zipp-3.1.0/.coveragerc  2020-03-03 11:58:43.000000000 +0100
@@ -0,0 +1,5 @@
+[run]
+omit = .tox/*
+
+[report]
+show_missing = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.6.0/.pre-commit-config.yaml 
new/zipp-3.1.0/.pre-commit-config.yaml
--- old/zipp-0.6.0/.pre-commit-config.yaml      2019-08-24 18:27:31.000000000 
+0200
+++ new/zipp-3.1.0/.pre-commit-config.yaml      2020-03-03 11:58:43.000000000 
+0100
@@ -1,5 +1,10 @@
 repos:
-- repo: https://github.com/ambv/black
-  rev: 18.9b0
+- repo: https://github.com/psf/black
+  rev: 19.10b0
   hooks:
   - id: black
+
+- repo: https://github.com/asottile/blacken-docs
+  rev: v1.4.0
+  hooks:
+  - id: blacken-docs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.6.0/.travis.yml new/zipp-3.1.0/.travis.yml
--- old/zipp-0.6.0/.travis.yml  2019-08-24 18:27:31.000000000 +0200
+++ new/zipp-3.1.0/.travis.yml  2020-03-03 11:58:43.000000000 +0100
@@ -2,18 +2,8 @@
 language: python
 
 python:
-- 2.7
-- 3.5
-- &latest_py3 3.7
-
-jobs:
-  fast_finish: true
-  include:
-  - stage: deploy
-    if: tag IS present
-    python: *latest_py3
-    before_script: skip
-    script: tox -e release
+- 3.6
+- &latest_py3 3.8
 
 cache: pip
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.6.0/CHANGES.rst new/zipp-3.1.0/CHANGES.rst
--- old/zipp-0.6.0/CHANGES.rst  2019-08-24 18:27:31.000000000 +0200
+++ new/zipp-3.1.0/CHANGES.rst  2020-03-03 11:58:43.000000000 +0100
@@ -1,3 +1,72 @@
+v3.1.0
+======
+
+#47: ``.open`` now raises ``FileNotFoundError`` and
+``IsADirectoryError`` when appropriate.
+
+v3.0.0
+======
+
+#44: Merge with v1.2.0.
+
+v1.2.0
+======
+
+#44: ``zipp.Path.open()`` now supports a compatible signature
+as ``pathlib.Path.open()``, accepting text (default) or binary
+modes and soliciting keyword parameters passed through to
+``io.TextIOWrapper`` (encoding, newline, etc). The stream is
+opened in text-mode by default now. ``open`` no
+longer accepts ``pwd`` as a positional argument and does not
+accept the ``force_zip64`` parameter at all. This change is
+a backward-incompatible change for that single function.
+
+v2.2.1
+======
+
+#43: Merge with v1.1.1.
+
+v1.1.1
+======
+
+#43: Restored performance of implicit dir computation.
+
+v2.2.0
+======
+
+#36: Rebuild package with minimum Python version declared both
+in package metadata and in the python tag.
+
+v2.1.0
+======
+
+#32: Merge with v1.1.0.
+
+v1.1.0
+======
+
+#32: For read-only zip files, complexity of ``.exists`` and
+``joinpath`` is now constant time instead of ``O(n)``, preventing
+quadratic time in common use-cases and rendering large
+zip files unusable for Path. Big thanks to Benjy Weinberger
+for the bug report and contributed fix (#33).
+
+v2.0.1
+======
+
+#30: Corrected version inference (from jaraco/skeleton#12).
+
+v2.0.0
+======
+
+Require Python 3.6 or later.
+
+v1.0.0
+======
+
+Re-release of 0.6 to correspond with release as found in
+Python 3.8.
+
 v0.6.0
 ======
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.6.0/LICENSE new/zipp-3.1.0/LICENSE
--- old/zipp-0.6.0/LICENSE      2019-08-24 18:27:31.000000000 +0200
+++ new/zipp-3.1.0/LICENSE      2020-03-03 11:58:43.000000000 +0100
@@ -1,7 +1,19 @@
 Copyright Jason R. Coombs
 
-Permission is hereby granted, free of charge, to any person obtaining a copy 
of this software and associated documentation files (the "Software"), to deal 
in the Software without restriction, including without limitation the rights to 
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
of the Software, and to permit persons to whom the Software is furnished to do 
so, subject to the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
 
-The above copyright notice and this permission notice shall be included in all 
copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
 
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
SOFTWARE.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.6.0/PKG-INFO new/zipp-3.1.0/PKG-INFO
--- old/zipp-0.6.0/PKG-INFO     2019-08-24 18:27:49.000000000 +0200
+++ new/zipp-3.1.0/PKG-INFO     2020-03-03 11:59:12.363708500 +0100
@@ -1,21 +1,27 @@
 Metadata-Version: 2.1
 Name: zipp
-Version: 0.6.0
+Version: 3.1.0
 Summary: Backport of pathlib-compatible object wrapper for zip files
 Home-page: https://github.com/jaraco/zipp
 Author: Jason R. Coombs
 Author-email: [email protected]
 License: UNKNOWN
 Description: .. image:: https://img.shields.io/pypi/v/zipp.svg
-           :target: https://pypi.org/project/zipp
+           :target: `PyPI link`_
         
         .. image:: https://img.shields.io/pypi/pyversions/zipp.svg
+           :target: `PyPI link`_
+        
+        .. _PyPI link: https://pypi.org/project/zipp
+        
+        .. image:: 
https://dev.azure.com/jaraco/zipp/_apis/build/status/jaraco.zipp?branchName=master
+           :target: 
https://dev.azure.com/jaraco/zipp/_build/latest?definitionId=1&branchName=master
         
         .. image:: https://img.shields.io/travis/jaraco/zipp/master.svg
            :target: https://travis-ci.org/jaraco/zipp
         
         .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
-           :target: https://github.com/ambv/black
+           :target: https://github.com/psf/black
            :alt: Code style: Black
         
         .. image:: https://img.shields.io/appveyor/ci/jaraco/zipp/master.svg
@@ -32,8 +38,8 @@
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
 Classifier: License :: OSI Approved :: MIT License
-Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-Requires-Python: >=2.7
-Provides-Extra: docs
+Classifier: Programming Language :: Python :: 3 :: Only
+Requires-Python: >=3.6
 Provides-Extra: testing
+Provides-Extra: docs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.6.0/README.rst new/zipp-3.1.0/README.rst
--- old/zipp-0.6.0/README.rst   2019-08-24 18:27:31.000000000 +0200
+++ new/zipp-3.1.0/README.rst   2020-03-03 11:58:43.000000000 +0100
@@ -1,13 +1,19 @@
 .. image:: https://img.shields.io/pypi/v/zipp.svg
-   :target: https://pypi.org/project/zipp
+   :target: `PyPI link`_
 
 .. image:: https://img.shields.io/pypi/pyversions/zipp.svg
+   :target: `PyPI link`_
+
+.. _PyPI link: https://pypi.org/project/zipp
+
+.. image:: 
https://dev.azure.com/jaraco/zipp/_apis/build/status/jaraco.zipp?branchName=master
+   :target: 
https://dev.azure.com/jaraco/zipp/_build/latest?definitionId=1&branchName=master
 
 .. image:: https://img.shields.io/travis/jaraco/zipp/master.svg
    :target: https://travis-ci.org/jaraco/zipp
 
 .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
-   :target: https://github.com/ambv/black
+   :target: https://github.com/psf/black
    :alt: Code style: Black
 
 .. image:: https://img.shields.io/appveyor/ci/jaraco/zipp/master.svg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.6.0/appveyor.yml new/zipp-3.1.0/appveyor.yml
--- old/zipp-0.6.0/appveyor.yml 2019-08-24 18:27:31.000000000 +0200
+++ new/zipp-3.1.0/appveyor.yml 2020-03-03 11:58:43.000000000 +0100
@@ -4,7 +4,7 @@
 
   matrix:
     - PYTHON: "C:\\Python36-x64"
-    - PYTHON: "C:\\Python27-x64"
+    - PYTHON: "C:\\Python38-x64"
 
 install:
   # symlink python from a directory with a space
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.6.0/azure-pipelines.yml 
new/zipp-3.1.0/azure-pipelines.yml
--- old/zipp-0.6.0/azure-pipelines.yml  1970-01-01 01:00:00.000000000 +0100
+++ new/zipp-3.1.0/azure-pipelines.yml  2020-03-03 11:58:43.000000000 +0100
@@ -0,0 +1,71 @@
+# Create the project in Azure with:
+# az devops project create --name $name --organization 
https://dev.azure.com/$org/ --visibility public
+# then configure the pipelines (through web UI)
+
+trigger:
+  branches:
+    include:
+    - '*'
+  tags:
+    include:
+    - '*'
+
+pool:
+  vmimage: 'Ubuntu-18.04'
+
+variables:
+- group: Azure secrets
+
+stages:
+- stage: Test
+  jobs:
+
+  - job: 'Test'
+    strategy:
+      matrix:
+        Python36:
+          python.version: '3.6'
+        Python38:
+          python.version: '3.8'
+      maxParallel: 4
+
+    steps:
+    - task: UsePythonVersion@0
+      inputs:
+        versionSpec: '$(python.version)'
+        architecture: 'x64'
+
+    - script: python -m pip install tox
+      displayName: 'Install tox'
+
+    - script: |
+        tox -- --junit-xml=test-results.xml
+      displayName: 'run tests'
+
+    - task: PublishTestResults@2
+      inputs:
+        testResultsFiles: '**/test-results.xml'
+        testRunTitle: 'Python $(python.version)'
+      condition: succeededOrFailed()
+
+- stage: Publish
+  dependsOn: Test
+  jobs:
+  - job: 'Publish'
+
+    steps:
+    - task: UsePythonVersion@0
+      inputs:
+        versionSpec: '3.8'
+        architecture: 'x64'
+
+    - script: python -m pip install tox
+      displayName: 'Install tox'
+
+    - script: |
+        tox -e release
+      env:
+        TWINE_PASSWORD: $(PyPI-token)
+      displayName: 'publish to PyPI'
+
+  condition: contains(variables['Build.SourceBranch'], 'tags')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.6.0/pyproject.toml 
new/zipp-3.1.0/pyproject.toml
--- old/zipp-0.6.0/pyproject.toml       2019-08-24 18:27:31.000000000 +0200
+++ new/zipp-3.1.0/pyproject.toml       2020-03-03 11:58:43.000000000 +0100
@@ -1,6 +1,8 @@
 [build-system]
-requires = ["setuptools>=34.4", "wheel", "setuptools_scm>=1.15"]
+requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4.1"]
 build-backend = "setuptools.build_meta"
 
 [tool.black]
 skip-string-normalization = true
+
+[tool.setuptools_scm]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.6.0/setup.cfg new/zipp-3.1.0/setup.cfg
--- old/zipp-0.6.0/setup.cfg    2019-08-24 18:27:49.000000000 +0200
+++ new/zipp-3.1.0/setup.cfg    2020-03-03 11:59:12.363708500 +0100
@@ -1,6 +1,3 @@
-[bdist_wheel]
-universal = 1
-
 [metadata]
 license_file = LICENSE
 name = zipp
@@ -13,24 +10,22 @@
        Development Status :: 5 - Production/Stable
        Intended Audience :: Developers
        License :: OSI Approved :: MIT License
-       Programming Language :: Python :: 2.7
        Programming Language :: Python :: 3
+       Programming Language :: Python :: 3 :: Only
 
 [options]
 py_modules = zipp
 packages = find:
 include_package_data = true
-python_requires = >=2.7
+python_requires = >=3.6
 install_requires = 
-       more_itertools
-setup_requires = setuptools_scm >= 1.15.0
+setup_requires = setuptools_scm[toml] >= 3.4.1
 
 [options.extras_require]
 testing = 
        
-       pathlib2
-       contextlib2
-       unittest2
+       jaraco.itertools
+       func-timeout
 docs = 
        sphinx
        jaraco.packaging >= 3.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.6.0/setup.py new/zipp-3.1.0/setup.py
--- old/zipp-0.6.0/setup.py     2019-08-24 18:27:31.000000000 +0200
+++ new/zipp-3.1.0/setup.py     2020-03-03 11:58:43.000000000 +0100
@@ -3,4 +3,4 @@
 import setuptools
 
 if __name__ == "__main__":
-    setuptools.setup(use_scm_version=True)
+    setuptools.setup()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.6.0/skeleton.md new/zipp-3.1.0/skeleton.md
--- old/zipp-0.6.0/skeleton.md  2019-08-24 18:27:31.000000000 +0200
+++ new/zipp-3.1.0/skeleton.md  2020-03-03 11:58:43.000000000 +0100
@@ -2,9 +2,9 @@
 
 This project is merged with [skeleton](https://github.com/jaraco/skeleton). 
What is skeleton? It's the scaffolding of a Python project jaraco [introduced 
in his blog](https://blog.jaraco.com/a-project-skeleton-for-python-projects/). 
It seeks to provide a means to re-use techniques and inherit advances when 
managing projects for distribution.
 
-## An SCM Managed Approach
+## An SCM-Managed Approach
 
-While maintaining dozens of projects in PyPI, jaraco derives best practices 
for project distribution and publishes them in the [skeleton 
repo](https://github.com/jaraco/skeleton), a git repo capturing the evolution 
and culmination of these best practices.
+While maintaining dozens of projects in PyPI, jaraco derives best practices 
for project distribution and publishes them in the [skeleton 
repo](https://github.com/jaraco/skeleton), a Git repo capturing the evolution 
and culmination of these best practices.
 
 It's intended to be used by a new or existing project to adopt these practices 
and honed and proven techniques. Adopters are encouraged to use the project 
directly and maintain a small deviation from the technique, make their own fork 
for more substantial changes unique to their environment or preferences, or 
simply adopt the skeleton once and abandon it thereafter.
 
@@ -38,7 +38,7 @@
 
 ## Updating
 
-Whenever a change is needed or desired for the general technique for 
packaging, it can be made in the skeleton project and then merged into each of 
the derived projects as needed, recommended before each release. As a result, 
features and best practices for packaging are centrally maintained and readily 
trickle into a whole suite of packages. This technique lowers the amount of 
tedious work necessary to create or maintain a project, and coupled with other 
techniques like continuous integration and deployment, lowers the cost of 
creating and maintaining refined Python projects to just a few, familiar git 
operations.
+Whenever a change is needed or desired for the general technique for 
packaging, it can be made in the skeleton project and then merged into each of 
the derived projects as needed, recommended before each release. As a result, 
features and best practices for packaging are centrally maintained and readily 
trickle into a whole suite of packages. This technique lowers the amount of 
tedious work necessary to create or maintain a project, and coupled with other 
techniques like continuous integration and deployment, lowers the cost of 
creating and maintaining refined Python projects to just a few, familiar Git 
operations.
 
 Thereafter, the target project can make whatever customizations it deems 
relevant to the scaffolding. The project may even at some point decide that the 
divergence is too great to merit renewed merging with the original skeleton. 
This approach applies maximal guidance while creating minimal constraints.
 
@@ -46,16 +46,16 @@
 
 The features/techniques employed by the skeleton include:
 
-- PEP 517/518 based build relying on setuptools as the build tool
-- setuptools declarative configuration using setup.cfg
+- PEP 517/518-based build relying on Setuptools as the build tool
+- Setuptools declarative configuration using setup.cfg
 - tox for running tests
-- A README.rst as reStructuredText with some popular badges, but with 
readthedocs and appveyor badges commented out
+- A README.rst as reStructuredText with some popular badges, but with Read the 
Docs and AppVeyor badges commented out
 - A CHANGES.rst file intended for publishing release notes about the project
-- Use of [black](https://black.readthedocs.io/en/stable/) for code formatting 
(disabled on unsupported Python 3.5 and earlier)
+- Use of [Black](https://black.readthedocs.io/en/stable/) for code formatting 
(disabled on unsupported Python 3.5 and earlier)
 
 ## Packaging Conventions
 
-A pyproject.toml is included to enable PEP 517 and PEP 518 compatibility and 
declares the requirements necessary to build the project on setuptools (a 
minimum version compatible with setup.cfg declarative config).
+A pyproject.toml is included to enable PEP 517 and PEP 518 compatibility and 
declares the requirements necessary to build the project on Setuptools (a 
minimum version compatible with setup.cfg declarative config).
 
 The setup.cfg file implements the following features:
 
@@ -85,46 +85,70 @@
 
 Other environments (invoked with `tox -e {name}`) supplied include:
 
-  - a `build-docs` environment to build the documentation
+  - a `docs` environment to build the documentation
   - a `release` environment to publish the package to PyPI
 
 A pytest.ini is included to define common options around running tests. In 
particular:
 
 - rely on default test discovery in the current directory
 - avoid recursing into common directories not containing tests
-- run doctests on modules and invoke flake8 tests
-- in doctests, allow unicode literals and regular literals to match, allowing 
for doctests to run on Python 2 and 3. Also enable ELLIPSES, a default that 
would be undone by supplying the prior option.
+- run doctests on modules and invoke Flake8 tests
+- in doctests, allow Unicode literals and regular literals to match, allowing 
for doctests to run on Python 2 and 3. Also enable ELLIPSES, a default that 
would be undone by supplying the prior option.
 - filters out known warnings caused by libraries/functionality included by the 
skeleton
 
-Relies a .flake8 file to correct some default behaviors:
+Relies on a .flake8 file to correct some default behaviors:
 
 - disable mutually incompatible rules W503 and W504
-- support for black format
+- support for Black format
 
 ## Continuous Integration
 
-The project is pre-configured to run tests in 
[Travis-CI](https://travis-ci.org) (.travis.yml). Any new project must be 
enabled either through their web site or with the `travis enable` command.
+The project is pre-configured to run tests through multiple CI providers.
+
+### Azure Pipelines
+
+[Azure 
Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines/) are 
the preferred provider as they provide free, fast, multi-platform services. See 
azure-pipelines.yml for more details.
+
+Features include:
+
+- test against multiple Python versions
+- run on Ubuntu Bionic
+
+### Travis CI
+
+[Travis CI](https://travis-ci.org) is configured through .travis.yml. Any new 
project must be enabled either through their web site or with the `travis 
enable` command.
 
 Features include:
-- test against Python 2 and 3
+- test against Python 3
 - run on Ubuntu Xenial
 - correct for broken IPv6
 
-Also provided is a minimal template for running under Appveyor (Windows).
+### AppVeyor
+
+A minimal template for running under AppVeyor (Windows) is provided.
 
 ### Continuous Deployments
 
-In addition to running tests, an additional deploy stage is configured to 
automatically release tagged commits to PyPI using [API 
tokens](https://pypi.org/help/#apitoken). The release process expects an 
authorized token to be configured with Travis as the TWINE_PASSWORD environment 
variable. After the Travis project is created, configure the token through the 
web UI or with a command like the following (bash syntax):
+In addition to running tests, an additional deploy stage is configured to 
automatically release tagged commits to PyPI using [API 
tokens](https://pypi.org/help/#apitoken). The release process expects an 
authorized token to be configured with Azure as the `Azure secrets` variable 
group. This variable group needs to be created only once per organization. For 
example:
 
 ```
-TWINE_PASSWORD={token} travis env copy TWINE_PASSWORD
+# create a resource group if none exists
+az group create --name main --location eastus2
+# create the vault (try different names until something works)
+az keyvault create --name secrets007 --resource-group main
+# create the secret
+az keyvault secret set --vault-name secrets007 --name PyPI-token --value $token
 ```
 
+Then, in the web UI for the project's Pipelines Library, create the `Azure 
secrets` variable group referencing the key vault name.
+
+For more details, see [this blog 
entry](https://blog.jaraco.com/configuring-azure-pipelines-with-secets/).
+
 ## Building Documentation
 
-Documentation is automatically built by [Read the 
Docs](https://readthedocs.org) when the project is registered with it, by way 
of the .readthedocs.yml file. To test the docs build manually, a tox env may be 
invoked as `tox -e build-docs`. Both techniques rely on the dependencies 
declared in `setup.cfg/options.extras_require.docs`.
+Documentation is automatically built by [Read the 
Docs](https://readthedocs.org) when the project is registered with it, by way 
of the .readthedocs.yml file. To test the docs build manually, a tox env may be 
invoked as `tox -e docs`. Both techniques rely on the dependencies declared in 
`setup.cfg/options.extras_require.docs`.
 
-In addition to building the sphinx docs scaffolded in `docs/`, the docs build 
a `history.html` file that first injects release dates and hyperlinks into the 
CHANGES.rst before incorporating it as history in the docs.
+In addition to building the Sphinx docs scaffolded in `docs/`, the docs build 
a `history.html` file that first injects release dates and hyperlinks into the 
CHANGES.rst before incorporating it as history in the docs.
 
 ## Cutting releases
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.6.0/test_zipp.py new/zipp-3.1.0/test_zipp.py
--- old/zipp-0.6.0/test_zipp.py 2019-08-24 18:27:31.000000000 +0200
+++ new/zipp-3.1.0/test_zipp.py 2020-03-03 11:58:43.000000000 +0100
@@ -1,33 +1,17 @@
-# coding: utf-8
-
-from __future__ import division, unicode_literals
-
 import io
 import zipfile
-import posixpath
 import contextlib
+import pathlib
+import unittest
 import tempfile
 import shutil
+import string
 
-try:
-    import pathlib
-except ImportError:
-    import pathlib2 as pathlib
-
-if not hasattr(contextlib, 'ExitStack'):
-    import contextlib2
-    contextlib.ExitStack = contextlib2.ExitStack
-
-try:
-    import unittest
-
-    unittest.TestCase.subTest
-except AttributeError:
-    import unittest2 as unittest
+import jaraco.itertools
+import func_timeout
 
 import zipp
 
-__metaclass__ = type
 consume = tuple
 
 
@@ -36,7 +20,7 @@
     Given a writable zip file zf, inject directory entries for
     any directories implied by the presence of children.
     """
-    for name in zipp.Path._implied_dirs(zf.namelist()):
+    for name in zipp.CompleteDirs._implied_dirs(zf.namelist()):
         zf.writestr(name, b"")
     return zf
 
@@ -123,13 +107,48 @@
             i, = h.iterdir()
             assert i.is_file()
 
+    def test_subdir_is_dir(self):
+        for alpharep in self.zipfile_alpharep():
+            root = zipp.Path(alpharep)
+            assert (root / 'b').is_dir()
+            assert (root / 'b/').is_dir()
+            assert (root / 'g').is_dir()
+            assert (root / 'g/').is_dir()
+
     def test_open(self):
         for alpharep in self.zipfile_alpharep():
             root = zipp.Path(alpharep)
             a, b, g = root.iterdir()
             with a.open() as strm:
                 data = strm.read()
-            assert data == b"content of a"
+            assert data == "content of a"
+
+    def test_open_write(self):
+        """
+        If the zipfile is open for write, it should be possible to
+        write bytes or text to it.
+        """
+        zf = zipp.Path(zipfile.ZipFile(io.BytesIO(), mode='w'))
+        with zf.joinpath('file.bin').open('wb') as strm:
+            strm.write(b'binary contents')
+        with zf.joinpath('file.txt').open('w') as strm:
+            strm.write('text file')
+
+    def test_open_extant_directory(self):
+        """
+        Attempting to open a directory raises IsADirectoryError.
+        """
+        zf = zipp.Path(add_dirs(build_alpharep_fixture()))
+        with self.assertRaises(IsADirectoryError):
+            zf.joinpath('b').open()
+
+    def test_open_missing_directory(self):
+        """
+        Attempting to open a missing directory raises FileNotFoundError.
+        """
+        zf = zipp.Path(add_dirs(build_alpharep_fixture()))
+        with self.assertRaises(FileNotFoundError):
+            zf.joinpath('z').open()
 
     def test_read(self):
         for alpharep in self.zipfile_alpharep():
@@ -196,3 +215,47 @@
         for alpharep in self.zipfile_alpharep():
             root = zipp.Path(alpharep)
             assert (root / 'missing dir/').parent.at == ''
+
+    def test_mutability(self):
+        """
+        If the underlying zipfile is changed, the Path object should
+        reflect that change.
+        """
+        for alpharep in self.zipfile_alpharep():
+            root = zipp.Path(alpharep)
+            a, b, g = root.iterdir()
+            alpharep.writestr('foo.txt', 'foo')
+            alpharep.writestr('bar/baz.txt', 'baz')
+            assert any(
+                child.name == 'foo.txt'
+                for child in root.iterdir())
+            assert (root / 'foo.txt').read_text() == 'foo'
+            baz, = (root / 'bar').iterdir()
+            assert baz.read_text() == 'baz'
+
+    HUGE_ZIPFILE_NUM_ENTRIES = 2 ** 13
+
+    def huge_zipfile(self):
+        """Create a read-only zipfile with a huge number of entries entries."""
+        strm = io.BytesIO()
+        zf = zipfile.ZipFile(strm, "w")
+        for entry in map(str, range(self.HUGE_ZIPFILE_NUM_ENTRIES)):
+            zf.writestr(entry, entry)
+        zf.mode = 'r'
+        return zf
+
+    def test_joinpath_constant_time(self):
+        """
+        Ensure joinpath on items in zipfile is linear time.
+        """
+        root = zipp.Path(self.huge_zipfile())
+        entries = jaraco.itertools.Counter(root.iterdir())
+        for entry in entries:
+            entry.joinpath('suffix')
+        # Check the file iterated all items
+        assert entries.count == self.HUGE_ZIPFILE_NUM_ENTRIES
+
+    @func_timeout.func_set_timeout(3)
+    def test_implied_dirs_performance(self):
+        data = ['/'.join(string.ascii_lowercase + str(n)) for n in 
range(10000)]
+        zipp.CompleteDirs._implied_dirs(data)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.6.0/tox.ini new/zipp-3.1.0/tox.ini
--- old/zipp-0.6.0/tox.ini      2019-08-24 18:27:31.000000000 +0200
+++ new/zipp-3.1.0/tox.ini      2020-03-03 11:58:43.000000000 +0100
@@ -3,29 +3,34 @@
 minversion = 3.2
 # https://github.com/jaraco/skeleton/issues/6
 tox_pip_extensions_ext_venv_update = true
+# Ensure that a late version of pip is used even on tox-venv.
+requires =
+       tox-pip-version>=0.0.6
+       tox-venv
+
 
 [testenv]
 deps =
-       setuptools>=31.0.1
+pip_version = pip
 commands =
        python -m unittest discover
 usedevelop = True
 extras = testing
 
-[testenv:build-docs]
+[testenv:docs]
 extras =
-    docs
-    testing
+       docs
+       testing
 changedir = docs
 commands =
-    python -m sphinx . {toxinidir}/build/html
+       python -m sphinx . {toxinidir}/build/html
 
 [testenv:release]
 skip_install = True
 deps =
        pep517>=0.5
-       twine>=1.13
-       path.py
+       twine[keyring]>=1.13
+       path
 passenv =
        TWINE_PASSWORD
 setenv =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.6.0/zipp.egg-info/PKG-INFO 
new/zipp-3.1.0/zipp.egg-info/PKG-INFO
--- old/zipp-0.6.0/zipp.egg-info/PKG-INFO       2019-08-24 18:27:49.000000000 
+0200
+++ new/zipp-3.1.0/zipp.egg-info/PKG-INFO       2020-03-03 11:59:11.000000000 
+0100
@@ -1,21 +1,27 @@
 Metadata-Version: 2.1
 Name: zipp
-Version: 0.6.0
+Version: 3.1.0
 Summary: Backport of pathlib-compatible object wrapper for zip files
 Home-page: https://github.com/jaraco/zipp
 Author: Jason R. Coombs
 Author-email: [email protected]
 License: UNKNOWN
 Description: .. image:: https://img.shields.io/pypi/v/zipp.svg
-           :target: https://pypi.org/project/zipp
+           :target: `PyPI link`_
         
         .. image:: https://img.shields.io/pypi/pyversions/zipp.svg
+           :target: `PyPI link`_
+        
+        .. _PyPI link: https://pypi.org/project/zipp
+        
+        .. image:: 
https://dev.azure.com/jaraco/zipp/_apis/build/status/jaraco.zipp?branchName=master
+           :target: 
https://dev.azure.com/jaraco/zipp/_build/latest?definitionId=1&branchName=master
         
         .. image:: https://img.shields.io/travis/jaraco/zipp/master.svg
            :target: https://travis-ci.org/jaraco/zipp
         
         .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
-           :target: https://github.com/ambv/black
+           :target: https://github.com/psf/black
            :alt: Code style: Black
         
         .. image:: https://img.shields.io/appveyor/ci/jaraco/zipp/master.svg
@@ -32,8 +38,8 @@
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
 Classifier: License :: OSI Approved :: MIT License
-Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-Requires-Python: >=2.7
-Provides-Extra: docs
+Classifier: Programming Language :: Python :: 3 :: Only
+Requires-Python: >=3.6
 Provides-Extra: testing
+Provides-Extra: docs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.6.0/zipp.egg-info/SOURCES.txt 
new/zipp-3.1.0/zipp.egg-info/SOURCES.txt
--- old/zipp-0.6.0/zipp.egg-info/SOURCES.txt    2019-08-24 18:27:49.000000000 
+0200
+++ new/zipp-3.1.0/zipp.egg-info/SOURCES.txt    2020-03-03 11:59:12.000000000 
+0100
@@ -1,3 +1,4 @@
+.coveragerc
 .flake8
 .pre-commit-config.yaml
 .readthedocs.yml
@@ -6,6 +7,7 @@
 LICENSE
 README.rst
 appveyor.yml
+azure-pipelines.yml
 conftest.py
 pyproject.toml
 setup.cfg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.6.0/zipp.egg-info/requires.txt 
new/zipp-3.1.0/zipp.egg-info/requires.txt
--- old/zipp-0.6.0/zipp.egg-info/requires.txt   2019-08-24 18:27:49.000000000 
+0200
+++ new/zipp-3.1.0/zipp.egg-info/requires.txt   2020-03-03 11:59:11.000000000 
+0100
@@ -1,4 +1,3 @@
-more_itertools
 
 [docs]
 sphinx
@@ -6,6 +5,5 @@
 rst.linker>=1.9
 
 [testing]
-pathlib2
-contextlib2
-unittest2
+jaraco.itertools
+func-timeout
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zipp-0.6.0/zipp.py new/zipp-3.1.0/zipp.py
--- old/zipp-0.6.0/zipp.py      2019-08-24 18:27:31.000000000 +0200
+++ new/zipp-3.1.0/zipp.py      2020-03-03 11:58:43.000000000 +0100
@@ -1,17 +1,14 @@
-# coding: utf-8
-
-from __future__ import division
-
 import io
-import sys
 import posixpath
 import zipfile
-import functools
 import itertools
+import contextlib
+import sys
 
-import more_itertools
-
-__metaclass__ = type
+if sys.version_info < (3, 7):
+    from collections import OrderedDict
+else:
+    OrderedDict = dict
 
 
 def _parents(path):
@@ -55,6 +52,97 @@
         path, tail = posixpath.split(path)
 
 
+_dedupe = OrderedDict.fromkeys
+"""Deduplicate an iterable in original order"""
+
+
+def _difference(minuend, subtrahend):
+    """
+    Return items in minuend not in subtrahend, retaining order
+    with O(1) lookup.
+    """
+    return itertools.filterfalse(set(subtrahend).__contains__, minuend)
+
+
+class CompleteDirs(zipfile.ZipFile):
+    """
+    A ZipFile subclass that ensures that implied directories
+    are always included in the namelist.
+    """
+
+    @staticmethod
+    def _implied_dirs(names):
+        parents = itertools.chain.from_iterable(map(_parents, names))
+        as_dirs = (p + posixpath.sep for p in parents)
+        return _dedupe(_difference(as_dirs, names))
+
+    def namelist(self):
+        names = super(CompleteDirs, self).namelist()
+        return names + list(self._implied_dirs(names))
+
+    def _name_set(self):
+        return set(self.namelist())
+
+    def resolve_dir(self, name):
+        """
+        If the name represents a directory, return that name
+        as a directory (with the trailing slash).
+        """
+        names = self._name_set()
+        dirname = name + '/'
+        dir_match = name not in names and dirname in names
+        return dirname if dir_match else name
+
+    @classmethod
+    def make(cls, source):
+        """
+        Given a source (filename or zipfile), return an
+        appropriate CompleteDirs subclass.
+        """
+        if isinstance(source, CompleteDirs):
+            return source
+
+        if not isinstance(source, zipfile.ZipFile):
+            return cls(_pathlib_compat(source))
+
+        # Only allow for FastPath when supplied zipfile is read-only
+        if 'r' not in source.mode:
+            cls = CompleteDirs
+
+        res = cls.__new__(cls)
+        vars(res).update(vars(source))
+        return res
+
+
+class FastLookup(CompleteDirs):
+    """
+    ZipFile subclass to ensure implicit
+    dirs exist and are resolved rapidly.
+    """
+    def namelist(self):
+        with contextlib.suppress(AttributeError):
+            return self.__names
+        self.__names = super(FastLookup, self).namelist()
+        return self.__names
+
+    def _name_set(self):
+        with contextlib.suppress(AttributeError):
+            return self.__lookup
+        self.__lookup = super(FastLookup, self)._name_set()
+        return self.__lookup
+
+
+def _pathlib_compat(path):
+    """
+    For path-like objects, convert to a filename for compatibility
+    on Python 3.6.1 and earlier.
+    """
+    try:
+        return path.__fspath__()
+    except AttributeError:
+        return str(path)
+
+
 class Path:
     """
     A pathlib-compatible interface for zip files.
@@ -123,38 +211,37 @@
     __repr = "{self.__class__.__name__}({self.root.filename!r}, {self.at!r})"
 
     def __init__(self, root, at=""):
-        self.root = (
-            root
-            if isinstance(root, zipfile.ZipFile)
-            else zipfile.ZipFile(self._pathlib_compat(root))
-        )
+        self.root = FastLookup.make(root)
         self.at = at
 
-    @staticmethod
-    def _pathlib_compat(path):
+    def open(self, mode='r', *args, pwd=None, **kwargs):
         """
-        For path-like objects, convert to a filename for compatibility
-        on Python 3.6.1 and earlier.
+        Open this entry as text or binary following the semantics
+        of ``pathlib.Path.open()`` by passing arguments through
+        to io.TextIOWrapper().
         """
-        try:
-            return path.__fspath__()
-        except AttributeError:
-            return str(path)
-
-    @property
-    def open(self):
-        return functools.partial(self.root.open, self.at)
+        if self.is_dir():
+            raise IsADirectoryError(self)
+        zip_mode = mode[0]
+        if not self.exists() and zip_mode == 'r':
+            raise FileNotFoundError(self)
+        stream = self.root.open(self.at, zip_mode, pwd=pwd)
+        if 'b' in mode:
+            if args or kwargs:
+                raise ValueError("encoding args invalid for binary operation")
+            return stream
+        return io.TextIOWrapper(stream, *args, **kwargs)
 
     @property
     def name(self):
         return posixpath.basename(self.at.rstrip("/"))
 
     def read_text(self, *args, **kwargs):
-        with self.open() as strm:
-            return io.TextIOWrapper(strm, *args, **kwargs).read()
+        with self.open('r', *args, **kwargs) as strm:
+            return strm.read()
 
     def read_bytes(self):
-        with self.open() as strm:
+        with self.open('rb') as strm:
             return strm.read()
 
     def _is_child(self, path):
@@ -170,12 +257,12 @@
         return not self.is_dir()
 
     def exists(self):
-        return self.at in self._names()
+        return self.at in self.root._name_set()
 
     def iterdir(self):
         if not self.is_dir():
             raise ValueError("Can't listdir a file")
-        subs = map(self._next, self._names())
+        subs = map(self._next, self.root.namelist())
         return filter(self._is_child, subs)
 
     def __str__(self):
@@ -185,36 +272,14 @@
         return self.__repr.format(self=self)
 
     def joinpath(self, add):
-        add = self._pathlib_compat(add)
-        next = posixpath.join(self.at, add)
-        next_dir = posixpath.join(self.at, add, "")
-        names = self._names()
-        return self._next(next_dir if next not in names and next_dir in names 
else next)
+        next = posixpath.join(self.at, _pathlib_compat(add))
+        return self._next(self.root.resolve_dir(next))
 
     __truediv__ = joinpath
 
-    @staticmethod
-    def _implied_dirs(names):
-        return more_itertools.unique_everseen(
-            parent + "/"
-            for name in names
-            for parent in _parents(name)
-            if parent + "/" not in names
-        )
-
-    @classmethod
-    def _add_implied_dirs(cls, names):
-        return names + list(cls._implied_dirs(names))
-
     @property
     def parent(self):
         parent_at = posixpath.dirname(self.at.rstrip('/'))
         if parent_at:
             parent_at += '/'
         return self._next(parent_at)
-
-    def _names(self):
-        return self._add_implied_dirs(self.root.namelist())
-
-    if sys.version_info < (3,):
-        __div__ = __truediv__


Reply via email to