Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-check-manifest for 
openSUSE:Factory checked in at 2022-03-10 22:45:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-check-manifest (Old)
 and      /work/SRC/openSUSE:Factory/.python-check-manifest.new.2349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-check-manifest"

Thu Mar 10 22:45:32 2022 rev:11 rq:960722 version:0.47

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-check-manifest/python-check-manifest.changes  
    2020-11-29 12:24:13.449747050 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-check-manifest.new.2349/python-check-manifest.changes
    2022-03-11 11:31:51.201956669 +0100
@@ -1,0 +2,19 @@
+Thu Mar 10 10:48:13 UTC 2022 - Matej Cepl <mc...@suse.com>
+
+- Add python-check-manifest-no-mock.patch
+  (gh#mgedmin/check-manifest#151) replace using mock with
+  unittest.mock.
+
+-------------------------------------------------------------------
+Wed Mar  9 10:06:10 UTC 2022 - pgaj...@suse.com
+
+- version update to 0.47
+  0.47 (2021-09-22)
+  -----------------
+  - Fix ``setuptools_scm`` workaround for packages with dashes in the name
+    (`#145 <https://github.com/mgedmin/check-manifest/issues/145>`_).
+  0.46 (2021-01-04)
+  -----------------
+  - The `pre-commit <https://pre-commit.com>`__ hook now always uses Python 3.
+
+-------------------------------------------------------------------

Old:
----
  check-manifest-0.45.tar.gz

New:
----
  check-manifest-0.47.tar.gz
  python-check-manifest-no-mock.patch

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

Other differences:
------------------
++++++ python-check-manifest.spec ++++++
--- /var/tmp/diff_new_pack.Zrkycg/_old  2022-03-11 11:31:52.873958631 +0100
+++ /var/tmp/diff_new_pack.Zrkycg/_new  2022-03-11 11:31:52.881958641 +0100
@@ -1,7 +1,7 @@
 #
-# spec file for package python-check-manifest
+# spec file
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -27,13 +27,16 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-check-manifest%{psuffix}
-Version:        0.45
+Version:        0.47
 Release:        0
 Summary:        Tool to check Python source package MANIFEST.in for 
completeness
 License:        MIT
 Group:          Development/Languages/Python
 URL:            https://github.com/mgedmin/check-manifest
 Source:         
https://files.pythonhosted.org/packages/source/c/check-manifest/check-manifest-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM python-check-manifest-no-mock.patch 
gh#mgedmin/check-manifest#151 pgaj...@suse.com
+# Replace using mock with unittest.mock.
+Patch0:         python-check-manifest-no-mock.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
@@ -42,7 +45,7 @@
 Requires:       python-setuptools
 Requires:       python-toml
 Requires(post): update-alternatives
-Requires(postun): update-alternatives
+Requires(postun):update-alternatives
 Recommends:     git-core > 2.11
 Recommends:     python-pip
 Recommends:     python-wheel
@@ -52,7 +55,6 @@
 BuildArch:      noarch
 %if %{with test}
 BuildRequires:  %{python_module build}
-BuildRequires:  %{python_module mock}
 BuildRequires:  %{python_module pep517}
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module pytest}
@@ -71,6 +73,8 @@
 
 %prep
 %setup -q -n check-manifest-%{version}
+%autopatch -p1
+
 sed -i '1{\,^#!%{_bindir}/env python,d}' check_manifest.py
 chmod -x check_manifest.py
 
@@ -89,7 +93,12 @@
 export LANG=en_US.UTF-8
 # test_build_sdist uses pip which likes to use internet to resolve versions
 # test_python_from_path fails on Leap only
-%pytest -rs -k 'not (test_build_sdist or test_python_from_path)'
+skip='test_build_sdist or test_python_from_path'
+%if 0%{?python_version_nodots} <= 36
+# E       TypeError: tuple indices must be integers or slices, not str
+skip="$skip or test_extra_ignore_args or test_ignore_bad_ideas_args"
+%endif
+%pytest -rs -k "not ($skip)"
 %endif
 
 %if !%{with test}

++++++ check-manifest-0.45.tar.gz -> check-manifest-0.47.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.45/.pre-commit-hooks.yaml 
new/check-manifest-0.47/.pre-commit-hooks.yaml
--- old/check-manifest-0.45/.pre-commit-hooks.yaml      2019-06-13 
14:22:50.000000000 +0200
+++ new/check-manifest-0.47/.pre-commit-hooks.yaml      2020-12-22 
16:37:34.000000000 +0100
@@ -3,5 +3,6 @@
     description: Check the completeness of MANIFEST.in for Python packages.
     entry: check-manifest
     language: python
+    language_version: python3
     pass_filenames: false
     always_run: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.45/.travis.yml 
new/check-manifest-0.47/.travis.yml
--- old/check-manifest-0.45/.travis.yml 2020-10-29 20:16:50.000000000 +0100
+++ new/check-manifest-0.47/.travis.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,26 +0,0 @@
-language: python
-cache: pip
-python:
-    - 3.6
-    - 3.7
-    - 3.8
-    - 3.9
-    - pypy3
-env:
-    - FORCE_TEST_VCS=bzr
-    - FORCE_TEST_VCS=git
-    - FORCE_TEST_VCS=hg
-    - FORCE_TEST_VCS=svn
-install:
-    - pip install -U pip
-    - pip install coverage coveralls pytest flake8
-    - pip install -e .[test]
-script:
-    - SKIP_NO_TESTS=1 coverage run -m pytest
-    - coverage report -m --fail-under=$(if [[ $FORCE_TEST_VCS == bzr ]]; then 
printf 99; else printf 100; fi)
-    - python check_manifest.py
-    - flake8 *.py
-after_script:
-    - coveralls
-notifications:
-    email: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.45/CHANGES.rst 
new/check-manifest-0.47/CHANGES.rst
--- old/check-manifest-0.45/CHANGES.rst 2020-10-30 23:12:25.000000000 +0100
+++ new/check-manifest-0.47/CHANGES.rst 2021-09-22 10:49:35.000000000 +0200
@@ -2,6 +2,19 @@
 =========
 
 
+0.47 (2021-09-22)
+-----------------
+
+- Fix ``setuptools_scm`` workaround for packages with dashes in the name
+  (`#145 <https://github.com/mgedmin/check-manifest/issues/145>`_).
+
+
+0.46 (2021-01-04)
+-----------------
+
+- The `pre-commit <https://pre-commit.com>`__ hook now always uses Python 3.
+
+
 0.45 (2020-10-31)
 -----------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.45/MANIFEST.in 
new/check-manifest-0.47/MANIFEST.in
--- old/check-manifest-0.45/MANIFEST.in 2019-06-13 14:22:50.000000000 +0200
+++ new/check-manifest-0.47/MANIFEST.in 2020-12-22 16:37:34.000000000 +0100
@@ -4,7 +4,6 @@
 include tox.ini
 include Makefile
 include .gitignore
-include .travis.yml
 include appveyor.yml
 include .coveragerc
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.45/Makefile 
new/check-manifest-0.47/Makefile
--- old/check-manifest-0.45/Makefile    2020-10-29 20:16:49.000000000 +0100
+++ new/check-manifest-0.47/Makefile    2020-11-30 07:53:19.000000000 +0100
@@ -29,6 +29,19 @@
 distcheck-self:
        tox -e check-manifest
 
+.PHONY: releasechecklist
+releasechecklist: check-readme  # also release.mk will add other checks
+
+.PHONY: check-readme
+check-readme:
+       @rev_line='        rev: "'"`$(PYTHON) setup.py --version`"'"' && \
+           grep -q "^$$rev_line$$" README.rst || { \
+               echo "README.rst doesn't specify $$rev_line"; \
+               echo "Please run make update-readme"; exit 1; }
+
+.PHONY: update-readme
+update-readme:
+       sed -i -e 's/rev: ".*"/rev: "$(shell $(PYTHON) setup.py --version)"/' 
README.rst
 
 FILE_WITH_VERSION = check_manifest.py
 include release.mk
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.45/PKG-INFO 
new/check-manifest-0.47/PKG-INFO
--- old/check-manifest-0.45/PKG-INFO    2020-10-30 23:15:11.123818400 +0100
+++ new/check-manifest-0.47/PKG-INFO    2021-09-22 11:08:44.181592200 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: check-manifest
-Version: 0.45
+Version: 0.47
 Summary: Check MANIFEST.in in a Python source package for completeness
 Home-page: https://github.com/mgedmin/check-manifest
 Author: Marius Gedminas
@@ -143,13 +143,13 @@
         
             repos:
             -   repo: https://github.com/mgedmin/check-manifest
-                rev: "0.39"
+                rev: "0.47"
                 hooks:
                 -   id: check-manifest
         
         If you are running pre-commit without a network, you can utilize
         ``args: [--no-build-isolation]`` to prevent a ``pip install`` reaching 
out to
-        pypi.  If you have additional ``build-system.requires`` outside of pip 
/
+        PyPI.  If you have additional ``build-system.requires`` outside of pip 
/
         setuptools / wheel you will want to list those in 
``additional_dependencies``.
         
         .. code-block:: yaml
@@ -163,8 +163,8 @@
                     additional_dependencies: [setuptools-scm]
         
         
-        .. |buildstatus| image:: 
https://api.travis-ci.com/mgedmin/check-manifest.svg?branch=master
-        .. _buildstatus: https://travis-ci.com/mgedmin/check-manifest
+        .. |buildstatus| image:: 
https://github.com/mgedmin/check-manifest/workflows/build/badge.svg?branch=master
+        .. _buildstatus: https://github.com/mgedmin/check-manifest/actions
         
         .. |appveyor| image:: 
https://ci.appveyor.com/api/projects/status/github/mgedmin/check-manifest?branch=master&svg=true
         .. _appveyor: https://ci.appveyor.com/project/mgedmin/check-manifest
@@ -177,6 +177,19 @@
         =========
         
         
+        0.47 (2021-09-22)
+        -----------------
+        
+        - Fix ``setuptools_scm`` workaround for packages with dashes in the 
name
+          (`#145 <https://github.com/mgedmin/check-manifest/issues/145>`_).
+        
+        
+        0.46 (2021-01-04)
+        -----------------
+        
+        - The `pre-commit <https://pre-commit.com>`__ hook now always uses 
Python 3.
+        
+        
         0.45 (2020-10-31)
         -----------------
         
@@ -620,6 +633,7 @@
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3 :: Only
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.45/README.rst 
new/check-manifest-0.47/README.rst
--- old/check-manifest-0.45/README.rst  2020-10-30 23:12:11.000000000 +0100
+++ new/check-manifest-0.47/README.rst  2021-09-22 10:49:50.000000000 +0200
@@ -135,13 +135,13 @@
 
     repos:
     -   repo: https://github.com/mgedmin/check-manifest
-        rev: "0.39"
+        rev: "0.47"
         hooks:
         -   id: check-manifest
 
 If you are running pre-commit without a network, you can utilize
 ``args: [--no-build-isolation]`` to prevent a ``pip install`` reaching out to
-pypi.  If you have additional ``build-system.requires`` outside of pip /
+PyPI.  If you have additional ``build-system.requires`` outside of pip /
 setuptools / wheel you will want to list those in ``additional_dependencies``.
 
 .. code-block:: yaml
@@ -155,8 +155,8 @@
             additional_dependencies: [setuptools-scm]
 
 
-.. |buildstatus| image:: 
https://api.travis-ci.com/mgedmin/check-manifest.svg?branch=master
-.. _buildstatus: https://travis-ci.com/mgedmin/check-manifest
+.. |buildstatus| image:: 
https://github.com/mgedmin/check-manifest/workflows/build/badge.svg?branch=master
+.. _buildstatus: https://github.com/mgedmin/check-manifest/actions
 
 .. |appveyor| image:: 
https://ci.appveyor.com/api/projects/status/github/mgedmin/check-manifest?branch=master&svg=true
 .. _appveyor: https://ci.appveyor.com/project/mgedmin/check-manifest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.45/check_manifest.egg-info/PKG-INFO 
new/check-manifest-0.47/check_manifest.egg-info/PKG-INFO
--- old/check-manifest-0.45/check_manifest.egg-info/PKG-INFO    2020-10-30 
23:15:11.000000000 +0100
+++ new/check-manifest-0.47/check_manifest.egg-info/PKG-INFO    2021-09-22 
11:08:44.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: check-manifest
-Version: 0.45
+Version: 0.47
 Summary: Check MANIFEST.in in a Python source package for completeness
 Home-page: https://github.com/mgedmin/check-manifest
 Author: Marius Gedminas
@@ -143,13 +143,13 @@
         
             repos:
             -   repo: https://github.com/mgedmin/check-manifest
-                rev: "0.39"
+                rev: "0.47"
                 hooks:
                 -   id: check-manifest
         
         If you are running pre-commit without a network, you can utilize
         ``args: [--no-build-isolation]`` to prevent a ``pip install`` reaching 
out to
-        pypi.  If you have additional ``build-system.requires`` outside of pip 
/
+        PyPI.  If you have additional ``build-system.requires`` outside of pip 
/
         setuptools / wheel you will want to list those in 
``additional_dependencies``.
         
         .. code-block:: yaml
@@ -163,8 +163,8 @@
                     additional_dependencies: [setuptools-scm]
         
         
-        .. |buildstatus| image:: 
https://api.travis-ci.com/mgedmin/check-manifest.svg?branch=master
-        .. _buildstatus: https://travis-ci.com/mgedmin/check-manifest
+        .. |buildstatus| image:: 
https://github.com/mgedmin/check-manifest/workflows/build/badge.svg?branch=master
+        .. _buildstatus: https://github.com/mgedmin/check-manifest/actions
         
         .. |appveyor| image:: 
https://ci.appveyor.com/api/projects/status/github/mgedmin/check-manifest?branch=master&svg=true
         .. _appveyor: https://ci.appveyor.com/project/mgedmin/check-manifest
@@ -177,6 +177,19 @@
         =========
         
         
+        0.47 (2021-09-22)
+        -----------------
+        
+        - Fix ``setuptools_scm`` workaround for packages with dashes in the 
name
+          (`#145 <https://github.com/mgedmin/check-manifest/issues/145>`_).
+        
+        
+        0.46 (2021-01-04)
+        -----------------
+        
+        - The `pre-commit <https://pre-commit.com>`__ hook now always uses 
Python 3.
+        
+        
         0.45 (2020-10-31)
         -----------------
         
@@ -620,6 +633,7 @@
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3 :: Only
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/check-manifest-0.45/check_manifest.egg-info/SOURCES.txt 
new/check-manifest-0.47/check_manifest.egg-info/SOURCES.txt
--- old/check-manifest-0.45/check_manifest.egg-info/SOURCES.txt 2020-10-30 
23:15:11.000000000 +0100
+++ new/check-manifest-0.47/check_manifest.egg-info/SOURCES.txt 2021-09-22 
11:08:44.000000000 +0200
@@ -1,7 +1,6 @@
 .coveragerc
 .gitignore
 .pre-commit-hooks.yaml
-.travis.yml
 CHANGES.rst
 LICENSE.rst
 MANIFEST.in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/check-manifest-0.45/check_manifest.egg-info/requires.txt 
new/check-manifest-0.47/check_manifest.egg-info/requires.txt
--- old/check-manifest-0.45/check_manifest.egg-info/requires.txt        
2020-10-30 23:15:11.000000000 +0100
+++ new/check-manifest-0.47/check_manifest.egg-info/requires.txt        
2021-09-22 11:08:44.000000000 +0200
@@ -4,3 +4,4 @@
 
 [test]
 mock>=3.0.0
+pytest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.45/check_manifest.py 
new/check-manifest-0.47/check_manifest.py
--- old/check-manifest-0.45/check_manifest.py   2020-10-30 23:12:25.000000000 
+0100
+++ new/check-manifest-0.47/check_manifest.py   2021-09-22 10:49:35.000000000 
+0200
@@ -30,18 +30,19 @@
 import tempfile
 import unicodedata
 import zipfile
-from contextlib import closing, contextmanager
+from contextlib import contextmanager
 from typing import List, Optional, Union
 from xml.etree import ElementTree as ET
 
 import toml
 from setuptools.command.egg_info import translate_pattern
 
+
 # import distutils after setuptools to avoid a warning
-from distutils.text_file import TextFile
+from distutils.text_file import TextFile  # isort:skip
 
 
-__version__ = '0.45'
+__version__ = '0.47'
 __author__ = 'Marius Gedminas <mar...@gedmin.as>'
 __licence__ = 'MIT'
 __url__ = 'https://github.com/mgedmin/check-manifest'
@@ -155,7 +156,7 @@
                                 stdout=subprocess.PIPE,
                                 stderr=subprocess.PIPE, cwd=cwd)
     except OSError as e:
-        raise Failure("could not run %s: %s" % (command, e))
+        raise Failure(f"could not run {command}: {e}")
     output, stderr = pipe.communicate()
     status = pipe.wait()
     if status != 0:
@@ -314,10 +315,10 @@
     Supports .tar.gz and .zip.
     """
     if archive_filename.endswith('.zip'):
-        with closing(zipfile.ZipFile(archive_filename)) as zf:
+        with zipfile.ZipFile(archive_filename) as zf:
             filelist = zf.namelist()
     elif archive_filename.endswith(('.tar.gz', '.tar.bz2', '.tar')):
-        with closing(tarfile.open(archive_filename)) as tf:
+        with tarfile.open(archive_filename) as tf:
             # XXX: is unicodify() necessary now that Py2 is no longer 
supported?
             filelist = map(unicodify, tf.getnames())
     else:
@@ -878,7 +879,7 @@
     filename = os.path.splitext(os.path.basename(filename))[0]
     if filename.endswith('.tar'):
         filename = os.path.splitext(filename)[0]
-    return filename.partition('-')[2]
+    return filename.split('-')[-1]
 
 
 def should_use_pep_517():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.45/release.mk 
new/check-manifest-0.47/release.mk
--- old/check-manifest-0.45/release.mk  2020-10-29 20:16:49.000000000 +0100
+++ new/check-manifest-0.47/release.mk  2021-04-22 21:51:21.000000000 +0200
@@ -1,4 +1,4 @@
-# release.mk version 2.0 (2020-10-11)
+# release.mk version 2.1 (2021-04-19)
 #
 # Helpful Makefile rules for releasing Python packages.
 # https://github.com/mgedmin/python-project-skel
@@ -142,18 +142,24 @@
 do-release:
        $(release_recipe)
 
-ifndef release_recipe
-define release_recipe =
+define default_release_recipe_publish_and_tag =
        # I'm chicken so I won't actually do these things yet
        @echo "Please run"
        @echo
        @echo "  $(PYPI_PUBLISH)"
        @echo "  $(VCS_TAG)"
        @echo
+endef
+define default_release_recipe_increment_and_push =
        @echo "Please increment the version number in $(FILE_WITH_VERSION)"
        @echo "and add a new empty entry at the top of the changelog in 
$(FILE_WITH_CHANGELOG), then"
        @echo
        @echo '  $(VCS_COMMIT_AND_PUSH)'
        @echo
 endef
+ifndef release_recipe
+define release_recipe =
+$(default_release_recipe_publish_and_tag)
+$(default_release_recipe_increment_and_push)
+endef
 endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.45/setup.cfg 
new/check-manifest-0.47/setup.cfg
--- old/check-manifest-0.45/setup.cfg   2020-10-30 23:15:11.123818400 +0100
+++ new/check-manifest-0.47/setup.cfg   2021-09-22 11:08:44.181592200 +0200
@@ -1,10 +1,3 @@
-[bdist_wheel]
-universal = 1
-
-[nosetests]
-with-doctest = 1
-exe = 1
-
 [tool:pytest]
 norecursedirs = dist build tmp .* *.egg-info
 python_files = tests.py check_manifest.py
@@ -16,6 +9,8 @@
 [flake8]
 ignore = E241,E501,E261,E126,E127,E128,E302,W503
 
+[mypy]
+
 [mypy-setuptools.command.egg_info]
 ignore_missing_imports = true
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.45/setup.py 
new/check-manifest-0.47/setup.py
--- old/check-manifest-0.45/setup.py    2020-10-30 23:12:11.000000000 +0100
+++ new/check-manifest-0.47/setup.py    2021-06-13 15:28:04.000000000 +0200
@@ -44,6 +44,7 @@
         'Operating System :: OS Independent',
         'Programming Language :: Python',
         'Programming Language :: Python :: 3',
+        'Programming Language :: Python :: 3 :: Only',
         'Programming Language :: Python :: 3.6',
         'Programming Language :: Python :: 3.7',
         'Programming Language :: Python :: 3.8',
@@ -64,6 +65,7 @@
     extras_require={
         'test': [
             'mock >= 3.0.0',
+            'pytest',
         ],
     },
     entry_points={
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.45/tests.py 
new/check-manifest-0.47/tests.py
--- old/check-manifest-0.45/tests.py    2020-10-30 23:12:11.000000000 +0100
+++ new/check-manifest-0.47/tests.py    2021-09-22 10:47:19.000000000 +0200
@@ -1,7 +1,4 @@
-from __future__ import print_function
-
 import codecs
-import doctest
 import locale
 import os
 import posixpath
@@ -36,7 +33,7 @@
     HAS_OEM_CODEC = True
 
 
-class MockUI(object):
+class MockUI:
 
     def __init__(self, verbosity=1):
         self.verbosity = verbosity
@@ -91,14 +88,14 @@
         self.assertEqual(run(["true"]), "")
 
     def test_run_failure(self):
-        from check_manifest import run, CommandFailed
+        from check_manifest import CommandFailed, run
         with self.assertRaises(CommandFailed) as cm:
             run(["false"])
         self.assertEqual(str(cm.exception),
                          "['false'] failed (status 1):\n")
 
     def test_run_no_such_program(self):
-        from check_manifest import run, Failure
+        from check_manifest import Failure, run
         with self.assertRaises(Failure) as cm:
             run(["there-is-really-no-such-program"])
         # Linux says "[Errno 2] No such file or directory"
@@ -163,7 +160,7 @@
                 with mock.patch('os.mkdir',
                                 lambda d: actions.append('mkdir %s' % d)):
                     with mock.patch('shutil.copy2',
-                                    lambda s, d: actions.append('cp %s %s' % 
(s, d))):
+                                    lambda s, d: actions.append(f'cp {s} 
{d}')):
                         copy_files(['a', 'b', n('c/d/e')], n('/dest/dir'))
         self.assertEqual(
             actions,
@@ -181,7 +178,7 @@
                              os.path.normpath('/some/dir/a'))
 
     def test_get_one_file_in_empty_directory(self):
-        from check_manifest import get_one_file_in, Failure
+        from check_manifest import Failure, get_one_file_in
         with mock.patch('os.listdir', lambda dir: []):
             with self.assertRaises(Failure) as cm:
                 get_one_file_in('/some/dir')
@@ -189,7 +186,7 @@
                              "No files found in /some/dir")
 
     def test_get_one_file_in_too_many(self):
-        from check_manifest import get_one_file_in, Failure
+        from check_manifest import Failure, get_one_file_in
         with mock.patch('os.listdir', lambda dir: ['b', 'a']):
             with self.assertRaises(Failure) as cm:
                 get_one_file_in('/some/dir')
@@ -205,7 +202,7 @@
             nonascii)
 
     def test_get_archive_file_list_unrecognized_archive(self):
-        from check_manifest import get_archive_file_list, Failure
+        from check_manifest import Failure, get_archive_file_list
         with self.assertRaises(Failure) as cm:
             get_archive_file_list('/path/to/archive.rar')
         self.assertEqual(str(cm.exception),
@@ -253,7 +250,7 @@
             format_missing(set(), set(), "1st", "2nd"),
             "")
         self.assertEqual(
-            format_missing(set(["c"]), set(["a"]), "1st", "2nd"),
+            format_missing({"c"}, {"a"}, "1st", "2nd"),
             "missing from 1st:\n"
             "  c\n"
             "missing from 2nd:\n"
@@ -264,11 +261,11 @@
         self.assertEqual(strip_toplevel_name([]), [])
 
     def test_strip_toplevel_name_no_common_prefix(self):
-        from check_manifest import strip_toplevel_name, Failure
+        from check_manifest import Failure, strip_toplevel_name
         self.assertRaises(Failure, strip_toplevel_name, ["a/b", "c/d"])
 
     def test_detect_vcs_no_vcs(self):
-        from check_manifest import detect_vcs, Failure
+        from check_manifest import Failure, detect_vcs
         ui = MockUI()
         with mock.patch('check_manifest.VCS.detect', staticmethod(lambda *a: 
False)):
             with mock.patch('check_manifest.Git.detect', staticmethod(lambda 
*a: False)):
@@ -304,8 +301,11 @@
                                      patterns))
 
     def test_strip_sdist_extras(self):
-        from check_manifest import strip_sdist_extras, IgnoreList
-        from check_manifest import canonical_file_list
+        from check_manifest import (
+            IgnoreList,
+            canonical_file_list,
+            strip_sdist_extras,
+        )
         filelist = canonical_file_list([
             '.github',
             '.github/ISSUE_TEMPLATE',
@@ -340,9 +340,12 @@
         self.assertEqual(strip_sdist_extras(ignore, filelist), expected)
 
     def test_strip_sdist_extras_with_manifest(self):
-        from check_manifest import strip_sdist_extras, IgnoreList
-        from check_manifest import canonical_file_list
-        from check_manifest import _get_ignore_from_manifest_lines
+        from check_manifest import (
+            IgnoreList,
+            _get_ignore_from_manifest_lines,
+            canonical_file_list,
+            strip_sdist_extras,
+        )
         manifest_in = textwrap.dedent("""
             graft src
             exclude *.cfg
@@ -461,10 +464,10 @@
         from check_manifest import extract_version_from_filename as e
         self.assertEqual(e('dist/foo_bar-1.2.3.dev4+g12345.zip'), 
'1.2.3.dev4+g12345')
         self.assertEqual(e('dist/foo_bar-1.2.3.dev4+g12345.tar.gz'), 
'1.2.3.dev4+g12345')
+        self.assertEqual(e('dist/foo-bar-1.2.3.dev4+g12345.tar.gz'), 
'1.2.3.dev4+g12345')
 
     def test_get_ignore_from_manifest_lines(self):
-        from check_manifest import _get_ignore_from_manifest_lines
-        from check_manifest import IgnoreList
+        from check_manifest import IgnoreList, _get_ignore_from_manifest_lines
         parse = partial(_get_ignore_from_manifest_lines, ui=self.ui)
         self.assertEqual(parse([]),
                          IgnoreList())
@@ -519,7 +522,7 @@
         )
 
     def test_get_ignore_from_manifest_lines_warns(self):
-        from check_manifest import _get_ignore_from_manifest_lines, IgnoreList
+        from check_manifest import IgnoreList, _get_ignore_from_manifest_lines
         parse = partial(_get_ignore_from_manifest_lines, ui=self.ui)
         text = textwrap.dedent("""
             graft a/
@@ -532,7 +535,7 @@
         ])
 
     def test_get_ignore_from_manifest(self):
-        from check_manifest import _get_ignore_from_manifest, IgnoreList
+        from check_manifest import IgnoreList, _get_ignore_from_manifest
         filename = os.path.join(self.make_temp_dir(), 'MANIFEST.in')
         self.create_file(filename, textwrap.dedent('''
            exclude \\
@@ -548,7 +551,7 @@
         self.assertEqual(ui.warnings, [])
 
     def test_get_ignore_from_manifest_warnings(self):
-        from check_manifest import _get_ignore_from_manifest, IgnoreList
+        from check_manifest import IgnoreList, _get_ignore_from_manifest
         filename = os.path.join(self.make_temp_dir(), 'MANIFEST.in')
         self.create_file(filename, textwrap.dedent('''
            # this is bad: a file should not end with a backslash
@@ -562,13 +565,13 @@
         ])
 
     def test_should_use_pep517_no_pyproject_toml(self):
-        from check_manifest import should_use_pep_517, cd
+        from check_manifest import cd, should_use_pep_517
         src_dir = self.make_temp_dir()
         with cd(src_dir):
             self.assertFalse(should_use_pep_517())
 
     def test_should_use_pep517_no_build_system(self):
-        from check_manifest import should_use_pep_517, cd
+        from check_manifest import cd, should_use_pep_517
         src_dir = self.make_temp_dir()
         filename = os.path.join(src_dir, 'pyproject.toml')
         self.create_file(filename, textwrap.dedent('''
@@ -578,7 +581,7 @@
             self.assertFalse(should_use_pep_517())
 
     def test_should_use_pep517_no_build_backend(self):
-        from check_manifest import should_use_pep_517, cd
+        from check_manifest import cd, should_use_pep_517
         src_dir = self.make_temp_dir()
         filename = os.path.join(src_dir, 'pyproject.toml')
         self.create_file(filename, textwrap.dedent('''
@@ -592,7 +595,7 @@
             self.assertFalse(should_use_pep_517())
 
     def test_should_use_pep517_yes_please(self):
-        from check_manifest import should_use_pep_517, cd
+        from check_manifest import cd, should_use_pep_517
         src_dir = self.make_temp_dir()
         filename = os.path.join(src_dir, 'pyproject.toml')
         self.create_file(filename, textwrap.dedent('''
@@ -780,7 +783,7 @@
         self._sys_exit.assert_called_with(1)
 
     def test_exit_code_2_on_failure(self):
-        from check_manifest import main, Failure
+        from check_manifest import Failure, main
         self._check_manifest.side_effect = Failure('msg')
         main()
         self.assertEqual(self.ui.errors, ['msg'])
@@ -893,7 +896,7 @@
     @mock.patch('check_manifest.check_manifest')
     def test_zest_releaser_check_failure_user_aborts(self, check_manifest,
                                                      sys_exit):
-        from check_manifest import zest_releaser_check, Failure
+        from check_manifest import Failure, zest_releaser_check
         self.ask.side_effect = [True, False]
         check_manifest.side_effect = Failure('msg')
         zest_releaser_check(dict(workingdir='.'))
@@ -905,7 +908,7 @@
     @mock.patch('check_manifest.check_manifest')
     def test_zest_releaser_check_failure_user_plods_on(self, check_manifest,
                                                        sys_exit):
-        from check_manifest import zest_releaser_check, Failure
+        from check_manifest import Failure, zest_releaser_check
         self.ask.side_effect = [True, True]
         check_manifest.side_effect = Failure('msg')
         zest_releaser_check(dict(workingdir='.'))
@@ -913,7 +916,7 @@
         sys_exit.assert_not_called()
 
 
-class VCSHelper(object):
+class VCSHelper:
 
     # override in subclasses
     command = None  # type: Optional[str]
@@ -947,7 +950,7 @@
             raise subprocess.CalledProcessError(rc, command[0], output=stdout)
 
 
-class VCSMixin(object):
+class VCSMixin:
 
     def setUp(self):
         if not self.vcs.is_installed() and CAN_SKIP_TESTS:
@@ -1074,7 +1077,7 @@
         os.chdir(self.tmpdir)
 
     def test_detect_git_submodule(self):
-        from check_manifest import detect_vcs, Failure
+        from check_manifest import Failure, detect_vcs
         with self.assertRaises(Failure) as cm:
             detect_vcs(self.ui)
         self.assertEqual(str(cm.exception),
@@ -1593,7 +1596,7 @@
         self._vcs._add_to_vcs([filename])
 
     def test_not_python_project(self):
-        from check_manifest import check_manifest, Failure
+        from check_manifest import Failure, check_manifest
         with self.assertRaises(Failure) as cm:
             check_manifest()
         self.assertEqual(
@@ -1601,7 +1604,7 @@
             "This is not a Python project (no setup.py/pyproject.toml).")
 
     def test_forgot_to_git_add_anything(self):
-        from check_manifest import check_manifest, Failure
+        from check_manifest import Failure, check_manifest
         self._create_repo_with_code(add_to_vcs=False)
         with self.assertRaises(Failure) as cm:
             check_manifest()
@@ -1629,6 +1632,7 @@
     def test_python_from_path(self):
         # https://github.com/mgedmin/check-manifest/issues/57
         from check_manifest import check_manifest
+
         # We need a Python interpeter to be in PATH.
         python = 'python'
         if hasattr(shutil, 'which'):
@@ -1640,7 +1644,7 @@
                         sys.stderr.getvalue())
 
     def test_extra_ignore(self):
-        from check_manifest import check_manifest, IgnoreList
+        from check_manifest import IgnoreList, check_manifest
         self._create_repo_with_code()
         self._add_to_vcs('unrelated.txt')
         ignore = IgnoreList().global_exclude('*.txt')
@@ -1743,7 +1747,7 @@
                       sys.stderr.getvalue())
 
     def test_ignore_bad_ideas(self):
-        from check_manifest import check_manifest, IgnoreList
+        from check_manifest import IgnoreList, check_manifest
         self._create_repo_with_code()
         with open('setup.cfg', 'w') as f:
             f.write('[check-manifest]\n'
@@ -1781,10 +1785,3 @@
                 "some files listed as being under source control are 
missing:\n"
                 "  missing.py",
                 sys.stderr.getvalue())
-
-
-def test_suite():
-    return unittest.TestSuite([
-        unittest.defaultTestLoader.loadTestsFromName(__name__),
-        doctest.DocTestSuite('check_manifest'),
-    ])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check-manifest-0.45/tox.ini 
new/check-manifest-0.47/tox.ini
--- old/check-manifest-0.45/tox.ini     2020-10-29 20:16:49.000000000 +0100
+++ new/check-manifest-0.47/tox.ini     2021-06-13 15:28:02.000000000 +0200
@@ -5,31 +5,28 @@
 [testenv]
 passenv = LANG LC_CTYPE LC_ALL MSYSTEM
 extras = test
-deps =
-    nose
 commands =
-    nosetests {posargs}
+    pytest {posargs}
 
 [testenv:coverage]
 deps =
-    {[testenv]deps}
     coverage
 commands =
-    coverage run -m nose
+    coverage run -m pytest
     coverage report -m --fail-under=100
 
-[testenv:py]
-commands =
-    python --version
-    nosetests {posargs}
-
-
 [testenv:check-manifest]
 basepython = python3
-deps =
-extras =
+skip_install = true
+deps = check-manifest
 commands = check-manifest {posargs}
 
+[testenv:check-python-versions]
+basepython = python3
+skip_install = true
+deps = check-python-versions
+commands = check-python-versions {posargs}
+
 [testenv:flake8]
 basepython = python3
 skip_install = true
@@ -39,5 +36,13 @@
 [testenv:mypy]
 basepython = python3
 skip_install = true
-deps = mypy
+deps =
+    mypy
+    types-toml
 commands = mypy {posargs:check_manifest.py}
+
+[testenv:isort]
+basepython = python3
+skip_install = true
+deps = isort
+commands = isort {posargs: -c check_manifest.py setup.py tests.py}

++++++ python-check-manifest-no-mock.patch ++++++
---
 setup.py |    1 -
 tests.py |    2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

--- a/setup.py
+++ b/setup.py
@@ -64,7 +64,6 @@ setup(
     ],
     extras_require={
         'test': [
-            'mock >= 3.0.0',
             'pytest',
         ],
     },
--- a/tests.py
+++ b/tests.py
@@ -16,7 +16,7 @@ from io import BytesIO, StringIO
 from typing import Optional
 from xml.etree import ElementTree as ET
 
-import mock
+import unittest.mock as mock
 
 from check_manifest import rmtree
 

Reply via email to