Hello community,

here is the log from the commit of package python-pytest-isort for 
openSUSE:Factory checked in at 2020-05-04 18:32:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-isort (Old)
 and      /work/SRC/openSUSE:Factory/.python-pytest-isort.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pytest-isort"

Mon May  4 18:32:31 2020 rev:4 rq:799796 version:1.0.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pytest-isort/python-pytest-isort.changes  
2019-03-11 11:18:08.153280609 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-pytest-isort.new.2738/python-pytest-isort.changes
        2020-05-04 18:32:42.372097029 +0200
@@ -1,0 +2,8 @@
+Sun May  3 07:31:24 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Update to 1.0.0:
+  * BREAKING CHANGE: Drop support for Python 3.4
+  * Add support for pytest >= 5.x - fixes "from_parent" warning
+  * Add support for Python 3.7 and Python 3.8
+
+-------------------------------------------------------------------

Old:
----
  pytest-isort-0.3.1.tar.gz

New:
----
  pytest-isort-1.0.0.tar.gz

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

Other differences:
------------------
++++++ python-pytest-isort.spec ++++++
--- /var/tmp/diff_new_pack.pw3EzJ/_old  2020-05-04 18:32:43.148098601 +0200
+++ /var/tmp/diff_new_pack.pw3EzJ/_new  2020-05-04 18:32:43.152098610 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pytest-isort
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,12 +18,11 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-pytest-isort
-Version:        0.3.1
+Version:        1.0.0
 Release:        0
 Summary:        Plugin for pytest to perform isort checks
 License:        BSD-3-Clause
-Group:          Development/Languages/Python
-URL:            http://github.com/moccu/pytest-isort/
+URL:            https://github.com/moccu/pytest-isort/
 Source:         
https://files.pythonhosted.org/packages/source/p/pytest-isort/pytest-isort-%{version}.tar.gz
 BuildRequires:  %{python_module isort >= 4.0}
 BuildRequires:  %{python_module pytest >= 3.5}

++++++ pytest-isort-0.3.1.tar.gz -> pytest-isort-1.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-isort-0.3.1/CHANGELOG.rst 
new/pytest-isort-1.0.0/CHANGELOG.rst
--- old/pytest-isort-0.3.1/CHANGELOG.rst        2019-03-11 08:55:28.000000000 
+0100
+++ new/pytest-isort-1.0.0/CHANGELOG.rst        2020-04-30 11:03:33.000000000 
+0200
@@ -1,6 +1,14 @@
 Changelog
 =========
 
+1.0.0 - 2020-04-30
+------------------
+
+* BREAKING CHANGE: Drop support for Python 3.4
+* Add support for pytest >= 5.x - fixes "from_parent" warning
+* Add support for Python 3.7 and Python 3.8
+
+
 0.3.1 - 2019-03-11
 ------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-isort-0.3.1/PKG-INFO 
new/pytest-isort-1.0.0/PKG-INFO
--- old/pytest-isort-0.3.1/PKG-INFO     2019-03-11 08:56:19.000000000 +0100
+++ new/pytest-isort-1.0.0/PKG-INFO     2020-04-30 11:05:12.000000000 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
 Name: pytest-isort
-Version: 0.3.1
+Version: 1.0.0
 Summary: py.test plugin to check import ordering using isort
 Home-page: http://github.com/moccu/pytest-isort/
 Author: Moccu GmbH & Co. KG
@@ -165,6 +165,8 @@
 Classifier: Programming Language :: Python :: 2
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Provides-Extra: dev
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-isort-0.3.1/pytest_isort.egg-info/PKG-INFO 
new/pytest-isort-1.0.0/pytest_isort.egg-info/PKG-INFO
--- old/pytest-isort-0.3.1/pytest_isort.egg-info/PKG-INFO       2019-03-11 
08:56:19.000000000 +0100
+++ new/pytest-isort-1.0.0/pytest_isort.egg-info/PKG-INFO       2020-04-30 
11:05:12.000000000 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
 Name: pytest-isort
-Version: 0.3.1
+Version: 1.0.0
 Summary: py.test plugin to check import ordering using isort
 Home-page: http://github.com/moccu/pytest-isort/
 Author: Moccu GmbH & Co. KG
@@ -165,6 +165,8 @@
 Classifier: Programming Language :: Python :: 2
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Provides-Extra: dev
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pytest-isort-0.3.1/pytest_isort.egg-info/requires.txt 
new/pytest-isort-1.0.0/pytest_isort.egg-info/requires.txt
--- old/pytest-isort-0.3.1/pytest_isort.egg-info/requires.txt   2019-03-11 
08:56:19.000000000 +0100
+++ new/pytest-isort-1.0.0/pytest_isort.egg-info/requires.txt   2020-04-30 
11:05:12.000000000 +0200
@@ -1,2 +1,5 @@
 pytest>=3.5
 isort>=4.0
+
+[dev]
+mock
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-isort-0.3.1/pytest_isort.py 
new/pytest-isort-1.0.0/pytest_isort.py
--- old/pytest-isort-0.3.1/pytest_isort.py      2019-03-11 08:55:35.000000000 
+0100
+++ new/pytest-isort-1.0.0/pytest_isort.py      2020-04-30 11:03:33.000000000 
+0200
@@ -6,7 +6,7 @@
 import pytest
 
 
-__version__ = '0.3.1'
+__version__ = '1.0.0'
 
 
 MTIMES_HISTKEY = 'isort/mtimes'
@@ -40,7 +40,10 @@
     config = parent.config
     if config.option.isort and path.ext == '.py':
         if not config._isort_ignore(path):
-            return IsortItem(path, parent)
+            if hasattr(IsortItem, 'from_parent'):
+                return IsortItem.from_parent(parent, fspath=path)
+            else:
+                return IsortItem(path, parent)
 
 
 def pytest_sessionfinish(session):
@@ -137,8 +140,10 @@
     py.test Item to run the isort check.
     """
 
-    def __init__(self, path, parent):
-        super(IsortItem, self).__init__(path, parent)
+    def __init__(self, path=None, parent=None, **kwargs):
+        if 'fspath' in kwargs:
+            path = kwargs.pop('fspath')
+        super(IsortItem, self).__init__(name=path, parent=parent, **kwargs)
         self._nodeid += "::ISORT"
         self.add_marker('isort')
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-isort-0.3.1/setup.py 
new/pytest-isort-1.0.0/setup.py
--- old/pytest-isort-0.3.1/setup.py     2019-03-11 08:55:45.000000000 +0100
+++ new/pytest-isort-1.0.0/setup.py     2020-04-30 11:03:33.000000000 +0200
@@ -5,6 +5,9 @@
 from setuptools import setup
 
 
+VERSION = '1.0.0'
+
+
 def read(*parts):
     filename = os.path.join(os.path.dirname(__file__), *parts)
     with codecs.open(filename, encoding='utf-8') as fp:
@@ -15,7 +18,7 @@
     name='pytest-isort',
     description='py.test plugin to check import ordering using isort',
     long_description=read('README.rst'),
-    version='0.3.1',
+    version=VERSION,
     license='BSD',
     author='Moccu GmbH & Co. KG',
     author_email='[email protected]',
@@ -27,6 +30,7 @@
         'pytest>=3.5',
         'isort>=4.0'
     ],
+    extras_require={'dev': ['mock']},
     classifiers=[
         'License :: OSI Approved :: BSD License',
         'Operating System :: OS Independent',
@@ -36,8 +40,9 @@
         'Programming Language :: Python :: 2',
         'Programming Language :: Python :: 2.7',
         'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.4',
         'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
+        'Programming Language :: Python :: 3.7',
+        'Programming Language :: Python :: 3.8',
     ],
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-isort-0.3.1/test_isort.py 
new/pytest-isort-1.0.0/test_isort.py
--- old/pytest-isort-0.3.1/test_isort.py        2018-05-07 12:17:54.000000000 
+0200
+++ new/pytest-isort-1.0.0/test_isort.py        2020-04-30 11:03:33.000000000 
+0200
@@ -1,5 +1,12 @@
 # -*- coding=utf-8 -*-
-from pytest_isort import FileIgnorer, IsortError
+try:
+    from unittest.mock import Mock
+except ImportError:
+    from mock import Mock
+
+import pytest
+
+from pytest_isort import FileIgnorer, IsortError, IsortItem
 
 
 pytest_plugins = 'pytester',
@@ -123,3 +130,62 @@
         '*1 failed*',
     ])
     assert result.ret == 1
+
+
+class TestIsortItem:
+    def test_init(self, testdir):
+        class TestConfig:
+            rootdir = testdir.tmpdir
+
+            def getini(self, norecursedirs):
+                return None
+
+        session_mock = Mock()
+        session_mock.configure_mock(
+            _initialpaths=[testdir.tmpdir],
+            config=TestConfig(),
+        )
+
+        class TestParent:
+            fspath = testdir.tmpdir
+            session = session_mock
+            config = TestConfig()
+
+        parent = TestParent()
+        path = testdir.tmpdir
+        kwargs = {}
+
+        test_obj = IsortItem(path, parent, **kwargs)
+
+        assert test_obj.name == path.basename
+        assert test_obj.parent == parent
+        assert test_obj.fspath == path
+
+    def test_init_fspath_in_kwargs(self, testdir):
+        class TestConfig:
+            rootdir = testdir.tmpdir
+
+            def getini(self, norecursedirs):
+                return None
+
+        session_mock = Mock()
+        session_mock.configure_mock(
+            _initialpaths=[testdir.tmpdir],
+            config=TestConfig(),
+        )
+
+        class TestParent:
+            fspath = testdir.tmpdir
+            session = session_mock
+            config = TestConfig()
+
+        parent = TestParent()
+        path = testdir.tmpdir
+        kwargs = {'fspath': path}
+
+        test_obj = IsortItem(None, parent, **kwargs)
+
+        assert test_obj.name == path.basename
+        assert test_obj.parent == parent
+        assert test_obj.fspath == path
+


Reply via email to