Hello community,
here is the log from the commit of package python-pytest-reqs for openSUSE:Factory checked in at 2018-10-25 09:10:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-reqs (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-reqs.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-reqs"
Thu Oct 25 09:10:56 2018 rev:3 rq:644099 version:0.2.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pytest-reqs/python-pytest-reqs.changes 2018-05-29 10:49:03.135343900 +0200
+++ /work/SRC/openSUSE:Factory/.python-pytest-reqs.new/python-pytest-reqs.changes 2018-10-25 09:11:04.126335528 +0200
@@ -1,0 +2,9 @@
+Tue Oct 23 21:05:25 UTC 2018 - Todd R
+
+- Update to 0.2.0
+ * Remove dependency on internal pip APIs
+ * Add support for Python 3.7
+ * Add support for pip 9.0.3, 10.0.0, 10.0.1, 18.0 and 18.1
+- Update dependencies
+
+-------------------------------------------------------------------
Old:
----
pytest-reqs-0.1.0.tar.gz
New:
----
pytest-reqs-0.2.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-reqs.spec ++++++
--- /var/tmp/diff_new_pack.xgO8e9/_old 2018-10-25 09:11:05.606334643 +0200
+++ /var/tmp/diff_new_pack.xgO8e9/_new 2018-10-25 09:11:05.610334640 +0200
@@ -17,9 +17,8 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%bcond_without test
Name: python-pytest-reqs
-Version: 0.1.0
+Version: 0.2.0
Release: 0
Summary: Pytest plugin to check pinned requirements
License: MIT
@@ -30,13 +29,17 @@
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-Requires: python-pytest >= 2.4.2
-BuildArch: noarch
-%if %{with test}
-BuildRequires: %{python_module pip}
+# SECTION test requirements
+BuildRequires: %{python_module pip >= 6}
BuildRequires: %{python_module pretend}
BuildRequires: %{python_module pytest >= 2.4.2}
-%endif
+# /SECTION
+# Setuptools and pip are both used at runtime
+Requires: python-pip >= 6
+Requires: python-pytest >= 2.4.2
+Requires: python-setuptools
+BuildArch: noarch
+
%python_subpackages
%description
@@ -62,10 +65,8 @@
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
-%if %{with test}
%check
%python_exec test_reqs.py
-%endif
%files %{python_files}
%doc CHANGELOG README.rst
++++++ pytest-reqs-0.1.0.tar.gz -> pytest-reqs-0.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-reqs-0.1.0/CHANGELOG new/pytest-reqs-0.2.0/CHANGELOG
--- old/pytest-reqs-0.1.0/CHANGELOG 2018-03-19 17:20:05.000000000 +0100
+++ new/pytest-reqs-0.2.0/CHANGELOG 2018-10-17 11:16:48.000000000 +0200
@@ -1,3 +1,10 @@
+0.2.0
+----------------------------------------------
+
+- Remove dependency on internal pip APIs
+- Add support for Python 3.7
+- Add support for pip 9.0.3, 10.0.0, 10.0.1, 18.0 and 18.1
+
0.1.0
----------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-reqs-0.1.0/PKG-INFO new/pytest-reqs-0.2.0/PKG-INFO
--- old/pytest-reqs-0.1.0/PKG-INFO 2018-03-19 17:20:10.000000000 +0100
+++ new/pytest-reqs-0.2.0/PKG-INFO 2018-10-17 11:17:05.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pytest-reqs
-Version: 0.1.0
+Version: 0.2.0
Summary: pytest plugin to check pinned requirements
Home-page: https://github.com/di/pytest-reqs
Author: Dustin Ingram
@@ -204,3 +204,4 @@
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-reqs-0.1.0/pytest_reqs.egg-info/PKG-INFO new/pytest-reqs-0.2.0/pytest_reqs.egg-info/PKG-INFO
--- old/pytest-reqs-0.1.0/pytest_reqs.egg-info/PKG-INFO 2018-03-19 17:20:09.000000000 +0100
+++ new/pytest-reqs-0.2.0/pytest_reqs.egg-info/PKG-INFO 2018-10-17 11:17:05.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pytest-reqs
-Version: 0.1.0
+Version: 0.2.0
Summary: pytest plugin to check pinned requirements
Home-page: https://github.com/di/pytest-reqs
Author: Dustin Ingram
@@ -204,3 +204,4 @@
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-reqs-0.1.0/pytest_reqs.egg-info/requires.txt new/pytest-reqs-0.2.0/pytest_reqs.egg-info/requires.txt
--- old/pytest-reqs-0.1.0/pytest_reqs.egg-info/requires.txt 2018-03-19 17:20:09.000000000 +0100
+++ new/pytest-reqs-0.2.0/pytest_reqs.egg-info/requires.txt 2018-10-17 11:17:05.000000000 +0200
@@ -1,2 +1,3 @@
pytest>=2.4.2
packaging>=17.1
+pip_api>=0.0.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-reqs-0.1.0/pytest_reqs.py new/pytest-reqs-0.2.0/pytest_reqs.py
--- old/pytest-reqs-0.1.0/pytest_reqs.py 2018-03-19 17:20:05.000000000 +0100
+++ new/pytest-reqs-0.2.0/pytest_reqs.py 2018-10-17 10:59:25.000000000 +0200
@@ -11,9 +11,10 @@
import packaging.version
import pytest
from pkg_resources import get_distribution
+import pip_api
-max_version = packaging.version.parse('9.0.2')
-pip_version = packaging.version.parse(get_distribution('pip').version)
+max_version = packaging.version.parse('18.1.0')
+pip_version = packaging.version.parse(pip_api.version())
if pip_version > max_version:
warn(
'Version pip=={} is possibly incompatible, highest '
@@ -22,12 +23,6 @@
)
)
-from pip import get_installed_distributions # noqa
-from pip.download import PipSession # noqa
-from pip.exceptions import InstallationError # noqa
-from pip.req import parse_requirements # noqa
-
-
__version__ = '0.0.4'
DEFAULT_PATTERNS = [
@@ -79,10 +74,7 @@
def check_requirements(config, session, items):
- installed_distributions = dict(
- (d.project_name.lower(), d)
- for d in get_installed_distributions()
- )
+ installed_distributions = pip_api.installed_distributions()
items.extend(
ReqsItem(filename, installed_distributions, config, session)
@@ -112,8 +104,6 @@
class PipOption:
def __init__(self, config):
self.skip_requirements_regex = '^-e' if config.ignore_local else ''
- self.isolated_mode = False
- self.default_vcs = None
class ReqsError(Exception):
@@ -132,21 +122,15 @@
self.config = config
def get_requirements(self):
- reqs = parse_requirements(
- self.filename, session=PipSession(), options=PipOption(self.config)
- )
try:
- name_to_req = dict(
- (r.name.lower(), r)
- for r in reqs
- if r.name and self.filename in r.comes_from
+ return pip_api.parse_requirements(
+ self.filename, options=PipOption(self.config)
)
- except InstallationError as e:
+ except pip_api.exceptions.PipError as e:
raise ReqsError('%s (from -r %s)' % (
e.args[0].split('\n')[0],
self.filename,
))
- return name_to_req
def runtest(self):
for name, req in self.get_requirements().items():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-reqs-0.1.0/setup.py new/pytest-reqs-0.2.0/setup.py
--- old/pytest-reqs-0.1.0/setup.py 2018-03-19 17:20:05.000000000 +0100
+++ new/pytest-reqs-0.2.0/setup.py 2018-10-17 11:16:48.000000000 +0200
@@ -1,6 +1,6 @@
from setuptools import setup
-__version__ = '0.1.0'
+__version__ = '0.2.0'
if __name__ == '__main__':
setup(
@@ -14,7 +14,7 @@
url='https://github.com/di/pytest-reqs',
py_modules=['pytest_reqs'],
entry_points={'pytest11': ['reqs = pytest_reqs']},
- install_requires=['pytest>=2.4.2', 'packaging>=17.1'],
+ install_requires=['pytest>=2.4.2', 'packaging>=17.1', 'pip_api>=0.0.2'],
tests_require=['pytest>=2.4.2', 'pretend'],
classifiers=[
'Framework :: Pytest',
@@ -23,5 +23,6 @@
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
+ 'Programming Language :: Python :: 3.7',
],
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-reqs-0.1.0/test_reqs.py new/pytest-reqs-0.2.0/test_reqs.py
--- old/pytest-reqs-0.1.0/test_reqs.py 2017-12-21 15:40:21.000000000 +0100
+++ new/pytest-reqs-0.2.0/test_reqs.py 2018-10-17 10:59:25.000000000 +0200
@@ -1,6 +1,6 @@
from distutils.version import LooseVersion
-import pip
from pkg_resources import get_distribution
+
from pretend import stub
import pytest
@@ -26,8 +26,8 @@
def test_existing_requirement(requirements, mock_dist, testdir, monkeypatch):
testdir.makefile('.txt', requirements=requirements)
monkeypatch.setattr(
- 'pytest_reqs.get_installed_distributions',
- lambda: [mock_dist]
+ 'pytest_reqs.pip_api.installed_distributions',
+ lambda: {mock_dist.project_name: mock_dist}
)
result = testdir.runpytest("--reqs")
@@ -36,7 +36,7 @@
def test_missing_requirement(mock_dist, testdir, monkeypatch):
testdir.makefile('.txt', requirements='foo')
- monkeypatch.setattr('pytest_reqs.get_installed_distributions', lambda: [])
+ monkeypatch.setattr('pytest_reqs.pip_api.installed_distributions', lambda: {})
result = testdir.runpytest("--reqs")
result.stdout.fnmatch_lines([
@@ -54,8 +54,8 @@
def test_wrong_version(requirements, mock_dist, testdir, monkeypatch):
testdir.makefile('.txt', requirements=requirements)
monkeypatch.setattr(
- 'pytest_reqs.get_installed_distributions',
- lambda: [mock_dist]
+ 'pytest_reqs.pip_api.installed_distributions',
+ lambda: {mock_dist.project_name: mock_dist}
)
result = testdir.runpytest("--reqs")
@@ -71,29 +71,24 @@
'foo=>1.0',
])
def test_invalid_requirement(requirements, mock_dist, testdir, monkeypatch):
- testdir.makefile('.txt', requirements='foo=1.0')
+ testdir.makefile('.txt', requirements=requirements)
monkeypatch.setattr(
- 'pytest_reqs.get_installed_distributions',
- lambda: [mock_dist]
+ 'pytest_reqs.pip_api.installed_distributions',
+ lambda: {mock_dist.project_name: mock_dist}
)
result = testdir.runpytest("--reqs")
- if pip.__version__ < '8.0.0':
- result.stdout.fnmatch_lines([
- '*Expected version spec in*',
- "*1 failed*",
- ])
- else:
- result.stdout.fnmatch_lines([
- '*Invalid requirement*',
- "*1 failed*",
- ])
+ result.stdout.fnmatch_lines([
+ '*Invalid requirement*',
+ "*1 failed*",
+ ])
+
assert 'passed' not in result.stdout.str()
def test_missing_local_requirement(testdir, monkeypatch):
testdir.makefile('.txt', requirements='-e ../foo')
- monkeypatch.setattr('pytest_reqs.get_installed_distributions', lambda: [])
+ monkeypatch.setattr('pytest_reqs.pip_api.installed_distributions', lambda: {})
result = testdir.runpytest("--reqs")
result.stdout.fnmatch_lines([
@@ -105,7 +100,7 @@
def test_local_requirement_ignored(testdir, monkeypatch):
testdir.makefile('.txt', requirements='-e ../foo')
testdir.makeini('[pytest]\nreqsignorelocal=True')
- monkeypatch.setattr('pytest_reqs.get_installed_distributions', lambda: [])
+ monkeypatch.setattr('pytest_reqs.pip_api.installed_distributions', lambda: {})
result = testdir.runpytest("--reqs")
assert 'passed' in result.stdout.str()
@@ -117,7 +112,7 @@
def pytest_configure(config):
config.ignore_local = True
""")
- monkeypatch.setattr('pytest_reqs.get_installed_distributions', lambda: [])
+ monkeypatch.setattr('pytest_reqs.pip_api.installed_distributions', lambda: {})
result = testdir.runpytest("--reqs")
assert 'passed' in result.stdout.str()
@@ -126,8 +121,8 @@
def test_non_lowered_requirement(mock_dist, testdir, monkeypatch):
testdir.makefile('.txt', requirements='Foo')
monkeypatch.setattr(
- 'pytest_reqs.get_installed_distributions',
- lambda: [mock_dist]
+ 'pytest_reqs.pip_api.installed_distributions',
+ lambda: {mock_dist.project_name: mock_dist}
)
result = testdir.runpytest("--reqs")
@@ -136,7 +131,7 @@
def test_no_option(testdir, monkeypatch):
testdir.makefile('.txt', requirements='foo')
- monkeypatch.setattr('pytest_reqs.get_installed_distributions', lambda: [])
+ monkeypatch.setattr('pytest_reqs.pip_api.installed_distributions', lambda: {})
result = testdir.runpytest()
assert 'collected 0 items' in result.stdout.str()
@@ -147,11 +142,11 @@
testdir.makefile('.txt', b='bar')
testdir.makeini('[pytest]\nreqsfilenamepatterns=\n a.txt\n b.txt')
monkeypatch.setattr(
- 'pytest_reqs.get_installed_distributions',
- lambda: [
- stub(project_name='bar', version='1.0'),
- stub(project_name='foo', version='1.0'),
- ],
+ 'pytest_reqs.pip_api.installed_distributions',
+ lambda: {
+ 'bar': stub(project_name='bar', version='1.0'),
+ 'foo': stub(project_name='foo', version='1.0'),
+ },
)
result = testdir.runpytest("--reqs")
@@ -166,11 +161,11 @@
config.patterns = ['a.txt', 'b.txt']
""")
monkeypatch.setattr(
- 'pytest_reqs.get_installed_distributions',
- lambda: [
- stub(project_name='bar', version='1.0'),
- stub(project_name='foo', version='1.0'),
- ],
+ 'pytest_reqs.pip_api.installed_distributions',
+ lambda: {
+ 'bar': stub(project_name='bar', version='1.0'),
+ 'foo': stub(project_name='foo', version='1.0'),
+ },
)
result = testdir.runpytest("--reqs")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-reqs-0.1.0/tox.ini new/pytest-reqs-0.2.0/tox.ini
--- old/pytest-reqs-0.1.0/tox.ini 2018-03-19 17:20:05.000000000 +0100
+++ new/pytest-reqs-0.2.0/tox.ini 2018-10-17 10:59:35.000000000 +0200
@@ -1,9 +1,22 @@
[tox]
-envlist=py27-pip{902,901,900,812,811,810,803,802,801,800,712,711,710},py27-pytesttrunk,py-xdist,py34,py35,py36-pip{902,901,900,812,811,810,803,802,801,800,712,711,710},pypypy
+envlist=
+ py27-pip{181,180,101,100,903,902,901,900,812,811,810,803,802,801,800,712,711,710},
+ py34-pip{181,180,101,100,903,902,901,900,812,811,810,803,802,801,800,712,711,710},
+ py35-pip{181,180,101,100,903,902,901,900,812,811,810,803,802,801,800,712,711,710},
+ py36-pip{181,180,101,100,903,902,901,900,812,811,810,803,802,801,800,712,711,710},
+ py37-pip{181,180,101,100,903,902,901,900,812,811,810,803,802,801,800,712,711,710},
+ py27-pytesttrunk,
+ test-pytest-xdist,
+ lint
[testenv]
deps=
-rrequirements/test.txt
+ pip181: pip==18.1
+ pip180: pip==18.0
+ pip101: pip==10.0.1
+ pip100: pip==10.0.0
+ pip903: pip==9.0.3
pip902: pip==9.0.2
pip901: pip==9.0.1
pip900: pip==9.0.0
@@ -21,12 +34,11 @@
commands=
py.test {posargs}
-[testenv:py36]
+[testenv:lint]
commands=
- py.test {posargs}
flake8
-[testenv:py-xdist]
+[testenv:test-pytest-xdist]
basepython=python
deps=
-rrequirements/test.txt
@@ -34,8 +46,5 @@
commands=
py.test -n3 {posargs}
-[testenv:pypypy]
-basepython=pypy
-
[pytest]
addopts=--reqs