forked from pool/python-Twisted
* Features
+ The enableSessions argument to twisted.internet.ssl.CertificateOptions now
+ actually enables/disables OpenSSL's session cache. Also, due to
+ session-related bugs, it defaults to False. (#9583)
+ twisted.internet.defer.inlineCallbacks and ensureDeferred will now associate a contextvars.Context with the coroutines they run, meaning that ContextVar objects will maintain their value within the same coroutine, similarly to asyncio Tasks. This functionality requires Python 3.7+, or the contextvars PyPI backport to be installed for Python 3.5-3.6. (#9719, #9826)
+ twisted.internet.defer.Deferred.fromCoroutine has been added. This is similar to the existing ensureDeferred function, but is named more consistently inside Twisted and does not pass through Deferreds. (#9825)
+ trial now allows the @unittest.skipIf decorator to specify that an entire test class should be skipped. (#9829)
+ The twisted.python.deprecate.deprecatedKeywordParameter decorator can be used to mark a keyword paramater of a function or method as deprecated. (#9844)
+ Projects using Twisted can now perform type checking against a Twisted
+ installation, for example using mypy. (#9908)
+ twisted.python.util.InsensitiveDict now fully implements MutableMapping. (#9919)
+ Python 3.8 is now tested and supported. (#9955)
+ Support a coroutine function in twisted.internet.task.react (#9974)
+ PyPy 3.7 is now tested and supported. (#10093)
* Bugfixes
+ twisted.web.twcgi.CGIProcessProtocol.processEnded(...) now handles an already-finished request, for example when request.connectionLost(...) was called previously. (#9468)
+ Twisted's dependency on PyHamcrest has been moved from the base package to the new "test" extra. Consequently the test extra must be installed for Twisted's test suite to pass. (#9509)
+ Fixed serialization of timedelta, date, and time objects in twisted.spread. (#9716)
+ twisted.internet.asyncioreactor.AsyncioSelectorReactor now raises an exception if instantiated with an event loop which is not compatible with asyncio.SelectorEventLoop. This fixes the AsyncioSelectorReactor in Python 3.8+ on Windows, where in bp-34687 the default Windows asyncio event loop was changed to ProactorEventLoop. Applications that use AsyncioSelectorReactor on Windows with Python 3.8+ must call asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) before instantiating and running AsyncioSelectorReactor. (#9766)
+ twisted.internet.process.registerReapProcessHandler and ._BaseProcess.reapProcess will no longer raise a TypeError when processing a None PID (#9775)
+ INotify will close its file descriptor if a directory is automatically removed by twisted from the watchlist because it's deleted, avoiding orphaned filedescriptors. (#9777)
+ DelayedCall.reset() is now working properly with asyncioreactor (#9780)
+ AsyncioSelectorReactor.seconds() now correctly returns an epoch time. (#9787)
+ The _connDone parameter has been removed from twisted.internet.abstract.FileDescriptor.loseConnection()'s signature in order to match the signature in the base class twisted.internet._newtls.ConnectionMixin loseConnection(). (#9849)
+ The Gtk3 reactor now runs on Wayland-only sessions (#9904)
+ Descriptive error messages from twisted.internet.error are now present when running with 'python -OO'. (#9918)
+ Comparator methods such as eq() now always return NotImplemented for uncomparable types. (#9919)
+ When installing Twisted it now requires a minimum Python 3.5.4 version to match the version used with automated testing. This is the minimum Python version that we know that Twisted works with. (#10098)
- Drop patches no-pygtkcompat.patch, python-38-hmac-digestmod.patch,
python-38-no-cgi-parseqs.patch, twisted-pr1369-remove-pyopenssl-npn.patch &
twisted-pr1487-increase-ffdh-keysize.patch, they have been merged.
- Refresh other patches.
- Add no-cython_test_exception_raiser.patch to avoid another dependency.
- Update URL and make use of sitelib, not sitearch macros
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Twisted?expand=0&rev=102
171 lines
6.7 KiB
RPMSpec
171 lines
6.7 KiB
RPMSpec
#
|
|
# spec file for package python-Twisted
|
|
#
|
|
# Copyright (c) 2021 SUSE LLC
|
|
#
|
|
# 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-%{**}}
|
|
%define modname Twisted
|
|
%define skip_python2 1
|
|
Name: python-Twisted
|
|
Version: 21.2.0
|
|
Release: 0
|
|
Summary: An asynchronous networking framework written in Python
|
|
License: MIT
|
|
URL: https://twistedmatrix.com/
|
|
Source: https://files.pythonhosted.org/packages/source/T/Twisted/%{modname}-%{version}.tar.gz
|
|
Patch0: skip_MultiCast.patch
|
|
Patch1: true-binary.patch
|
|
# PATCH-FIX-UPSTREAM no-test_successResultOfWithFailureHasTraceback.patch https://twistedmatrix.com/trac/ticket/9665 mcepl@suse.com
|
|
# skip over the test test_successResultOfWithFailureHasTraceback
|
|
Patch2: no-test_successResultOfWithFailureHasTraceback.patch
|
|
# PATCH-FIX-UPSTREAM 1521_delegate_parseqs_stdlib_bpo42967.patch https://twistedmatrix.com/trac/ticket/10096 mcepl@suse.com
|
|
# overcome incompatibility with the solution for bpo#42967.
|
|
Patch3: 1521_delegate_parseqs_stdlib_bpo42967.patch
|
|
# We don't want to package yet another module, and it is easily skippable
|
|
Patch4: no-cython_test_exception_raiser.patch
|
|
BuildRequires: %{python_module Automat >= 0.8.0}
|
|
BuildRequires: %{python_module PyHamcrest >= 1.9.0}
|
|
BuildRequires: %{python_module appdirs >= 1.4.0}
|
|
BuildRequires: %{python_module attrs >= 19.2.0}
|
|
BuildRequires: %{python_module bcrypt >= 3.0.0}
|
|
BuildRequires: %{python_module constantly >= 15.1}
|
|
BuildRequires: %{python_module cryptography >= 2.6}
|
|
BuildRequires: %{python_module devel}
|
|
BuildRequires: %{python_module h2 >= 3.0}
|
|
BuildRequires: %{python_module hyperlink >= 17.1.1}
|
|
BuildRequires: %{python_module idna >= 2.4}
|
|
BuildRequires: %{python_module incremental >= 16.10.1}
|
|
BuildRequires: %{python_module pyOpenSSL >= 16.0.0}
|
|
BuildRequires: %{python_module pyasn1}
|
|
BuildRequires: %{python_module pyserial >= 3.0}
|
|
BuildRequires: %{python_module pyserial}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module python-subunit}
|
|
BuildRequires: %{python_module pytz}
|
|
BuildRequires: %{python_module service_identity >= 18.1.0}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: %{python_module zope.interface >= 4.4.2}
|
|
BuildRequires: fdupes
|
|
BuildRequires: git-core
|
|
BuildRequires: python-rpm-macros
|
|
Requires: python-Automat >= 0.8.0
|
|
Requires: python-PyHamcrest >= 1.9.0
|
|
Requires: python-appdirs >= 1.4.0
|
|
Requires: python-attrs >= 19.2.0
|
|
Requires: python-bcrypt >= 3.0.0
|
|
Requires: python-constantly >= 15.1
|
|
Requires: python-cryptography >= 2.6
|
|
Requires: python-h2 >= 3.0
|
|
Requires: python-hyperlink >= 17.1.1
|
|
Requires: python-idna >= 2.4
|
|
Requires: python-incremental >= 16.10.1
|
|
Requires: python-pyOpenSSL >= 16.0.0
|
|
Requires: python-pyasn1
|
|
Requires: python-pyserial >= 3.0
|
|
Requires: python-service_identity >= 18.1.0
|
|
Requires: python-zope.interface >= 4.4.2
|
|
Requires(post): update-alternatives
|
|
Requires(postun):update-alternatives
|
|
%python_subpackages
|
|
|
|
%description
|
|
An extensible framework for Python programming, with special focus
|
|
on event-based network programming and multiprotocol integration.
|
|
|
|
%package -n %{name}-doc
|
|
Summary: An asynchronous networking framework written in Python - Documentation
|
|
|
|
%description -n %{name}-doc
|
|
An extensible framework for Python programming, with special focus
|
|
on event-based network programming and multiprotocol integration.
|
|
|
|
This package contains the documentation for python-Twisted
|
|
|
|
%prep
|
|
%autosetup -p1 -n %{modname}-%{version}
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
find %{buildroot} -regex '.*\.[ch]' -exec rm {} ";" # Remove leftover C sources
|
|
install -dm0755 %{buildroot}%{_mandir}/man1/
|
|
install -m0644 docs/*/man/*.1 %{buildroot}%{_mandir}/man1/ # Install man pages
|
|
find docs -type f -print0 | xargs -0 chmod a-x # Fix doc-file dependency by removing x flags
|
|
#sed -i "s/\r//" docs/core/howto/listings/udp/{MulticastClient,MulticastServer}.py
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
|
|
|
# Prepare for update-alternatives usage
|
|
for p in twistd cftp ckeygen conch pyhtmlizer tkconch trial ; do
|
|
%python_clone -a %{buildroot}%{_bindir}/$p
|
|
%python_clone -a %{buildroot}%{_mandir}/man1/$p.1
|
|
done
|
|
|
|
# mailmail is useful only on Python 2
|
|
rm %{buildroot}%{_bindir}/mailmail %{buildroot}%{_mandir}/man1/mailmail.1
|
|
|
|
# no manpage for twist yet:
|
|
%python_clone -a %{buildroot}%{_bindir}/twist
|
|
|
|
%check
|
|
export LANG=en_US.UTF-8
|
|
export PATH=%{buildroot}%{_bindir}:$PATH
|
|
export PYTHONDONTWRITEBYTECODE=1
|
|
|
|
# Relax the crypto policies for the test-suite
|
|
export OPENSSL_SYSTEM_CIPHERS_OVERRIDE=xyz_nonexistent_file
|
|
export OPENSSL_CONF=''
|
|
|
|
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python -m twisted.trial twisted
|
|
|
|
%post
|
|
# these were master alternatives until Dec 2020. Remove before the install as slave links
|
|
for f in cftp ckeygen conch pyhtmlizer tkconch trial twist; do
|
|
(update-alternatives --quiet --list $f 2>&1 >/dev/null) && update-alternatives --remove-all $f
|
|
done
|
|
%{python_install_alternative twistd cftp ckeygen conch pyhtmlizer tkconch trial twist
|
|
twistd.1 cftp.1 ckeygen.1 conch.1 pyhtmlizer.1 tkconch.1 trial.1}
|
|
|
|
%postun
|
|
%python_uninstall_alternative twistd
|
|
|
|
%files -n %{name}-doc
|
|
%doc docs/*
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%doc NEWS.rst README.rst
|
|
%python_alternative %{_bindir}/twistd
|
|
%python_alternative %{_bindir}/cftp
|
|
%python_alternative %{_bindir}/ckeygen
|
|
%python_alternative %{_bindir}/conch
|
|
%python_alternative %{_bindir}/pyhtmlizer
|
|
%python_alternative %{_bindir}/tkconch
|
|
%python_alternative %{_bindir}/trial
|
|
%python_alternative %{_bindir}/twist
|
|
%python_alternative %{_mandir}/man1/twistd.1%{?ext_man}
|
|
%python_alternative %{_mandir}/man1/cftp.1%{?ext_man}
|
|
%python_alternative %{_mandir}/man1/ckeygen.1%{?ext_man}
|
|
%python_alternative %{_mandir}/man1/conch.1%{?ext_man}
|
|
%python_alternative %{_mandir}/man1/pyhtmlizer.1%{?ext_man}
|
|
%python_alternative %{_mandir}/man1/tkconch.1%{?ext_man}
|
|
%python_alternative %{_mandir}/man1/trial.1%{?ext_man}
|
|
%{python_sitelib}/twisted
|
|
%{python_sitelib}/Twisted-%{version}*-info
|
|
|
|
%changelog
|