diff -Nru twisted-22.1.0/debian/changelog twisted-22.1.0/debian/changelog --- twisted-22.1.0/debian/changelog 2022-02-23 07:46:09.000000000 +0000 +++ twisted-22.1.0/debian/changelog 2022-02-23 19:53:17.000000000 +0000 @@ -1,3 +1,10 @@ +twisted (22.1.0-2ubuntu2) jammy; urgency=medium + + * Import Literal from typing instead of typing_extensions in + a few more places + + -- Graham Inggs Wed, 23 Feb 2022 19:53:17 +0000 + twisted (22.1.0-2ubuntu1) jammy; urgency=medium * Import Literal from typing instead of typing_extensions, diff -Nru twisted-22.1.0/debian/patches/import-Literal-from-typing.patch twisted-22.1.0/debian/patches/import-Literal-from-typing.patch --- twisted-22.1.0/debian/patches/import-Literal-from-typing.patch 2022-02-23 07:17:34.000000000 +0000 +++ twisted-22.1.0/debian/patches/import-Literal-from-typing.patch 2022-02-23 19:12:14.000000000 +0000 @@ -1,5 +1,4 @@ -Description: Revert 'Use typing_extensions to get Literal' - https://github.com/twisted/twisted/commit/6e768da0a10c8ab42a57a1c0fa505ebe2d8bfb30 +Description: Import Literal from typing instead of typing_extensions Author: Graham Inggs Last-Update: 2022-02-23 @@ -13,6 +12,57 @@ twisted-iocpsupport >= 1.0.2, <2; platform_system == "Windows" include_package_data = True zip_safe = False +--- a/src/Twisted.egg-info/requires.txt ++++ b/src/Twisted.egg-info/requires.txt +@@ -4,7 +4,6 @@ + Automat>=0.8.0 + hyperlink>=17.1.1 + attrs>=19.2.0 +-typing_extensions>=3.6.5 + + [:platform_system == "Windows"] + twisted-iocpsupport<2,>=1.0.2 +--- a/src/twisted/protocols/haproxy/_v2parser.py ++++ b/src/twisted/protocols/haproxy/_v2parser.py +@@ -9,12 +9,11 @@ + + import binascii + import struct +-from typing import Callable, Tuple, Type, Union ++from typing import Callable, Literal, Tuple, Type, Union + + from zope.interface import implementer + + from constantly import ValueConstant, Values # type: ignore[import] +-from typing_extensions import Literal + + from twisted.internet import address + from twisted.python import compat +--- a/src/twisted/internet/tcp.py ++++ b/src/twisted/internet/tcp.py +@@ -14,12 +14,11 @@ + import socket + import struct + import sys +-from typing import Callable, ClassVar, List, Optional ++from typing import Callable, ClassVar, List, Optional, Protocol + + from zope.interface import Interface, implementer + + import attr +-import typing_extensions + + from twisted.internet.interfaces import ( + IHalfCloseableProtocol, +@@ -936,7 +935,7 @@ + """ + + +-class _HasClose(typing_extensions.Protocol): ++class _HasClose(Protocol): + def close(self) -> object: + ... + --- a/src/twisted/internet/defer.py +++ b/src/twisted/internet/defer.py @@ -26,6 +26,7 @@ @@ -31,3 +81,20 @@ from twisted.internet.interfaces import IDelayedCall, IReactorTime from twisted.logger import Logger +--- a/src/twisted/internet/address.py ++++ b/src/twisted/internet/address.py +@@ -7,13 +7,12 @@ + + + import os +-from typing import Optional, Union ++from typing import Literal, Optional, Union + from warnings import warn + + from zope.interface import implementer + + import attr +-from typing_extensions import Literal + + from twisted.internet.interfaces import IAddress + from twisted.python.filepath import _asFilesystemBytes, _coerceToFilesystemEncoding