[IronPython] IronPython and CPython httplib and ssl modules produce IOError
loocas at duber.cz
Sun Jun 12 22:57:02 CEST 2011
Hi there, Bill,
thanks a lot for the insight of the issue, I can see
how my programs could error out like that now.
I'll see what I can do for now, but, unfortunately
the fastest and easiest workaround I used was:
which is painful even when looked at. :(
Thanks again, cheers,
[T] +420 602 444 164
[M] info at duber.cz
[A] R.A.Dvorského 601, Praha 10
[A] 10900, Czech Republic, Europe
On 12.6.2011 19:34, Bill Janssen wrote:
> Lukáš Duběda<loocas at duber.cz> wrote:
>> Hi there,
>> I hope someone out there could help me out with this problem.
>> I have a API written in Python (CPython that is) that relies on
>> some of the CPython modules, such as ssl and httplib.
>> The problem is, when I call the API and its methods via IronPython
>> I get IOError: "System.IO.IOException: Unable to write data to the
>> transport connection: Cannot access a disposed object."
> I re-wrote the SSL module for CPython back in 2007, and as part of that
> delved into the socket and httplib modules, further than I wanted to go.
> The httplib module relies on the socket module's not actually closing
> the socket when it gets GC'd. It passes the file descriptor off to a
> callback function, and drops the socket object, assuming that the file
> descriptor will stay open so the callback function can read from it,
> until someone (presumably the callback function) closes it. (This
> apparently was originally done to work around the absence of dup() on
> Windows.) I believe it was re-engineered in py3, but am not sure what
> the status is in py2. I could easily see this leading to something
> similar to what you're seeing.
> Users mailing list
> Users at lists.ironpython.com
More information about the Ironpython-users