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

2012-04-24 Thread Nick Coghlan
On Wed, Apr 25, 2012 at 2:56 AM, Jim Jewett wrote: > 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 Pyth

Re: [Python-Dev] netiquette on py-dev

2012-04-24 Thread Nick Coghlan
On Wed, Apr 25, 2012 at 1:58 PM, Chris Angelico wrote: > On Wed, Apr 25, 2012 at 1:44 PM, Stephen J. Turnbull > wrote: >> I don't know of any webmail implementations that provide >> reply-to-list, so a lot of us end up using reply-to-all.  Cleaning up >> the headers requires at least deleting th

Re: [Python-Dev] netiquette on py-dev

2012-04-24 Thread Chris Angelico
On Wed, Apr 25, 2012 at 1:44 PM, Stephen J. Turnbull wrote: > I don't know of any webmail implementations that provide > reply-to-list, so a lot of us end up using reply-to-all.  Cleaning up > the headers requires at least deleting the To (which is where the > author ends up), and perhaps moving t

Re: [Python-Dev] netiquette on py-dev

2012-04-24 Thread Stephen J. Turnbull
On Wed, Apr 25, 2012 at 5:46 AM, Ethan Furman wrote: > When responding to posts, should the poster to whom I am responding be > listed as well as python-dev, or should my responses just go to python-dev? > > I see both ways occuring, and am not sure if one or the other is preferred. I don't know

Re: [Python-Dev] (time) PEP 418 glossary V2

2012-04-24 Thread Stephen J. Turnbull
On Wed, Apr 25, 2012 at 1:19 AM, Jim Jewett wrote: > I'm still a little fuzzy on *why* it shouldn't count as a monotonic > clock. So are the people who say it shouldn't count (unless you're speaking of the specific implementation on Unix systems, which can go backward if the admin or NTP decides

Re: [Python-Dev] netiquette on py-dev

2012-04-24 Thread Ben Finney
Ethan Furman writes: > When responding to posts, should the poster to whom I am responding be > listed as well as python-dev, or should my responses just go to > python-dev? IMO, the poster to whom you are responding should expect to read your response in the same forum where their message appea

Re: [Python-Dev] netiquette on py-dev

2012-04-24 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/24/2012 04:46 PM, Ethan Furman wrote: > Okay, advice please. > > When responding to posts, should the poster to whom I am responding be > listed as well as python-dev, or should my responses just go to > python-dev? > > I see both ways occurin

Re: [Python-Dev] netiquette on py-dev

2012-04-24 Thread Oleg Broytman
On Tue, Apr 24, 2012 at 01:46:51PM -0700, Ethan Furman wrote: > When responding to posts, should the poster to whom I am responding > be listed as well as python-dev, or should my responses just go to > python-dev? I reply to list only, except when I want extra attention (e.g. when I direct p

Re: [Python-Dev] netiquette on py-dev

2012-04-24 Thread Antoine Pitrou
On Tue, 24 Apr 2012 13:46:51 -0700 Ethan Furman wrote: > Okay, advice please. > > When responding to posts, should the poster to whom I am responding be > listed as well as python-dev, or should my responses just go to python-dev? I prefer responses to python-dev only myself; I am always a bit

[Python-Dev] netiquette on py-dev

2012-04-24 Thread Ethan Furman
Okay, advice please. When responding to posts, should the poster to whom I am responding be listed as well as python-dev, or should my responses just go to python-dev? I see both ways occuring, and am not sure if one or the other is preferred. As a reference point, on python-list I almost nev

Re: [Python-Dev] Repeated hangs during "make test"

2012-04-24 Thread Antoine Pitrou
On Tue, 24 Apr 2012 12:05:46 -0400 "Edward C. Jones" wrote: > CPython 3.3.0a2 (default, Apr 24 2012, 10:47:03) [GCC 4.4.5] > Linux-2.6.32-5-amd64-x86_64-with-debian-6.0.4 little-endian > > Ran "make test". Hung during test_socket. Used CNTL-C to exit the test. > test_ssl failed. Ran "./python

Re: [Python-Dev] Repeated hangs during "make test"

2012-04-24 Thread Victor Stinner
2012/4/24 Edward C. Jones : > CPython 3.3.0a2 (default, Apr 24 2012, 10:47:03) [GCC 4.4.5] > Linux-2.6.32-5-amd64-x86_64-with-debian-6.0.4 little-endian > > Ran "make test".  Hung during test_socket.  Used CNTL-C to exit the test. Can you investigate what is blocked in the test? Can you at least p

Re: [Python-Dev] [Python-checkins] cpython: Closes Issue #14661: posix module: add O_EXEC, O_SEARCH, O_TTY_INIT (I add some

2012-04-24 Thread Victor Stinner
2012/4/24 jesus.cea : > http://hg.python.org/cpython/rev/2023f48b32b6 > changeset:   76537:2023f48b32b6 > user:        Jesus Cea > date:        Tue Apr 24 20:59:17 2012 +0200 > summary: >  Closes Issue #14661: posix module: add O_EXEC, O_SEARCH, O_TTY_INIT (I add > some Solaris constants too) Do

Re: [Python-Dev] [Python-checkins] cpython (3.2): don't use a slot wrapper from a different special method (closes #14658)

2012-04-24 Thread Mark Shannon
Benjamin Peterson wrote: 2012/4/24 Mark Shannon : I'm not happy with this fix. It's not perfect, but it's an improvement. Actually, I think it is probably correct. I've been trying to break it by assigning various unusual objects to special attributes and it seems OK so far. I don't really

Re: [Python-Dev] cpython: Closes Issue #14661: posix module: add O_EXEC, O_SEARCH, O_TTY_INIT (I add some

2012-04-24 Thread Charles-François Natali
> jesus.cea wrote: >> http://hg.python.org/cpython/rev/2023f48b32b6 >> changeset: 76537:2023f48b32b6 >> user:Jesus Cea >> date:Tue Apr 24 20:59:17 2012 +0200 >> summary: >> Closes Issue #14661: posix module: add O_EXEC, O_SEARCH, O_TTY_INIT (I >> add some Solaris constants too

Re: [Python-Dev] cpython (2.7): #14538: HTMLParser can now parse correctly start tags that contain a bare /.

2012-04-24 Thread Brian Curtin
On Tue, Apr 24, 2012 at 14:34, Éric Araujo wrote: > Le 24/04/2012 15:02, Georg Brandl a écrit : >> >> On 24.04.2012 20:34, Benjamin Peterson wrote: >>> >>> 2012/4/24 Georg Brandl: I think that's misleading: there's no way to "correctly" parse malformed HTML. >>> >>> There is in the

Re: [Python-Dev] cpython (2.7): #14538: HTMLParser can now parse correctly start tags that contain a bare /.

2012-04-24 Thread Éric Araujo
Le 24/04/2012 15:02, Georg Brandl a écrit : On 24.04.2012 20:34, Benjamin Peterson wrote: 2012/4/24 Georg Brandl: I think that's misleading: there's no way to "correctly" parse malformed HTML. There is in the since that you can follow the HTML5 algorithm, which can "parse" any junk you throw a

Re: [Python-Dev] cpython: Closes Issue #14661: posix module: add O_EXEC, O_SEARCH, O_TTY_INIT (I add some

2012-04-24 Thread Antoine Pitrou
On Tue, 24 Apr 2012 21:00:49 +0200 jesus.cea wrote: > http://hg.python.org/cpython/rev/2023f48b32b6 > changeset: 76537:2023f48b32b6 > user:Jesus Cea > date:Tue Apr 24 20:59:17 2012 +0200 > summary: > Closes Issue #14661: posix module: add O_EXEC, O_SEARCH, O_TTY_INIT (I add >

Re: [Python-Dev] cpython (2.7): #14538: HTMLParser can now parse correctly start tags that contain a bare /.

2012-04-24 Thread Benjamin Peterson
2012/4/24 Benjamin Peterson : > There is in the since This is confusing, since I meant "sense". -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.

Re: [Python-Dev] cpython (2.7): #14538: HTMLParser can now parse correctly start tags that contain a bare /.

2012-04-24 Thread Georg Brandl
On 24.04.2012 20:34, Benjamin Peterson wrote: > 2012/4/24 Georg Brandl : >> On 19.04.2012 03:36, ezio.melotti wrote: >>> http://hg.python.org/cpython/rev/36c901fcfcda >>> changeset: 76413:36c901fcfcda >>> branch: 2.7 >>> user:Ezio Melotti >>> date:Wed Apr 18 19:08:41 2012 -0

Re: [Python-Dev] cpython (2.7): #14538: HTMLParser can now parse correctly start tags that contain a bare /.

2012-04-24 Thread Fred Drake
On Tue, Apr 24, 2012 at 2:34 PM, Benjamin Peterson wrote: > There is in the since that you can follow the HTML5 algorithm, which > can "parse" any junk you throw at it. This whole can of worms is why I gave up on HTML years ago (well, one reason among many). There are markup languages, and there

Re: [Python-Dev] cpython (2.7): #14538: HTMLParser can now parse correctly start tags that contain a bare /.

2012-04-24 Thread Benjamin Peterson
2012/4/24 Georg Brandl : > On 19.04.2012 03:36, ezio.melotti wrote: >> http://hg.python.org/cpython/rev/36c901fcfcda >> changeset:   76413:36c901fcfcda >> branch:      2.7 >> user:        Ezio Melotti >> date:        Wed Apr 18 19:08:41 2012 -0600 >> summary: >>   #14538: HTMLParser can now parse

Re: [Python-Dev] cpython: Implement PEP 412: Key-sharing dictionaries (closes #13903)

2012-04-24 Thread martin
Benchmarks should measure memory usage too, of course. Sadly that is not possible in standard cPython. It's actually very easy in standard CPython, using sys.getsizeof. Btw, this is of great interest to me at the moment, our Shanghai engineers are screaming at the memory waste incurred by d

[Python-Dev] Repeated hangs during "make test"

2012-04-24 Thread Edward C. Jones
CPython 3.3.0a2 (default, Apr 24 2012, 10:47:03) [GCC 4.4.5] Linux-2.6.32-5-amd64-x86_64-with-debian-6.0.4 little-endian Ran "make test". Hung during test_socket. Used CNTL-C to exit the test. test_ssl failed. Ran "./python -m test -v test_ssl". Test ok. Ran "./python -m test -v test_socket"

Re: [Python-Dev] What do PyAPI_FUNC & PyAPI_DATA mean?

2012-04-24 Thread martin
Quoting Kristján Valur Jónsson : Aha, so that is the rationale. Because the export table on unix is so generous, we force ourselves to be generous on windows too? Yes. If the code compiles and links on Unix, it shall also compile and link on Windows. I did some unix programming back in the

Re: [Python-Dev] What do PyAPI_FUNC & PyAPI_DATA mean?

2012-04-24 Thread martin
Quoting Kristján Valur Jónsson : You know that I'm speaking of Windows, right? Yes, but this may only be valid for CCP; for CPython, we certainly have to consider Unix as well. IMHO, we shouldn't put the PyAPI* stuff on functions unless they are actual API functions. I don't know how the e

Re: [Python-Dev] cpython (2.7): #14538: HTMLParser can now parse correctly start tags that contain a bare /.

2012-04-24 Thread Georg Brandl
On 19.04.2012 03:36, ezio.melotti wrote: > http://hg.python.org/cpython/rev/36c901fcfcda > changeset: 76413:36c901fcfcda > branch: 2.7 > user:Ezio Melotti > date:Wed Apr 18 19:08:41 2012 -0600 > summary: > #14538: HTMLParser can now parse correctly start tags that contain

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

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

2012-04-24 Thread Jim Jewett
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. Given that

Re: [Python-Dev] (time) PEP 418 glossary V2

2012-04-24 Thread Victor Stinner
>> I don't know any monotonic with a defined epoch or >> mappable to the civil time. > > The very basic "seconds (not even milliseconds) since the beginning of > 1970" fits that definition, but doesn't seem to fit what most people > mean by "Monotonic Clock". > > I'm still a little fuzzy on *why* i

Re: [Python-Dev] [Python-checkins] cpython (3.2): don't use a slot wrapper from a different special method (closes #14658)

2012-04-24 Thread Ethan Furman
Mark Shannon wrote: Benjamin Peterson wrote: 2012/4/24 Mark Shannon : I'm not happy with this fix. It's not perfect, but it's an improvement. Admittedly code like: class S(str): __getattr__ = str.__add__ s = S('a') print(S.b) My typo, should be: print(s.b) (Instance not class) is a l

Re: [Python-Dev] (time) PEP 418 glossary V2

2012-04-24 Thread Jim Jewett
On Tue, Apr 24, 2012 at 6:38 AM, Victor Stinner wrote: >> Monotonic >> - >> This is a particularly tricky term, as there are several subtly >> incompatible definitions in use. > Is it a definition for the glossary? One use case for a PEP is that someone who does *not* have a background

Re: [Python-Dev] [Python-checkins] cpython (3.2): don't use a slot wrapper from a different special method (closes #14658)

2012-04-24 Thread Mark Shannon
Benjamin Peterson wrote: 2012/4/24 Mark Shannon : I'm not happy with this fix. It's not perfect, but it's an improvement. Admittedly code like: class S(str): __getattr__ = str.__add__ s = S('a') print(S.b) My typo, should be: print(s.b) (Instance not class) This doesn't work. is a li

Re: [Python-Dev] [Python-checkins] cpython (3.2): don't use a slot wrapper from a different special method (closes #14658)

2012-04-24 Thread Benjamin Peterson
2012/4/24 Mark Shannon : > I'm not happy with this fix. It's not perfect, but it's an improvement. > > Admittedly code like: > > class S(str): >   __getattr__ = str.__add__ > s = S('a') > print(S.b) > > is a little weird. > But I think it should work (ie print 'ab') properly. > > This works witho

Re: [Python-Dev] [Python-checkins] cpython (3.2): don't use a slot wrapper from a different special method (closes #14658)

2012-04-24 Thread Mark Shannon
I'm not happy with this fix. Admittedly code like: class S(str): __getattr__ = str.__add__ s = S('a') print(S.b) is a little weird. But I think it should work (ie print 'ab') properly. This works without the patch. class S(str): __getattribute__ = str.__add__ s = S('a') print(S.b) (Pri

Re: [Python-Dev] cpython (2.7): Reorder the entries to put the type specific technique last.

2012-04-24 Thread Antoine Pitrou
On Tue, 24 Apr 2012 06:27:07 +0200 raymond.hettinger wrote: > http://hg.python.org/cpython/rev/e2a3260f1718 > changeset: 76513:e2a3260f1718 > branch: 2.7 > parent: 76480:db26c4daecbb > user:Raymond Hettinger > date:Mon Apr 23 21:24:15 2012 -0700 > summary: > Reorder

Re: [Python-Dev] cpython: Implement PEP 412: Key-sharing dictionaries (closes #13903)

2012-04-24 Thread Nick Coghlan
On Tue, Apr 24, 2012 at 8:24 PM, Kristján Valur Jónsson wrote: > Perhaps I should write about this on my blog.  Updating the memory allocation > macro layer in > cPython for embedding is something I'd be inclined to contribute, but it will > involve a large amount > of bikeshedding, I'm sure :)

Re: [Python-Dev] Daily reference leaks (8dbcedfd13f8): sum=15528

2012-04-24 Thread Mark Shannon
Antoine Pitrou wrote: On Tue, 24 Apr 2012 05:36:41 +0200 solip...@pitrou.net wrote: results for 8dbcedfd13f8 on branch "default" test_itertools leaked [44, 44, 44] references, sum=132 test_robotparser leaked [103, 103, 103] references, sum=309 test_s

Re: [Python-Dev] Daily reference leaks (8dbcedfd13f8): sum=15528

2012-04-24 Thread Antoine Pitrou
On Tue, 24 Apr 2012 05:36:41 +0200 solip...@pitrou.net wrote: > results for 8dbcedfd13f8 on branch "default" > > > test_itertools leaked [44, 44, 44] references, sum=132 > test_robotparser leaked [103, 103, 103] references, sum=309 > test_ssl leaked [10

Re: [Python-Dev] (time) PEP 418 glossary V2

2012-04-24 Thread Victor Stinner
> Precision > - > > This is another tricky term, This is a good reason why it is no more used in the PEP :-) > Note that "precision" as reported by the clock itself may use yet > another definition, and may differ between clocks. Some C function provides the frequency of the clock (and s

Re: [Python-Dev] cpython: Implement PEP 412: Key-sharing dictionaries (closes #13903)

2012-04-24 Thread Antoine Pitrou
On Tue, 24 Apr 2012 10:24:16 + Kristján Valur Jónsson wrote: > > Btw, this is of great interest to me at the moment, our Shanghai engineers > are screaming at the > memory waste incurred by dictionaries. A 10 item dictionary consumes 1/2k on > 32 bits, did you > know this? The sparseness

Re: [Python-Dev] (time) PEP 418 glossary V2

2012-04-24 Thread Victor Stinner
> Monotonic > - > > This is a particularly tricky term, as there are several subtly > incompatible definitions in use. Is it a definition for the glossary? >  C++ followed the mathematical > definition, so that a monotonic clock only promises not to go > backwards. The "C++ Timeout Speci

Re: [Python-Dev] What do PyAPI_FUNC & PyAPI_DATA mean?

2012-04-24 Thread Kristján Valur Jónsson
Aha, so that is the rationale. Because the export table on unix is so generous, we force ourselves to be generous on windows too? I did some unix programming back in the day. IRIX, actually (a Sys V derivative). I'm pretty sure we had to explicitly specify our .so exports. But I might be mista

Re: [Python-Dev] [RFC] PEP 418: Add monotonic time, performance counter and process time functions

2012-04-24 Thread Victor Stinner
> Here is a simplified version of the first draft of the PEP 418. The > full version can be read online. > http://www.python.org/dev/peps/pep-0418/ Thanks to everyone who helped me to work on this PEP! I integrated last comments. There is no more open question. (Or did I miss something?) I didn'

Re: [Python-Dev] cpython: Implement PEP 412: Key-sharing dictionaries (closes #13903)

2012-04-24 Thread Kristján Valur Jónsson
Probably any benchmark involving a large amount of object instances with non-trivial dictionaries. Benchmarks should measure memory usage too, of course. Sadly that is not possible in standard cPython. Our 2.7 branch has extensive patching to allow custom memory allocators to be used (it even

Re: [Python-Dev] (time) PEP 418 glossary V2

2012-04-24 Thread Stephen J. Turnbull
Very nice! Two possible clarifications: On Tue, Apr 24, 2012 at 10:58 AM, Jim Jewett wrote: > Glossary > > Bias > > > Lack of accuracy that is systematically in one direction, as opposed to > random errors.  When a clock is `Adjusted`_, durations overlapping the > adjustment will s

Re: [Python-Dev] What do PyAPI_FUNC & PyAPI_DATA mean?

2012-04-24 Thread Kristján Valur Jónsson
You know that I'm speaking of Windows, right? IMHO, we shouldn't put the PyAPI* stuff on functions unless they are actual API functions. I don't know how the export tables for ELF .so objects is generated, but it surely can't export _everything_. Anyway, marking stuff as part of the API makes se

Re: [Python-Dev] What do PyAPI_FUNC & PyAPI_DATA mean?

2012-04-24 Thread Martin v. Löwis
Am 23.04.2012 15:05, schrieb Kristján Valur Jónsson: > IMHO, we are _much_ too generous at applying this to almost whatever > gets exposed between .c files. I have created something called the > "restricted" api for our custom python27.dll where I use different > macros (PyAPI_RFUNC, pyAPI_RDATA)

Re: [Python-Dev] What do PyAPI_FUNC & PyAPI_DATA mean?

2012-04-24 Thread Martin v. Löwis
> What do they mean, exactly? From the name I would expect that they are a > way of declaring a function or datum to be part of the API, but their > usage seems to be more to do with linkage. It means that they will be exported from the pythonXY.dll on Windows. In Windows DLLs, it's not sufficient