[This message will not be threaded properly since I wasn't subscribed
at the time the original was sent]
[John]
> What I found in the archive is this thread (sorry for the
> non-python.org URL):
>
> http://www.gossamer-threads.com/lists/python/dev/555039?do=post_view_threaded#555039
>
> In that di
[Alan]
>>I want jython to use the same errno symbolic constants as cpython, to
>>ease portability of code.
[Martin]
> That will be very difficult to achieve, as Python is (deliberately)
> not even consistent across systems. Instead, it reports what the
> platform reports, so you should do the sam
Dear all,
I'm seeking enlightenment on the error codes returned by the
socket.getaddrinfo() function.
Consider the following on python 2.5 on Windows
>>> import urllib
>>> urllib.urlopen("http://nonexistent";)
[snip traceback]
IOError: [Errno socket error] (11001, 'getaddrinfo failed')
So
Dear all,
I am writing to seek information about the socket.fileno() method, and
opinions on how best to implement it on jython.
On cpython, socket.fileno() returns a file descriptor, i.e. an integer
index into an array of file objects. This integer is then passed to
select.select and select.p
[Alan]
>> - Explicitly check that the address passed is a tuple of (string, integer)
[Facundo]
> In the code, I'll just make "host, port = address", I don't think it
> will be a problem at all. Remember that this function primary use is for
> higher level libraries, and that "address" in socket en
[Facundo]
> Talk is cheap.
I'm sorry if you see my attempts to review your patch as "cheap talk".
Maybe I should have just kept my opinion to myself.
You'll get your chance to return the favour when I check in my
upcoming 1000+ line change to jython 2.3 to bring the jython socket,
select and asyn
[Greg Ewing]
> or
>
> d) Put it in another module
>
> Is it time for a sockettools module, maybe?
+1!
Alan.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/ma
[Josiah]
> In regards to 'there is no way to
> create a blocking socket this way', Alan is off his rocker.
I am not off my rocker.
And I never wrote the words you place in quotes (except in relation to
an earlier defect in the patch where the timeout=None value was
ignored).
What I clearly state
[Facundo]
> Talk is cheap.
I'm sorry if you see my attempts to review your patch as "cheap talk".
Maybe I should have just kept my opinion to myself.
You'll get your chance to return the favour when I check in my
upcoming 1000+ line change to jython 2.3 to bring the jython socket,
select and asyn
[Facundo]
> Talk is cheap.
I'm sorry if you see my attempts to review your patch as "cheap talk".
Maybe I should have just kept my opinion to myself.
You'll get your chance to return the favour when I check in my
upcoming 1000+ line change to jython 2.3 to bring the jython socket,
select and asyn
[Facundo]
> Voting is open, ;)
So what are we voting on exactly? The patch as it currently is? The
patch has not been updated to reflect recent discussions on the list.
Will the patch be updated before the vote?
I have one more issue with the patch.
I think that the exception handling in the fun
[Facundo Batista]
> Remember that this function primary use is for
> higher level libraries
Yes, I see that clearly now.
But remember that by adding a new function to the socket module to
support httplib et al, you are also adding a function to the socket
module that will be used directly by end
[Josiah]
> Error-wise, I agree that it would be better to pass timeout explicitly
> with a keyword, but generally users will notice their mistake if they
> try to do create_connection(host, port) by ValueError("tuple expected as
> first argument, got str instead") Is it better than
> TypeError("cre
[Facundo]
> Letting "timeout" be positional or named, it's just less error prone.
> So, if I can make it this way, it's what I prefer, :)
So, if I want a timeout of, say, 80 seconds, I issue a call like this
new_socket = socket.create_connection(address, 80)
So is that address = host, port = 80?
[Josiah]
> But now the result could be either an error code OR a socket. One of
> the reasons to provide a timeout for the create_connection call, if I
> understand correctly, is to handle cases for which you don't get a
> response back in sufficient time.
AFAICT, that's the only reason. It's not
[Facundo]
> So, I have two modifications to make to the patch:
>
> - change the name to "create_connection"
> - make timeout obligatory named
I was going to suggest a third change: for orthogonality with the API
for socket objects, add a blocking parameter as well, i.e.
def create_connection(addr
[Facundo]
> But, I recognize that maybe it's [connect] not the best name. What about
> "create_connection"?
I have no strong feelings about it, other than to say it should not be
"connect". How about
* connect_to_server()
* open_connection()
* open_client_connection()
There's no need to inclu
[Alan Kennedy]
>> I see that your updated socket.connect() method takes a timeout
>> parameter, which defaults to None if not present, e.g.
[Facundo Batista]
> I did NOT update a connect() method. I created a connect() function, in
> the module socket.py (there's also a
[Facundo Batista]
> Do you have any news about this?
Re: Patch 1676823
http://sourceforge.net/tracker/index.php?func=detail&aid=1676823&group_id=5470&atid=305470
Since I've just written a lot of socket stuff for jython, I thought
I'd have a look at the patch.
I like the idea of adding better soc
Thanks Josiah and Neal, you were right.
I am running the code on Windows, Server 2003. I should have mentioned
that at the start.
When I change the hostname from "" to "localhost", the code works
exactly as expected.
It's odd that this behaviour exists, only on Windows.
The jython code that I'm
Dear all,
I'm working on a select implementation for jython (in combination with
non-blocking sockets), and a set of unit tests for same.
I decided to run all of the non-blocking unit tests, both server and
client side, in the same thread; seems to be a reasonable thing to do.
After all, avoiding
21 matches
Mail list logo