Hello community,

here is the log from the commit of package python-py for openSUSE:Factory 
checked in at 2020-01-16 18:13:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-py (Old)
 and      /work/SRC/openSUSE:Factory/.python-py.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-py"

Thu Jan 16 18:13:33 2020 rev:34 rq:761141 version:1.8.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-py/python-py.changes      2019-06-27 
15:52:19.579835018 +0200
+++ /work/SRC/openSUSE:Factory/.python-py.new.26092/python-py.changes   
2020-01-16 18:13:39.568717505 +0100
@@ -1,0 +2,9 @@
+Mon Jan  6 12:53:25 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Update to 1.8.1:
+  - Handle ``FileNotFoundError`` when trying to import pathlib in
+    ``path.common`` on Python 3.4 (#207).
+  - ``py.path.local.samefile`` now works correctly in Python 3 on
+    Windows when dealing with symlinks.
+
+-------------------------------------------------------------------

Old:
----
  py-1.8.0.tar.gz

New:
----
  py-1.8.1.tar.gz

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

Other differences:
------------------
++++++ python-py.spec ++++++
--- /var/tmp/diff_new_pack.xCUkI0/_old  2020-01-16 18:13:40.352717949 +0100
+++ /var/tmp/diff_new_pack.xCUkI0/_new  2020-01-16 18:13:40.352717949 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-py
 #
-# 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
@@ -27,7 +27,7 @@
 %bcond_with test
 %endif
 Name:           python-py%{psuffix}
-Version:        1.8.0
+Version:        1.8.1
 Release:        0
 Summary:        Library with cross-python path, ini-parsing, io, code, log 
facilities
 License:        MIT

++++++ py-1.8.0.tar.gz -> py-1.8.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/py-1.8.0/.travis.yml new/py-1.8.1/.travis.yml
--- old/py-1.8.0/.travis.yml    2019-02-22 02:33:43.000000000 +0100
+++ new/py-1.8.1/.travis.yml    2019-12-27 13:07:13.000000000 +0100
@@ -19,8 +19,10 @@
     #- DEPS="pytest~=3.1.0"
 
 stages:
+  - name: test
+    if: tag IS NOT present
   - name: deploy
-    if: tag IS present
+    if: repo = pytest-dev/py AND tag IS present
 
 matrix:
   include:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/py-1.8.0/CHANGELOG new/py-1.8.1/CHANGELOG
--- old/py-1.8.0/CHANGELOG      2019-02-22 02:33:43.000000000 +0100
+++ new/py-1.8.1/CHANGELOG      2019-12-27 13:07:13.000000000 +0100
@@ -1,3 +1,11 @@
+1.8.1 (2019-12-27)
+==================
+
+- Handle ``FileNotFoundError`` when trying to import pathlib in ``path.common``
+  on Python 3.4 (#207).
+
+- ``py.path.local.samefile`` now works correctly in Python 3 on Windows when 
dealing with symlinks.
+
 1.8.0 (2019-02-21)
 ==================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/py-1.8.0/PKG-INFO new/py-1.8.1/PKG-INFO
--- old/py-1.8.0/PKG-INFO       2019-02-22 02:34:00.000000000 +0100
+++ new/py-1.8.1/PKG-INFO       2019-12-27 13:07:30.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: py
-Version: 1.8.0
+Version: 1.8.1
 Summary: library with cross-python path, ini-parsing, io, code, log facilities
 Home-page: http://py.readthedocs.io/
 Author: holger krekel, Ronny Pfannschmidt, Benjamin Peterson and others
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/py-1.8.0/doc/style.css new/py-1.8.1/doc/style.css
--- old/py-1.8.0/doc/style.css  2019-02-22 02:33:43.000000000 +0100
+++ new/py-1.8.1/doc/style.css  2019-12-27 13:07:13.000000000 +0100
@@ -546,7 +546,7 @@
 }
 strong.highlight {
     background-color: #FFBBBB;
-/* as usual, NetScape fucks up with innocent CSS
+/* as usual, NetScape breaks with innocent CSS
     border-color: #FFAAAA;
     border-style: solid;
     border-width: 1pt;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/py-1.8.0/py/_path/common.py 
new/py-1.8.1/py/_path/common.py
--- old/py-1.8.0/py/_path/common.py     2019-02-22 02:33:43.000000000 +0100
+++ new/py-1.8.1/py/_path/common.py     2019-12-27 13:07:13.000000000 +0100
@@ -11,6 +11,12 @@
 iswin32 = sys.platform == "win32" or (getattr(os, '_name', False) == 'nt')
 
 try:
+    # FileNotFoundError might happen in py34, and is not available with py27.
+    import_errors = (ImportError, FileNotFoundError)
+except NameError:
+    import_errors = (ImportError,)
+
+try:
     from os import fspath
 except ImportError:
     def fspath(path):
@@ -35,7 +41,7 @@
                 raise
             try:
                 import pathlib
-            except ImportError:
+            except import_errors:
                 pass
             else:
                 if isinstance(path, pathlib.PurePath):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/py-1.8.0/py/_path/local.py 
new/py-1.8.1/py/_path/local.py
--- old/py-1.8.0/py/_path/local.py      2019-02-22 02:33:43.000000000 +0100
+++ new/py-1.8.1/py/_path/local.py      2019-12-27 13:07:13.000000000 +0100
@@ -196,8 +196,8 @@
             other = abspath(other)
         if self == other:
             return True
-        if iswin32:
-            return False # there is no samefile
+        if not hasattr(os.path, "samefile"):
+            return False
         return py.error.checked_call(
                 os.path.samefile, self.strpath, other)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/py-1.8.0/py/_version.py new/py-1.8.1/py/_version.py
--- old/py-1.8.0/py/_version.py 2019-02-22 02:34:00.000000000 +0100
+++ new/py-1.8.1/py/_version.py 2019-12-27 13:07:30.000000000 +0100
@@ -1,4 +1,4 @@
 # coding: utf-8
 # file generated by setuptools_scm
 # don't change, don't track in version control
-version = '1.8.0'
+version = '1.8.1'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/py-1.8.0/py.egg-info/PKG-INFO 
new/py-1.8.1/py.egg-info/PKG-INFO
--- old/py-1.8.0/py.egg-info/PKG-INFO   2019-02-22 02:34:00.000000000 +0100
+++ new/py-1.8.1/py.egg-info/PKG-INFO   2019-12-27 13:07:30.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: py
-Version: 1.8.0
+Version: 1.8.1
 Summary: library with cross-python path, ini-parsing, io, code, log facilities
 Home-page: http://py.readthedocs.io/
 Author: holger krekel, Ronny Pfannschmidt, Benjamin Peterson and others
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/py-1.8.0/testing/path/test_local.py 
new/py-1.8.1/testing/path/test_local.py
--- old/py-1.8.0/testing/path/test_local.py     2019-02-22 02:33:43.000000000 
+0100
+++ new/py-1.8.1/testing/path/test_local.py     2019-12-27 13:07:13.000000000 
+0100
@@ -174,7 +174,31 @@
         assert path2 != path3
 
     def test_eq_with_none(self, path1):
-        assert path1 != None  # noqa
+        assert path1 != None  # noqa: E711
+
+    @pytest.mark.skipif(
+        sys.platform.startswith("win32"), reason="cannot remove cwd on Windows"
+    )
+    @pytest.mark.skipif(
+        sys.version_info < (3, 0) or sys.version_info >= (3, 5),
+        reason="only with Python 3 before 3.5"
+    )
+    def test_eq_with_none_and_custom_fspath(self, monkeypatch, path1):
+        import os
+        import shutil
+        import tempfile
+
+        d = tempfile.mkdtemp()
+        monkeypatch.chdir(d)
+        shutil.rmtree(d)
+
+        monkeypatch.delitem(sys.modules, 'pathlib', raising=False)
+        monkeypatch.setattr(sys, 'path', [''] + sys.path)
+
+        with pytest.raises(FileNotFoundError):
+            import pathlib  # noqa: F401
+
+        assert path1 != None  # noqa: E711
 
     def test_eq_non_ascii_unicode(self, path1):
         path2 = path1.join(u'temp')
@@ -680,6 +704,17 @@
         p2 = p.__class__(str(p).upper())
         assert p1.samefile(p2)
 
[email protected](not hasattr(os, "symlink"), reason="os.symlink not 
available")
+def test_samefile_symlink(tmpdir):
+    p1 = tmpdir.ensure("foo.txt")
+    p2 = tmpdir.join("linked.txt")
+    try:
+        os.symlink(str(p1), str(p2))
+    except OSError as e:
+        # on Windows this might fail if the user doesn't have special symlink 
permissions
+        pytest.skip(str(e.args[0]))
+
+    assert p1.samefile(p2)
 
 def test_listdir_single_arg(tmpdir):
     tmpdir.ensure("hello")


Reply via email to