Change socket.error to inherit from IOError rather than being a stand
commit9d58d75a1145ac0e433a6d40a9f792eca933b07b
authorgregory.p.smith <gregory.p.smith@6015fed2-1504-0410-9fe1-9d1591cc4771>
Sun, 9 Sep 2007 23:36:46 +0000 (9 23:36 +0000)
committergregory.p.smith <gregory.p.smith@6015fed2-1504-0410-9fe1-9d1591cc4771>
Sun, 9 Sep 2007 23:36:46 +0000 (9 23:36 +0000)
tree5ea4c9a2b3a71242953d8a0817faa07e07e5b7b8
parent8280ca60d7052fdc7263f7f741cd464f256eb5e4
Change socket.error to inherit from IOError rather than being a stand
alone class.  This addresses the primary concern in

 http://bugs.python.org/issue1706815

python-dev discussion here:

 http://mail.python.org/pipermail/python-dev/2007-July/073749.html

I chose IOError rather than EnvironmentError as the base class since
socket objects are often used as transparent duck typed file objects
in code already prepared to deal with IOError exceptions.

also a minor fix:

 urllib2 - fix a couple places where IOError was raised rather than URLError.
           for better or worse, URLError already inherits from IOError so
           this won't break any existing code.

 test_urllib2net - replace bad ftp urls.

git-svn-id: http://svn.python.org/projects/python/trunk@58067 6015fed2-1504-0410-9fe1-9d1591cc4771
Doc/library/exceptions.rst
Doc/library/socket.rst
Doc/whatsnew/2.6.rst
Lib/test/test_urllib2net.py
Lib/urllib2.py
Modules/socketmodule.c