Roundup Robot devnull@devnull added the comment:
New changeset 5e13e5e6df30 by Antoine Pitrou in branch 'default':
Issue #11127: Raise a TypeError when trying to pickle a socket object.
http://hg.python.org/cpython/rev/5e13e5e6df30
--
nosy: +python-dev
Antoine Pitrou pit...@free.fr added the comment:
Committed the patch with the test, thank you!
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Xuanji Li xua...@gmail.com added the comment:
the correct way is to provide a __getstate__ method for socket right? I have
implemented that in the attached patch.
--
keywords: +patch
nosy: +xuanji
Added file: http://bugs.python.org/file20803/issue11127.patch
Antoine Pitrou pit...@free.fr added the comment:
You also need to a test to Lib/test/test_socket.py.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11127
___
New submission from Antoine Pitrou pit...@free.fr:
Like already done for file objects, sockets should refuse pickling by raising a
TypeError.
--
components: Library (Lib)
messages: 127976
nosy: pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: sockets
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11127
___
___