mirror of
https://github.com/python/cpython.git
synced 2025-10-08 08:01:55 +00:00
Issue #11127: Raise a TypeError when trying to pickle a socket object.
This commit is contained in:
parent
b938bcd211
commit
6d58d64919
3 changed files with 12 additions and 0 deletions
|
@ -112,6 +112,9 @@ class socket(_socket.socket):
|
|||
s[7:])
|
||||
return s
|
||||
|
||||
def __getstate__(self):
|
||||
raise TypeError("Cannot serialize socket object")
|
||||
|
||||
def dup(self):
|
||||
"""dup() -> socket object
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue