Hello community, here is the log from the commit of package python-path for openSUSE:Factory checked in at 2020-03-27 00:20:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-path (Old) and /work/SRC/openSUSE:Factory/.python-path.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-path" Fri Mar 27 00:20:31 2020 rev:2 rq:784138 version:13.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-path/python-path.changes 2019-12-04 14:20:13.114429967 +0100 +++ /work/SRC/openSUSE:Factory/.python-path.new.3160/python-path.changes 2020-03-27 00:20:35.828113949 +0100 @@ -1,0 +2,6 @@ +Wed Mar 11 15:41:44 UTC 2020 - Marketa Calabkova <[email protected]> + +- update to version 13.2.0 + * Require Python 3.6 or later. + +------------------------------------------------------------------- Old: ---- path-13.1.0.tar.gz New: ---- path-13.2.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-path.spec ++++++ --- /var/tmp/diff_new_pack.P22tuU/_old 2020-03-27 00:20:36.568114324 +0100 +++ /var/tmp/diff_new_pack.P22tuU/_new 2020-03-27 00:20:36.572114326 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-path # -# Copyright (c) 2019 SUSE LLC +# 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 @@ -28,14 +28,15 @@ %define skip_python2 1 %define modname path Name: python-path%{psuffix} -Version: 13.1.0 +Version: 13.2.0 Release: 0 Summary: A module wrapper for os.path License: MIT URL: https://github.com/jaraco/path Source: https://files.pythonhosted.org/packages/source/p/path/%{modname}-%{version}.tar.gz -BuildRequires: %{python_module setuptools_scm >= 1.15.0} +BuildRequires: %{python_module setuptools_scm >= 3.4.1} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module toml} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-importlib-metadata >= 0.5 ++++++ path-13.1.0.tar.gz -> path-13.2.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-13.1.0/.pre-commit-config.yaml new/path-13.2.0/.pre-commit-config.yaml --- old/path-13.1.0/.pre-commit-config.yaml 2019-12-01 18:40:38.000000000 +0100 +++ new/path-13.2.0/.pre-commit-config.yaml 2020-02-23 03:30:16.000000000 +0100 @@ -1,5 +1,10 @@ repos: - repo: https://github.com/psf/black - rev: 19.3b0 + 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/path-13.1.0/.travis.yml new/path-13.2.0/.travis.yml --- old/path-13.1.0/.travis.yml 2019-12-01 18:40:38.000000000 +0100 +++ new/path-13.2.0/.travis.yml 2020-02-23 03:30:16.000000000 +0100 @@ -5,15 +5,6 @@ - 3.6 - &latest_py3 3.8 -jobs: - fast_finish: true - include: - - stage: deploy - if: tag IS present - python: *latest_py3 - before_script: skip - script: tox -e release - cache: pip install: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-13.1.0/CHANGES.rst new/path-13.2.0/CHANGES.rst --- old/path-13.1.0/CHANGES.rst 2019-12-01 18:40:38.000000000 +0100 +++ new/path-13.2.0/CHANGES.rst 2020-02-23 03:30:16.000000000 +0100 @@ -1,3 +1,8 @@ +v13.2.0 +------- + +- Require Python 3.6 or later. + v13.1.0 ------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-13.1.0/LICENSE new/path-13.2.0/LICENSE --- old/path-13.1.0/LICENSE 2019-12-01 18:40:38.000000000 +0100 +++ new/path-13.2.0/LICENSE 2020-02-23 03:30:16.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/path-13.1.0/PKG-INFO new/path-13.2.0/PKG-INFO --- old/path-13.1.0/PKG-INFO 2019-12-01 18:41:07.787592000 +0100 +++ new/path-13.2.0/PKG-INFO 2020-02-23 03:30:37.286082700 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: path -Version: 13.1.0 +Version: 13.2.0 Summary: A module wrapper for os.path Home-page: https://github.com/jaraco/path Author: Jason Orendorff @@ -9,9 +9,15 @@ Maintainer-email: [email protected] License: UNKNOWN Description: .. image:: https://img.shields.io/pypi/v/path.svg - :target: https://pypi.org/project/path + :target: `PyPI link`_ .. image:: https://img.shields.io/pypi/pyversions/path.svg + :target: `PyPI link`_ + + .. _PyPI link: https://pypi.org/project/path + + .. image:: https://dev.azure.com/jaraco/path/_apis/build/status/jaraco.path?branchName=master + :target: https://dev.azure.com/jaraco/path/_build/latest?definitionId=1&branchName=master .. image:: https://img.shields.io/travis/jaraco/path/master.svg :target: https://travis-ci.org/jaraco/path @@ -37,13 +43,14 @@ .. code-block:: python from path import Path - d = Path('/home/guido/bin') - for f in d.files('*.py'): + + d = Path("/home/guido/bin") + for f in d.files("*.py"): f.chmod(0o755) # Globbing - for f in d.files('*.py'): - f.chmod('u+rwx') + for f in d.files("*.py"): + f.chmod("u+rwx") # Changing the working directory: with Path("somewhere"): @@ -134,8 +141,15 @@ Releasing ========= - Tagged releases are automatically published to PyPI by Travis-CI, assuming - the tests pass. + Tagged releases are automatically published to PyPI by Azure + Pipelines, assuming the tests pass. + + Origins + ======= + + The ``path.py`` project was initially released in 2003 by Jason Orendorff + and has been continuously developed and supported by several maintainers + over the years. Security Contact ================ @@ -149,8 +163,9 @@ Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3 :: Only Classifier: Operating System :: OS Independent Classifier: Topic :: Software Development :: Libraries :: Python Modules -Requires-Python: >=3.5 +Requires-Python: >=3.6 Provides-Extra: testing Provides-Extra: docs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-13.1.0/README.rst new/path-13.2.0/README.rst --- old/path-13.1.0/README.rst 2019-12-01 18:40:38.000000000 +0100 +++ new/path-13.2.0/README.rst 2020-02-23 03:30:16.000000000 +0100 @@ -1,7 +1,13 @@ .. image:: https://img.shields.io/pypi/v/path.svg - :target: https://pypi.org/project/path + :target: `PyPI link`_ .. image:: https://img.shields.io/pypi/pyversions/path.svg + :target: `PyPI link`_ + +.. _PyPI link: https://pypi.org/project/path + +.. image:: https://dev.azure.com/jaraco/path/_apis/build/status/jaraco.path?branchName=master + :target: https://dev.azure.com/jaraco/path/_build/latest?definitionId=1&branchName=master .. image:: https://img.shields.io/travis/jaraco/path/master.svg :target: https://travis-ci.org/jaraco/path @@ -27,13 +33,14 @@ .. code-block:: python from path import Path - d = Path('/home/guido/bin') - for f in d.files('*.py'): + + d = Path("/home/guido/bin") + for f in d.files("*.py"): f.chmod(0o755) # Globbing - for f in d.files('*.py'): - f.chmod('u+rwx') + for f in d.files("*.py"): + f.chmod("u+rwx") # Changing the working directory: with Path("somewhere"): @@ -124,8 +131,15 @@ Releasing ========= -Tagged releases are automatically published to PyPI by Travis-CI, assuming -the tests pass. +Tagged releases are automatically published to PyPI by Azure +Pipelines, assuming the tests pass. + +Origins +======= + +The ``path.py`` project was initially released in 2003 by Jason Orendorff +and has been continuously developed and supported by several maintainers +over the years. Security Contact ================ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-13.1.0/appveyor.yml new/path-13.2.0/appveyor.yml --- old/path-13.1.0/appveyor.yml 2019-12-01 18:40:38.000000000 +0100 +++ new/path-13.2.0/appveyor.yml 2020-02-23 03:30:16.000000000 +0100 @@ -4,6 +4,7 @@ matrix: - PYTHON: "C:\\Python36-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/path-13.1.0/azure-pipelines.yml new/path-13.2.0/azure-pipelines.yml --- old/path-13.1.0/azure-pipelines.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/path-13.2.0/azure-pipelines.yml 2020-02-23 03:30:16.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/path-13.1.0/path.egg-info/PKG-INFO new/path-13.2.0/path.egg-info/PKG-INFO --- old/path-13.1.0/path.egg-info/PKG-INFO 2019-12-01 18:41:07.000000000 +0100 +++ new/path-13.2.0/path.egg-info/PKG-INFO 2020-02-23 03:30:36.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: path -Version: 13.1.0 +Version: 13.2.0 Summary: A module wrapper for os.path Home-page: https://github.com/jaraco/path Author: Jason Orendorff @@ -9,9 +9,15 @@ Maintainer-email: [email protected] License: UNKNOWN Description: .. image:: https://img.shields.io/pypi/v/path.svg - :target: https://pypi.org/project/path + :target: `PyPI link`_ .. image:: https://img.shields.io/pypi/pyversions/path.svg + :target: `PyPI link`_ + + .. _PyPI link: https://pypi.org/project/path + + .. image:: https://dev.azure.com/jaraco/path/_apis/build/status/jaraco.path?branchName=master + :target: https://dev.azure.com/jaraco/path/_build/latest?definitionId=1&branchName=master .. image:: https://img.shields.io/travis/jaraco/path/master.svg :target: https://travis-ci.org/jaraco/path @@ -37,13 +43,14 @@ .. code-block:: python from path import Path - d = Path('/home/guido/bin') - for f in d.files('*.py'): + + d = Path("/home/guido/bin") + for f in d.files("*.py"): f.chmod(0o755) # Globbing - for f in d.files('*.py'): - f.chmod('u+rwx') + for f in d.files("*.py"): + f.chmod("u+rwx") # Changing the working directory: with Path("somewhere"): @@ -134,8 +141,15 @@ Releasing ========= - Tagged releases are automatically published to PyPI by Travis-CI, assuming - the tests pass. + Tagged releases are automatically published to PyPI by Azure + Pipelines, assuming the tests pass. + + Origins + ======= + + The ``path.py`` project was initially released in 2003 by Jason Orendorff + and has been continuously developed and supported by several maintainers + over the years. Security Contact ================ @@ -149,8 +163,9 @@ Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3 :: Only Classifier: Operating System :: OS Independent Classifier: Topic :: Software Development :: Libraries :: Python Modules -Requires-Python: >=3.5 +Requires-Python: >=3.6 Provides-Extra: testing Provides-Extra: docs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-13.1.0/path.egg-info/SOURCES.txt new/path-13.2.0/path.egg-info/SOURCES.txt --- old/path-13.1.0/path.egg-info/SOURCES.txt 2019-12-01 18:41:07.000000000 +0100 +++ new/path-13.2.0/path.egg-info/SOURCES.txt 2020-02-23 03:30:37.000000000 +0100 @@ -11,6 +11,7 @@ MANIFEST.in README.rst appveyor.yml +azure-pipelines.yml pyproject.toml pytest.ini setup.cfg diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-13.1.0/pyproject.toml new/path-13.2.0/pyproject.toml --- old/path-13.1.0/pyproject.toml 2019-12-01 18:40:38.000000000 +0100 +++ new/path-13.2.0/pyproject.toml 2020-02-23 03:30:16.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/path-13.1.0/setup.cfg new/path-13.2.0/setup.cfg --- old/path-13.1.0/setup.cfg 2019-12-01 18:41:07.791590000 +0100 +++ new/path-13.2.0/setup.cfg 2020-02-23 03:30:37.286082700 +0100 @@ -13,16 +13,17 @@ Intended Audience :: Developers License :: OSI Approved :: MIT License Programming Language :: Python :: 3 + Programming Language :: Python :: 3 :: Only Operating System :: OS Independent Topic :: Software Development :: Libraries :: Python Modules [options] packages = find: include_package_data = true -python_requires = >=3.5 +python_requires = >=3.6 install_requires = importlib_metadata >= 0.5; python_version < "3.8" -setup_requires = setuptools_scm >= 1.15.0 +setup_requires = setuptools_scm[toml] >= 3.4.1 [options.extras_require] testing = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-13.1.0/setup.py new/path-13.2.0/setup.py --- old/path-13.1.0/setup.py 2019-12-01 18:40:38.000000000 +0100 +++ new/path-13.2.0/setup.py 2020-02-23 03:30:16.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/path-13.1.0/skeleton.md new/path-13.2.0/skeleton.md --- old/path-13.1.0/skeleton.md 2019-12-01 18:40:38.000000000 +0100 +++ new/path-13.2.0/skeleton.md 2020-02-23 03:30:16.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/path-13.1.0/test_path.py new/path-13.2.0/test_path.py --- old/path-13.1.0/test_path.py 2019-12-01 18:40:38.000000000 +0100 +++ new/path-13.2.0/test_path.py 2020-02-23 03:30:16.000000000 +0100 @@ -33,27 +33,18 @@ import packaging.version import path +from path import Path from path import TempDir from path import matchers from path import SpecialResolver from path import Multi -Path = None - def p(**choices): """ Choose a value from several possible values, based on os.name """ return choices[os.name] [email protected](autouse=True, params=[path.Path]) -def path_class(request, monkeypatch): - """ - Invoke tests on any number of Path classes. - """ - monkeypatch.setitem(globals(), 'Path', request.param) - - def mac_version(target, comparator=operator.ge): """ Return True if on a Mac whose version passes the comparator. @@ -411,9 +402,9 @@ except Exception: pass - @pytest.mark.xfail(mac_version('10.13'), reason="macOS disallows invalid encodings") - @pytest.mark.xfail( - platform.system() == 'Windows', reason="Can't write latin characters. See #133" + @pytest.mark.skip( + platform.system() != "Linux", + reason="Only Linux allows writing invalid encodings", ) def test_listdir_other_encoding(self, tmpdir): """ @@ -434,7 +425,7 @@ # now try with path results = Path(tmpdir).listdir() assert len(results) == 1 - res, = results + (res,) = results assert isinstance(res, Path) # OS X seems to encode the bytes in the filename as %XX characters. if platform.system() == 'Darwin': @@ -579,135 +570,129 @@ self.assertList(d.walkdirs('*.tmp'), [d / 'xdir.tmp']) @pytest.mark.filterwarnings("ignore:.text is deprecated") - def test_unicode(self, tmpdir): + @pytest.mark.parametrize("encoding", ('UTF-8', 'UTF-16BE', 'UTF-16LE', 'UTF-16')) + def test_unicode(self, tmpdir, encoding): + """ Test that path works with the specified encoding, + which must be capable of representing the entire range of + Unicode codepoints. + """ d = Path(tmpdir) p = d / 'unicode.txt' - def test(enc): - """ Test that path works with the specified encoding, - which must be capable of representing the entire range of - Unicode codepoints. - """ - - given = ( - 'Hello world\n' - '\u0d0a\u0a0d\u0d15\u0a15\r\n' - '\u0d0a\u0a0d\u0d15\u0a15\x85' - '\u0d0a\u0a0d\u0d15\u0a15\u2028' - '\r' - 'hanging' - ) - clean = ( - 'Hello world\n' - '\u0d0a\u0a0d\u0d15\u0a15\n' - '\u0d0a\u0a0d\u0d15\u0a15\n' - '\u0d0a\u0a0d\u0d15\u0a15\n' - '\n' - 'hanging' - ) - givenLines = [ - ('Hello world\n'), - ('\u0d0a\u0a0d\u0d15\u0a15\r\n'), - ('\u0d0a\u0a0d\u0d15\u0a15\x85'), - ('\u0d0a\u0a0d\u0d15\u0a15\u2028'), - ('\r'), - ('hanging'), - ] - expectedLines = [ - ('Hello world\n'), - ('\u0d0a\u0a0d\u0d15\u0a15\n'), - ('\u0d0a\u0a0d\u0d15\u0a15\n'), - ('\u0d0a\u0a0d\u0d15\u0a15\n'), - ('\n'), - ('hanging'), - ] - expectedLines2 = [ - ('Hello world'), - ('\u0d0a\u0a0d\u0d15\u0a15'), - ('\u0d0a\u0a0d\u0d15\u0a15'), - ('\u0d0a\u0a0d\u0d15\u0a15'), - (''), - ('hanging'), - ] - - # write bytes manually to file - f = codecs.open(p, 'w', enc) - f.write(given) - f.close() - - # test all 3 path read-fully functions, including - # path.lines() in unicode mode. - assert p.bytes() == given.encode(enc) - assert p.text(enc) == clean - assert p.lines(enc) == expectedLines - assert p.lines(enc, retain=False) == expectedLines2 - - # If this is UTF-16, that's enough. - # The rest of these will unfortunately fail because append=True - # mode causes an extra BOM to be written in the middle of the file. - # UTF-16 is the only encoding that has this problem. - if enc == 'UTF-16': - return - - # Write Unicode to file using path.write_text(). - # This test doesn't work with a hanging line. - cleanNoHanging = clean + '\n' - - p.write_text(cleanNoHanging, enc) - p.write_text(cleanNoHanging, enc, append=True) - # Check the result. - expectedBytes = 2 * cleanNoHanging.replace('\n', os.linesep).encode(enc) - expectedLinesNoHanging = expectedLines[:] - expectedLinesNoHanging[-1] += '\n' - assert p.bytes() == expectedBytes - assert p.text(enc) == 2 * cleanNoHanging - assert p.lines(enc) == 2 * expectedLinesNoHanging - assert p.lines(enc, retain=False) == 2 * expectedLines2 - - # Write Unicode to file using path.write_lines(). - # The output in the file should be exactly the same as last time. - p.write_lines(expectedLines, enc) - p.write_lines(expectedLines2, enc, append=True) - # Check the result. - assert p.bytes() == expectedBytes - - # Now: same test, but using various newline sequences. - # If linesep is being properly applied, these will be converted - # to the platform standard newline sequence. - p.write_lines(givenLines, enc) - p.write_lines(givenLines, enc, append=True) - # Check the result. - assert p.bytes() == expectedBytes - - # Same test, using newline sequences that are different - # from the platform default. - def testLinesep(eol): - p.write_lines(givenLines, enc, linesep=eol) - p.write_lines(givenLines, enc, linesep=eol, append=True) - expected = 2 * cleanNoHanging.replace('\n', eol).encode(enc) - assert p.bytes() == expected - - testLinesep('\n') - testLinesep('\r') - testLinesep('\r\n') - testLinesep('\x0d\x85') - - # Again, but with linesep=None. - p.write_lines(givenLines, enc, linesep=None) - p.write_lines(givenLines, enc, linesep=None, append=True) - # Check the result. - expectedBytes = 2 * given.encode(enc) - assert p.bytes() == expectedBytes - assert p.text(enc) == 2 * clean - expectedResultLines = expectedLines[:] - expectedResultLines[-1] += expectedLines[0] - expectedResultLines += expectedLines[1:] - assert p.lines(enc) == expectedResultLines - - test('UTF-8') - test('UTF-16BE') - test('UTF-16LE') - test('UTF-16') + given = ( + 'Hello world\n' + '\u0d0a\u0a0d\u0d15\u0a15\r\n' + '\u0d0a\u0a0d\u0d15\u0a15\x85' + '\u0d0a\u0a0d\u0d15\u0a15\u2028' + '\r' + 'hanging' + ) + clean = ( + 'Hello world\n' + '\u0d0a\u0a0d\u0d15\u0a15\n' + '\u0d0a\u0a0d\u0d15\u0a15\n' + '\u0d0a\u0a0d\u0d15\u0a15\n' + '\n' + 'hanging' + ) + givenLines = [ + ('Hello world\n'), + ('\u0d0a\u0a0d\u0d15\u0a15\r\n'), + ('\u0d0a\u0a0d\u0d15\u0a15\x85'), + ('\u0d0a\u0a0d\u0d15\u0a15\u2028'), + ('\r'), + ('hanging'), + ] + expectedLines = [ + ('Hello world\n'), + ('\u0d0a\u0a0d\u0d15\u0a15\n'), + ('\u0d0a\u0a0d\u0d15\u0a15\n'), + ('\u0d0a\u0a0d\u0d15\u0a15\n'), + ('\n'), + ('hanging'), + ] + expectedLines2 = [ + ('Hello world'), + ('\u0d0a\u0a0d\u0d15\u0a15'), + ('\u0d0a\u0a0d\u0d15\u0a15'), + ('\u0d0a\u0a0d\u0d15\u0a15'), + (''), + ('hanging'), + ] + + # write bytes manually to file + f = codecs.open(p, 'w', encoding) + f.write(given) + f.close() + + # test all 3 path read-fully functions, including + # path.lines() in unicode mode. + assert p.bytes() == given.encode(encoding) + assert p.text(encoding) == clean + assert p.lines(encoding) == expectedLines + assert p.lines(encoding, retain=False) == expectedLines2 + + # If this is UTF-16, that's enough. + # The rest of these will unfortunately fail because append=True + # mode causes an extra BOM to be written in the middle of the file. + # UTF-16 is the only encoding that has this problem. + if encoding == 'UTF-16': + return + + # Write Unicode to file using path.write_text(). + # This test doesn't work with a hanging line. + cleanNoHanging = clean + '\n' + + p.write_text(cleanNoHanging, encoding) + p.write_text(cleanNoHanging, encoding, append=True) + # Check the result. + expectedBytes = 2 * cleanNoHanging.replace('\n', os.linesep).encode(encoding) + expectedLinesNoHanging = expectedLines[:] + expectedLinesNoHanging[-1] += '\n' + assert p.bytes() == expectedBytes + assert p.text(encoding) == 2 * cleanNoHanging + assert p.lines(encoding) == 2 * expectedLinesNoHanging + assert p.lines(encoding, retain=False) == 2 * expectedLines2 + + # Write Unicode to file using path.write_lines(). + # The output in the file should be exactly the same as last time. + p.write_lines(expectedLines, encoding) + p.write_lines(expectedLines2, encoding, append=True) + # Check the result. + assert p.bytes() == expectedBytes + + # Now: same test, but using various newline sequences. + # If linesep is being properly applied, these will be converted + # to the platform standard newline sequence. + p.write_lines(givenLines, encoding) + p.write_lines(givenLines, encoding, append=True) + # Check the result. + assert p.bytes() == expectedBytes + + # Same test, using newline sequences that are different + # from the platform default. + def testLinesep(eol): + p.write_lines(givenLines, encoding, linesep=eol) + p.write_lines(givenLines, encoding, linesep=eol, append=True) + expected = 2 * cleanNoHanging.replace('\n', eol).encode(encoding) + assert p.bytes() == expected + + testLinesep('\n') + testLinesep('\r') + testLinesep('\r\n') + testLinesep('\x0d\x85') + + # Again, but with linesep=None. + p.write_lines(givenLines, encoding, linesep=None) + p.write_lines(givenLines, encoding, linesep=None, append=True) + # Check the result. + expectedBytes = 2 * given.encode(encoding) + assert p.bytes() == expectedBytes + assert p.text(encoding) == 2 * clean + expectedResultLines = expectedLines[:] + expectedResultLines[-1] += expectedLines[0] + expectedResultLines += expectedLines[1:] + assert p.lines(encoding) == expectedResultLines def test_chunks(self, tmpdir): p = (TempDir() / 'test.txt').touch() @@ -964,7 +949,7 @@ def test_context_manager_using_with(self): """ The context manager will allow using the with keyword and - provide a temporry directory that will be deleted after that. + provide a temporary directory that will be deleted after that. """ with TempDir() as d: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-13.1.0/tox.ini new/path-13.2.0/tox.ini --- old/path-13.1.0/tox.ini 2019-12-01 18:40:38.000000000 +0100 +++ new/path-13.2.0/tox.ini 2020-02-23 03:30:16.000000000 +0100 @@ -11,14 +11,13 @@ [testenv] deps = - setuptools>=31.0.1 pip_version = pip commands = pytest {posargs} usedevelop = True extras = testing -[testenv:build-docs] +[testenv:docs] extras = docs testing @@ -31,7 +30,7 @@ deps = pep517>=0.5 twine[keyring]>=1.13 - path.py + path jaraco.tidelift passenv = TWINE_PASSWORD
