mirror of
https://github.com/python/cpython.git
synced 2025-11-26 21:33:10 +00:00
Issue #10180: Pickling file objects is now explicitly forbidden, since
unpickling them produced nonsensical results.
This commit is contained in:
parent
4a5f9677f3
commit
243757eb79
6 changed files with 57 additions and 0 deletions
|
|
@ -747,6 +747,10 @@ class _BufferedIOMixin(BufferedIOBase):
|
|||
def mode(self):
|
||||
return self.raw.mode
|
||||
|
||||
def __getstate__(self):
|
||||
raise TypeError("can not serialize a '{0}' object"
|
||||
.format(self.__class__.__name__))
|
||||
|
||||
def __repr__(self):
|
||||
clsname = self.__class__.__name__
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue