SHA256
15
0
forked from pool/python-fs

Accepting request 730453 from devel:languages:python

- 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

OBS-URL: https://build.opensuse.org/request/show/730453
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-fs?expand=0&rev=9
This commit is contained in:
Ludwig Nussel
2019-09-13 13:02:13 +00:00
committed by Git OBS Bridge
6 changed files with 64 additions and 42 deletions

34
conftest.py Normal file
View File

@@ -0,0 +1,34 @@
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())

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

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

View File

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

View File

@@ -1,28 +0,0 @@
Index: fs-2.4.8/setup.py
===================================================================
--- fs-2.4.8.orig/setup.py 2019-07-26 15:56:23.878197898 +0200
+++ fs-2.4.8/setup.py 2019-07-26 15:57:13.178479543 +0200
@@ -19,7 +19,7 @@ CLASSIFIERS = [
"Topic :: System :: Filesystems",
]
-REQUIREMENTS = ["appdirs~=1.4.3", "pytz", "setuptools", "six~=1.10"]
+REQUIREMENTS = ["appdirs>=1.4.3", "pytz", "setuptools", "six>=1.10"]
setup(
author="Will McGugan",
@@ -28,10 +28,10 @@ setup(
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.6'": ["typing~=3.6"],
- ":python_version < '3.0'": ["backports.os~=0.1"],
+ "scandir :python_version < '3.5'": ["scandir>=1.5"],
+ ":python_version < '3.4'": ["enum34>=1.1.6"],
+ ":python_version < '3.6'": ["typing>=3.6"],
+ ":python_version < '3.0'": ["backports.os>=0.1"],
},
license="MIT",
name="fs",

View File

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

View File

@@ -19,21 +19,19 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-fs
Version: 2.4.8
Version: 2.4.11
Release: 0
Summary: Python's filesystem abstraction layer
License: MIT
Group: Development/Languages/Python
Url: https://github.com/PyFilesystem/pyfilesystem2
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
Source1: https://raw.githubusercontent.com/PyFilesystem/pyfilesystem2/master/tests/conftest.py
BuildRequires: %{python_module appdirs >= 1.4.3}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module nose}
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}
@@ -41,6 +39,8 @@ BuildRequires: %{python_module six >= 1.10.0}
BuildRequires: %{python_module typing >= 3.6}
BuildRequires: fdupes
BuildRequires: python-backports.os >= 0.1
BuildRequires: python-enum34 >= 1.1.6
BuildRequires: python-mock
BuildRequires: python-rpm-macros
Requires: python-appdirs >= 1.4.3
Requires: python-psutil
@@ -49,8 +49,9 @@ Requires: python-setuptools
Requires: python-six >= 1.10.0
Requires: python-typing >= 3.6
Recommends: python-pyftpdlib
BuildArch: noarch
%ifpython2
Requires: python-backports.os
Requires: python-backports.os >= 0.1
%endif
%if %{python_version_nodots} < 34
Requires: python-enum34 >= 1.1.6
@@ -59,8 +60,6 @@ Recommends: python-pysendfile
%if %{python3_version_nodots} < 35
Recommends: python-scandir >= 1.5
%endif
BuildArch: noarch
%python_subpackages
%description
@@ -72,7 +71,8 @@ any of the supported filesystems (zip, ftp, S3 etc.).
%prep
%setup -q -n fs-%{version}
%patch0 -p1
sed -i -e 's:~=:>=:g' setup.py
cp %{SOURCE1} tests/
%build
%python_build
@@ -83,7 +83,8 @@ any of the supported filesystems (zip, ftp, S3 etc.).
%check
export LANG=en_US.UTF-8
%python_exec setup.py test
export PYTHONDONTWRITEBYTECODE=1
%pytest
%files %{python_files}
%doc README.md