Issue2366

classification
Title: Subclassing of socket.socket broken
Type: Severity: normal
Components: Library Versions: Jython 2.7
Milestone: Jython 2.7.1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: zyasoft Nosy List: Arfrever, amak, holywen, richmoore, zyasoft
Priority: Keywords:

Created on 2015-06-08.00:33:58 by Arfrever, last changed 2015-09-17.20:31:58 by zyasoft.

Messages
msg10105 (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) Date: 2015-06-08.00:33:57
Subclassing of socket.socket is broken.
I think that it was working before some major changes in socket implementation some months ago.

$ python2.7 -c $'import socket\nclass A(socket.socket): pass'
$ jython2.7 -c $'import socket\nclass A(socket.socket): pass'
Traceback (most recent call last):
  File "<string>", line 2, in <module>
TypeError: Error when calling the metaclass bases
    function() argument 1 must be code, not str
$
msg10110 (view) Author: Jim Baker (zyasoft) Date: 2015-06-10.21:39:05
Hopefully does not require major rewriting to make happen. Although that is my plan in terms of converting the socket module to Java.
msg10165 (view) Author: Richard Moore (richmoore) Date: 2015-07-28.13:03:12
socket.socket is a function, that's why this is failing.
msg10226 (view) Author: Jim Baker (zyasoft) Date: 2015-09-04.04:45:43
Fixed as of https://hg.python.org/jython/rev/b3b82ef080a9
History
Date User Action Args
2015-09-17 20:31:58zyasoftsetstatus: pending -> closed
2015-09-04 04:45:43zyasoftsetstatus: open -> pending
resolution: fixed
messages: + msg10226
2015-07-28 15:05:26zyasoftsetassignee: zyasoft
2015-07-28 13:03:13richmooresetnosy: + richmoore
messages: + msg10165
2015-07-24 13:22:57holywensetnosy: + holywen
2015-06-12 17:03:38amaksetnosy: + amak
2015-06-10 21:39:05zyasoftsetmessages: + msg10110
milestone: Jython 2.7.1
2015-06-08 00:33:58Arfrevercreate