[Python-Dev] Deprecating 2.2 old bugs

2005-03-21 Thread Facundo Batista
Going on with the old bugs checking, here are the results for 2.2. When I'll finish this will be put in an informational PEP. When I verified the bug, I filled two fields: - Summary: the same subject as in SF - Group: the bug's group at verifying time. - Bug #: the bug number - Verified: is the

[Python-Dev] Deprecating 2.2.1 old bugs

2005-03-22 Thread Facundo Batista
Going on with the old bugs checking, here are the results for 2.2.1. When I'll finish, this will be put in an informational PEP. When I verified the bug, I filled two fields: - Summary: the same subject as in SF - Group: the bug's group at verifying time. - Bug #: the bug number - Verified: is

Re: [Python-Dev] anonymous blocks

2005-04-19 Thread Facundo Batista
On 4/19/05, Guido van Rossum [EMAIL PROTECTED] wrote: I'm still not sure how this is particularly solving a pressing problem that isn't solved by putting the function definitions in front of the Well. As to what I've read in my short python experience, people wants to change the language

Re: [Python-Dev] Re: Caching objects in memory

2005-04-25 Thread Facundo Batista
On 4/22/05, Fredrik Lundh [EMAIL PROTECTED] wrote: Is there a document that details which objects are cached in memory (to not create the same object multiple times, for performance)? why do you think you need to know? I was in my second class of the Python workshop I'm giving here in one

Re: [Python-Dev] Re: Caching objects in memory

2005-04-26 Thread Facundo Batista
On 4/25/05, Guido van Rossum [EMAIL PROTECTED] wrote: I was in my second class of the Python workshop I'm giving here in one Argentine University, and I was explaining how to think using name/object and not variable/value. Using id() for being pedagogic about the objects, the kids saw

Re: [Python-Dev] Re: Caching objects in memory

2005-04-26 Thread Facundo Batista
On 4/26/05, Greg Ewing [EMAIL PROTECTED] wrote: Also, string literals that resemble Python identifiers are often interned, although this is not guaranteed. And this only applies to literals, not strings constructed dynamically by the program (unless you explicitly apply intern() to them).

Re: [Python-Dev] Adventures with Decimal

2005-05-19 Thread Facundo Batista
On 5/18/05, Raymond Hettinger [EMAIL PROTECTED] wrote: from decimal import getcontext context = getcontext() x = context.create_decimal('3.104') y = context.create_decimal('2.104') z = context.create_decimal('0.000') context.prec = 3 x + y Decimal(5.21) x + z + y Decimal(5.20)

Re: [Python-Dev] Adventures with Decimal

2005-05-20 Thread Facundo Batista
On 5/20/05, Michael Chermside [EMAIL PROTECTED] wrote: In other words, Java's behavior is much closer to the current behavior of Python, at least in terms of features that are user-visible. The default behavior in Java is to have infinite precision unless a context is supplied that says

Re: [Python-Dev] Decimal FAQ

2005-05-24 Thread Facundo Batista
On 5/22/05, Raymond Hettinger [EMAIL PROTECTED] wrote: Some of the private email I've received indicates a need for a decimal FAQ that would shorten the module's learning curve. Nice FAQ, but where we should put it? It's kinda for advanced Decimal users... A. Some users prefer to

[Python-Dev] Deprecating old bugs, now from 2.2.2

2005-05-30 Thread Facundo Batista
Going on with the old bugs checking, here are the results for 2.2.2 (and one from 2.2.1). When I'll finish this will be put in an informational PEP. When I verified the bug, I filled two fields: - Summary: the same subject as in SF - Group: the bug's group at verifying time. - Bug #: the bug

Re: [Python-Dev] Deprecating old bugs, now from 2.2.2

2005-05-30 Thread Facundo Batista
On 5/30/05, Brett C. [EMAIL PROTECTED] wrote: Facundo Batista wrote: Going on with the old bugs checking, here are the results for 2.2.2 (and one from 2.2.1). When I'll finish this will be put in an informational PEP. Great work, Facundo! Now I feel lazy. =) C'mon! Just a well used

Re: [Python-Dev] Old Python version categories in Bug Tracker

2005-05-30 Thread Facundo Batista
On 5/30/05, Fred L. Drake, Jr. [EMAIL PROTECTED] wrote: While we can't (and shouldn't) delete categories, we can change the text used to describe them. So Python 2.2.2 can become Python 2.2.2 (unmaintained). Whether this is desirable or not, I'm not sure. +1 for this solution. We (aka this

Re: [Python-Dev] Closing old bugs

2005-06-01 Thread Facundo Batista
On 6/1/05, Michael Hudson [EMAIL PROTECTED] wrote: Old age and a missing OP is not sufficient reason to close a bug. But if closing a bug is an effective way of kicking things into life again... I'm seeing this effect in a lot of bugs I closed as old ones. I think that using the

Re: [Python-Dev] Propose to reject PEP 276 -- Simple iterator for ints

2005-06-19 Thread Facundo Batista
On 6/17/05, Raymond Hettinger [EMAIL PROTECTED] wrote: The principal use case was largely met by enumerate(). From PEP 276's +1 for reject it. .Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ ___ Python-Dev

Re: [Python-Dev] Decimal floats as default (was: discussion aboutPEP239 and 240)

2005-06-28 Thread Facundo Batista
On 6/27/05, Fredrik Johansson [EMAIL PROTECTED] wrote: The context (as I envision it) would not be just a binary float context, but a universal float context that lets you choose between binary and decimal precision at run time. You mean something like this? from __future__ import

Re: [Python-Dev] New python developer

2005-06-29 Thread Facundo Batista
On 6/29/05, Fabien [EMAIL PROTECTED] wrote: I'm using Python for about 2 years, and I would like to go further in python developement. So that's why I've subscribed to python-dev. And since I'm not very good in C, I think I will try to help and to submit patchs in pure python. I'm not good

[Python-Dev] Decimal rounding doc

2005-07-01 Thread Facundo Batista
I'm preparing the pre-PEP of a Money module, and I don't want to explain the rounding methods there again. So my idea was to point to Decimal documentation regarding them. And I couldn't find them. Could it be we missed the explanation of each rounding mode in the Decimal docs? Or the sprints

Re: [Python-Dev] Decimal rounding doc

2005-07-01 Thread Facundo Batista
On 7/1/05, Aahz [EMAIL PROTECTED] wrote: My suspicion is that someone at some point thought that Cowlishaw was sufficient; we probably should write some base-level docs that explain the Python mechanisms and refer to Cowlishaw for details. Well, it's already well explained, with examples and

Re: [Python-Dev] Decimal rounding doc

2005-07-01 Thread Facundo Batista
On 7/1/05, Fred L. Drake, Jr. [EMAIL PROTECTED] wrote: On Friday 01 July 2005 11:36, Raymond Hettinger wrote: I've got it from here. Will update the docs. Dang, a race condition. :-) Ok, Facundo, never mind the SF tracker item. :p. My original idea was to ask you for another pair of

Re: [Python-Dev] Missing docs (was Decimal rounding doc)

2005-07-01 Thread Facundo Batista
On 7/1/05, Aahz [EMAIL PROTECTED] wrote: Agreed. Unfortunately, that's one big area where Python needs work; new-style classes are probably the worst. If you wanted to take the lead and push a sprint on doc work, you'd be a hero. Ehhh... what a good idea for PyCon 2006!! :D .Facundo

[Python-Dev] Money module

2005-07-01 Thread Facundo Batista
People: The Money two-days sprint in EuroPython 2005 has finished. We advanced a lot. The pre-PEP is almost done, and the corresponding test cases are all written. We need to finish the structure procesing for currency general information, and bring general functions to the module, but most of

Re: [Python-Dev] Money module

2005-07-02 Thread Facundo Batista
On 7/1/05, Raymond Hettinger [EMAIL PROTECTED] wrote: [Facundo] The pre-PEP is almost done, and the corresponding test cases are all written. What is the part about the pre-PEP? Something like this probably shouldn't go in the standard library until it has been proven in the field.

Re: [Python-Dev] Money module

2005-07-04 Thread Facundo Batista
On 7/2/05, Aahz [EMAIL PROTECTED] wrote: Sounds like a better way to go is a Money package (or perhaps a Financial package) and just create the Currency module within it for now. Anyway, Something to consider! given that this isn't going to be a real PEP any time soon, please restrict the

Re: [Python-Dev] while:

2005-07-20 Thread Facundo Batista
On 7/20/05, Martin Blais [EMAIL PROTECTED] wrote: Well, maybe you're reading a bit too litterally into that statement. To me the expression is very explicitly absent :-)More seriously, reading into these rules too literally leads to funny places: I could ask why at the end of functions

Re: [Python-Dev] Deprecating builtin id (and moving it to sys())

2005-08-17 Thread Facundo Batista
On 8/17/05, Neil Schemenauer [EMAIL PROTECTED] wrote: On Wed, Aug 17, 2005 at 06:37:11PM +0200, Reinhold Birkenfeld wrote: As I can see, this is not going to happen before Py3k, as it is completely breaking backwards compatibility. As such, a PEP would be unnecessary. We could add sys.id

Re: [Python-Dev] status of development documentation

2005-12-22 Thread Facundo Batista
2005/12/21, Phillip J. Eby [EMAIL PROTECTED]: 3. Fredrik believes that more people would participate in updating Python documentation if it didn't require a LaTeX toolchain or LaTeX-friendly editor. I'm sure he's right. I'm not talking about any random user that finds a doc bug and wants to

Re: [Python-Dev] documentation comments

2005-12-24 Thread Facundo Batista
2005/12/22, Fred L. Drake, Jr. [EMAIL PROTECTED]: In general, my worry is less with dealing with spam than with ensuring integration of content enhancements before release candidates go out. Well, I think that the most important part of annotable documentation is just cuantitative feedback,

[Python-Dev] NotImplemented reaching top-level

2005-12-24 Thread Facundo Batista
Folks, There's a bug about number coercion about Decimal (http://www.python.org/sf/1355842). The bug appeared after some changes Raymond and I did a few months ago, solving something else (started to return NotImplemented instead of raising TypeError, to better work with custom objects that

Re: [Python-Dev] NotImplemented reaching top-level

2005-12-26 Thread Facundo Batista
2005/12/26, Armin Rigo [EMAIL PROTECTED]: Done in patch #1390657. Fantastic, Armin, thank you! nb_add and nb_multiply should be tried. I don't think that this would break existing C or Python code, but it should probably only go in 2.5, together with the patch #1390657 that relies on it.

[Python-Dev] ConfigParser to save with order

2006-01-07 Thread Facundo Batista
ConfigParser saves the data in a not-predefined order. This is because it keeps, internally, the information in dictionaries. I opened a patch in SF 1399309 that orders the info to be saved in the file through the ConfigParser write() method. This patch does not let the user to specify the

Re: [Python-Dev] ConfigParser to save with order

2006-01-09 Thread Facundo Batista
2006/1/7, Guido van Rossum [EMAIL PROTECTED]: I think it's moot unless you also preserve comments. Ideally would be something that prserved everything (ordering, blank lines, comments etc.) from how it was read in. Modifying a value should keep its position. Adding a value should add it to

Re: [Python-Dev] ConfigParser to save with order

2006-01-09 Thread Facundo Batista
2006/1/9, Fred L. Drake, Jr. [EMAIL PROTECTED]: On Monday 09 January 2006 12:08, Facundo Batista wrote: What I wanted to add to the module was predicatibility: a very needed feature when you're writing test cases (and that's where I got bite). In that case, would sorting the keys within

Re: [Python-Dev] ConfigParser to save with order

2006-01-11 Thread Facundo Batista
2006/1/11, Tony Meyer [EMAIL PROTECTED]: Remember that there has been a lot of discussion about how ConfigParser should work in the past; for example (ignoring c.l.p): http://mail.python.org/pipermail/python-dev/2004-October/049454.html

Re: [Python-Dev] New Pythondoc by effbot

2006-01-22 Thread Facundo Batista
2006/1/22, Georg Brandl [EMAIL PROTECTED]: Guido van Rossum wrote: ... Why? If wikipedia can do without moderation (for most pages) then why couldn't the Python docs? Well, why not... it's surely worth a try. Perhaps using a spam filter like most modern weblogs would suffice. I can

Re: [Python-Dev] Extension to ConfigParser

2006-01-31 Thread Facundo Batista
2006/1/30, Fredrik Lundh [EMAIL PROTECTED]: fwiw, I've *never* used INI files to store program state, and I've never used the save support in ConfigParser. As a SiGeFi developing decision, we obligated us to keep the program state between executions (hey, if I set the window this big, I want

Re: [Python-Dev] Octal literals

2006-01-31 Thread Facundo Batista
2006/1/31, Bengt Richter [EMAIL PROTECTED]: In that case, could I also make a pitch for the letter c which would similarly follow a radix (in decimal) but would introduce the rest of the number as a radix-complement signed number, e.g., -2, 16cfe, 8c76, 2c110, 10c98 would all have the same

Re: [Python-Dev] (-1)**(1/2)==1?

2006-02-20 Thread Facundo Batista
2006/2/20, Jonathan Barbero [EMAIL PROTECTED]: Hello! My name is Jonathan, i´m new with Python. Hello Jonathan. This list is only for developing Python itself, not for developing in Python. You should address this kind of question in comp.lang.python (available as a newsgroup and a mailing

[Python-Dev] OT: T-Shirts

2006-02-23 Thread Facundo Batista
Lundh David Ascher Mark Lutz Mark Hammond Also, some of us want to give one as a personal present: Raymond Hettinger (from Facundo Batista) Bob Ippolito (from Alejandro David Weil) Glyph Lefkowitz (from Alejandro J. Cura) The point is that I don't know some of you, so please grab

Re: [Python-Dev] Dropping support for Win9x in 2.6

2006-02-24 Thread Facundo Batista
2006/2/24, Neal Norwitz [EMAIL PROTECTED]: Martin and I were talking about dropping support for older versions of Windows (of the non-NT flavor). We both thought that it was reasonable to stop supporting Win9x (including WinME) in Python 2.6. +1 .Facundo Blog:

[Python-Dev] Translating docs

2006-02-25 Thread Facundo Batista
After a small talk with Raymond, yesterday in the breakfast, I proposed in PyAr the idea of start to translate the Library Reference. You'll agree with me that this is a BIG effort. But not only big, it's dynamic! So, we decided that we need a system that provide us the management of the

[Python-Dev] Fwd: Translating docs

2006-02-25 Thread Facundo Batista
2006/2/25, [EMAIL PROTECTED] [EMAIL PROTECTED]: Translating the library reference as such is more difficult, because it can't be translated in small chunks very well. The SVN directory python/dist/src/Doc/lib/ has 276 .tex's, with an average of 250 lines each. Maybe manage each file

Re: [Python-Dev] Summer of Code preparation

2006-04-21 Thread Facundo Batista
2006/4/17, Neal Norwitz [EMAIL PROTECTED]: I can help manage the process from inside Google, but I need help gathering mentors and ideas. I'm not certain of the process, but if you are interested in being a mentor, send me an email. I will try to I already applied to Google to be a Mentor.

Re: [Python-Dev] Google Summer of Code proposal: improvement of long int and adding new types/modules.

2006-04-24 Thread Facundo Batista
2006/4/22, Mateusz Rukowicz [EMAIL PROTECTED]: I am now quite sure, what I would like to do, and is possible by you to accept - code decimal in C, most important things about that would: I'd be glad to mentor this. Regards, .Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr:

Re: [Python-Dev] Decimal and Exponentiation

2006-05-23 Thread Facundo Batista
2006/5/19, Tim Peters [EMAIL PROTECTED]: If you're not a numeric expert, I wouldn't recommend that you try this yourself (in particular, trying to implement x**y as exp(ln(x)*y) using the same precision is mathematically correct but is numerically badly naive). I'd start to see this not

Re: [Python-Dev] A Horrible Inconsistency

2006-05-26 Thread Facundo Batista
2006/5/25, Fredrik Lundh [EMAIL PROTECTED]: -1 * (1, 2, 3) () -(1, 2, 3) Traceback (most recent call last): File stdin, line 1, in module TypeError: bad operand type for unary - We Really Need To Fix This! I don't see here an inconsistency. The operator * is not a multiplier as in

Re: [Python-Dev] A Horrible Inconsistency

2006-05-26 Thread Facundo Batista
2006/5/26, Sean Reifschneider [EMAIL PROTECTED]: On Fri, May 26, 2006 at 12:37:02PM -0300, Facundo Batista wrote: - Treat the negative as a reverser, so we get back (3, 2, 1). Then we could get: print -123 321 An integer is NOT a sequence. OTOH, that should be consistent to -1

Re: [Python-Dev] A Horrible Inconsistency

2006-05-26 Thread Facundo Batista
2006/5/26, Fred L. Drake, Jr. [EMAIL PROTECTED]: Even better: 123*-1 We'd get to explain: - what the *- operator is all about, and - why we'd use it with a string and an int. I see possibilities here. :-) All this different ways enforce my vote: we should get an error...

Re: [Python-Dev] A Horrible Inconsistency

2006-05-26 Thread Facundo Batista
2006/5/26, Steven Bethard [EMAIL PROTECTED]: On 5/26/06, Facundo Batista [EMAIL PROTECTED] wrote: All this different ways enforce my vote: we should get an error... ... But if this change goes in, I want a big we're breaking backwards incompatibility message somewhere. I say if you

Re: [Python-Dev] Segmentation fault of Python if build on Solaris 9 or10 with Sun Studio 11

2006-05-31 Thread Facundo Batista
2006/5/31, [EMAIL PROTECTED] [EMAIL PROTECTED]: This strictly doesn't belong to python-dev: this is the list where you say I want to help, not so much I need your help. QOTW! I love it! -- .Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/

[Python-Dev] tarfile and unicode filenames in windows

2006-06-08 Thread Facundo Batista
I'm working in Windows 2K SP4. I have a directory with non-ascii names (i.e.: camión.txt). I'm trying to tar.bzip it: nomdir = sys.argv[1] tar = tarfile.open(prueba.tar.bz2, w:bz2) tar.add(nomdir) tar.close() This works ok, even considering that the ó in the filename is not

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

[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] 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

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] 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] 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] 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] 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] 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] 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] 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 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] 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] 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

[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] 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

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] 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] 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

[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] 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] 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] 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] 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

  1   2   3   4   >