[Python-Dev] UTF8 in the PEP branch

2007-10-11 Thread Facundo Batista
There were two tracker issues that I want to solve that implies to touch some PEP text. So, I checked out the PEP branch... svn.python.org/peps/trunk ...and made a make. A lot of files started to fail because of not ASCII characters (the standard Syntax Error of PEP-0263, I'm using Py2.5),

Re: [Python-Dev] possible string formatting bug

2007-10-08 Thread Facundo Batista
2007/10/8, Eli Courtwright [EMAIL PROTECTED]: On Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 this produces the following exception: Traceback (most recent call last): File stdin, line 1, in module TypeError: not enough arguments for format string

Re: [Python-Dev] Python tickets summary

2007-10-02 Thread Facundo Batista
2007/9/19, Ron Adam [EMAIL PROTECTED]: I noticed that there is a background of light blue between marks. That is hard to see on my computer because it is so close to the grey tone. Made it a little darker, now it's easier to look. Also shouldn't the light blue background bar extend all the

[Python-Dev] Backporting Decimal

2007-10-02 Thread Facundo Batista
People: I don't decide myself what to do in this case. The Decimal module appeared in 2.4, and received just slight modifications for 2.5. Since it appeared, a just download and use it version was available for Python 2.3 users. But for 2.6, it was fully renewed. Not only was updated to the

Re: [Python-Dev] Backporting Decimal

2007-10-02 Thread Facundo Batista
2007/10/2, Raymond Hettinger [EMAIL PROTECTED]: Yes! We have guaranteed that spec updates are to be treated as bug fixes and backported. This is especially important in this case because other errors have been fixed and the test cases have grown. Perfect! I'll backport it to 2.5... what

Re: [Python-Dev] Backporting Decimal

2007-10-02 Thread Facundo Batista
2007/10/2, Mark Dickinson [EMAIL PROTECTED]: difficulties. In particular, some cases of three-argument pow that previously worked (giving arguably nonsensical results) will now raise an exception. To be honest, I'd be quite surprised to find that *anyone* was If previously it gave a

Re: [Python-Dev] Decimal news

2007-09-19 Thread Facundo Batista
2007/9/18, Thomas Wouters [EMAIL PROTECTED]: Unfortunately, that's not how it works :-) If you check something into the trunk, it will be merged into Py3k sooner or later. I may ask the original submitter for assistance if it's incredibly hard to figure out the changes, but so far, I only had

Re: [Python-Dev] Decimal news

2007-09-19 Thread Facundo Batista
2007/9/19, Thomas Wouters [EMAIL PROTECTED]: So, how is this handled? Until which moment can I expect that the changes in the trunk are merged to Py3k? Until you hear otherwise :) You can commit py3k-specific changes to the py3k branch, the merges shouldn't lose them. (Of course, mistakes

Re: [Python-Dev] Python tickets summary

2007-09-19 Thread Facundo Batista
2007/9/10, Facundo Batista [EMAIL PROTECTED]: I modified my tool, whichs makes a summary of all the Python tickets (I moved the source where the info is taken from SF to our Roundup). Based on an idea from Dennis Benzinger, now the temporal bars show the moments where each comment was made, so

[Python-Dev] Hash to longs, and Decimal

2007-09-17 Thread Facundo Batista
Hi everybody! In the Tracker Issue... http://bugs.python.org/issue1772851 ... Mark Dickinson came with a patch that alters in a very corner case how the hash is calculated to a long integer. This allows changes in Decimal that lead to a better hashing behaviour for big, big, really big

[Python-Dev] Decimal news

2007-09-14 Thread Facundo Batista
Hi people! After some months, Decimal is now in the trunk again. It's fully updated to the latest Cowlishaw specification, and complying with the latest test cases (from a few days ago, which even take in consideration some feedback from ours). I want to thank so much to Mark Dickinson, who

Re: [Python-Dev] Python tickets summary

2007-09-13 Thread Facundo Batista
2007/9/10, Facundo Batista [EMAIL PROTECTED]: I modified my tool, whichs makes a summary of all the Python tickets (I moved the source where the info is taken from SF to our Roundup). In result, the summary is now, again, updated daily: Taking an idea from Jeff Rush, now there're separate

[Python-Dev] Python tickets summary

2007-09-10 Thread Facundo Batista
People: I modified my tool, whichs makes a summary of all the Python tickets (I moved the source where the info is taken from SF to our Roundup). In result, the summary is now, again, updated daily: http://www.taniquetil.com.ar/facundo/py_tickets.html Enjoy it. Regards, -- .Facundo

[Python-Dev] Order of operations (was: PEP 238 - The // operator should truncate instead of floor)

2007-08-29 Thread Facundo Batista
2007/8/29, Martin v. Löwis [EMAIL PROTECTED]: It would have been good if you had indicated what result you had expected instead. I assume 0; to get 0, you have to write -(3/2)+3/2, or 0-3/2+3/2. Wow, that caught me: -3/2+3/2 -1 0-3/2+3/2 0 I'm not talking about division here, just the

[Python-Dev] Merging a branch, and new docs

2007-08-28 Thread Facundo Batista
Hello everybody. Mark Dickinson helped a lot (*a lot*) with the decimal branch, and we're near to pass the brand new test cases from Cowlishaw. My original idea is to update all the documentation before merging the branch into the trunk, but now that they changed so much, I don't know what to

Re: [Python-Dev] RFC - proposal for urilib. unified module of urlparse, urllib and urllib2

2007-08-21 Thread Facundo Batista
2007/8/19, O.R.Senthil Kumaran [EMAIL PROTECTED]: I am drafting a PEP proposing a module 'urilib', which will be the unified module of urlparse, urllib and urllib2. Great!! a) _all_ functions will include from urlparse,urllib and urllib2. b) overlapping functionality between urllib and

Re: [Python-Dev] NotImplemented comparisons

2007-08-03 Thread Facundo Batista
2007/8/2, Facundo Batista [EMAIL PROTECTED]: Given that you 'should' return an int, doing elsewise has undefined results. I'll fix decimal to always return sane values from __cmp__, :) Done, thanks again everybody! -- .Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http

[Python-Dev] make iter() return an empty iterator?

2007-08-03 Thread Facundo Batista
2007/8/3, Andrew Bennetts [EMAIL PROTECTED]: I don't really think there's much reason to make iter() work. As you say, What bad thing could happen if we make iter() work? If nothing, we should ask ourselves: which is the more intuitive behaviour to expect of iter()? To raise an exception or to

[Python-Dev] NotImplemented comparisons

2007-08-02 Thread Facundo Batista
People: Pablo Hoffman opened this bug: [1764761] Decimal comparison with None fails in Windows. It's not a Decimal problem, see the differente behaviour of this basic test in Linux and Windows: Python 2.5.1 (r251:54863, May 2 2007, 16:56:35) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 class

Re: [Python-Dev] NotImplemented comparisons

2007-08-02 Thread Facundo Batista
2007/8/2, Guido van Rossum [EMAIL PROTECTED]: NonImplemented isn't treated as special when returned by __cmp__(); __cmp__ is not considered a binary operator like __add__. (__lt__ and friends *do* get treated as such -- but instead of __rlt__ we use __gt__, etc.) I understand that is tricky

Re: [Python-Dev] NotImplemented comparisons

2007-08-02 Thread Facundo Batista
2007/8/2, Paul Moore [EMAIL PROTECTED]: A wild guess: c None falls back to checking c.__cmp__(None) 0. This translates to NotImplemented 0, and as the ordering of built in types is implementation dependent, maybe that explains the difference between Windows and Linux? NotImplemented 0

Re: [Python-Dev] NotImplemented comparisons

2007-08-02 Thread Facundo Batista
2007/8/2, Terry Reedy [EMAIL PROTECTED]: Given that you 'should' return an int, doing elsewise has undefined results. I'll fix decimal to always return sane values from __cmp__, :) Thank you all! Regards, -- .Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr:

Re: [Python-Dev] [Python-3000] test_asyncore fails intermittently on Darwin

2007-07-30 Thread Facundo Batista
2007/7/30, Jean-Paul Calderone [EMAIL PROTECTED]: Uh, no, that's basically totally wrong. Details on the ticket. I rejected it. Regards, -- .Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ ___ Python-Dev

Re: [Python-Dev] Failure on assorted buildbots - Address already in use

2007-07-25 Thread Facundo Batista
2007/7/25, Nick Coghlan [EMAIL PROTECTED]: Yep, looks like that did the trick. Facundo, a similar change may help with the GSoC project you're mentoring (the new smtplib tests failed on at least one of the buildbots). Yes! Alan is already working in this (he sent me today a patch, :).

Re: [Python-Dev] Subversion branch merging

2007-07-13 Thread Facundo Batista
2007/7/13, Barry Warsaw [EMAIL PROTECTED]: with merges. This means the end of posting patches because instead what you would do is post the url to a branch that you published some place. It means that branch can be kept up-to-date as its parent branch changes, so a new feature candidate

Re: [Python-Dev] Building Python with CMake

2007-07-13 Thread Facundo Batista
2007/7/13, Alexander Neundorf [EMAIL PROTECTED]: as I wrote in my previous email, I'm currently porting Python to some more unusual platforms, namely to a super computer (http://www.research.ibm.com/bluegene/) and a tiny embedded operating system (http://ecos.sourceware.org), which have more

Re: [Python-Dev] Python 3000 Status Update (Long!)

2007-06-20 Thread Facundo Batista
Guido van Rossum wrote: I've written up a comprehensive status report on Python 3000. Please read: http://www.artima.com/weblogs/viewpost.jsp?thread=208549 One doubt: In Miscellaneus you say: Ordering comparisons (, =, , =) will raise TypeError by default instead of returning arbitrary

[Python-Dev] Santa Fe Python Day report

2007-06-11 Thread Facundo Batista
It was very succesful, around +300 people assisted, and there were a lot of interesting talks (two introductory talks, Turbogears, PyWeek, Zope 3, security, creating 3D games, Plone, automatic security testings, concurrency, and programming the OLPC). I want to thanks the PSF for the received

[Python-Dev] Timeout in urllib2.urlopen

2007-06-06 Thread Facundo Batista
[EMAIL PROTECTED]:~/devel/reps/python/trunk$ ./python Python 2.6a0 (trunk, Jun 6 2007, 12:32:23) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 Type help, copyright, credits or license for more information. import urllib2 u = urllib2.urlopen(http://www.taniquetil.com.ar/plog;)

Re: [Python-Dev] python/trunk/Lib/test/test_urllib.py (for ftpwrapper)

2007-05-28 Thread Facundo Batista
ocean wrote: After I did this change, most errors were gone. Index: Lib/urllib.py === --- Lib/urllib.py (revision 55584) +++ Lib/urllib.py (working copy) @@ -833,7 +833,7 @@ self.busy = 0 self.ftp =

Re: [Python-Dev] New operations in Decimal

2007-05-14 Thread Facundo Batista
Tim Peters wrote: I'm with Raymond on this one, especially given the triviality of implementing the revised spec's new logical operations. Exactly. I already implemented part of it, and took less than read this thread, ;). The cost of having it is lines of code in decimal.py. The benefit is

Re: [Python-Dev] Draft PEP: Maintenance of Python Releases

2007-05-14 Thread Facundo Batista
Martin v. Löwis wrote: I don't understand the point of a security release made up to a year after commit, especially in view of the first quoted paragraph. The objective is to reduce load for the release manager. Any kind of release that is worth anything takes several hours to produce, in

Re: [Python-Dev] New operations in Decimal

2007-05-01 Thread Facundo Batista
Ronald Oussoren wrote: - and (and), or (or), xor (xor) [CD]: Takes two logical operands, the result is the logical operation applied between each digit. and and or are keywords, you can't have methods with those names: You're right. I'll name them logical_and, logical_or, and logical_xor.

Re: [Python-Dev] New operations in Decimal

2007-05-01 Thread Facundo Batista
Nick Maclaren wrote: Am I losing my marbles, or is this a proposal to add the logical operations to FLOATING-POINT? Sort of. This is a proposal to keep compliant with the General Decimal Arithmetic Specification, as we promised. http://www2.hursley.ibm.com/decimal/ Regards, -- .

[Python-Dev] New operations in Decimal

2007-04-27 Thread Facundo Batista
The following are the new operations in the decimal module that we'll be available according to the last published specification. I wrote here the proposed name by me, the original name between parenthesis, where it will be located between square brackets (C for context and D for the decimal

Re: [Python-Dev] whitespace normalization

2007-04-25 Thread Facundo Batista
Georg Brandl wrote: Of course, we could also setup a svn pre-commit hook that rejects trailing whitespace :- I was about to suggest a mail to python-checkins when a bad whitespace is detected, but had no idea that a pre-commit check existed in SVN. It'd be great if the system won't let you

[Python-Dev] New decimal branch - news and status

2007-04-20 Thread Facundo Batista
Ok, I cut a branch in svn to work with decimal.py (decimal-branch). I commited the work I made during the last weeks. Right now, the state is: - All the operations that already existed pass ok the new tests (except ``power``). For this, I fixed some bugs, reordered some code (without changing

Re: [Python-Dev] Changes to decimal.py

2007-04-17 Thread Facundo Batista
Tim Peters wrote: can wait a couple months, I'd be happy to own it. A possible saving grace for ln() is that while the mathematical function is one-to-one, I'm working right now in making the old operation to pass the new tests ok. Soon I'll cut a branch to work publicly on this (good idea

Re: [Python-Dev] new subscriber looking for grunt work

2007-04-17 Thread Facundo Batista
Martin v. Löwis wrote: an activity that is always worthwhile is bug and patch review. Pick a patch or a bug report that hasn't seen any feedback (there are, unfortunately, plenty of them), and try to analyse it. Sergio, welcome. As Martin said, bugs and patch revision is a fruitful activity,

Re: [Python-Dev] HTTP responses and errors

2007-04-10 Thread Facundo Batista
Facundo Batista wrote: Martin v. Löwis wrote: ... think it should treat all 2xx responses as success. Callers can then still check the response code themselves if they need to. The same I think. If nobody has a conflic with this decission, I'll fix this. Nobody raised any objection, I'll

Re: [Python-Dev] Changes to decimal.py

2007-04-10 Thread Facundo Batista
Raymond Hettinger wrote: As promised in the decimal.py header, the spec updates should all be considered as bugs and backported at some point after they are fully tested and we're happy with them all around. Also, as promised, the module should continue to run on Py2.3. Ok. So far, I'm

Re: [Python-Dev] About SSL tests

2007-04-04 Thread Facundo Batista
Martin v. Löwis wrote: I don't like it. I would rather rely on the private _handle member. If that ever gets changed, the test fails. I made it using _handle. Right now, we have test_socket_ssl.py using a local openssl and passing all the tests in all the buildbots, :D Thanks for your (you

Re: [Python-Dev] About SSL tests

2007-04-03 Thread Facundo Batista
Martin v. Löwis wrote: On Win32, you also have subprocess.TerminateProcess, if you have the subprocess module in the first place. The problem of TerminateProcess is that I need the handle of the process. I don't like the idea of rely on the private _handle and do: process =

Re: [Python-Dev] About SSL tests

2007-04-03 Thread Facundo Batista
Eric V. Smith wrote: Would it not be better to put a platform-independent version of this into subprocess, so that this code doesn't have to be duplicated all over the place? Maybe a method on a Popen object called terminate()? Yes. But I'm not up to that task. Really don't know how to

Re: [Python-Dev] About SSL tests

2007-04-03 Thread Facundo Batista
Eric V. Smith wrote: I'd be willing to look at adding it, if the group thinks it's the right thing to do. +1 to have the functionality of kill the process you started in subprocess. -- . Facundo . Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/

Re: [Python-Dev] About SSL tests

2007-04-03 Thread Facundo Batista
Raghuram Devarakonda wrote: Q end the current SSL connection and exit. Can a command Q be sent to the server once testing is complete? For openssl to recognize your Q, you need to have a connection active. So, we need a better way to kill the external openssl in the tests (don't

Re: [Python-Dev] test_socketserver flakey?

2007-04-02 Thread Facundo Batista
Guido van Rossum wrote: The test_socketserver unittest seems to be failing occasionally for me. (Svn HEAD, Ubuntu dapper.) I have Ubuntu Edgy, will take a look at it... Regards, -- . Facundo . Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/

Re: [Python-Dev] About SSL tests

2007-04-02 Thread Facundo Batista
Jean-Paul Calderone wrote: If the openssl binary is available, when the test starts, launch it in a child process, talk to it for the test, then kill it when the test is done. Ok, I have a demo of this. Right now, I face this problem. I launch openssl through subprocess, but I do *not*

Re: [Python-Dev] Get 2.5 changes in now, branch will be frozen soon

2007-03-30 Thread Facundo Batista
Neal Norwitz wrote: This is a reminder that the 2.5 branch will be frozen early next week. If there are changes you want to get into 2.5.1, they should be checked in within a few days. Be conservative! There will be a There's this bug (which includes the patch): #1688393. It's ok, solves

Re: [Python-Dev] About SSL tests

2007-03-30 Thread Facundo Batista
Jean-Paul Calderone wrote: If the openssl binary is available, when the test starts, launch it in a child process, talk to it for the test, then kill it when the test is done. Ok. I'll try to do something like this. I'm assigning the bug to myself. Regards, -- . Facundo . Blog:

[Python-Dev] About SSL tests

2007-03-28 Thread Facundo Batista
There's this bug (#451607) about the needing of tests for socket SSL... Last interesting update in the tracker is five years ago, and since a lot of work has been done in test_socket_ssl.py (Brett, Neal, Tim, George Brandl). Do you think is useful to leave this bug opened? Regards, -- .

Re: [Python-Dev] About SSL tests

2007-03-28 Thread Facundo Batista
Jean-Paul Calderone wrote: Take a look at openssl s_server. This is still a pretty terrible way to test the SSL functionality, but it's loads better than connecting to a site on the public internet. How would you deal with the deployment and maintenance of this server in all buildbot's

Re: [Python-Dev] HTTP responses and errors

2007-03-27 Thread Facundo Batista
Martin v. Löwis wrote: Why only 200 and 206? This kind of question can often be answered through the revision history. If you do 'svn annotate', you see that the line testing ... So it seems that it only tests for 200 and 206 because the experiments never produced a need for anything

Re: [Python-Dev] HTTP responses and errors

2007-03-27 Thread Facundo Batista
Martin v. Löwis wrote: Who am I to judge whether a fix will break much code? Personally, I Sorry, this was an error. I thought you as in plural (in spanish there're two different words for third person of plural and singular), and wrote it as is; now, re-reading the parragraph, it's confusing.

[Python-Dev] [ 1688393 ] sock.recvfrom(-24) crashes

2007-03-27 Thread Facundo Batista
I applied the patch in this bug to the trunk. As it's a bug, and a very nasty one (it causes an ugly crash), please consider backporting it to 2.5.x. If you apply this to 2.5.x, just close the bug. Regards, -- . Facundo . Blog: http://www.taniquetil.com.ar/plog/ PyAr:

[Python-Dev] HTTP responses and errors

2007-03-25 Thread Facundo Batista
urllib2.py, after receiving an HTTP response, decides if it was an error and raises an Exception, or it just returns the info. For example, you make ``urllib2.urlopen(http://www.google.com;)``. If you receive 200, it's ok; if you receive 500, you get an exception raised. How it decides? Function

Re: [Python-Dev] Final (final?) update to patch about socket timeout...

2007-03-24 Thread Facundo Batista
Facundo Batista wrote: Tests failed because of this commit *only* in alpha Tru64 5.1 trunk buildbot. Also it fails in g4 osx.4 trunk. In all the other platforms it works ok. As usual, human error. Now I used the already present threading custom testing architecture in test_socket.py

[Python-Dev] Final (final?) update to patch about socket timeout...

2007-03-23 Thread Facundo Batista
...in socket.py and httplib.py, with tests and docs. The patch is #1676823. Basically what I did now is: - Just put a timeout default to None. If None, skip settimeout() call. - Copy the exceptions behaviour that we have actually in the higher level libraries, to be sure we aren't breaking

Re: [Python-Dev] Final (final?) update to patch about socket timeout...

2007-03-23 Thread Facundo Batista
Guido van Rossum wrote: Looks good. I forget -- can you check this in yourself? If so, do it! If not, let me know and I'll do it for you. Thanks for doing this! Done. You're welcome. I'll start now with the patch about the *other* higher level libraries, :) Regards, -- . Facundo . Blog:

Re: [Python-Dev] Final (final?) update to patch about socket timeout...

2007-03-23 Thread Facundo Batista
Facundo Batista wrote: Guido van Rossum wrote: Looks good. I forget -- can you check this in yourself? If so, do it! If not, let me know and I'll do it for you. Thanks for doing this! Done. You're welcome. Tests failed because of this commit *only* in alpha Tru64 5.1 trunk buildbot

Re: [Python-Dev] Final (final?) update to patch about socket timeout...

2007-03-23 Thread Facundo Batista
Facundo Batista wrote: Tests failed because of this commit *only* in alpha Tru64 5.1 trunk buildbot. Also it fails in g4 osx.4 trunk. In all the other platforms it works ok. The test that failed is one that does: sock = socket.create_connection((HOST, PORT), timeout=10

Re: [Python-Dev] Patchs and bugs resume

2007-03-22 Thread Facundo Batista
Martin v. Löwis wrote: When you do, make sure you take a look at roundup's search facilities. Roundup keeps a 'last activity' field, on which you can search and sort, and a 'creation date' field (likewise). Could you please point me to documentation about the new tracker? I want to study the

Re: [Python-Dev] Adding timeout to socket.py and httplib.py - Updated

2007-03-22 Thread Facundo Batista
Georg Brandl wrote: There are others who can judge the new API and implementation better than me, but I can review the formal issues as soon as the API is accepted. The API is accepted now, I proposed it and Guido say ok 24hs ago, ;) I'll update the patch to that API, and let you know through

Re: [Python-Dev] I vote to reject: Adding timeout to socket.py and httplib.py.

2007-03-21 Thread Facundo Batista
Alan Kennedy wrote: 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 users. I vote to reject this patch. Well, you can vote to name it _create_connection(), if your

Re: [Python-Dev] I vote to reject: Adding timeout to socket.py and httplib.py.

2007-03-21 Thread Facundo Batista
Alan Kennedy wrote: 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? The voting is on a, b or c. The patch will be updated after I know what python-dev want to

[Python-Dev] Adding timeout to socket.py and httplib.py - Updated

2007-03-21 Thread Facundo Batista
I updated the patch #1676823, reflecting discussion here: - The function name changed, now it's _create_connection(). Its signature also changed: now, timeout is mandatorily named. - HTTPConnection has the posibility to call timeout with a number, and also with None. In both cases, it updates

Re: [Python-Dev] I vote to reject: Adding timeout to socket.pyand httplib.py.

2007-03-21 Thread Facundo Batista
Guido van Rossum wrote: (like httplib before the patch), I am personally in favor of going back to defaulting timeout to None and skipping the settimeout() call in _create_connection() if timeout is None. IMO the use case where there is a global timeout set and one library wants to override

Re: [Python-Dev] I vote to reject: Adding timeout to socket.pyand httplib.py.

2007-03-21 Thread Facundo Batista
Guido van Rossum wrote: This is why I proposed to *get rid of* the distinction between timeout=None and timeout not specified. Let an unspecified timeout default to None, and if timeout is None, skip the settimeout() call. +1 I'll abuse of your dictatorship, and let's see if we can finally

Re: [Python-Dev] Adding timeout to socket.py and httplib.py

2007-03-20 Thread Facundo Batista
On March 15, Georg Brandl wrote: I'll review it tomorrow. Do you have any news about this? Regards, -- . Facundo . Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Adding timeout to socket.py and httplib.py

2007-03-20 Thread Facundo Batista
Alan Kennedy wrote: I see that your updated socket.connect() method takes a timeout parameter, which defaults to None if not present, e.g. I did NOT update a connect() method. I created a connect() function, in the module socket.py (there's also a connect() method in the socket object, but I

Re: [Python-Dev] Adding timeout to socket.py and httplib.py

2007-03-20 Thread Facundo Batista
Alan Kennedy wrote: Sorry, my mistake. No problem. So, a question I would ask is: Is connect the right name for that function? ... Perhaps a better name might be create_connected_client_socket, or something equally descriptive? Guido proposed connect_with_timeout. I don't like your

Re: [Python-Dev] Adding timeout to socket.py and httplib.py

2007-03-20 Thread Facundo Batista
Alan Kennedy wrote: [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 Ok. create_connection, then. Ah, but it's too late by the time the

[Python-Dev] Patchs and bugs resume

2007-03-20 Thread Facundo Batista
People: At the beginning of March, there was a thread in this list about patchs and bugs that teorically weren't checked out. From that discussion, I asked myself: How can I know the temporal location of a patch/bug?. Are there a lot of old patchs/bugs? Those that are old, don't have any update

Re: [Python-Dev] Adding timeout to socket.py and httplib.py

2007-03-20 Thread Facundo Batista
Steven Bethard wrote: is supposed to be a timeout. The modified version:: newsock = socket.create_connection(HOST, PORT, timeout=None) Warning. The correct function signature is create_connection(address[, timeout=None]) where address is a tuple (HOST, PORT). BTW, how can I

Re: [Python-Dev] Adding timeout to socket.py and httplib.py

2007-03-20 Thread Facundo Batista
Josiah Carlson wrote: sentinel = object() def connect(HOST, PORT, timeout=sentinel): ... if timeout is not sentinel: sock.settimeout(timeout) ... A keyword argument via **kwargs is also fine. I have no preference. I do. The way you showed here, I'm not restricting

Re: [Python-Dev] Adding timeout to socket.py and httplib.py

2007-03-20 Thread Facundo Batista
Josiah Carlson wrote: restrict what the user could pass as a value to timeout. It requires that you pass timeout explicitly, but that's a (relatively inconsequential) API decision. This is exactly the point. It's an API decision, that you must communicate to the user, he/she must read it and

Re: [Python-Dev] Patchs and bugs resume

2007-03-20 Thread Facundo Batista
Brett Cannon wrote: That's some interesting stuff. Took me a second to realize that the temporal column's total length is the time range from the opening of the oldest bug to the latest comment made on any bug and that the blue bar is where within that time frame the bug was opened and the

Re: [Python-Dev] Adding timeout to socket.py and httplib.py

2007-03-20 Thread Facundo Batista
Alan Kennedy wrote: So is that address = host, port = 80? Or is it address = (host, port), timeout=80? The latter, as is in the rest of Python... See your point, you say it's less error prone to make timeout mandatory. I really don't care, so I'll take your advice... -- . Facundo .

Re: [Python-Dev] Adding timeout to socket.py and httplib.py

2007-03-20 Thread Facundo Batista
Alan Kennedy wrote: - Explicitly check that the address passed is a tuple of (string, integer) It's more probable that a use pass a list of two values, that a host of two letters as you suggested above... - To raise an exception explaining the parameter expectation when it is not met

Re: [Python-Dev] pypy's interpreter/highlevel backend features

2007-03-15 Thread Facundo Batista
holger krekel wrote: Hello Python-dev! Hello Holger! We'd be very happy about feedback and opinions/questions (preferably until Monday, 19th March) http://codespeak.net/pypy/extradoc/eu-report/D12.1_H-L-Backends_and_Feature_Prototypes-interim-2007-03-12.pdf It seems quite

Re: [Python-Dev] Status of thread cancellation

2007-03-15 Thread Facundo Batista
Martin v. Löwis wrote: asynchronous exceptions in a sensible way. I have to research somewhat more, but I think the standard solution to the problem in operating system (i.e. disabling interrupts at certain points, explicitly due to code or implicitly as a result of entering the interrupt

Re: [Python-Dev] Adding timeout to socket.py and httplib.py

2007-03-15 Thread Facundo Batista
Facundo Batista wrote: I studied Skip patch, and I think he is in good direction: add a NetworkConnection object to socket.py, and then use it from the other modules. As of discussion in the patch tracker, this class is now a function in socket.py. This function connect() does

[Python-Dev] [ 1673007 ] urllib2 requests history + HEAD support

2007-03-12 Thread Facundo Batista
This patch was posted by koder_ua. I think that Request must have a request type parameters, so people can send HEAD requests easily. But it seems to me that keeping a request history in the module is bad, because it can easily grow up to thousands and explode (a.k.a. consume too much memory).

Re: [Python-Dev] Encouraging developers

2007-03-08 Thread Facundo Batista
Martin v. Löwis wrote: - How can I know if a patch is still open? Easy: if it's marked as Open. - I found a problem, and know how to fix it, but what else need to do? Go to www.python.org, then CORE DEVELOPMENT, then Patch submission. - Found a problem in the docs, for this I must submit

[Python-Dev] Adding timeout to socket.py and httplib.py

2007-03-08 Thread Facundo Batista
I studied Skip patch, and I think he is in good direction: add a NetworkConnection object to socket.py, and then use it from the other modules. This NetworkConnection basically does what all the other modules do once and again, so no mistery about it (basically calls getaddrinfo over the

Re: [Python-Dev] Encouraging developers

2007-03-07 Thread Facundo Batista
A.M. Kuchling wrote: FWIW, I have a related perception that we aren't getting new core developers. These two problems are probably related: people don't get patches processed and don't become core developers, and we don't have enough core developers to process patches in a timely way. And so

Re: [Python-Dev] Adding socket timeout to urllib2

2007-03-06 Thread Facundo Batista
Guido van Rossum wrote: - I'll modify urlopen for it to accept a socket_timeout parameter, default to None I'd call it timeout. There can't really be much ambiguity can there? Yes and no. For example, if I do a ``urllib2.urlopen(ftp://ftp.myhome.com.ar/blah.txt;, timeout=10)``, the timeout

Re: [Python-Dev] Python-3000 upgrade path

2007-03-05 Thread Facundo Batista
Thomas Wouters wrote: developers and people who develop their own software. I would like to hear from people who have concrete doubts about this upgrade path. I don't mean Disclaimer: I'm not involved in Py3k, and not even tried it once. And don't know the details of the tool to transform Py2

[Python-Dev] Adding socket timeout to urllib2

2007-03-05 Thread Facundo Batista
I studied which modifications I need to make into urllib2 to support a socket timeout. - I'll modify urlopen for it to accept a socket_timeout parameter, default to None - Request will also accept a socket_timeout parameter, default to None. It will keep it in a socket_timeout attribute, so it

[Python-Dev] About code comments policy (and Handler order in urllib2)

2007-03-05 Thread Facundo Batista
One question and one answer (this is a balanced post, :p). The question is what to do when we found a question in a code. Reading urllib2 I found: # XXX why does self.handlers need to be sorted? I found the answer, so I deleted that line, and added a comment in that place just to clarify.

Re: [Python-Dev] Adding timeout option to httplib...connect()

2007-02-27 Thread Facundo Batista
[EMAIL PROTECTED] wrote: Guido, I looked at urllib2 and quickly gave up. I have no idea how that code works (where is a lower level library's connection object instantiated, for example?). I presume with timeouts in the lower level libraries someone who knows how urllib2 works will be able

Re: [Python-Dev] Floor division

2007-01-23 Thread Facundo Batista
Tim Peters wrote: Which Spec? For example, floor division isn't mentioned at all in IBM's proposed decimal standard, or in PEP 327, or in the Python Oops, you're right. My fault, sorry. Library Reference section on `decimal`. It's an artifact of trying to extend Python's integer mod

Re: [Python-Dev] Floor division

2007-01-22 Thread Facundo Batista
Guido van Rossum wrote: The ints aren't really embedded in Decimal, so we don't have to do that there (but we could). -0. If we can't achieve it without disturbing the rest of Python, I'll try as much as possible to keep what the Spec proposes. Regards, -- . Facundo . Blog:

Re: [Python-Dev] Code working in both 2.x and 3.X

2007-01-12 Thread Facundo Batista
Ron Adam wrote: I thinking that the 3.0.X version be considered a try it out (alpha) release to generate plenty of feed back, and the 3.1.X version be the first version meant for actual development use. +1 for this approach. I think it's very clear, and everybody will understand it

Re: [Python-Dev] Nondeterministic long-to-float coercion

2006-10-19 Thread Facundo Batista
2006/10/19, Raymond Hettinger [EMAIL PROTECTED]: My colleague got an odd result today that is reproducible on his build of Python (RedHat's distribution of Py2.4.2) but not any other builds ... set(-194 * (1/100.0) for i in range(1)) set([-19400.0, -193995904.0,

Re: [Python-Dev] Strategy for converting the decimal module to C

2006-07-26 Thread Facundo Batista
2006/7/26, Raymond Hettinger [EMAIL PROTECTED]: Greg Ewing And all of this is getting rather far away from where we started, which was simply instrumenting a piece of code to count floating point exceptions. I'm thinking of adding a note to the Py2.5 docs that the counting feature is

Re: [Python-Dev] Time-out in URL Open

2006-07-05 Thread Facundo Batista
2006/7/4, Guido van Rossum [EMAIL PROTECTED]: This affect all the sockets. So, assuming your app is single-threaded, set the timeout, call urlopen(), and reset the timeout to None. No, it's multithreaded, :D And I hit the problem when servicing information with a web service

Re: [Python-Dev] Time-out in URL Open

2006-07-04 Thread Facundo Batista
2006/7/3, Guido van Rossum [EMAIL PROTECTED]: To fake things like this, socket.setdefaulttimeout() was added, though I don't know if it actually works. Have you tried that? This affect all the sockets. And I hit the problem when servicing information with a web service (TCPServer), and I need

[Python-Dev] Time-out in URL Open

2006-07-03 Thread Facundo Batista
I need a timeout in urlopen, just to be able to make: urllib2.urlopen(http://no.host.org;, timeout=2) This is actually not possible, but I'll make it work. I want to know, please, if this is useful in general, for me to post a patch in SF. Regards, -- .Facundo Blog:

Re: [Python-Dev] Numerical robustness, IEEE etc.

2006-06-20 Thread Facundo Batista
), but it was NOT designed for speed. BTW, prove me Decimal is not fast enough, ;) Mateusz Rucowicz has taken up the challenge for Google's Summer of Code (mentored by Facundo Batista, the original author of PEP 327 and the decimal module). I've cc'ed Facundo, so hopefully he will see this thread

<    1   2   3   4   >