%define debug_package %{nil}
Name: python-twisted
Version: 26.10.0
Release: 1
Summary: An event-driven networking engine written in Python
License: MIT
URL: http://twistedmatrix.com/
Source0: https://github.com/twisted/twisted/archive/refs/tags/twisted-26.10.0.tar.gz
BuildRequires: python3-pip python3-hatchling python3-hatch-vcs python3-wheel
BuildRequires: python3-hatch-fancy-pypi-readme python3-incremental
%description
Twisted is an event-based framework for internet applications,
supporting Python 2.7 and Python 3.5+. It includes modules for many
different purposes, including the following:
* twisted.web: HTTP clients and servers, HTML templating, and a WSGI server
* twisted.conch: SSHv2 and Telnet clients and servers and terminal emulators
* twisted.words: Clients and servers for IRC, XMPP, and other IM protocols
* twisted.mail: IMAPv4, POP3, SMTP clients and servers
* twisted.positioning: Tools for communicating with NMEA-compatible GPS receivers
* twisted.names: DNS client and tools for making your own DNS servers
* twisted.trial: A unit testing framework that integrates well with Twisted-based code.
Twisted supports all major system event loops -- select (all platforms),
poll (most POSIX platforms), epoll (Linux), kqueue (FreeBSD, macOS),
IOCP (Windows), and various GUI event loops (GTK+2/3, Qt, wxWidgets).
Third-party reactors can plug into Twisted, and provide support for
additional event loops.
%package -n python3-twisted
Summary: An event-driven networking engine written in Python
%{?python_provide:%python_provide python3-twisted}
BuildRequires: python3-devel >= 3.3 python3dist(appdirs) >= 1.4.0
BuildRequires: python3dist(automat) >= 0.3.0 python3dist(constantly) >= 15.1
BuildRequires: python3dist(cryptography) >= 1.5 python3-hyperlink >= 17.1.1
BuildRequires: (python3dist(h2) >= 3.0 with python3dist(h2) < 5.0)
BuildRequires: python3dist(idna) >= 0.6 python3dist(incremental) >= 16.10.1
BuildRequires: (python3dist(priority) >= 1.1.0 with python3dist(priority) < 2.0)
BuildRequires: python3dist(pyasn1) python3dist(pyopenssl) >= 16.0.0
BuildRequires: python3dist(pyserial) >= 3.0 python3dist(service-identity)
BuildRequires: python3dist(setuptools) python3dist(sphinx) >= 1.3.1
BuildRequires: python3dist(zope.interface) >= 4.4.2 python3dist(pyhamcrest)
Recommends: python3dist(service-identity)
%description -n python3-twisted
Twisted is an event-based framework for internet applications,
supporting Python 2.7 and Python 3.5+. It includes modules for many
different purposes, including the following:
* twisted.web: HTTP clients and servers, HTML templating, and a WSGI server
* twisted.conch: SSHv2 and Telnet clients and servers and terminal emulators
* twisted.words: Clients and servers for IRC, XMPP, and other IM protocols
* twisted.mail: IMAPv4, POP3, SMTP clients and servers
* twisted.positioning: Tools for communicating with NMEA-compatible GPS receivers
* twisted.names: DNS client and tools for making your own DNS servers
* twisted.trial: A unit testing framework that integrates well with Twisted-based code.
Twisted supports all major system event loops -- select (all platforms),
poll (most POSIX platforms), epoll (Linux), kqueue (FreeBSD, macOS),
IOCP (Windows), and various GUI event loops (GTK+2/3, Qt, wxWidgets).
Third-party reactors can plug into Twisted, and provide support for
additional event loops.
%package help
Summary: Documents for python-twisted
BuildArch: noarch
%description help
The python-twisted-help package contains related documents.
%prep
%autosetup -n twisted-%{version} -p1
%build
%pyproject_build
%install
%pyproject_install
sed -i 's/zope-interface/zope.interface/g' %{buildroot}%{python3_sitelib}/twisted-%{version}.dist-info/METADATA
mv %{buildroot}%{_bindir}/trial %{buildroot}%{_bindir}/trial-%{python3_version}
mv %{buildroot}%{_bindir}/twistd %{buildroot}%{_bindir}/twistd-%{python3_version}
ln -s ./trial-%{python3_version} %{buildroot}%{_bindir}/trial-3
ln -s ./twistd-%{python3_version} %{buildroot}%{_bindir}/twistd-3
ln -s ./trial-%{python3_version} %{buildroot}%{_bindir}/trial
ln -s ./twistd-%{python3_version} %{buildroot}%{_bindir}/twistd
chmod +x %{buildroot}%{python3_sitelib}/twisted/mail/test/pop3testserver.py
chmod +x %{buildroot}%{python3_sitelib}/twisted/trial/test/scripttest.py
pathfix.py -pn -i %{__python3} %{buildroot}%{python3_sitelib}
install -d %{buildroot}%{_mandir}/man1/
cp -a docs/conch/man/*.1 %{buildroot}%{_mandir}/man1/
cp -a docs/core/man/*.1 %{buildroot}%{_mandir}/man1/
cp -a docs/mail/man/*.1 %{buildroot}%{_mandir}/man1/
%check
PATH=%{buildroot}%{_bindir}:$PATH PYTHONPATH=%{buildroot}%{python3_sitelib} %{buildroot}%{_bindir}/trial-3 twisted ||:
%files -n python3-twisted
%doc NEWS.rst README.rst LICENSE
%{_bindir}/{trial-3*,twistd-3*}
%{python3_sitelib}/twisted*
%{_bindir}/{cftp,ckeygen,conch,mailmail,pyhtmlizer,tkconch,trial,twist,twistd}
%files help
%{_mandir}/man1/{cftp.1*,ckeygen.1*,conch.1*,mailmail.1*,pyhtmlizer.1*,tkconch.1*,trial.1*,twistd.1*}
%changelog
* Sat Oct 31 2026 infra_team <zhaiwenjie1@huawei.com> - 26.10.0-1
- fix CVE: CVE-2026-83813
- Upgrade python-twisted to 26.10.0 to fix CVE-2026-83813 (GHSA-jj36-9pvh-vj5r):
twisted.names DNS client now validates the source address of responses and
discards those sent from the wrong host or port, preventing DNS response
spoofing (CWE-346)
- Drop backport-CVE-2026-106454.patch, the IMAP wildcardToRegexp escaping
fix is included upstream in 26.10.0
* Wed Oct 14 2026 infra_team <zhaiwenjie1@huawei.com> - 26.4.0-2
- fix CVE: CVE-2026-106454
- Backport upstream fix to escape IMAP wildcards and metacharacters
in wildcardToRegexp, preventing attacker-controlled regex injection
in twisted.mail.imap4
* Tue Jun 16 2026 wuzhaomin <wuzhaomin@kylinos.cn> - 26.4.0-1
- update python-twisted to 26.4.0
- Update version for final release.
* Fri May 08 2026 openeuler_bot <infra@openeuler.sh> - 26.4.0rc2-1
- update python-twisted to 26.4.0rc2
* Wed Aug 06 2025 zhang_wenyu <zhang_wenyu@hoperun.com> - 25.5.0-1
- Upgrade version to 25.5.0
- twisted.trial.unittest.TestCase.deferRunCleanups were removed and
converted to private methods.
- twisted.internet.defer.Deferred.callbacks attribute has been deprecated
- twisted.internet.runner.procmon.ProcessMonitor: startProcess() catches
exceptions raised by reactor.spawnProcess() and attempts to restart
the failed process
* Thu Sep 19 2024 xu_ping <707078654@qq.com> - 24.3.0-1
- Upgrade version to 24.7.0
* Tue Jul 30 2024 yinyongkang <yinyongkang@kylinos.cn> - 22.10.0-4
- Fix CVE-2024-41810 and CVE-2024-41671
* Fri Dec 29 2023 yaoxin <yao_xin001@hoperun.com> - 22.10.0-3
- Fix CVE-2023-46137
* Thu Jan 19 2023 caodongxia <caodongxia@h-partners.com> - 22.10.0-2
- Modify the version restriction of python-h2
* Wed Dec 07 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 22.10.0-1
- Update package to version 22.10.0
* Wed Aug 03 2022 duyiwei <duyiwei@kylinos.cn> - 22.4.0-1
- upgrade version to 22.4.0
* Mon May 09 2022 xu_ping <xuping33@h-partners.com> - 18.9.0-7
- fix build error caused by python3.10 wildcard
* Tue Aug 17 2021 liwu <liwu13@huawei.com> - 18.9.0-6
- fix CVE-2019-12855
* Mon Aug 16 2021 liwu <liwu13@huawei.com> - 18.9.0-5
- fix CVE-2020-10109 CVE-2020-10108
* Mon Oct 12 2020 zhangjiapeng <zhangjiapeng9@huawei.com> - 18.9.0-4
- Drop python2 support
* Tue Feb 25 2020 Jiangping Hu <hujp1985@foxmail.com> - 18.9.0-3
- Package init