Sync from SUSE:SLFO:Main python-fs revision cc17516cbabe4e21361a99d0a1c21853

This commit is contained in:
Adrian Schröter 2024-05-03 20:44:38 +02:00
commit 8c2ad057d8
4 changed files with 508 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
fs-2.4.16.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

383
python-fs.changes Normal file
View File

@ -0,0 +1,383 @@
-------------------------------------------------------------------
Fri Apr 21 12:25:31 UTC 2023 - Dirk Müller <dmueller@suse.com>
- add sle15_python_module_pythons (jsc#PED-68)
-------------------------------------------------------------------
Thu Apr 13 22:41:29 UTC 2023 - Matej Cepl <mcepl@suse.com>
- Make calling of %{sle15modernpython} optional.
-------------------------------------------------------------------
Sun May 29 20:03:22 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 2.4.16:
* Make `fs.zipfs._ZipExtFile` use the seeking mechanism implemented
in the Python standard library in Python version 3.7 and later
* Mark `fs.zipfs.ReadZipFS` as a case-sensitive filesystem
* Optimized moving files between filesystems with syspaths.
* Fixed `fs.move.move_file` to clean up the copy on the destination in case of errors.
* `fs.opener.manage_fs` with `writeable=True` will now raise a `ResourceReadOnly`
exception if the managed filesystem is not writeable.
* Marked filesystems wrapped with `fs.wrap.WrapReadOnly` as read-only.
-------------------------------------------------------------------
Sat Mar 26 21:28:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 2.4.15:
- Support more lenient usernames and group names in FTP servers
- Fixed `MemoryFS.move` and `MemoryFS.movedir` not updating the name of moved
resources, causing `MemoryFS.scandir` to use the old name.
- Make `WrapFS.move` and `WrapFS.movedir` use the delegate FS methods instead
of `fs.move` functions, which was causing optimized implementation of
`movedir` to be always skipped.
-------------------------------------------------------------------
Sat Jan 15 15:54:03 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 2.4.14:
* Added `fs.copy.copy_file_if`, `fs.copy.copy_dir_if`, and `fs.copy.copy_fs_if`.
* Added `fs.base.FS.getmodified`.
* FTP servers that do not support the MLST command now try to use the MDTM
command to retrieve the last modification timestamp of a resource.
* Fixed performance bugs in `fs.copy.copy_dir_if_newer`. Test cases were
adapted to catch those bugs in the future.
* Fixed precision bug for timestamps in `fs.OSFS.setinfo`.
-------------------------------------------------------------------
Fri Apr 16 13:02:36 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Update to 2.4.13
* Added FTP over TLS (FTPS) support to FTPFS.
Closes #437, #449.
* PathError now supports wrapping an exception using the exc
argument.
Closes #453.
* Better documentation of the writable parameter of fs.open_fs,
and hint about using fs.wrap.read_only when a read-only
filesystem is required. Closes #441.
Changed
* Make FS.upload explicit about the expected error when the
parent directory of the destination does not exist.
Closes #445.
* Migrate continuous integration from Travis-CI to GitHub
Actions and introduce several linters again in the build steps
(#448). Closes #446.
* Stop requiring pytest to run tests, allowing any test runner
supporting unittest-style test suites.
* FSTestCases now builds the large data required for upload and
download tests only once in order to reduce the total testing
time.
* MemoryFS.move and MemoryFS.movedir will now avoid copying data.
Closes #452.
* FS.removetree("/") behaviour has been standardized in all
filesystems, and is expected to clear the contents of the root
folder without deleting it. Closes #471.
* FS.getbasic is now deprecated, as it is redundant with
FS.getinfo, and FS.getinfo is now explicitly expected to
return the basic info namespace unconditionally. Closes #469.
Fixed
* Make FTPFile, MemoryFile and RawWrapper accept array.array
arguments for the write and writelines methods, as expected by
their base class io.RawIOBase.
* Various documentation issues, including MemoryFS docstring not
rendering properly.
* Avoid creating a new connection on every call of FTPFS.upload.
Closes #455.
* WrapReadOnly.removetree not raising a ResourceReadOnly when
called. Closes #468.
* WrapCachedDir.isdir and WrapCachedDir.isfile raising a
ResourceNotFound error on non-existing path (#470).
* FTPFS not listing certain entries with sticky/SUID/SGID
permissions set by Linux server (#473). Closes #451.
* scandir iterator not being closed explicitly in OSFS.scandir,
occasionally causing a ResourceWarning
to be thrown. Closes #311.
* Incomplete type annotations for the temp_fs parameter of
WriteTarFS and WriteZipFS. Closes #410.
- Release 2.4.12
Added
* Missing mode attribute to _MemoryFile objects returned by
MemoryFS. openbin.
* Missing readinto method for MemoryFS and FTPFS file objects.
Closes #380.
* Added compatibility if a Windows FTP server returns file
information to the LIST command with 24-hour times. Closes
#438.
Changed
* Start testing on PyPy. Due to #342
we have to treat PyPy builds specially and allow them to fail,
but at least we'll be able to see if we break something aside
from known issues with FTP tests.
* Include docs in source distributions as well as the whole
tests folder, ensuring conftest.py is present, fixes #364.
* Stop patching copy with Python 3.8+ because it already
uses sendfile.
Fixed
* Fixed crash when CPython's -OO flag is used
* Fixed error when parsing timestamps from a FTP directory
served from a WindowsNT FTP Server, fixes #395.
* Fixed documentation of Mode.to_platform_bin. Closes #382.
* Fixed the code example in the "Testing Filesystems" section of
the "Implementing Filesystems" guide. Closes #407.
* Fixed FTPFS.openbin not implicitly opening files in binary
mode like expected from openbin. Closes #406.
- conftest.py was removed by upstream
-------------------------------------------------------------------
Mon Apr 20 12:01:32 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Fix build wihtout python2
-------------------------------------------------------------------
Thu Sep 12 12:00:45 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 2.4.11:
* Restored fs.path import
* Fixed potential race condition in makedirs. Fixes #310
* Added missing methods to WrapFS. Fixed #294
* MemFS now immediately releases all memory it holds when close() is called, rather than when it gets garbage collected. Closes issue #308.
* FTPFS now translates EOFError into RemoteConnectionError. Closes #292
* Added automatic close for filesystems that go out of scope. Fixes #298
* Fixed broken WrapFS.movedir #322
* Added geturl for TarFS and ZipFS for 'fs' purpose. NoURL for 'download' purpose.
* Added helpful root path in CreateFailed exception #340
- remove patch more-relaxed-requirements.patch replaced by sed
-------------------------------------------------------------------
Fri Jul 26 14:10:13 UTC 2019 - pgajdos@suse.com
- version update to 2.4.8
* geturl will return URL with user/password if needed @zmej-serow
* Flag to OSFS to disable env var expansion
* Implemented geturl in FTPFS @zmej-serow
- modified patches
% more-relaxed-requirements.patch (refreshed)
-------------------------------------------------------------------
Thu May 16 18:12:13 UTC 2019 - ranand@suse.com
Update to 2.4.5
Fixes:
* Restored deprecated setfile method with deprecation warning
to change to writefile
* Fixed exception when a tarfile contains a path called '.'
* Made TarFS directory loading lazy
-------------------------------------------------------------------
Fri Mar 1 09:24:19 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
- Remove unnecessary bcond_without test
- Simplifed build dependencies on scandir and typing
- Fix compatibility Requires for older Python which were using incorrect
comparisons with python_version_nodots, and incorrectly used Recommends
- Update to v2.4.4
* OSFS fail in nfs mounts
- from 2.4.3
* Fixed broken "case_insensitive" check
* Fixed Windows test fails
- from 2.4.2
* Fixed exception when Python runs with -OO
- from 2.4.1
* Fixed hash method missing from WrapFS
- from 2.4.0
* Added exclude and filter_dirs arguments to walk
* Micro-optimizations to walk
- from 2.3.1
* Add encoding check in OSFS.validatepath
- from 2.3.0
* IllegalBackReference had mangled error message
* Added FS.hash method
-------------------------------------------------------------------
Fri Jan 25 21:31:50 UTC 2019 - Todd R <toddrme2178@gmail.com>
- 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 <mcepl@suse.com>
- Remove superfluous devel dependency for noarch package
-------------------------------------------------------------------
Tue Nov 28 19:41:26 UTC 2017 - bwiedemann@suse.com
- Add python-fs-fix-ftp-test.patch to make ftp tests pass in 2018
-------------------------------------------------------------------
Thu Aug 3 20:42:12 UTC 2017 - toddrme2178@gmail.com
- Remove no longer needed patches:
fs-testing-fix-missing-fuse.diff
fs-testing-fix-missing-paramiko.diff
-------------------------------------------------------------------
Wed Aug 2 19:23:56 UTC 2017 - sebix+novell.com@sebix.at
- add more-relaxed-requirements.patch to weaken the very harsh version requirements
-------------------------------------------------------------------
Wed Jul 19 20:00:26 UTC 2017 - sebix+novell.com@sebix.at
- update to version 2.0.4
- update to singlespec
-------------------------------------------------------------------
Mon May 9 11:01:50 UTC 2016 - hpj@urpla.net
- disable testing of fuse and paramiko dependent parts:
- fuse tests need root
- paramiko tests fail
-------------------------------------------------------------------
Sun May 8 20:24:28 UTC 2016 - hpj@urpla.net
- version 0.5.4: initial build

99
python-fs.spec Normal file
View File

@ -0,0 +1,99 @@
#
# spec file for package python-fs
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2016 LISA GmbH, Bingen, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
%{?sle15_python_module_pythons}
Name: python-fs
Version: 2.4.16
Release: 0
Summary: Python's filesystem abstraction layer
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
BuildRequires: %{python_module appdirs >= 1.4.3}
BuildRequires: %{python_module enum34 >= 1.1.6 if %python-base < 3.4}
BuildRequires: %{python_module parameterized}
BuildRequires: %{python_module psutil}
BuildRequires: %{python_module pyftpdlib}
BuildRequires: %{python_module pysendfile}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pytz}
BuildRequires: %{python_module scandir >= 1.5}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six >= 1.10.0}
BuildRequires: %{python_module typing >= 3.6 if %python-base < 3.6}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-appdirs >= 1.4.3
Requires: python-psutil
Requires: python-pytz
Requires: python-setuptools
Requires: python-six >= 1.10.0
Recommends: python-pyftpdlib
BuildArch: noarch
%if %{with python2}
BuildRequires: python-backports.os >= 0.1
BuildRequires: python-mock
%endif
%ifpython2
Requires: python-backports.os >= 0.1
%endif
%if %{python_version_nodots} < 34
Requires: python-enum34 >= 1.1.6
Recommends: python-pysendfile
%endif
%if %{python_version_nodots} < 35
Recommends: python-scandir >= 1.5
%endif
%if %{python_version_nodots} < 36
Requires: python-typing >= 3.6
%endif
%python_subpackages
%description
PyFilesystem is an abstraction layer for filesystems. In the same way that
Python's file-like objects provide a common way of accessing files,
PyFilesystem provides a common way of accessing entire filesystems. You can
write platform-independent code to work with local files, that also works with
any of the supported filesystems (zip, ftp, S3 etc.).
%prep
%setup -q -n fs-%{version}
sed -i -e '/install_requires/,/bdist_wheel/ s:~=:>=:g' setup.cfg
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
export LANG=en_US.UTF-8
%pytest
%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitelib}/fs
%{python_sitelib}/fs-%{version}*-info
%changelog