Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-jaraco.context for openSUSE:Factory checked in at 2021-04-01 14:17:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-jaraco.context (Old) and /work/SRC/openSUSE:Factory/.python-jaraco.context.new.2401 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-jaraco.context" Thu Apr 1 14:17:26 2021 rev:2 rq:882148 version:4.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-jaraco.context/python-jaraco.context.changes 2021-03-18 22:55:01.643536465 +0100 +++ /work/SRC/openSUSE:Factory/.python-jaraco.context.new.2401/python-jaraco.context.changes 2021-04-01 14:18:43.496110594 +0200 @@ -1,0 +2,8 @@ +Mon Mar 29 19:30:53 UTC 2021 - Ben Greiner <c...@bnavigator.de> + +- Update to version 4.0.0 + * Moved dependency_context and run to jaraco.apt. +- Drop no-jaraco-apt.patch +- Remove unnecessary test tool requirements + +------------------------------------------------------------------- Old: ---- jaraco.context-3.0.0.tar.gz no-jaraco-apt.patch New: ---- jaraco.context-4.0.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-jaraco.context.spec ++++++ --- /var/tmp/diff_new_pack.zNtSih/_old 2021-04-01 14:18:44.012111220 +0200 +++ /var/tmp/diff_new_pack.zNtSih/_new 2021-04-01 14:18:44.012111220 +0200 @@ -19,22 +19,18 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-jaraco.context -Version: 3.0.0 +Version: 4.0.0 Release: 0 Summary: Tools to work with functools License: MIT URL: https://github.com/jaraco/jaraco.context Source0: https://files.pythonhosted.org/packages/source/j/jaraco.context/jaraco.context-%{version}.tar.gz -Patch0: no-jaraco-apt.patch -BuildRequires: %{python_module pytest-black} -BuildRequires: %{python_module pytest-cov} -BuildRequires: %{python_module pytest-flake8} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module yg.lockfile} +BuildRequires: %{python_module toml} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-yg.lockfile BuildArch: noarch %python_subpackages @@ -51,14 +47,7 @@ %install %python_install - -%python_expand rm %{buildroot}%{$python_sitelib}/jaraco/__init__.py - -%py3_compile %{buildroot}%{python3_sitelib}/jaraco/ -%py3_compile -O %{buildroot}%{python3_sitelib}/jaraco/ - %python_expand %fdupes %{buildroot}%{$python_sitelib} -%python_expand rm -f %{buildroot}%{$python_sitelib}/jaraco/__pycache__/__init__* %check %pytest @@ -66,8 +55,10 @@ %files %{python_files} %license LICENSE %doc docs/*.rst README.rst CHANGES.rst -%{python_sitelib}/jaraco.context-%{version}-py*.egg-info +%{python_sitelib}/jaraco.context-%{version}*-info +%dir %{python_sitelib}/jaraco %{python_sitelib}/jaraco/context.py* +%dir %{python_sitelib}/jaraco/__pycache__ %pycache_only %{python_sitelib}/jaraco/__pycache__/context*.py* %changelog ++++++ jaraco.context-3.0.0.tar.gz -> jaraco.context-4.0.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jaraco.context-3.0.0/.flake8 new/jaraco.context-4.0.0/.flake8 --- old/jaraco.context-3.0.0/.flake8 2020-01-10 09:37:17.000000000 +0100 +++ new/jaraco.context-4.0.0/.flake8 2021-01-29 03:42:18.000000000 +0100 @@ -1,9 +1,9 @@ [flake8] max-line-length = 88 -ignore = - # W503 violates spec https://github.com/PyCQA/pycodestyle/issues/513 - W503 - # W504 has issues https://github.com/OCA/maintainer-quality-tools/issues/545 - W504 + +# jaraco/skeleton#34 +max-complexity = 10 + +extend-ignore = # Black creates whitespace before colon E203 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jaraco.context-3.0.0/.github/workflows/automerge.yml new/jaraco.context-4.0.0/.github/workflows/automerge.yml --- old/jaraco.context-3.0.0/.github/workflows/automerge.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/jaraco.context-4.0.0/.github/workflows/automerge.yml 2021-01-29 03:42:18.000000000 +0100 @@ -0,0 +1,27 @@ +name: automerge +on: + pull_request: + types: + - labeled + - unlabeled + - synchronize + - opened + - edited + - ready_for_review + - reopened + - unlocked + pull_request_review: + types: + - submitted + check_suite: + types: + - completed + status: {} +jobs: + automerge: + runs-on: ubuntu-latest + steps: + - name: automerge + uses: "pascalgn/automerge-action@v0.12.0" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jaraco.context-3.0.0/.github/workflows/main.yml new/jaraco.context-4.0.0/.github/workflows/main.yml --- old/jaraco.context-3.0.0/.github/workflows/main.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/jaraco.context-4.0.0/.github/workflows/main.yml 2021-01-29 03:42:18.000000000 +0100 @@ -0,0 +1,42 @@ +name: tests + +on: [push, pull_request] + +jobs: + test: + strategy: + matrix: + python: [3.6, 3.8, 3.9] + platform: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - name: Install tox + run: | + python -m pip install tox + - name: Run tests + run: tox + + release: + needs: test + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install tox + run: | + python -m pip install tox + - name: Release + run: tox -e release + env: + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jaraco.context-3.0.0/.pre-commit-config.yaml new/jaraco.context-4.0.0/.pre-commit-config.yaml --- old/jaraco.context-3.0.0/.pre-commit-config.yaml 2020-01-10 09:37:17.000000000 +0100 +++ new/jaraco.context-4.0.0/.pre-commit-config.yaml 2021-01-29 03:42:18.000000000 +0100 @@ -1,10 +1,10 @@ repos: - repo: https://github.com/psf/black - rev: 19.10b0 + rev: 20.8b1 hooks: - id: black - repo: https://github.com/asottile/blacken-docs - rev: v1.4.0 + rev: v1.9.1 hooks: - id: blacken-docs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jaraco.context-3.0.0/.readthedocs.yml new/jaraco.context-4.0.0/.readthedocs.yml --- old/jaraco.context-3.0.0/.readthedocs.yml 2020-01-10 09:37:17.000000000 +0100 +++ new/jaraco.context-4.0.0/.readthedocs.yml 2021-01-29 03:42:18.000000000 +0100 @@ -1,5 +1,6 @@ +version: 2 python: - version: 3 - extra_requirements: - - docs - pip_install: true + install: + - path: . + extra_requirements: + - docs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jaraco.context-3.0.0/.travis.yml new/jaraco.context-4.0.0/.travis.yml --- old/jaraco.context-3.0.0/.travis.yml 2020-01-10 09:37:17.000000000 +0100 +++ new/jaraco.context-4.0.0/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,18 +0,0 @@ -dist: xenial -language: python - -python: -- 3.6 -- &latest_py3 3.8 - -cache: pip - -install: -- pip install tox tox-venv - -before_script: - # Disable IPv6. Ref travis-ci/travis-ci#8361 - - if [ "${TRAVIS_OS_NAME}" == "linux" ]; then - sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'; - fi -script: tox diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jaraco.context-3.0.0/CHANGES.rst new/jaraco.context-4.0.0/CHANGES.rst --- old/jaraco.context-3.0.0/CHANGES.rst 2020-01-10 09:37:17.000000000 +0100 +++ new/jaraco.context-4.0.0/CHANGES.rst 2021-01-29 03:42:18.000000000 +0100 @@ -1,3 +1,9 @@ +v4.0.0 +====== + +Moved ``dependency_context`` and ``run`` to +`jaraco.apt <https://pypi.org/project/jaraco.apt>`_. + v3.0.0 ====== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jaraco.context-3.0.0/LICENSE new/jaraco.context-4.0.0/LICENSE --- old/jaraco.context-3.0.0/LICENSE 2020-01-10 09:37:17.000000000 +0100 +++ new/jaraco.context-4.0.0/LICENSE 2021-01-29 03:42:18.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/jaraco.context-3.0.0/PKG-INFO new/jaraco.context-4.0.0/PKG-INFO --- old/jaraco.context-3.0.0/PKG-INFO 2020-01-10 09:37:50.220738600 +0100 +++ new/jaraco.context-4.0.0/PKG-INFO 2021-01-29 03:42:34.967781800 +0100 @@ -1,29 +1,27 @@ Metadata-Version: 2.1 Name: jaraco.context -Version: 3.0.0 +Version: 4.0.0 Summary: Context managers by jaraco Home-page: https://github.com/jaraco/jaraco.context Author: Jason R. Coombs Author-email: jar...@jaraco.com License: UNKNOWN Description: .. image:: https://img.shields.io/pypi/v/jaraco.context.svg - :target: https://pypi.org/project/jaraco.context + :target: `PyPI link`_ .. image:: https://img.shields.io/pypi/pyversions/jaraco.context.svg + :target: `PyPI link`_ - .. image:: https://dev.azure.com/jaraco/jaraco.context/_apis/build/status/jaraco.jaraco.context?branchName=master - :target: https://dev.azure.com/jaraco/jaraco.context/_build/latest?definitionId=1&branchName=master + .. _PyPI link: https://pypi.org/project/jaraco.context - .. image:: https://img.shields.io/travis/jaraco/jaraco.context/master.svg - :target: https://travis-ci.org/jaraco/jaraco.context + .. image:: https://github.com/jaraco/jaraco.context/workflows/tests/badge.svg + :target: https://github.com/jaraco/jaraco.context/actions?query=workflow%3A%22tests%22 + :alt: tests .. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/psf/black :alt: Code style: Black - .. .. image:: https://img.shields.io/appveyor/ci/jaraco/jaraco-context/master.svg - .. :target: https://ci.appveyor.com/project/jaraco/jaraco-context/branch/master - .. image:: https://readthedocs.org/projects/jaracocontext/badge/?version=latest :target: https://jaracocontext.readthedocs.io/en/latest/?badge=latest @@ -32,6 +30,7 @@ Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Programming Language :: Python :: 3 +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/jaraco.context-3.0.0/README.rst new/jaraco.context-4.0.0/README.rst --- old/jaraco.context-3.0.0/README.rst 2020-01-10 09:37:17.000000000 +0100 +++ new/jaraco.context-4.0.0/README.rst 2021-01-29 03:42:18.000000000 +0100 @@ -1,20 +1,18 @@ .. image:: https://img.shields.io/pypi/v/jaraco.context.svg - :target: https://pypi.org/project/jaraco.context + :target: `PyPI link`_ .. image:: https://img.shields.io/pypi/pyversions/jaraco.context.svg + :target: `PyPI link`_ -.. image:: https://dev.azure.com/jaraco/jaraco.context/_apis/build/status/jaraco.jaraco.context?branchName=master - :target: https://dev.azure.com/jaraco/jaraco.context/_build/latest?definitionId=1&branchName=master +.. _PyPI link: https://pypi.org/project/jaraco.context -.. image:: https://img.shields.io/travis/jaraco/jaraco.context/master.svg - :target: https://travis-ci.org/jaraco/jaraco.context +.. image:: https://github.com/jaraco/jaraco.context/workflows/tests/badge.svg + :target: https://github.com/jaraco/jaraco.context/actions?query=workflow%3A%22tests%22 + :alt: tests .. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/psf/black :alt: Code style: Black -.. .. image:: https://img.shields.io/appveyor/ci/jaraco/jaraco-context/master.svg -.. :target: https://ci.appveyor.com/project/jaraco/jaraco-context/branch/master - .. image:: https://readthedocs.org/projects/jaracocontext/badge/?version=latest :target: https://jaracocontext.readthedocs.io/en/latest/?badge=latest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jaraco.context-3.0.0/appveyor.yml new/jaraco.context-4.0.0/appveyor.yml --- old/jaraco.context-3.0.0/appveyor.yml 2020-01-10 09:37:17.000000000 +0100 +++ new/jaraco.context-4.0.0/appveyor.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,24 +0,0 @@ -environment: - - APPVEYOR: true - - matrix: - - PYTHON: "C:\\Python36-x64" - - PYTHON: "C:\\Python38-x64" - -install: - # symlink python from a directory with a space - - "mklink /d \"C:\\Program Files\\Python\" %PYTHON%" - - "SET PYTHON=\"C:\\Program Files\\Python\"" - - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" - -build: off - -cache: - - '%LOCALAPPDATA%\pip\Cache' - -test_script: - - "python -m pip install -U tox tox-venv virtualenv" - - "tox" - -version: '{build}' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jaraco.context-3.0.0/azure-pipelines.yml new/jaraco.context-4.0.0/azure-pipelines.yml --- old/jaraco.context-3.0.0/azure-pipelines.yml 2020-01-10 09:37:17.000000000 +0100 +++ new/jaraco.context-4.0.0/azure-pipelines.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,71 +0,0 @@ -# Create the project in Azure with: -# az 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/jaraco.context-3.0.0/docs/conf.py new/jaraco.context-4.0.0/docs/conf.py --- old/jaraco.context-3.0.0/docs/conf.py 2020-01-10 09:37:17.000000000 +0100 +++ new/jaraco.context-4.0.0/docs/conf.py 2021-01-29 03:42:18.000000000 +0100 @@ -14,7 +14,7 @@ url='{package_url}/issues/{issue}', ), dict( - pattern=r'^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n', + pattern=r'(?m:^((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n)', with_scm='{text}\n{rev[timestamp]:%d %b %Y}\n', ), dict( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jaraco.context-3.0.0/docs/index.rst new/jaraco.context-4.0.0/docs/index.rst --- old/jaraco.context-3.0.0/docs/index.rst 2020-01-10 09:37:17.000000000 +0100 +++ new/jaraco.context-4.0.0/docs/index.rst 2021-01-29 03:42:18.000000000 +0100 @@ -1,5 +1,5 @@ -Welcome to jaraco.context documentation! -======================================== +Welcome to |project| documentation! +=================================== .. toctree:: :maxdepth: 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jaraco.context-3.0.0/jaraco/__init__.py new/jaraco.context-4.0.0/jaraco/__init__.py --- old/jaraco.context-3.0.0/jaraco/__init__.py 2020-01-10 09:37:17.000000000 +0100 +++ new/jaraco.context-4.0.0/jaraco/__init__.py 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jaraco.context-3.0.0/jaraco/context.py new/jaraco.context-4.0.0/jaraco/context.py --- old/jaraco.context-3.0.0/jaraco/context.py 2020-01-10 09:37:17.000000000 +0100 +++ new/jaraco.context-4.0.0/jaraco/context.py 2021-01-29 03:42:18.000000000 +0100 @@ -1,170 +1,14 @@ import os -import argparse import subprocess import contextlib -import shlex -import logging import functools import tempfile import shutil -try: - import contextlib2 -except Exception: - import contextlib as contextlib2 - -import jaraco.apt -import yg.lockfile - __metaclass__ = type -def file_lines_if_exists(filename): - """ - Return the lines from a file as a list if the file exists, or an - empty list otherwise. - - >>> file_lines_if_exists('/doesnotexist.txt') - [] - >>> file_lines_if_exists('setup.py') - [...] - """ - if not os.path.isfile(filename): - return [] - return list(open(filename)) - - -def strip_comments(lines): - """ - Returns the lines from a list of a lines with comments and trailing - whitespace removed. - - >>> strip_comments(['abc', ' ', '# def', 'egh ']) - ['abc', '', '', 'egh'] - - It should not remove leading whitespace - >>> strip_comments([' bar # baz']) - [' bar'] - - It should also strip trailing comments. - >>> strip_comments(['abc #foo']) - ['abc'] - """ - return [line.partition('#')[0].rstrip() for line in lines] - - -def data_lines_from_file(filename): - return filter(None, strip_comments(file_lines_if_exists(filename))) - - -def run(): - """ - Run a command in the context of the system dependencies. - """ - parser = argparse.ArgumentParser() - parser.add_argument( - '--deps-def', - default=data_lines_from_file("system deps.txt") - + data_lines_from_file("build deps.txt"), - help="A file specifying the dependencies (one per line)", - type=data_lines_from_file, - dest="spec_deps", - ) - parser.add_argument( - '--dep', - action="append", - default=[], - help="A specific dependency (multiple allowed)", - dest="deps", - ) - parser.add_argument( - 'command', - type=shlex.split, - default=shlex.split("python2.7 setup.py test"), - help="Command to invoke in the context of the dependencies", - ) - parser.add_argument( - '--do-not-remove', - default=False, - action="store_true", - help="Keep any installed packages", - ) - parser.add_argument( - '--aggressively-remove', - default=False, - action="store_true", - help="When removing packages, also remove those automatically installed" - " as dependencies", - ) - parser.add_argument( - '-l', - '--log-level', - default=logging.INFO, - type=log_level, - help="Set log level (DEBUG, INFO, WARNING, ERROR)", - ) - args = parser.parse_args() - logging.basicConfig(level=args.log_level) - context = dependency_context( - args.spec_deps + args.deps, aggressively_remove=args.aggressively_remove - ) - with context as to_remove: - if args.do_not_remove: - del to_remove[:] - raise SystemExit(subprocess.Popen(args.command).wait()) - - -def log_level(level_string): - """ - Return a log level for a string - """ - return getattr(logging, level_string.upper()) - - -@contextlib.contextmanager -def dependency_context(package_names, aggressively_remove=False): - """ - Install the supplied packages and yield. Finally, remove all packages - that were installed. - Currently assumes 'aptitude' is available. - """ - installed_packages = [] - log = logging.getLogger(__name__) - try: - if not package_names: - logging.debug('No packages requested') - if package_names: - lock = yg.lockfile.FileLock('/tmp/.pkg-context-lock', timeout=30 * 60) - log.info('Acquiring lock to perform install') - lock.acquire() - log.info('Installing ' + ', '.join(package_names)) - output = subprocess.check_output( - ['sudo', 'aptitude', 'install', '-y'] + package_names, - stderr=subprocess.STDOUT, - ) - log.debug('Aptitude output:\n%s', output) - installed_packages = jaraco.apt.parse_new_packages( - output, include_automatic=aggressively_remove - ) - if not installed_packages: - lock.release() - log.info('Installed ' + ', '.join(installed_packages)) - yield installed_packages - except subprocess.CalledProcessError: - log.error("Error occurred installing packages") - raise - finally: - if installed_packages: - log.info('Removing ' + ','.join(installed_packages)) - subprocess.check_call( - ['sudo', 'aptitude', 'remove', '-y'] + installed_packages, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - ) - lock.release() - - @contextlib.contextmanager def pushd(dir): orig = os.getcwd() @@ -314,7 +158,7 @@ __nonzero__ = __bool__ -class suppress(contextlib2.suppress, contextlib2.ContextDecorator): +class suppress(contextlib.suppress, contextlib.ContextDecorator): """ A version of contextlib.suppress with decorator support. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jaraco.context-3.0.0/jaraco.context.egg-info/PKG-INFO new/jaraco.context-4.0.0/jaraco.context.egg-info/PKG-INFO --- old/jaraco.context-3.0.0/jaraco.context.egg-info/PKG-INFO 2020-01-10 09:37:47.000000000 +0100 +++ new/jaraco.context-4.0.0/jaraco.context.egg-info/PKG-INFO 2021-01-29 03:42:34.000000000 +0100 @@ -1,29 +1,27 @@ Metadata-Version: 2.1 Name: jaraco.context -Version: 3.0.0 +Version: 4.0.0 Summary: Context managers by jaraco Home-page: https://github.com/jaraco/jaraco.context Author: Jason R. Coombs Author-email: jar...@jaraco.com License: UNKNOWN Description: .. image:: https://img.shields.io/pypi/v/jaraco.context.svg - :target: https://pypi.org/project/jaraco.context + :target: `PyPI link`_ .. image:: https://img.shields.io/pypi/pyversions/jaraco.context.svg + :target: `PyPI link`_ - .. image:: https://dev.azure.com/jaraco/jaraco.context/_apis/build/status/jaraco.jaraco.context?branchName=master - :target: https://dev.azure.com/jaraco/jaraco.context/_build/latest?definitionId=1&branchName=master + .. _PyPI link: https://pypi.org/project/jaraco.context - .. image:: https://img.shields.io/travis/jaraco/jaraco.context/master.svg - :target: https://travis-ci.org/jaraco/jaraco.context + .. image:: https://github.com/jaraco/jaraco.context/workflows/tests/badge.svg + :target: https://github.com/jaraco/jaraco.context/actions?query=workflow%3A%22tests%22 + :alt: tests .. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/psf/black :alt: Code style: Black - .. .. image:: https://img.shields.io/appveyor/ci/jaraco/jaraco-context/master.svg - .. :target: https://ci.appveyor.com/project/jaraco/jaraco-context/branch/master - .. image:: https://readthedocs.org/projects/jaracocontext/badge/?version=latest :target: https://jaracocontext.readthedocs.io/en/latest/?badge=latest @@ -32,6 +30,7 @@ Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Programming Language :: Python :: 3 +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/jaraco.context-3.0.0/jaraco.context.egg-info/SOURCES.txt new/jaraco.context-4.0.0/jaraco.context.egg-info/SOURCES.txt --- old/jaraco.context-3.0.0/jaraco.context.egg-info/SOURCES.txt 2020-01-10 09:37:50.000000000 +0100 +++ new/jaraco.context-4.0.0/jaraco.context.egg-info/SOURCES.txt 2021-01-29 03:42:34.000000000 +0100 @@ -2,22 +2,21 @@ .flake8 .pre-commit-config.yaml .readthedocs.yml -.travis.yml CHANGES.rst LICENSE README.rst -appveyor.yml -azure-pipelines.yml +mypy.ini pyproject.toml pytest.ini setup.cfg setup.py skeleton.md tox.ini +.github/workflows/automerge.yml +.github/workflows/main.yml docs/conf.py docs/history.rst docs/index.rst -jaraco/__init__.py jaraco/context.py jaraco.context.egg-info/PKG-INFO jaraco.context.egg-info/SOURCES.txt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jaraco.context-3.0.0/jaraco.context.egg-info/requires.txt new/jaraco.context-4.0.0/jaraco.context.egg-info/requires.txt --- old/jaraco.context-3.0.0/jaraco.context.egg-info/requires.txt 2020-01-10 09:37:47.000000000 +0100 +++ new/jaraco.context-4.0.0/jaraco.context.egg-info/requires.txt 2021-01-29 03:42:34.000000000 +0100 @@ -1,17 +1,16 @@ -jaraco.apt -yg.lockfile - -[:python_version == "2.7"] -contextlib2 [docs] sphinx -jaraco.packaging>=3.2 +jaraco.packaging>=8.2 rst.linker>=1.9 [testing] pytest!=3.7.3,>=3.5 pytest-checkdocs>=1.2.3 pytest-flake8 -pytest-black-multipy pytest-cov +pytest-enabler + +[testing:platform_python_implementation != "PyPy"] +pytest-black>=0.3.7 +pytest-mypy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jaraco.context-3.0.0/jaraco.context.egg-info/top_level.txt new/jaraco.context-4.0.0/jaraco.context.egg-info/top_level.txt --- old/jaraco.context-3.0.0/jaraco.context.egg-info/top_level.txt 2020-01-10 09:37:47.000000000 +0100 +++ new/jaraco.context-4.0.0/jaraco.context.egg-info/top_level.txt 2021-01-29 03:42:34.000000000 +0100 @@ -1 +1,2 @@ +dist jaraco diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jaraco.context-3.0.0/mypy.ini new/jaraco.context-4.0.0/mypy.ini --- old/jaraco.context-3.0.0/mypy.ini 1970-01-01 01:00:00.000000000 +0100 +++ new/jaraco.context-4.0.0/mypy.ini 2021-01-29 03:42:18.000000000 +0100 @@ -0,0 +1,2 @@ +[mypy] +ignore_missing_imports = True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jaraco.context-3.0.0/pyproject.toml new/jaraco.context-4.0.0/pyproject.toml --- old/jaraco.context-3.0.0/pyproject.toml 2020-01-10 09:37:17.000000000 +0100 +++ new/jaraco.context-4.0.0/pyproject.toml 2021-01-29 03:42:18.000000000 +0100 @@ -1,6 +1,20 @@ [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] + +[pytest.enabler.black] +addopts = "--black" + +[pytest.enabler.mypy] +addopts = "--mypy" + +[pytest.enabler.flake8] +addopts = "--flake8" + +[pytest.enabler.cov] +addopts = "--cov" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jaraco.context-3.0.0/pytest.ini new/jaraco.context-4.0.0/pytest.ini --- old/jaraco.context-3.0.0/pytest.ini 2020-01-10 09:37:17.000000000 +0100 +++ new/jaraco.context-4.0.0/pytest.ini 2021-01-29 03:42:18.000000000 +0100 @@ -1,5 +1,9 @@ [pytest] norecursedirs=dist build .tox .eggs -addopts=--doctest-modules --flake8 --black --cov +addopts=--doctest-modules doctest_optionflags=ALLOW_UNICODE ELLIPSIS +# workaround for warning pytest-dev/pytest#6178 +junit_family=xunit2 filterwarnings= + # https://github.com/pytest-dev/pytest/issues/6928 + ignore:direct construction of .*Item has been deprecated:DeprecationWarning diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jaraco.context-3.0.0/setup.cfg new/jaraco.context-4.0.0/setup.cfg --- old/jaraco.context-3.0.0/setup.cfg 2020-01-10 09:37:50.220738600 +0100 +++ new/jaraco.context-4.0.0/setup.cfg 2021-01-29 03:42:34.967781800 +0100 @@ -1,8 +1,6 @@ -[bdist_wheel] -universal = 1 - [metadata] -license_file = LICENSE +license_files = + LICENSE name = jaraco.context author = Jason R. Coombs author_email = jar...@jaraco.com @@ -14,27 +12,33 @@ Intended Audience :: Developers License :: OSI Approved :: MIT License Programming Language :: Python :: 3 + Programming Language :: Python :: 3 :: Only [options] -packages = find: +packages = find_namespace: include_package_data = true python_requires = >=3.6 install_requires = - jaraco.apt - yg.lockfile - contextlib2; python_version=="2.7" -setup_requires = setuptools_scm >= 1.15.0 +setup_requires = setuptools_scm[toml] >= 3.4.1 + +[options.packages.find] +exclude = + build* + docs* + tests* [options.extras_require] testing = pytest >= 3.5, !=3.7.3 pytest-checkdocs >= 1.2.3 pytest-flake8 - pytest-black-multipy + pytest-black >= 0.3.7; python_implementation != "PyPy" pytest-cov + pytest-mypy; python_implementation != "PyPy" + pytest-enabler docs = sphinx - jaraco.packaging >= 3.2 + jaraco.packaging >= 8.2 rst.linker >= 1.9 [options.entry_points] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jaraco.context-3.0.0/setup.py new/jaraco.context-4.0.0/setup.py --- old/jaraco.context-3.0.0/setup.py 2020-01-10 09:37:17.000000000 +0100 +++ new/jaraco.context-4.0.0/setup.py 2021-01-29 03:42:18.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/jaraco.context-3.0.0/skeleton.md new/jaraco.context-4.0.0/skeleton.md --- old/jaraco.context-3.0.0/skeleton.md 2020-01-10 09:37:17.000000000 +0100 +++ new/jaraco.context-4.0.0/skeleton.md 2021-01-29 03:42:18.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,24 +38,49 @@ ## 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. + +For example, here's a session of the [path project](https://pypi.org/project/path) pulling non-conflicting changes from the skeleton: + +<img src="https://raw.githubusercontent.com/jaraco/skeleton/gh-pages/docs/refresh.svg"> 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. +## Periodic Collapse + +In late 2020, this project [introduced](https://github.com/jaraco/skeleton/issues/27) the idea of a periodic but infrequent (O(years)) collapse of commits to limit the number of commits a new consumer will need to accept to adopt the skeleton. + +The full history of commits is collapsed into a single commit and that commit becomes the new mainline head. + +When one of these collapse operations happens, any project that previously pulled from the skeleton will no longer have a related history with that new main branch. For those projects, the skeleton provides a "handoff" branch that reconciles the two branches. Any project that has previously merged with the skeleton but now gets an error "fatal: refusing to merge unrelated histories" should instead use the handoff branch once to incorporate the new main branch. + +``` +$ git pull https://github.com/jaraco/skeleton 2020-handoff +``` + +This handoff needs to be pulled just once and thereafter the project can pull from the main head. + +The archive and handoff branches from prior collapses are indicate here: + +| refresh | archive | handoff | +|---------|-----------------|--------------| +| 2020-12 | archive/2020-12 | 2020-handoff | + # Features 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) +- Integrated type checking through [mypy](https://github.com/python/mypy/). ## 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: @@ -92,63 +117,43 @@ - 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 through multiple CI providers. +The project is pre-configured to run Continuous Integration tests. -### Azure Pipelines +### Github Actions -[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. +[Github Actions](https://docs.github.com/en/free-pro-team@latest/actions) are the preferred provider as they provide free, fast, multi-platform services with straightforward configuration. Configured in `.github/workflows`. 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. +- run on late (and updated) platform versions +- automated releases of tagged commits +- [automatic merging of PRs](https://github.com/marketplace/actions/merge-pull-requests) (requires [protecting branches with required status checks](https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/enabling-required-status-checks), [not possible through API](https://github.community/t/set-all-status-checks-to-be-required-as-branch-protection-using-the-github-api/119493)) -Features include: -- test against 3 -- run on Ubuntu Xenial -- correct for broken IPv6 - -### 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 Azure as the `Azure secrets` variable group. This variable group needs to be created only once per organization. For example: +In addition to running tests, an additional publish 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 each Github project (or org) `PYPI_TOKEN` [secret](https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets). Example: ``` -# 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 +pip-run -q jaraco.develop -- -m jaraco.develop.add-github-secrets ``` -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 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/jaraco.context-3.0.0/tox.ini new/jaraco.context-4.0.0/tox.ini --- old/jaraco.context-3.0.0/tox.ini 2020-01-10 09:37:17.000000000 +0100 +++ new/jaraco.context-4.0.0/tox.ini 2021-01-29 03:42:18.000000000 +0100 @@ -3,16 +3,11 @@ 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 +toxworkdir={env:TOX_WORK_DIR:.tox} [testenv] deps = - setuptools>=31.0.1 -pip_version = pip commands = pytest {posargs} usedevelop = True @@ -29,14 +24,17 @@ [testenv:release] skip_install = True deps = - pep517>=0.5 + build twine[keyring]>=1.13 path + jaraco.develop>=7.1 passenv = TWINE_PASSWORD + GITHUB_TOKEN setenv = TWINE_USERNAME = {env:TWINE_USERNAME:__token__} commands = python -c "import path; path.Path('dist').rmtree_p()" - python -m pep517.build . + python -m build python -m twine upload dist/* + python -m jaraco.develop.create-github-release