Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
c068ca93
Commit
c068ca93
authored
Oct 25, 2016
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue 25002: Deprecate asyncore/asynchat. Patch by Mariatta.
parent
e3edf707
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
0 deletions
+15
-0
Doc/library/asynchat.rst
Doc/library/asynchat.rst
+3
-0
Doc/library/asyncore.rst
Doc/library/asyncore.rst
+3
-0
Lib/asynchat.py
Lib/asynchat.py
+5
-0
Lib/asyncore.py
Lib/asyncore.py
+4
-0
No files found.
Doc/library/asynchat.rst
View file @
c068ca93
...
...
@@ -9,6 +9,9 @@
**Source code:** :source:`Lib/asynchat.py`
.. deprecated:: 3.6
Please use :mod:`asyncio` instead.
--------------
.. note::
...
...
Doc/library/asyncore.rst
View file @
c068ca93
...
...
@@ -12,6 +12,9 @@
**Source code:** :source:`Lib/asyncore.py`
.. deprecated:: 3.6
Please use :mod:`asyncio` instead.
--------------
.. note::
...
...
Lib/asynchat.py
View file @
c068ca93
...
...
@@ -46,8 +46,13 @@ method) up to the terminator, and then control will be returned to
you - by calling your self.found_terminator() method.
"""
import
asyncore
import
warnings
from
collections
import
deque
warnings
.
warn
(
'asynchat module is deprecated in 3.6. Use asyncio instead.'
,
PendingDeprecationWarning
,
stacklevel
=
2
)
class
async_chat
(
asyncore
.
dispatcher
):
"""This is an abstract class. You must derive from this class, and add
...
...
Lib/asyncore.py
View file @
c068ca93
...
...
@@ -60,6 +60,10 @@ from errno import EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, EINVAL, \
_DISCONNECTED
=
frozenset
({
ECONNRESET
,
ENOTCONN
,
ESHUTDOWN
,
ECONNABORTED
,
EPIPE
,
EBADF
})
warnings
.
warn
(
'asyncore module is deprecated in 3.6. Use asyncio instead.'
,
PendingDeprecationWarning
,
stacklevel
=
2
)
try
:
socket_map
except
NameError
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment