[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

[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 rep...@bugs.python.org http://bugs.python.org/issue17956 ___

[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 rep...@bugs.python.org http://bugs.python.org/issue17914 ___ ___

[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

[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 rep...@bugs.python.org

[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

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

[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

[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 rep...@bugs.python.org http://bugs.python.org/issue17914

[issue14097] Improve the introduction page of the tutorial

2013-05-11 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +akuchling ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14097 ___ ___ Python-bugs-list

[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 rep...@bugs.python.org

[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 rep...@bugs.python.org http://bugs.python.org/issue17947 ___

[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 rep...@bugs.python.org http://bugs.python.org/issue17947

[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 rep...@bugs.python.org

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

2013-05-11 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- Removed message: http://bugs.python.org/msg188954 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17947 ___

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

2013-05-11 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- Removed message: http://bugs.python.org/msg188955 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17947 ___

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

2013-05-11 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- Removed message: http://bugs.python.org/msg188956 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17947 ___

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

[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 rep...@bugs.python.org http://bugs.python.org/issue16805 ___ ___ Python-bugs-list mailing list

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

2013-05-11 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - patch review type: - behavior versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16805 ___

[issue15130] remove redundant paragraph in socket howto

2013-05-11 Thread Tshepang Lekhonkhobe
Tshepang Lekhonkhobe added the comment: ping -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15130 ___ ___ Python-bugs-list mailing list

[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 rep...@bugs.python.org http://bugs.python.org/issue17914

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

[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 rep...@bugs.python.org

[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 rep...@bugs.python.org http://bugs.python.org/issue16805 ___

[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 rep...@bugs.python.org http://bugs.python.org/issue16805 ___ ___ Python-bugs-list

[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 rep...@bugs.python.org http://bugs.python.org/issue17957

[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

[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

[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 rep...@bugs.python.org http://bugs.python.org/issue8876 ___

[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

[issue17810] Implement PEP 3154 (pickle protocol 4)

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

[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

[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 rep...@bugs.python.org

[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

[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

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

[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 rep...@bugs.python.org http://bugs.python.org/issue17947

[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

<    1   2