Sync from SUSE:SLFO:Main python-pyftpdlib revision 2463691bb39a835b9f142c08978d1bff

This commit is contained in:
Adrian Schröter 2024-12-13 12:04:57 +01:00
parent 38d8e9799f
commit bda775f261
4 changed files with 117 additions and 51 deletions

BIN
pyftpdlib-1.5.10.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

BIN
pyftpdlib-1.5.7.tar.gz (Stored with Git LFS)

Binary file not shown.

View File

@ -1,3 +1,85 @@
-------------------------------------------------------------------
Sat Aug 31 12:04:37 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 1.5.10:
* use black formatter.
* use argparse instead of deprecated optparse.
* use pytest instead of unittest.
* add ability to run tests in parallel with make test-
parallel.
* PermissionError may occur on Windows when binding ports
from a pre-configured PASV range.
-------------------------------------------------------------------
Mon Mar 25 14:21:26 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 1.5.9:
* Enhancements
* #611: use ruff code style checker instead of flake8 + isort
(much faster + makes many more code quality checks).
* Bug fixes
* #604: client connection may be reset in PASV/EPSV mode during
TLS handshake. (patch by Benedikt McMullin)
* #607: possible infinite wait in Epoll (patch by
@stat1c-void)
* #607: possible infinite traceback printing in DTPHandler
(patch by @stat1c-void)
* #613: (CRITICAL) bugfix for TLS disconnect causing 100% CPU
usage. (patch by @hakai)
* #614: close connection on SSL EOF error, instead of
erroneously replying with "226 Transfer completed."
* Enhancements
* #586: removed Python 2.6 support.
* #591: speedup logging by 28% by using logging._srcfile = None
trick. This avoids calling calling sys._getframe() for each
log record.
* #605: added support for Python 3.12.
* Enhancements
* #544: replace Travis with Github Actions for CI testing.
* Bug fixes
* #481: fix [WinError 10038] an operation was attempted on
something that is not a socket. (patch by Tailing Yuan)
* #578, [critical]: FTPS broke with PyOpenSSL version 22.1.0.
* Enhancements
* #467: added pre-fork concurrency model, spawn()ing worker
processes to split load.
* #520: directory LISTing is now 3.7x times faster.
* Enhancements
* #495: colored test output.
* Bug fixes
* #492: CRLF line endings are replaced with CRCRLF in ASCII
mode downloads.
* #496: import error due to multiprocessing.Lock() bug.
* Enhancements
* #463: FTPServer class can now be used as a context manager.
* Bug fixes
* #431: Ctrl-C doesn't exit python -m pyftpdlib on Windows.
* #436: ThreadedFTPServer.max_cons is evaluated
threading.activeCount(). If the user uses threads of its own
it will consume the number of max_cons.
* #447: ThreadedFTPServer and MultiprocessFTPServer do not
join() tasks which are no longer consuming resources.
* Enhancements
* #201: implemented SITE MFMT command which changes file
modification time. (patch by Tahir Ijaz)
* #327: add username and password command line options
* #433: documentation moved to readthedocs:
http://pyftpdlib.readthedocs.io
* Bug fixes
* #403: fix duplicated output log. (path by PonyPC)
* #414: Respond successfully to STOR only after closing file
handle.
- drop support-python-312.patch (upstream)
-------------------------------------------------------------------
Tue Sep 19 05:14:22 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch support-python-312.patch, support Python 3.12+
- Stop using greedy globs in %files
- Switch to autosetup and pyproject macros
- Remove Python 2 leftovers
- Enable running the tests again
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Apr 21 12:30:41 UTC 2023 - Dirk Müller <dmueller@suse.com> Fri Apr 21 12:30:41 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package python-pyftpdlib # spec file for package python-pyftpdlib
# #
# Copyright (c) 2023 SUSE LLC # Copyright (c) 2024 SUSE LLC
# Copyright (c) 2016 LISA GmbH, Bingen, Germany. # Copyright (c) 2016 LISA GmbH, Bingen, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
@ -17,23 +17,22 @@
# #
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
Name: python-pyftpdlib Name: python-pyftpdlib
Version: 1.5.7 Version: 1.5.10
Release: 0 Release: 0
Summary: Asynchronous FTP server library for Python Summary: Asynchronous FTP server library for Python
License: MIT License: MIT
Group: Development/Languages/Python
URL: https://github.com/giampaolo/pyftpdlib/ URL: https://github.com/giampaolo/pyftpdlib/
Source: https://files.pythonhosted.org/packages/source/p/pyftpdlib/pyftpdlib-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/p/pyftpdlib/pyftpdlib-%{version}.tar.gz
Source1: keycert.pem Source1: keycert.pem
BuildRequires: %{python_module pip}
BuildRequires: %{python_module psutil} BuildRequires: %{python_module psutil}
BuildRequires: %{python_module pyOpenSSL} BuildRequires: %{python_module pyOpenSSL}
BuildRequires: %{python_module pysendfile} BuildRequires: %{python_module pysendfile}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: python-pyOpenSSL Requires: python-pyOpenSSL
@ -41,13 +40,6 @@ Requires(post): update-alternatives
Requires(postun): update-alternatives Requires(postun): update-alternatives
Recommends: python-pysendfile Recommends: python-pysendfile
BuildArch: noarch BuildArch: noarch
%if %{with python2}
BuildRequires: python-ipaddress
BuildRequires: python-mock
%endif
%ifpython2
Requires: python-ipaddress
%endif
%python_subpackages %python_subpackages
%description %description
@ -55,49 +47,40 @@ The Python FTP server library provides a high-level interface to
write very asynchronous FTP servers with Python. write very asynchronous FTP servers with Python.
%prep %prep
%setup -q -n pyftpdlib-%{version} %autosetup -p1 -n pyftpdlib-%{version}
sed -i '1 {/env python/ d}' pyftpdlib/test/*.py pyftpdlib/_compat.py sed -i '1 {/env python/ d}' pyftpdlib/test/*.py pyftpdlib/_compat.py
cp %{SOURCE1} pyftpdlib/test cp %{SOURCE1} pyftpdlib/test
%build %build
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
%python_clone -a %{buildroot}%{_bindir}/ftpbench %python_clone -a %{buildroot}%{_bindir}/ftpbench
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
# Note: Do not remove tests. Other packages import them # Note: Do not remove tests. Other packages import them
%check %check
## # Tests reported as randomly failing in 2016 against v1.5.0: ignorebuild="--ignore build"
## # https://github.com/giampaolo/pyftpdlib/issues/386 %{python_expand # expand to python flavor, not to the binary name, then strip the trailing _
## # If they re-occur, please update the issue with backtraces, builddir=_build.$python_
## # and disable only related tests. ignorebuild+=" --ignore ${builddir%%_}"
## donttest="(TestFtpStoreDataTLSMixin and test_rest_on_stor)" }
## donttest+=" or (TestFtpStoreDataTLSMixin and test_stor_ascii)" cat > pytest.ini <<EOF
## # https://github.com/giampaolo/pyftpdlib/issues/550 [pytest]
## donttest+=" or test_masquerade_address" addopts =
## ignorebuild="--ignore build" -rs -v
## %%{python_expand # expand to python flavor, not to the binary name, then strip the trailing _ $ignorebuild
## builddir=_build.$python_ EOF
## ignorebuild+=" --ignore ${builddir%%_}" %{python_expand # pytest macro does not work. The tests parse CLI args and fail if there are any unknown program args
## } export PYTHONPATH=%%{buildroot}%%{$python_sitelib}
## cat > pytest.ini <<EOF export PYTHONDONTWRITEBYTECODE=1
## [pytest] # gh#giampaolo/pyftpdlib#540
## addopts =
## -rs -v
## -k "not ($donttest)"
## $ignorebuild
## EOF
## %%{python_expand # pytest macro does not work. The tests parse CLI args and fail if there are any unknown program args
## export PYTHONPATH=%%{buildroot}%%{$python_sitelib}
## export PYTHONDONTWRITEBYTECODE=1
## # gh#giampaolo/pyftpdlib#540
##export PYTEST_ADDOPTS="-k 'not (TestFtpListingCmdsTLSMixin or TestConfigurableOptions or TestFtpStoreDataTLSMixin)'" ##export PYTEST_ADDOPTS="-k 'not (TestFtpListingCmdsTLSMixin or TestConfigurableOptions or TestFtpStoreDataTLSMixin)'"
## # gh#giampaolo/pyftpdlib#478 # gh#giampaolo/pyftpdlib#478
## export TZ=GMT+1 export TZ=GMT+1
## $python -m pytest $python -m pytest
## } }
%post %post
%python_install_alternative ftpbench %python_install_alternative ftpbench
@ -109,6 +92,7 @@ cp %{SOURCE1} pyftpdlib/test
%license LICENSE %license LICENSE
%doc README.rst %doc README.rst
%python_alternative %{_bindir}/ftpbench %python_alternative %{_bindir}/ftpbench
%{python_sitelib}/* %{python_sitelib}/pyftpdlib
%{python_sitelib}/pyftpdlib-%{version}.dist-info
%changelog %changelog