Re: [Python-Dev] on Python's tests (and making them better)

2008-06-06 Thread Eric Smith
Benjamin Peterson wrote: On Fri, Jun 6, 2008 at 5:51 PM, Eric Smith <[EMAIL PROTECTED]> wrote: Martin v. Löwis wrote: I always find it hard to find a test I'm looking for in a directory with 365 different tests in it. Also grouping tests by function will hopefully help reduce dupl

Re: [Python-Dev] [Python-checkins] r64424 - in python/trunk: Include/object.h Lib/test/test_sys.py Misc/NEWS Objects/intobject.c Objects/longobject.c Objects/typeobject.c Python/bltinmodule.c

2008-06-20 Thread Eric Smith
I thought there was a discussion of this earlier, and the idea was to leave the prior implementation, because that's how it's implemented in 3.0. bin() is a new feature in 2.6, so there's no particular need to make it work like hex() and oct(). Recall that in 3.0, __bin__, __oct__, and __hex_

Re: [Python-Dev] [Python-checkins] r64424 - in python/trunk: Include/object.h Lib/test/test_sys.py Misc/NEWS Objects/intobject.c Objects/longobject.c Objects/typeobject.c Python/bltinmodule.c

2008-06-24 Thread Eric Smith
Guido van Rossum wrote: The 3.0 approach means that non-float floating point types still can't be displayed properly by bin()/oct()/hex(). Nor can float, AFAICT from the current 3.0 tree. $ ./python Python 3.0b1+ (py3k:64491:64497M, Jun 24 2008, 07:14:03) [GCC 4.1.2 20070626 (Red Hat 4.1.2-13

Re: [Python-Dev] [Python-checkins] r64424 - in python/trunk:Include/object.h Lib/test/test_sys.py Misc/NEWSObjects/intobject.c Objects/longobject.c Objects/typeobject.cPython/bltinmodule.c

2008-06-26 Thread Eric Smith
mat() instead. * Amaury Forgeot d'Arc requested that tests should check if negative numbers have the same representation as their absolute value. Done. * Mark Dickinson requested sign preserving output for bin(-0.0). We couldn't find a clean way to do this without a special cased

Re: [Python-Dev] [Python-checkins] r64424 - in python/trunk:Include/object.h Lib/test/test_sys.py Misc/NEWSObjects/intobject.c Objects/longobject.c Objects/typeobject.cPython/bltinmodule.c

2008-06-26 Thread Eric Smith
Eric Smith wrote: Actually, after saying I was opposed to __bin__ in 2.6, I said: "Instead, I think the approach used in 3.0 (r64451) should be used instead. That is, if this feature exist at all. I'm -0 on adding bin(), etc. to floats." My last sentence is a little unclea

Re: [Python-Dev] [Python-checkins] r64424 - in python/trunk:Include/object.h Lib/test/test_sys.py Misc/NEWSObjects/intobject.c Objects/longobject.c Objects/typeobject.cPython/bltinmodule.c

2008-06-26 Thread Eric Smith
Mark Dickinson wrote: On Thu, Jun 26, 2008 at 11:00 PM, Georg Brandl <[EMAIL PROTECTED]> wrote: Let me remind you that %a currently means "call ascii()" in 3.0. Oh well. That's out then. I'll rephrase to "I'd be delighted with something similar in spirit to '%a' support." :-) It could be

Re: [Python-Dev] Default metaclass in Python 3.0 modules

2008-07-15 Thread Eric Smith
Ben Finney wrote: "Benjamin Peterson" <[EMAIL PROTECTED]> writes: On Mon, Jul 14, 2008 at 6:42 PM, Ben Finney <[EMAIL PROTECTED]> wrote: The `unittest` module will gain the following attribute, to set the default metaclass for classes in the module and thus make all classes in the module part

[Python-Dev] PEP 3101: floats format 'f' and 'F'

2008-07-16 Thread Eric Smith
Does anyone know why 'F' is the same as 'f'? Wouldn't it make more sense to either drop it, or make it convert the exponent to upper case (like 'E' and 'G')? Compatibility with %-formatting is the only reason I can think of to keep up, but I get the sense we've given up on an automatic conver

Re: [Python-Dev] PEP 3101: floats format 'f' and 'F'

2008-07-16 Thread Eric Smith
Mark Dickinson wrote: On Wed, Jul 16, 2008 at 3:35 PM, Eric Smith <[EMAIL PROTECTED]> wrote: Does anyone know why 'F' is the same as 'f'? Wouldn't it make more sense to either drop it, or make it convert the exponent to upper case What exponent? Isn't th

Re: [Python-Dev] PEP 3101: floats format 'f' and 'F'

2008-07-16 Thread Eric Smith
Guido van Rossum wrote: On Wed, Jul 16, 2008 at 7:35 AM, Eric Smith <[EMAIL PROTECTED]> wrote: Does anyone know why 'F' is the same as 'f'? Wouldn't it make more sense to either drop it, or make it convert the exponent to upper case (like 'E' and 

Re: [Python-Dev] PEP 3101: floats format 'f' and 'F'

2008-07-16 Thread Eric Smith
Guido van Rossum wrote: It shares code with %-formatting. Change that, too? I couldn't find any occurrences of %F in the stdlib. Not that that's the entire universe, of course. The change is slightly less elegant if I don't change %-formatting, but still doable, especially if the betas don't

Re: [Python-Dev] PEP 3101: floats format 'f' and 'F'

2008-07-16 Thread Eric Smith
Mark Dickinson wrote: On Wed, Jul 16, 2008 at 4:15 PM, Eric Smith <[EMAIL PROTECTED]> wrote: There's no exponent until the number gets large. I haven't looked up how big the number has to get. On my Mac, it's somewhere between 1e50 and 1e60. I think it's around 1e

Re: [Python-Dev] PEP 3101: floats format 'f' and 'F'

2008-07-17 Thread Eric Smith
Eric Smith wrote: Guido van Rossum wrote: It shares code with %-formatting. Change that, too? I couldn't find any occurrences of %F in the stdlib. Not that that's the entire universe, of course. The change is slightly less elegant if I don't change %-formatting, b

Re: [Python-Dev] PEP 3101: floats format 'f' and 'F'

2008-07-17 Thread Eric Smith
Thomas Heller wrote: Guido van Rossum schrieb: On Thu, Jul 17, 2008 at 9:25 AM, Raymond Hettinger <[EMAIL PROTECTED]> wrote: From: "Eric Smith" <[EMAIL PROTECTED]> I have this ready for checkin (with docs and tests). I'd like to get it in for this beta, sin

Re: [Python-Dev] [Python-checkins] r65099 - python/trunk/Doc/library/string.rst

2008-07-18 Thread Eric Smith
georg.brandl wrote: Author: georg.brandl Date: Fri Jul 18 13:15:06 2008 New Revision: 65099 Log: Document the different meaning of precision for {:f} and {:g}. Also document how inf and nan are formatted. #3404. Thanks for doing this. But see this output: http://www.python.org/dev/buildbot/al

Re: [Python-Dev] optimization required: .format() is much slower than %

2008-08-18 Thread Eric Smith
Eric Smith wrote: Eric Smith wrote: Eric Smith wrote: Nick Coghlan wrote: Secondly, the string % operator appears to have an explicit optimisation for the 'just return str(self)' case. This optimisation is missing from the new string format method. I'll see if I can opt

Re: [Python-Dev] Add python.exe to PATH environment variable

2008-09-03 Thread Eric Smith
M.-A. Lemburg wrote: On 2008-09-03 04:12, Greg Ewing wrote: M.-A. Lemburg wrote: The problem is: how to undo those changes without accidentally undoing an explicit change made by the user ? Is that really much of an issue? If the PATH contains an entry corresponding to the Python installation

Re: [Python-Dev] Update to httplib.py

2008-09-25 Thread Eric Smith
Eldon Ziegler wrote: I updated httplib.py, python 2.4, to be able to bind to a specific IP address when connecting to a remote site. Would there be any interest in making this available to others? If so, are there instructions on how to post an update? Create an issue at http://bugs.python.org/

Re: [Python-Dev] PyCon 2009 Call for Proposals

2008-09-27 Thread Eric Smith
Brett Cannon wrote: I am thinking of organizing a panel this year for python-dev (much like the one I organized in 2007). Who would be willing to be on the panel with me if I did this? If you're looking for the perspective of someone who's relatively new to Python core programming, I'll do it.

Re: [Python-Dev] for __future__ import planning

2008-10-03 Thread Eric Smith
Brett Cannon wrote: Christian rightly points out that with four active trees, we're going to a pretty big challenge on our hands. How do other large open source projects handle similar situations? Beats me. Are that many projects crazy enough to have that many active branches? Is it really

Re: [Python-Dev] if-syntax for regular for-loops

2008-10-04 Thread Eric Smith
Steven D'Aprano wrote: On Sat, 4 Oct 2008 12:26:30 pm Nick Coghlan wrote: (Tangent: the above two try/except examples are perfectly legal Py3k code. Do we really need the "pass" statement anymore?) I can't imagine why you would think we don't need the pass statement. I often use it: * For

Re: [Python-Dev] My patches

2008-10-30 Thread Eric Smith
Ulrich Eckhardt wrote: On Thursday 30 October 2008, Victor Stinner wrote: One of the reasons why I'm very keen on us moving to a distributed version control system is to help break the logjam on core developers. Yeah, exactly :-) Does anyone already maintain a distributed tree? Mercurial, GIT,

Re: [Python-Dev] Fwd: Removal of GIL through refcounting removal.

2008-10-30 Thread Eric Smith
Guido van Rossum wrote: No offense taken. The V8 experience makes me feel much more optimistic that they might actually pull this off. (I'm still skeptical about support for extension modules, withougt which CPython is pretty lame.) The need to modify all extension modules is the usual non-star

Re: [Python-Dev] hg branch gone?

2008-10-31 Thread Eric Smith
Georg Brandl wrote: Brett Cannon schrieb: I just tried to update my 3.0 branch in hg from http://code.python.org/hg/branches/py3k/ and hg is telling me it's a 404. Anyone else having trouble? 404 here too. Since http://code.python.org/ serves the loggerhead Bazaar view, I suppose the problem

Re: [Python-Dev] Fwd: Removal of GIL through refcounting removal.

2008-11-02 Thread Eric Smith
Giovanni Bajo wrote: [[ my 0.2: it would be a great loss if we lose reference-counting semantic (eg: objects deallocated as soon as they exit the scope). I would bargain that for a noticable speed increase of course, but my own experience with standard GCs from other languages has been less tha

Re: [Python-Dev] Fwd: Removal of GIL through refcounting removal.

2008-11-02 Thread Eric Smith
[EMAIL PROTECTED] wrote: Eric> I consider it a bug to rely on reference counting to close files, We can mostly have our cake and eat it too using the "with" statement. In most cases it should be sufficient I would think. True, and I meant to mention that. But unfortunately, my work projec

Re: [Python-Dev] SSH key for work

2008-11-18 Thread Eric Smith
Brett Cannon wrote: On Tue, Nov 18, 2008 at 13:23, Benjamin Peterson <[EMAIL PROTECTED]> wrote: On Tue, Nov 18, 2008 at 3:17 PM, Brett Cannon <[EMAIL PROTECTED]> wrote: Can someone please add the attached SSH 2 DSA key for me? I want to be able to help out with the rc tomorrow while I am at wor

Re: [Python-Dev] format specification mini-language docs...

2008-11-21 Thread Eric Smith
Dino Viehland wrote: Ok, now I'm implementing __format__ support for IronPython. The format spec mini-language docs say that a presentation type of None is the same as 'g' for floating point / decimal values. Awesome! Thanks for doing this. >But these two formats seem to differ based upon ho

Re: [Python-Dev] format specification mini-language docs...

2008-11-25 Thread Eric Smith
Dino Viehland wrote: Finally providing any sign character seems to cause +1.0#INF and friends to be returned instead of inf as is documented: 10e667.__format__('+') '+1.0#INF' 10e667.__format__('') 'inf' Are these just doc bugs? The inf issue is the only one that seems particularly we

Re: [Python-Dev] format specification mini-language docs...

2008-12-01 Thread Eric Smith
ke care of it. Eric. -Original Message----- From: Eric Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 25, 2008 4:38 AM To: Dino Viehland Cc: python-dev@python.org dev Subject: Re: [Python-Dev] format specification mini-language docs... Dino Viehland wrote: Finally providing any sign char

Re: [Python-Dev] Merging flow

2008-12-04 Thread Eric Smith
Christian Heimes wrote: Several people have asked about the patch and merge flow. Now that Python 3.0 is out it's a bit more complicated. Flow diagram trunk ---> release26-maint \-> py3k ---> release30-maint Patches for all versions of Python should land in the

Re: [Python-Dev] Merging flow

2008-12-11 Thread Eric Smith
Nick Coghlan wrote: Martin v. Löwis wrote: I believe that's difficult when you previously merged from the trunk to the py3k branch - the merged change to the svnmerge related properties on the root directory gets in the way when svnmerge attempts to update them on the maintenance branch. That's

Re: [Python-Dev] Py3k: magical dir()

2008-12-19 Thread Eric Smith
Christian Heimes wrote: Dmitry Vasiliev schrieb: Hello! I think it's a strange behavior: Python 3.1a0 (py3k:67851, Dec 19 2008, 16:50:32) [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. hash(range(10)) Traceback (most recen

Re: [Python-Dev] Call PyType_Ready on builtin types during interpreter startup?

2008-12-28 Thread Eric Smith
Nick Coghlan wrote: Nick Coghlan wrote: Rather than playing whack-a-mole with this, does anyone have any ideas on how to systematically find types which are defined in the core, but are missing an explicit PyType_Ready call? (I guess one way would be to remove all the implicit calls in a local b

Re: [Python-Dev] floatformat vs float_format

2009-01-01 Thread Eric Smith
David Cournapeau wrote: Hi, In python 2.6, there have been some effort to make float formatting more consistent between platforms, which is nice. Unfortunately, there is still one corner case, for example on windows: print a -> print 'inf' print '%f' % a -> print '1.#INF' The difference being

Re: [Python-Dev] socket.create_connection slow

2009-01-14 Thread Eric Smith
Kristján Valur Jónsson wrote: Aha, thanks, since my wireshark wasn't working. I boiled a few pints of water (thanks, Google) and came up with this: http://support.microsoft.com/kb/175523 Here is the summary: Note that with other implementations of TCP, such as those commonly found in many UNIX

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-22 Thread Eric Smith
Terry Reedy wrote: Cameron Simpson wrote: Back at uni we had to implement a small language in our compilers class and the lecturer had specified a proper generic while loop, thus: loop: suite while invariant suite endloop In Python, that is spelled while True: suite if not

Re: [Python-Dev] ac_sys_system == Monterey*?

2009-01-24 Thread Eric Smith
s...@pobox.com wrote: From configure.in: # The current (beta) Monterey compiler dies with optimizations # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this? case $ac_sys_system in Monterey*) OPT="" ;; esac What is Monterey? C

Re: [Python-Dev] pprint(iterator)

2009-01-29 Thread Eric Smith
Terry Reedy wrote: Ron Adam wrote: Steven D'Aprano wrote: Michael Foord wrote: Don't we have a pretty-print API - and isn't it spelled __str__ ? Not really. If it were as simple as calling str(obj), there would be no need for the pprint module. I agree. And when I want to use pprint,

Re: [Python-Dev] pprint(iterator)

2009-01-30 Thread Eric Smith
Steven D'Aprano wrote: Eric Smith wrote: Terry Reedy wrote: Ron Adam wrote: Steven D'Aprano wrote: Michael Foord wrote: Don't we have a pretty-print API - and isn't it spelled __str__ ? Not really. If it were as simple as calling str(obj), there would be no need f

Re: [Python-Dev] Issue 4285 Review

2009-02-03 Thread Eric Smith
Aahz wrote: On Tue, Feb 03, 2009, Ross Light wrote: Hello, python-dev. I submitted a patch a couple weeks ago for Issue 4285, and it has been reviewed and revised. Would someone please review/commit it? Thank you. http://bugs.python.org/issue4285 When sending in a request like this, it's u

Re: [Python-Dev] The interpreter accepts f(**{'5':'foo'}); is this intentional?

2009-02-05 Thread Eric Smith
Calvin Spealman wrote: I would favor this not being constrained. I don't want every use of ** to cause a pattern match to verify each key. I would even be fine without the check for being strings. Define what it should be, but let the implementation be lax. It is no different from any other place

Re: [Python-Dev] Issue 4285 Review

2009-02-05 Thread Eric Smith
Eric Smith wrote: Aahz wrote: On Tue, Feb 03, 2009, Ross Light wrote: Hello, python-dev. I submitted a patch a couple weeks ago for Issue 4285, and it has been reviewed and revised. Would someone please review/commit it? Thank you. http://bugs.python.org/issue4285 When sending in a

[Python-Dev] regrtest hangs on test_tk_guionly

2009-02-06 Thread Eric Smith
In the trunk, test_tk_guionly hangs if I run it through regrtest. This is on a Fedora Core 6 box, without X installed. If I run test_tk_guionly directly, it exits saying there's no DISPLAY set, which is what I'd expect: --8<-- [trunk]$ ./python Lib/test/test_ttk_guionly.py

Re: [Python-Dev] regrtest hangs on test_tk_guionly

2009-02-06 Thread Eric Smith
Guilherme Polo wrote: On Fri, Feb 6, 2009 at 1:14 PM, Eric Smith wrote: In the trunk, test_tk_guionly test_ttk_guionly, right ? Right, sorry. hangs if I run it through regrtest. This is on a Fedora Core 6 box, without X installed. Does it hang if you run it alone through regrtest, or

[Python-Dev] Fwd: [Python-checkins] devguide: Add Sandro to the list of core developers

2011-08-02 Thread Eric Smith
Speaking of developers.rst, could whoever added Jason Coombs also update developers.rst? I've added Jason to the committers mailing list. Thanks. Eric. Original Message Subject: [Python-checkins] devguide: Add Sandro to the list of core developers Date: Tue, 02 Aug 2011 14:58:38

Re: [Python-Dev] [Python-checkins] peps: Note that ImportError will no longer be raised due to a missing __init__.py

2012-04-24 Thread Eric Smith
> On Thu, Apr 19, 2012 at 18:56, eric.smith wrote: > >> +Note that an ImportError will no longer be raised for a directory >> +lacking an ``__init__.py`` file. Such a directory will now be imported >> +as a namespace package, whereas in prior Python versions an >> +ImportError would be raised. > >

<    1   2   3   4