[issue14191] argparse doesn't allow optionals within positionals

2013-05-11 Thread Glenn Linderman
Glenn Linderman added the comment: OK, I've been running with the new code most the day, and it seems functional in my testing. I only "sort of" follow your discussion about the "custom action class" caveat, probably because I haven't used "custom action classes"... I tried once, but failed t

[issue17952] setup#editors-and-tools

2013-05-11 Thread Tshepang Lekhonkhobe
New submission from Tshepang Lekhonkhobe: 2nd paragraph of http://docs.python.org/devguide/setup#editors-and-tools does not look accurate. It implies that there would be some mention of text editor in the given link, but I could not find it. -- components: Devguide messages: 188900 nos

[issue17952] editors-and-tools section of devguide does not appear to be ccurate

2013-05-11 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- title: setup#editors-and-tools -> editors-and-tools section of devguide does not appear to be ccurate ___ Python tracker ___ ___

[issue17953] sys.modules cannot be reassigned

2013-05-11 Thread ProgVal
New submission from ProgVal: In Python 3.3 (I did not test with 3.4), sys.modules cannot be reassigned without breaking the import mechanism; while it works with Python <= 3.2. Here is how to reproduce the bug: progval@Andromede:/tmp$ mkdir test_imports progval@Andromede:/tmp$ echo "from . imp

[issue17940] extra code in argparse.py

2013-05-11 Thread Yogesh Chaudhari
Yogesh Chaudhari added the comment: Removed the duplicated code from argparse.py -- keywords: +patch nosy: +Yogesh.Chaudhari Added file: http://bugs.python.org/file30214/issue17940.patch ___ Python tracker

[issue17940] extra code in argparse.py

2013-05-11 Thread Yogesh Chaudhari
Yogesh Chaudhari added the comment: Remove extra code in argparse.py for 2.7 branch -- hgrepos: +190 Added file: http://bugs.python.org/file30215/issue17940-27.patch ___ Python tracker _

[issue17940] extra code in argparse.py

2013-05-11 Thread Yogesh Chaudhari
Yogesh Chaudhari added the comment: I have added a patch for default branch as well, because IMO the same issue exists in all branches -- ___ Python tracker ___

[issue15642] Integrate pickle protocol version 4 GSoC work by Stefan Mihaila

2013-05-11 Thread Stefan Mihaila
Changes by Stefan Mihaila : Added file: http://bugs.python.org/file30216/d0c3a8d4947a.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue17914] add os.cpu_count()

2013-05-11 Thread Yogesh Chaudhari
Yogesh Chaudhari added the comment: Based on the conversation and the particular inputs to the thread form neologix and ezio, I would like to submit this patch. It probably needs modification(s) as I am not sure what to do with the implementation that is already present in multiprocessing. Th

[issue17914] add os.cpu_count()

2013-05-11 Thread Charles-François Natali
Charles-François Natali added the comment: > Based on the conversation and the particular inputs to the thread form > neologix and ezio, I would like to submit this patch. > > It probably needs modification(s) as I am not sure what to do with the > implementation that is already present in mult

[issue17914] add os.cpu_count()

2013-05-11 Thread Ned Batchelder
Ned Batchelder added the comment: A few small points: Use `num is None` instead of `num == None`. Use `isinstance(cpus, int)` rather than `type(cpus) is int`. And this I think will throw an exception in Python 3: `cpus >= 1 or cpus == None`, because you can't compare None to 1. -- _

[issue17945] tkinter/Python 3.3.0: peer_create doesn't instantiate Text

2013-05-11 Thread Gregory HOULDSWORTH
Gregory HOULDSWORTH added the comment: Noted: I assumed 'works for me' meant user approval of proposed fix, pending 'official' sanction. Didn't catch the BNF-like syntax for issue linking, hence the literal <>'s in my original post. Thank you for clarifying those. -- __

[issue17914] add os.cpu_count()

2013-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think the idiom `os.cpu_count() or 1` should be mentioned in the documentation an officially recommended. Otherwise people will produce a non-portable code which works on their developer's computers but not on exotic platforms. I have added some other com

[issue17914] add os.cpu_count()

2013-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: I agree with Charles-François. An approach using C library functions is far superior to launching external commands. -- ___ Python tracker ___

[issue11406] There is no os.listdir() equivalent returning generator instead of list

2013-05-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: -serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue17914] add os.cpu_count()

2013-05-11 Thread Charles-François Natali
Charles-François Natali added the comment: > I think the idiom `os.cpu_count() or 1` should be mentioned in the > documentation an officially recommended. Otherwise people will produce a > non-portable code which works on their developer's computers but not on > exotic platforms. And I mainta

[issue17914] add os.cpu_count()

2013-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > And I maintain it's an ugly idiom ;-) > Since the user can't do anything except falling back to 1, > os.cpu_count() should always return a positive number (1 by default). The user can also raise an error. For example, if I'm writing a benchmark to measure per-

[issue17905] Add check for locale.h

2013-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: There are more places where including locale.h is guarded by HAVE_LANGINFO_H. Also, there are places where including locale.h isn't guarded by anything (such as Python/formatter_unicode.c), so I don't think we need the new configure check. -- nosy: +p

[issue17953] sys.modules cannot be reassigned

2013-05-11 Thread Christian Heimes
Changes by Christian Heimes : -- assignee: -> brett.cannon keywords: +3.3regression nosy: +brett.cannon ___ Python tracker ___ ___ Py

[issue17953] sys.modules cannot be reassigned

2013-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: I wouldn't call it a bug personally. The modules dictionary is used in all kinds of places in the interpreter; you can change the dictionary's contents, but not swap it with another one. It's just a pity that we can't forbid reassignment altogether. -

[issue17237] m68k aligns on 16bit boundaries.

2013-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PyASCIIObject is allocated on heap and should have a maximal alignment enough for every type. If sizeof(PyASCIIObject) % SIZEOF_LONG == 0 then dest is at least long-aligned. Currently sizeof(PyASCIIObject) is 22 on m68k and the optimization is switched off a

[issue17237] m68k aligns on 16bit boundaries.

2013-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > PyASCIIObject is allocated on heap and should have a maximal alignment > enough for every type. If sizeof(PyASCIIObject) % SIZEOF_LONG == 0 > then dest is at least long-aligned. Currently sizeof(PyASCIIObject) is > 22 on m68k and the optimization is switched of

[issue17237] m68k aligns on 16bit boundaries.

2013-05-11 Thread mirabilos
mirabilos added the comment: Right, keeping it simple helps in preventing accidents, and the code block looks full of magic enough as-is. Maybe add a comment block that says: /* * m68k is a bit different from most architectures in that objects * do not use "natural alignment" - for example,

[issue17914] add os.cpu_count()

2013-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Since the user can't do anything except falling back to 1, > os.cpu_count() should always return a positive number (1 by default). In general I agree with you. Actually the os module should contains two functions: cpu_count() which fallbacks to 1 and is_cpu

[issue17237] m68k aligns on 16bit boundaries.

2013-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Well, then already too much bikeshedding for such simple fix. Antoine, do you want to commit a fix? -- ___ Python tracker ___ ___

[issue17954] Support creation of extensible enums through metaclass subclassing

2013-05-11 Thread Nick Coghlan
New submission from Nick Coghlan: Guido chose to follow Java in enforcing the invariant "Enum members are instances of that Enum" for PEP 435 (i.e. "assert (all(isinstance(x, SomeEnum) for x in SomeEnum)"). As a consequence, the Enum metaclass prevents subclassing of Enums with defined members

[issue17954] Support creation of extensible enums through metaclass subclassing

2013-05-11 Thread Nick Coghlan
Changes by Nick Coghlan : -- dependencies: +Code, test, and doc review for PEP-0435 Enum ___ Python tracker ___ ___ Python-bugs-list m

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-11 Thread Nick Coghlan
Nick Coghlan added the comment: The accepted PEP states that the frame hack should be removed: "To support pickling of these enums, the module name can be specified using the module keyword-only argument." Ergo, if you don't specify it, they cannot be pickled. Explicit is better than implicit

[issue17237] m68k aligns on 16bit boundaries.

2013-05-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0f8022ac88ad by Antoine Pitrou in branch '3.3': Issue #17237: Fix crash in the ASCII decoder on m68k. http://hg.python.org/cpython/rev/0f8022ac88ad New changeset 201ae2d02328 by Antoine Pitrou in branch 'default': Issue #17237: Fix crash in the ASCI

[issue17952] editors-and-tools section of devguide does not appear to be accurate

2013-05-11 Thread Ramchandra Apte
Changes by Ramchandra Apte : -- title: editors-and-tools section of devguide does not appear to be ccurate -> editors-and-tools section of devguide does not appear to be accurate ___ Python tracker ___

[issue17237] m68k aligns on 16bit boundaries.

2013-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, I hope I got the fix right :) Thanks mirabilos for the comment suggestion, I used a modified version. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-11 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: It turned out to be slightly more compilcated. Two additions make this complete: 1) check for the subtype OR the Py_None when removing subclass. This removes any dependency on the order in which weakrefs are cleared. 2) When the type is cleared, manua

[issue17237] m68k aligns on 16bit boundaries.

2013-05-11 Thread mirabilos
mirabilos added the comment: Thanks Antoine! Now, for “finishing up” this… to follow up on Stefan’s comment… is there any way I can run the testsuite from an installed Python (from the Debian packages)? (I build the packages with disabled testsuite, to get the rest of the system running again

[issue17237] m68k aligns on 16bit boundaries.

2013-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Now, for “finishing up” this… to follow up on Stefan’s comment… is > there any way I can run the testsuite from an installed Python (from > the Debian packages)? "python -m test" (with any options you might like), but we don't guarantee that all tests pass on

[issue17237] m68k aligns on 16bit boundaries.

2013-05-11 Thread mirabilos
mirabilos added the comment: Antoine Pitrou dixit: >"python -m test" (with any options you might like), but we don't No, I tried that (as it was the only thing I could find on the ’net as well) on an i386 system and only get: tglase@tglase:~ $ python2.7 -m test /usr/bin/python2.7: No module na

[issue17237] m68k aligns on 16bit boundaries.

2013-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > >"python -m test" (with any options you might like), but we don't > > No, I tried that (as it was the only thing I could find on the > ’net as well) on an i386 system and only get: Ah, that's because the system Python install doesn't include the test suite. P

[issue11406] There is no os.listdir() equivalent returning generator instead of list

2013-05-11 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: -brian.curtin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue17237] m68k aligns on 16bit boundaries.

2013-05-11 Thread mirabilos
mirabilos added the comment: Antoine Pitrou dixit: >(note, on 2.7, it's "python -m test.regrtest") That indeed does things. So I had mistaken them for the same problem. >Ah, that's because the system Python install doesn't include the test >suite. Perhaps you have to install an additional pack

[issue17237] m68k aligns on 16bit boundaries.

2013-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Oh well, then it’ll just have to wait. Do you have a preferred > place where I can submit the test results, as it’s getting > very off-topic here? Well, if everything works fine, you don't have to submit them! If you get test failures, you can open issues for

[issue17955] Minor updates to Functional HOWTO

2013-05-11 Thread A.M. Kuchling
New submission from A.M. Kuchling: I read through the 3.x Functional HOWTO, and it only seems to require a few minor updates. The attached patch: * adds a forward link to skip the theoretical discussion in the first section. * remove stray extra comma * clarify what filterfalse() is the opposi

[issue17945] tkinter/Python 3.3.0: peer_create doesn't instantiate Text

2013-05-11 Thread Guilherme Polo
Guilherme Polo added the comment: If someone decides to commit this, please check that the name of the widget in Tcl is always adequate. -- ___ Python tracker ___ ___

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-11 Thread Guido van Rossum
Guido van Rossum added the comment: Sorry everyone, the frame hack needs to stay. This is not negotiable. -- nosy: +gvanrossum ___ Python tracker ___ ___

[issue17914] add os.cpu_count()

2013-05-11 Thread Yogesh Chaudhari
Yogesh Chaudhari added the comment: Appreciate everyone's feedback. I have modified the patch based on further messages in the thread. @Neologix modified posixmodule according to one in Trent's branch and used that for cpu_count(). Kindly suggest improvements/changes if any. @Ned: Thanks for

[issue17956] add ScheduledExecutor

2013-05-11 Thread Charles-François Natali
New submission from Charles-François Natali: Here's an implementation of a new ScheduledExecutor abstract class, with a concrete ScheduledThreadPoolExecutor implementation (see #995907). The aim is to provide a flexible, efficient and consistent framework for delayed and periodic tasks, leverag

[issue995907] memory leak with threads and enhancement of the timer class

2013-05-11 Thread Charles-François Natali
Charles-François Natali added the comment: OK, I just created #17956 for ScheduledExecutor, closing this one. -- resolution: -> duplicate stage: test needed -> committed/rejected status: open -> closed superseder: -> add ScheduledExecutor ___ Python

[issue17547] "checking whether gcc supports ParseTuple __format__... " erroneously returns yes with gcc 4.8

2013-05-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9d50af4c482f by Benjamin Peterson in branch '2.7': -Wformat is needed by gcc 4.8 (closes #17547) http://hg.python.org/cpython/rev/9d50af4c482f New changeset 94a7475d3a5f by Benjamin Peterson in branch '3.3': -Wformat is needed by gcc 4.8 (closes #17

[issue17956] add ScheduledExecutor

2013-05-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +bquinlan, gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue17547] "checking whether gcc supports ParseTuple __format__... " erroneously returns yes with gcc 4.8

2013-05-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: We really ought to just scrap that configure test. -- ___ Python tracker ___ ___ Python-bugs-list

[issue17955] Minor updates to Functional HOWTO

2013-05-11 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue17937] Collect garbage harder at shutdown

2013-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: I was asked what this patch did exactly: it simply calls the garbage collector one last time after sys.modules has been cleared. I don't know it it makes much of a difference, but it may limit the amount of leaking when doing successive Py_Initialize/Py_Finali

[issue17956] add ScheduledExecutor

2013-05-11 Thread Charles-François Natali
Changes by Charles-François Natali : Added file: http://bugs.python.org/file30222/scheduled-2.diff ___ Python tracker ___ ___ Python-bugs-list

[issue17905] Add check for locale.h

2013-05-11 Thread Antonio Cavallo
Antonio Cavallo added the comment: I see, in that case wouldn't make more sense completely remove the check for the langinfo.h either? I think is better to close the issue to keep the noise low. Thanks -- resolution: -> works for me status: open -> closed

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-11 Thread Nick Coghlan
Nick Coghlan added the comment: Why we need two ways to do it? If "module=__name__" is available, what's the rationale for providing the option of leaving it out when pickling support is required? (The only times the frame hack will work to enable pickling, the explicit fix will also work). -

[issue17905] Add check for locale.h

2013-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: You might have misunderstood me. Since locale.h appears to exist on all systems (including Android) there's no need to add a check for it in configure. On the other hand, it is correct to fix the existing guards like your patch proposes to do, except that ther

[issue17956] add ScheduledExecutor

2013-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It will be good to be compatible with sched.scheduler. -- nosy: +serhiy.storchaka ___ Python tracker ___ _

[issue17914] add os.cpu_count()

2013-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yogesh, didn't you notice comments on Rietveld? -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue17953] sys.modules cannot be reassigned

2013-05-11 Thread Brett Cannon
Brett Cannon added the comment: There is no good way to solve this. At the C level there interpreter struct has two key fields, sysdict and modules. The former is sys.__dict__ and the latter is sys.modules. But when you re-assign sys.modules you then break the assumption that sys.modules is th

[issue1159051] Handle corrupted gzip files with unexpected EOF

2013-05-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset abc780332b60 by Benjamin Peterson in branch '2.7': backout 214d8909513d for regressions (#1159051) http://hg.python.org/cpython/rev/abc780332b60 -- ___ Python tracker

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-11 Thread Eli Bendersky
Eli Bendersky added the comment: Ethan, something is wrong with _StealthProperty. Well, two things. First, it's way too general and can be cut to just what Enum needs. Second, this is enough to make the tests pass: class _StealthProperty(): """ Returns the value in the instance, or the

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-11 Thread Eli Bendersky
Eli Bendersky added the comment: Also, your test must run within the regrtest framework. Currently I get: ./python -mtest.regrtest test_enum [1/1] test_enum test test_enum failed -- Traceback (most recent call last): File "/home/eliben/python-src/default/Lib/test/test_enum.py", line 245, in t

[issue17914] add os.cpu_count()

2013-05-11 Thread Yogesh Chaudhari
Yogesh Chaudhari added the comment: @Serhiy Sorry, I missed your comments in the thread. I have made 2 changes and ignored the cpu_count() returning 0, because it returns -1 on failure, else give the number of CPUs. Also the test_os, checks for 0 return if that was to e the case. -- Ad

[issue17934] Add a frame method to clear expensive details

2013-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. Guido, I would hope this may be useful to you. -- keywords: +patch nosy: +gvanrossum stage: needs patch -> patch review Added file: http://bugs.python.org/file30224/frame_clear.patch ___ Python tracke

[issue17914] add os.cpu_count()

2013-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Now we have three cpu_count() functions: multiprocessing.cpu_count() raises an exception on failure, posix.cpu_count() returns -1, and os.cpu_count() returns None. It will be easy to get rid of Python wrapper in the os module and return None directly from C

[issue17934] Add a frame method to clear expensive details

2013-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch to avoid clearing executing frames. Note that the new f_executing member should be re-usable to compute gi_running without storing it. -- Added file: http://bugs.python.org/file30225/frame_clear2.patch

[issue17914] add os.cpu_count()

2013-05-11 Thread Yogesh Chaudhari
Yogesh Chaudhari added the comment: Returning None from C code sounds reasonable to me. Anyone else wants to pitch in with suggestions for/against this? -- ___ Python tracker __

[issue14097] Improve the "introduction" page of the tutorial

2013-05-11 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +akuchling ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1b595399e070 by Benjamin Peterson in branch 'default': simplify #17947 test with weakrefs http://hg.python.org/cpython/rev/1b595399e070 -- nosy: +python-dev ___ Python tracker

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: I copied the wrong bug number. should have been #17927. sorry -- nosy: +benjamin.peterson ___ Python tracker ___

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-11 Thread Eli Bendersky
Eli Bendersky added the comment: Benjamin, I guess you can just unlink the message from the issue? [and then your clarification, and when again this message from me ;-)] -- ___ Python tracker _

[issue17914] add os.cpu_count()

2013-05-11 Thread Charles-François Natali
Charles-François Natali added the comment: > Returning None from C code sounds reasonable to me. Anyone else wants to > pitch in with suggestions for/against this? Go for it ;-) -- ___ Python tracker

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-11 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- Removed message: http://bugs.python.org/msg188954 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-11 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- Removed message: http://bugs.python.org/msg188955 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-11 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- Removed message: http://bugs.python.org/msg188956 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue17956] add ScheduledExecutor

2013-05-11 Thread Charles-François Natali
Charles-François Natali added the comment: > It will be good to be compatible with sched.scheduler. What do you mean? Actually, this would kind of supersede the sched module (except that the sched module supports custom time and delay functions). By the way, for those that didn't realize it, it

[issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive

2013-05-11 Thread Tshepang Lekhonkhobe
Tshepang Lekhonkhobe added the comment: ping -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive

2013-05-11 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti stage: -> patch review type: -> behavior versions: -Python 3.2 ___ Python tracker ___

[issue15130] remove redundant paragraph in socket howto

2013-05-11 Thread Tshepang Lekhonkhobe
Tshepang Lekhonkhobe added the comment: ping -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue17914] add os.cpu_count()

2013-05-11 Thread Yogesh Chaudhari
Yogesh Chaudhari added the comment: Modified patch to return None from C code -- Added file: http://bugs.python.org/file30226/issue17914-3.patch ___ Python tracker ___ __

[issue17957] remove outdated (and unexcellent) paragraph in whatsnew

2013-05-11 Thread Tshepang Lekhonkhobe
New submission from Tshepang Lekhonkhobe: The first part looks incomplete, and the second part is outdated. The whole paragraph doesn't add much value I believe, so should just go. -- assignee: docs@python components: Documentation files: diff messages: 188962 nosy: docs@python, tshepan

[issue17914] add os.cpu_count()

2013-05-11 Thread Ned Batchelder
Ned Batchelder added the comment: @Yogesh: if cpus is None, then this will raise an exception in Python 3: `cpus >= 1 or cpus == None` Perhaps you don't have enough test cases yet. -- ___ Python tracker

[issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive

2013-05-11 Thread Tshepang Lekhonkhobe
Tshepang Lekhonkhobe added the comment: @ezio why remove 3.2 from applicable versions -- ___ Python tracker ___ ___ Python-bugs-list m

[issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive

2013-05-11 Thread Ezio Melotti
Ezio Melotti added the comment: 3.2 only gets security fixes. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17957] remove outdated (and unexcellent) paragraph in whatsnew

2013-05-11 Thread Ezio Melotti
Ezio Melotti added the comment: The patch you uploaded is wrong. -- nosy: +ezio.melotti stage: -> needs patch type: -> enhancement versions: -Python 3.2 ___ Python tracker ___

[issue17914] add os.cpu_count()

2013-05-11 Thread Yogesh Chaudhari
Yogesh Chaudhari added the comment: @Ned: if cpus is None, then this will raise an exception in Python 3: `cpus >= 1 or cpus == None` I understand that cpus >= INTEGER will raise an exception and have already modified the condition to remove that kind of check. I was merely stating that equa

[issue17914] add os.cpu_count()

2013-05-11 Thread STINNER Victor
STINNER Victor added the comment: Not being able to decide for the default value is not a problem: just an optional "default" argument, which is 1 by default (most convinient value), return default on error. os.get_terminal_size() has a similar API for example. -- __

[issue17905] Add check for locale.h

2013-05-11 Thread Antonio Cavallo
Antonio Cavallo added the comment: ok I see it, thanks. I've attached a new patch fixing the files with the locale's guards. Modules/readline.c might have the SAVE_LOCALE renamed into HAVE_SETLOCALE but the patch doesn't address that bit. Android has definitively locale.h but it is a dummy im

[issue8876] distutils should not assume that hardlinks will work

2013-05-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: Not blocking on this old bug. -- priority: release blocker -> normal ___ Python tracker ___ ___ Py

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-05-11 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Thanks Stefan for the patch. It's very much appreciated. I will try to review it soon. Of the features you proposed, the twos I would like to take a look again is implicit memoization and the BAIL_OUT opcode. For the implicit memoization feature, we wil

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-05-11 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file30229/pickle4+methods.patch ___ Python tracker ___ ___ Python-bugs-

[issue17838] Can't assign a different value for sys.stdin in IDLE

2013-05-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4b3d18117813 by Benjamin Peterson in branch '2.7': prevent IDLE from trying to close when sys.stdin is reassigned (#17838) http://hg.python.org/cpython/rev/4b3d18117813 -- nosy: +python-dev ___ Python tra

[issue17838] Can't assign a different value for sys.stdin in IDLE

2013-05-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: I applied the least controversial patch, which fixes the regression, so 2.7.5 can be released. Feel free to tweak as needed. -- priority: release blocker -> normal ___ Python tracker

[issue17934] Add a frame method to clear expensive details

2013-05-11 Thread Nick Coghlan
Nick Coghlan added the comment: Mostly looks good to me, but I think I'd prefer that attempts to clear a running frame raise RuntimeError with an appropriate message. I also wonder how this might relate to Eric Snow's proposal to reference the currently executing function from the frame object

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-11 Thread Ethan Furman
Ethan Furman added the comment: Eli, The original _StealthProperty checked to see if it was being called on instance or class, and if it was the class it invoked __getattr__ to attempt a lookup for an enum member. Your version does not check, but, ironically, the exception raised is Attribut

[issue17958] int(math.log(2**i, 2))

2013-05-11 Thread Alex Rhatushnyak
New submission from Alex Rhatushnyak: In Python 2.7.4: import math for i in range(40, 55): print int(math.log(2**i, 2)), output: 40 41 42 43 44 45 46 46 48 49 49 50 52 53 53 -- messages: 188976 nosy: Alex.Rhatushnyak priority: normal severity: normal status: open title: int(math.log(

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-11 Thread Ethan Furman
Ethan Furman added the comment: regrtest framework now supported (had to change the module name I was passing in from '__main__' to __name__). -- ___ Python tracker ___ ___

[issue17954] Support creation of extensible enums through metaclass subclassing

2013-05-11 Thread Ethan Furman
Ethan Furman added the comment: I'm sure this is a dumb question, but I have lots of them so thought I'd share. Can this issue be resolved simply by making the `_get_mixins` method `get_mixins`? -- nosy: +ethan.furman ___ Python tracker

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-11 Thread Nick Coghlan
Nick Coghlan added the comment: Guido has promised an explanation for why he wants to keep the frame hack once he is back at work next week. To help him target that reply appropriately for my concrete objections to retaining it, I'd like to explain a bit more about why I think it's fundamental

[issue17954] Support creation of extensible enums through metaclass subclassing

2013-05-11 Thread Nick Coghlan
Nick Coghlan added the comment: I don't think that would be wise - there's currently other logic in _get_mixins that subclasses would then have to duplicate. I was thinking more of an allow_subclass() API that subtypes could override to always return True. EnumMeta would then just factor the r

[issue17959] Alternate approach to aliasing for PEP 435

2013-05-11 Thread Nick Coghlan
New submission from Nick Coghlan: Creating this as a separate issue so as not to delay incorporation of the accepted PEP. One legitimate criticism of the accepted PEP 435 is that the combination of requiring explicit assignment of values *and* allowing aliasing by default is that aliases may

[issue17959] Alternate approach to aliasing for PEP 435

2013-05-11 Thread Nick Coghlan
Changes by Nick Coghlan : -- dependencies: +Code, test, and doc review for PEP-0435 Enum ___ Python tracker ___ ___ Python-bugs-list m

  1   2   >