Accepting request 886050 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/886050
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-fs?expand=0&rev=11
This commit is contained in:
2021-04-16 22:02:13 +00:00
committed by Git OBS Bridge
5 changed files with 94 additions and 48 deletions

View File

@@ -1,34 +0,0 @@
import pytest
try:
from unittest import mock
except ImportError:
import mock
@pytest.fixture
@mock.patch("appdirs.user_data_dir", autospec=True, spec_set=True)
@mock.patch("appdirs.site_data_dir", autospec=True, spec_set=True)
@mock.patch("appdirs.user_config_dir", autospec=True, spec_set=True)
@mock.patch("appdirs.site_config_dir", autospec=True, spec_set=True)
@mock.patch("appdirs.user_cache_dir", autospec=True, spec_set=True)
@mock.patch("appdirs.user_state_dir", autospec=True, spec_set=True)
@mock.patch("appdirs.user_log_dir", autospec=True, spec_set=True)
def mock_appdir_directories(
user_log_dir_mock,
user_state_dir_mock,
user_cache_dir_mock,
site_config_dir_mock,
user_config_dir_mock,
site_data_dir_mock,
user_data_dir_mock,
tmpdir
):
"""Mock out every single AppDir directory so tests can't access real ones."""
user_log_dir_mock.return_value = str(tmpdir.join("user_log").mkdir())
user_state_dir_mock.return_value = str(tmpdir.join("user_state").mkdir())
user_cache_dir_mock.return_value = str(tmpdir.join("user_cache").mkdir())
site_config_dir_mock.return_value = str(tmpdir.join("site_config").mkdir())
user_config_dir_mock.return_value = str(tmpdir.join("user_config").mkdir())
site_data_dir_mock.return_value = str(tmpdir.join("site_data").mkdir())
user_data_dir_mock.return_value = str(tmpdir.join("user_data").mkdir())

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cc99d476b500f993df8ef697b96dc70928ca2946a455c396a566efe021126767
size 128125

3
fs-2.4.13.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:caab4dc1561d63c92f36ee78976f6a4a01381830d8420ce34a78d4f1bb1dc95f
size 179654

View File

@@ -1,3 +1,83 @@
-------------------------------------------------------------------
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>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-fs
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2016 LISA GmbH, Bingen, Germany.
#
# All modifications and additions to the file contributed by third parties
@@ -20,15 +20,15 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-fs
Version: 2.4.11
Version: 2.4.13
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
Source1: https://raw.githubusercontent.com/PyFilesystem/pyfilesystem2/master/tests/conftest.py
BuildRequires: %{python_module appdirs >= 1.4.3}
BuildRequires: %{python_module enum34 >= 1.1.6 if %python-base < 3.4}
BuildRequires: %{python_module psutil}
BuildRequires: %{python_module pyftpdlib}
BuildRequires: %{python_module pysendfile}
@@ -37,7 +37,7 @@ 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}
BuildRequires: %{python_module typing >= 3.6 if %python-base < 3.6}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-appdirs >= 1.4.3
@@ -45,12 +45,10 @@ Requires: python-psutil
Requires: python-pytz
Requires: python-setuptools
Requires: python-six >= 1.10.0
Requires: python-typing >= 3.6
Recommends: python-pyftpdlib
BuildArch: noarch
%if %{with python2}
BuildRequires: python-backports.os >= 0.1
BuildRequires: python-enum34 >= 1.1.6
BuildRequires: python-mock
%endif
%ifpython2
@@ -60,9 +58,12 @@ Requires: python-backports.os >= 0.1
Requires: python-enum34 >= 1.1.6
Recommends: python-pysendfile
%endif
%if %{python3_version_nodots} < 35
%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
@@ -74,8 +75,7 @@ any of the supported filesystems (zip, ftp, S3 etc.).
%prep
%setup -q -n fs-%{version}
sed -i -e 's:~=:>=:g' setup.py
cp %{SOURCE1} tests/
sed -i -e '/install_requires/,/bdist_wheel/ s:~=:>=:g' setup.cfg
%build
%python_build
@@ -86,12 +86,12 @@ cp %{SOURCE1} tests/
%check
export LANG=en_US.UTF-8
export PYTHONDONTWRITEBYTECODE=1
%pytest
%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitelib}/*
%{python_sitelib}/fs
%{python_sitelib}/fs-%{version}*-info
%changelog