From fb7e81c49bb39e0f322b3baa2502a7a5e284b647edb167ed840ea874373ddae4 Mon Sep 17 00:00:00 2001 From: Todd R Date: Mon, 28 Jan 2019 16:44:45 +0000 Subject: [PATCH] Accepting request 669133 from home:TheBlackCat:branches:devel:languages:python - Update to version 2.2.1 + Fixed * `Registry.install` returns its argument. - Update to version 2.2.0 * A few methods have been renamed for greater clarity (but functionality remains the same). The old methods are now aliases and will continue to work, but will issue a deprecation warning via the `warnings` module. Please update your code accordingly. > `getbytes` -> `readbytes` > `getfile` -> `download` > `gettext` -> `readtext` > `setbytes` -> `writebytes` > `setbinfile` -> `upload` > `settext` -> `writetext` + Changed * Changed default chunk size in `copy_file_data` to 1MB * Added `chunk_size` and `options` to `FS.upload` - Update to version 2.1.3 + Fixed * Incomplete FTPFile.write when using `workers` @geoffjukes * Fixed AppFS not creating directory + Added * Added load_extern switch to opener, fixes #228 @althanos - Update to version 2.1.2 + Added * Support for Windows NT FTP servers @sspross + Fixed * Root dir of MemoryFS accesible as a file * Packaging issues @televi * Deprecation warning re collections.Mapping - Update to version 2.1.1 + Added * Added PEP 561 py.typed files * Use sendfile for faster copies @althonos * Atomic exclusive mode in Py2.7 @sqwishy + Fixed * Fixed lstat @kamomil - Update to version 2.1.0 + Added * fs.glob support - Update to version 2.0.27 + Fixed * Fixed for Winows paths #152 * Fixed ftp dir parsing (@dhirschfeld) - Update to version 2.0.26 + Fixed * fs.copy and fs.move disable workers if not thread-safe * fs.match detects case insensitivity * Open in exclusive mode is atomic (@squishy) * Exceptions can be pickleabe (@Spacerat) - Update to version 2.0.25 + Added * workers parameter to fs.copy, fs.move, and fs.mirror for concurrent copies - Update to version 2.0.24 + Added * timeout to FTP opener - Update to version 2.0.23 * Fix for Markdown on PyPi, no code changes - Update to version 2.0.22 + Fixed * Handling of broken unicode on Python2.7 + Added * Added fs.getospath - Update to version 2.0.21 + Added * Typing information * Added Info.suffix, Info.suffixes, Info.stem attributes + Fixed * Fixed issue with implied directories in TarFS + Changed * Changed path.splitext so that 'leading periods on the basename are ignored', which is the behaviour of os.path.splitext - Update to version 2.0.20 + Fixed * MultiFS.listdir now correctly filters out duplicates - Update to version 2.0.19 + Fixed * encoding issue with TarFS * CreateFailed now contains the original exception in `exc` attribute - Update to version 2.0.18 + Added * fs.getfile function + Changed * Modified walk to use iterators internally (for more efficient walking) * Modified fs.copy to use getfile - Update to version 2.0.17 + Fixed * Issue with ZipFS files missing a byte - Update to version 2.0.16 + Added * fs.parts + Fixed * Walk now yields Step named tuples as advertised + Added * Added max_depth parameter to fs.walk - Update to version 2.0.15 + Changed * ZipFS files are now seekable (Martin Larralde) - Update to version 2.0.14 * No changes, pushed wrong branch to PyPi. - Update to version 2.0.13 + Fixed * Fixed ignore_errors in walk.py - Update to version 2.0.12 + Fixed * settext, appendtext, appendbytes, setbytes now raise a TypeError if the type is wrong, rather than ValueError * More efficient feature detection for FTPFS * Fixes for `fs.filesize` * Major documentation refactor (Martin Larralde) - Update to version 2.0.11 + Added * fs.mirror - Update to version 2.0.10 + Added * Added params support to FS URLs + Fixed * Many fixes to FTPFS contributed by Martin Larralde. - Update to version 2.0.9 + Changed * MountFS and MultiFS now accept FS URLS * Add openers for AppFS - Update to version 2.0.8 + Added * Lstat info namespace * Link info namespace * FS.islink method * Info.is_link method - Update to version 2.0.7 + Fixes * Fixed entry point breaking pip - Update to version 2.0.6 + Fixes * Opener refinements - Update to version 2.0.5 + Fixed * Fixed potential for deadlock in MemoryFS + Added * Added factory parameter to opendir. * ClosingSubFS. * File objects are all derived from io.IOBase. + Fixed * Fix closing for FTP opener. - License change to MIT - Rebase and update more-relaxed-requirements.patch - Remove no longer needed python-fs-fix-ftp-test.patch OBS-URL: https://build.opensuse.org/request/show/669133 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fs?expand=0&rev=12 --- fs-2.0.4.tar.gz | 3 - fs-2.2.1.tar.gz | 3 + more-relaxed-requirements.patch | 26 +++--- python-fs-fix-ftp-test.patch | 62 ------------- python-fs.changes | 151 ++++++++++++++++++++++++++++++++ python-fs.spec | 34 ++++--- 6 files changed, 189 insertions(+), 90 deletions(-) delete mode 100644 fs-2.0.4.tar.gz create mode 100644 fs-2.2.1.tar.gz delete mode 100644 python-fs-fix-ftp-test.patch diff --git a/fs-2.0.4.tar.gz b/fs-2.0.4.tar.gz deleted file mode 100644 index ee92078..0000000 --- a/fs-2.0.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ef99d9bd3e2630e63fd1b754a4738ad0d6654bd2d795db4f0dd67f36f2902c6e -size 91209 diff --git a/fs-2.2.1.tar.gz b/fs-2.2.1.tar.gz new file mode 100644 index 0000000..6a7a685 --- /dev/null +++ b/fs-2.2.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2581685468e0e492466170235e1bcda5ed4359c69607c83935afee7d4945ad2d +size 122543 diff --git a/more-relaxed-requirements.patch b/more-relaxed-requirements.patch index 9dc267b..dd7e298 100644 --- a/more-relaxed-requirements.patch +++ b/more-relaxed-requirements.patch @@ -1,26 +1,30 @@ ---- setup.py 2017-05-20 18:01:44.000000000 +0200 -+++ setup.py 2017-07-19 21:52:56.023550438 +0200 -@@ -23,10 +23,10 @@ - DESCRIPTION = f.read() +--- a/setup.py ++++ b/setup.py +@@ -21,10 +21,10 @@ + ] REQUIREMENTS = [ -- "appdirs~=1.4.0", +- "appdirs~=1.4.3", + "appdirs", "pytz", "setuptools", -- "six~=1.10.0", +- "six~=1.10", + "six", ] setup( -@@ -36,8 +36,8 @@ +@@ -34,10 +34,10 @@ description="Python's filesystem abstraction layer", install_requires=REQUIREMENTS, extras_require={ - "scandir :python_version < '3.5'": ['scandir~=1.5'], -- ":python_version < '3.4'": ['enum34~=1.1.6'] +- ":python_version < '3.4'": ['enum34~=1.1.6'], +- ":python_version < '3.6'": ['typing~=3.6'], +- ":python_version < '3.0'": ['backports.os~=0.1'] + "scandir :python_version < '3.5'": ['scandir'], -+ ":python_version < '3.4'": ['enum34'] ++ ":python_version < '3.4'": ['enum34'], ++ ":python_version < '3.6'": ['typing'], ++ ":python_version < '3.0'": ['backports.os'] }, - license="BSD", - long_description=DESCRIPTION, + license="MIT", + name='fs', diff --git a/python-fs-fix-ftp-test.patch b/python-fs-fix-ftp-test.patch deleted file mode 100644 index 9b176fa..0000000 --- a/python-fs-fix-ftp-test.patch +++ /dev/null @@ -1,62 +0,0 @@ -Date: 2017-11-28 -Author: Bernhard M. Wiedemann - -Make ftp tests pass in 2018 - -The previous code assumed that time.localtime would return tm_year=2017 - -Someone could probably upstream a fix using unittest.mock -for time.localtime with -return_value = time.struct_time(tm_year=2017, tm_mon=11, tm_mday=28, tm_hour=19, tm_min=21, tm_sec=19, tm_wday=1, tm_yday=332, tm_isdst=0) - -Index: fs-2.0.4/tests/test_ftp_parse.py -=================================================================== ---- fs-2.0.4.orig/tests/test_ftp_parse.py -+++ fs-2.0.4/tests/test_ftp_parse.py -@@ -15,12 +15,6 @@ class TestFTPParse(unittest.TestCase): - 142214400.0 - ) - -- year = time.localtime().tm_year -- self.assertEqual( -- ftp_parse._parse_time('JUL 05 02:00'), -- 1499220000.0 -- ) -- - self.assertEqual( - ftp_parse._parse_time("notadate"), - None -@@ -35,9 +29,9 @@ class TestFTPParse(unittest.TestCase): - def test_decode_linux(self): - directory = """\ - lrwxrwxrwx 1 0 0 19 Jan 18 2006 debian -> ./pub/mirror/debian --drwxr-xr-x 10 0 0 4096 Aug 03 09:21 debian-archive -+drwxr-xr-x 10 0 0 4096 Jan 18 2006 debian-archive - lrwxrwxrwx 1 0 0 27 Nov 30 2015 debian-backports -> pub/mirror/debian-backports --drwxr-xr-x 12 0 0 4096 Sep 29 13:13 pub -+drwxr-xr-x 12 0 0 4096 Jan 18 2006 pub - -rw-r--r-- 1 0 0 26 Mar 04 2010 robots.txt - """ - -@@ -65,8 +59,8 @@ drwxr-xr-x 12 0 0 40 - u'u_x'], - u'user': u'0'}, - u'basic': {u'is_dir': True, u'name': u'debian-archive'}, -- u'details': {u'modified': 1501752060.0, u'size': 4096, u'type': 1}, -- u'ftp': {u'ls': u'drwxr-xr-x 10 0 0 4096 Aug 03 09:21 debian-archive'}}, -+ u'details': {u'modified': 1137542400.0, u'size': 4096, u'type': 1}, -+ u'ftp': {u'ls': u'drwxr-xr-x 10 0 0 4096 Jan 18 2006 debian-archive'}}, - {u'access': {u'group': u'0', - u'permissions': [u'g_r', - u'g_w', -@@ -91,8 +85,8 @@ drwxr-xr-x 12 0 0 40 - u'u_x'], - u'user': u'0'}, - u'basic': {u'is_dir': True, u'name': u'pub'}, -- u'details': {u'modified': 1506690780.0, u'size': 4096, u'type': 1}, -- u'ftp': {u'ls': u'drwxr-xr-x 12 0 0 4096 Sep 29 13:13 pub'}}, -+ u'details': {u'modified': 1137542400.0, u'size': 4096, u'type': 1}, -+ u'ftp': {u'ls': u'drwxr-xr-x 12 0 0 4096 Jan 18 2006 pub'}}, - {u'access': {u'group': u'0', - u'permissions': [u'g_r', u'o_r', u'u_r', u'u_w'], - u'user': u'0'}, diff --git a/python-fs.changes b/python-fs.changes index 30d7d91..99221f2 100644 --- a/python-fs.changes +++ b/python-fs.changes @@ -1,3 +1,154 @@ +------------------------------------------------------------------- +Fri Jan 25 21:31:50 UTC 2019 - Todd R + +- Update to version 2.2.1 + + Fixed + * `Registry.install` returns its argument. +- Update to version 2.2.0 + * A few methods have been renamed for greater clarity (but functionality remains the same). + The old methods are now aliases and will continue to work, but will + issue a deprecation warning via the `warnings` module. + Please update your code accordingly. + > `getbytes` -> `readbytes` + > `getfile` -> `download` + > `gettext` -> `readtext` + > `setbytes` -> `writebytes` + > `setbinfile` -> `upload` + > `settext` -> `writetext` + + Changed + * Changed default chunk size in `copy_file_data` to 1MB + * Added `chunk_size` and `options` to `FS.upload` +- Update to version 2.1.3 + + Fixed + * Incomplete FTPFile.write when using `workers` @geoffjukes + * Fixed AppFS not creating directory + + Added + * Added load_extern switch to opener, fixes #228 @althanos +- Update to version 2.1.2 + + Added + * Support for Windows NT FTP servers @sspross + + Fixed + * Root dir of MemoryFS accesible as a file + * Packaging issues @televi + * Deprecation warning re collections.Mapping +- Update to version 2.1.1 + + Added + * Added PEP 561 py.typed files + * Use sendfile for faster copies @althonos + * Atomic exclusive mode in Py2.7 @sqwishy + + Fixed + * Fixed lstat @kamomil +- Update to version 2.1.0 + + Added + * fs.glob support +- Update to version 2.0.27 + + Fixed + * Fixed for Winows paths #152 + * Fixed ftp dir parsing (@dhirschfeld) +- Update to version 2.0.26 + + Fixed + * fs.copy and fs.move disable workers if not thread-safe + * fs.match detects case insensitivity + * Open in exclusive mode is atomic (@squishy) + * Exceptions can be pickleabe (@Spacerat) +- Update to version 2.0.25 + + Added + * workers parameter to fs.copy, fs.move, and fs.mirror for concurrent + copies +- Update to version 2.0.24 + + Added + * timeout to FTP opener +- Update to version 2.0.23 + * Fix for Markdown on PyPi, no code changes +- Update to version 2.0.22 + + Fixed + * Handling of broken unicode on Python2.7 + + Added + * Added fs.getospath +- Update to version 2.0.21 + + Added + * Typing information + * Added Info.suffix, Info.suffixes, Info.stem attributes + + Fixed + * Fixed issue with implied directories in TarFS + + Changed + * Changed path.splitext so that 'leading periods on the basename are + ignored', which is the behaviour of os.path.splitext +- Update to version 2.0.20 + + Fixed + * MultiFS.listdir now correctly filters out duplicates +- Update to version 2.0.19 + + Fixed + * encoding issue with TarFS + * CreateFailed now contains the original exception in `exc` attribute +- Update to version 2.0.18 + + Added + * fs.getfile function + + Changed + * Modified walk to use iterators internally (for more efficient walking) + * Modified fs.copy to use getfile +- Update to version 2.0.17 + + Fixed + * Issue with ZipFS files missing a byte +- Update to version 2.0.16 + + Added + * fs.parts + + Fixed + * Walk now yields Step named tuples as advertised + + Added + * Added max_depth parameter to fs.walk +- Update to version 2.0.15 + + Changed + * ZipFS files are now seekable (Martin Larralde) +- Update to version 2.0.14 + * No changes, pushed wrong branch to PyPi. +- Update to version 2.0.13 + + Fixed + * Fixed ignore_errors in walk.py +- Update to version 2.0.12 + + Fixed + * settext, appendtext, appendbytes, setbytes now raise a TypeError if + the type is wrong, rather than ValueError + * More efficient feature detection for FTPFS + * Fixes for `fs.filesize` + * Major documentation refactor (Martin Larralde) +- Update to version 2.0.11 + + Added + * fs.mirror +- Update to version 2.0.10 + + Added + * Added params support to FS URLs + + Fixed + * Many fixes to FTPFS contributed by Martin Larralde. +- Update to version 2.0.9 + + Changed + * MountFS and MultiFS now accept FS URLS + * Add openers for AppFS +- Update to version 2.0.8 + + Added + * Lstat info namespace + * Link info namespace + * FS.islink method + * Info.is_link method +- Update to version 2.0.7 + + Fixes + * Fixed entry point breaking pip +- Update to version 2.0.6 + + Fixes + * Opener refinements +- Update to version 2.0.5 + + Fixed + * Fixed potential for deadlock in MemoryFS + + Added + * Added factory parameter to opendir. + * ClosingSubFS. + * File objects are all derived from io.IOBase. + + Fixed + * Fix closing for FTP opener. +- License change to MIT +- Rebase and update more-relaxed-requirements.patch +- Remove no longer needed python-fs-fix-ftp-test.patch + ------------------------------------------------------------------- Tue Dec 4 12:48:15 UTC 2018 - Matej Cepl diff --git a/python-fs.spec b/python-fs.spec index 6eeaeb1..a7cceb5 100644 --- a/python-fs.spec +++ b/python-fs.spec @@ -1,7 +1,7 @@ # # spec file for package python-fs # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2016 LISA GmbH, Bingen, Germany. # # All modifications and additions to the file contributed by third parties @@ -16,39 +16,45 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # - %{?!python_module:%define python_module() python-%{**} python3-%{**}} -%bcond_without test +%bcond_without test Name: python-fs -Version: 2.0.4 +Version: 2.2.1 Release: 0 Summary: Python's filesystem abstraction layer -License: BSD-3-Clause +License: MIT Group: Development/Languages/Python Url: https://github.com/PyFilesystem/pyfilesystem2 Source: https://files.pythonhosted.org/packages/source/f/fs/fs-%{version}.tar.gz # PATCH-FIX-UPSTREAM more-relaxed-requirements.patch sebix+novell.com@sebix.at -- Weaken the version dependencies Patch0: more-relaxed-requirements.patch -# PATCH-FIX-OPENSUSE make ftp tests pass in 2018 -Patch1: python-fs-fix-ftp-test.patch BuildRequires: %{python_module setuptools} +BuildRequires: fdupes BuildRequires: python-rpm-macros %if %{with test} BuildRequires: %{python_module appdirs >= 1.4} BuildRequires: %{python_module mock} BuildRequires: %{python_module nose} BuildRequires: %{python_module pyftpdlib} +BuildRequires: %{python_module psutil} +BuildRequires: %{python_module pysendfile} BuildRequires: %{python_module pytz} -BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six >= 1.10.0} +BuildRequires: python-backports.os +BuildRequires: python-typing %endif Requires: python-appdirs +Requires: python-psutil Requires: python-pytz Requires: python-setuptools Requires: python-six -%if %python_version_nodots < 35 +%ifpython2 +Requires: python-backports.os +%endif +%if %{python_version_nodots} < 35 +Requires: python-typing Recommends: python-enum34 -Suggests: python-scandir >= 1.5 +Recommends: python-scandir >= 1.5 %endif BuildArch: noarch @@ -63,14 +69,14 @@ any of the supported filesystems (zip, ftp, S3 etc.). %prep %setup -q -n fs-%{version} -%patch0 -%patch1 -p1 +%patch0 -p1 %build %python_build %install %python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} %if %{with test} %check @@ -79,8 +85,8 @@ export LANG=en_US.UTF-8 %endif %files %{python_files} -%defattr(-,root,root,-) -%doc README.rst +%doc README.md +%license LICENSE %{python_sitelib}/* %changelog