Skip to content

Commit ddbd854

Browse files
committed
Revert "bpo-36889: Merge asyncio streams (pythonGH-13251)"
This reverts commit 23b4b69.
1 parent e8650a4 commit ddbd854

File tree

12 files changed

+420
-2217
lines changed

12 files changed

+420
-2217
lines changed

Lib/asyncio/__init__.py

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# flake8: noqa
44

55
import sys
6-
import warnings
76

87
# This relies on each of the submodules having an __all__ variable.
98
from .base_events import *
@@ -44,40 +43,3 @@
4443
else:
4544
from .unix_events import * # pragma: no cover
4645
__all__ += unix_events.__all__
47-
48-
49-
__all__ += ('StreamReader', 'StreamWriter', 'StreamReaderProtocol') # deprecated
50-
51-
52-
def __getattr__(name):
53-
global StreamReader, StreamWriter, StreamReaderProtocol
54-
if name == 'StreamReader':
55-
warnings.warn("StreamReader is deprecated since Python 3.8 "
56-
"in favor of Stream, and scheduled for removal "
57-
"in Python 3.10",
58-
DeprecationWarning,
59-
stacklevel=2)
60-
from .streams import StreamReader as sr
61-
StreamReader = sr
62-
return StreamReader
63-
if name == 'StreamWriter':
64-
warnings.warn("StreamWriter is deprecated since Python 3.8 "
65-
"in favor of Stream, and scheduled for removal "
66-
"in Python 3.10",
67-
DeprecationWarning,
68-
stacklevel=2)
69-
from .streams import StreamWriter as sw
70-
StreamWriter = sw
71-
return StreamWriter
72-
if name == 'StreamReaderProtocol':
73-
warnings.warn("Using asyncio internal class StreamReaderProtocol "
74-
"is deprecated since Python 3.8 "
75-
" and scheduled for removal "
76-
"in Python 3.10",
77-
DeprecationWarning,
78-
stacklevel=2)
79-
from .streams import StreamReaderProtocol as srp
80-
StreamReaderProtocol = srp
81-
return StreamReaderProtocol
82-
83-
raise AttributeError(f"module {__name__} has no attribute {name}")

0 commit comments

Comments
 (0)