[issue17908] Unittest runner needs an option to call gc.collect() after each test
Changes by Phil Connell pconn...@gmail.com: -- nosy: +pconnell ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17908 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17930] Search not needed in combinations_with_replacement
Raymond Hettinger added the comment: Thanks Tim :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17930 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17920] Documentation: complete ordering should be total ordering
Raymond Hettinger added the comment: It can be closed now. Thanks for the reminder. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17920 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14191] argparse doesn't allow optionals within positionals
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 to achieve my goal, as it was more ambitious than they presently support. If the [] value is significantly problematical in some manner, could positional nargs be set to a sentinal value that would avoid the assignment of the [] value? I realize that would require code changes in some other function or functions, in addition to the added new functions, so that would make the patch a bit more intrusive. If _fallback helps some folks with understanding errors clearly, I won't object to it. I guess it would only be programmers that would be confused, because they would be the ones interpreting the errors... and with adequate testing, should fix the programming errors before the users get a chance to be confused. So maybe your next .patch will be ready to ship! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14191 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17952] setup#editors-and-tools
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 nosy: ezio.melotti, tshepang priority: normal severity: normal status: open title: setup#editors-and-tools ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17952 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17952] editors-and-tools section of devguide does not appear to be ccurate
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- title: setup#editors-and-tools - editors-and-tools section of devguide does not appear to be ccurate ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17952 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17953] sys.modules cannot be reassigned
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 . import module test_imports/__init__.py progval@Andromede:/tmp$ echo print('foo') test_imports/module.py progval@Andromede:/tmp$ python3.3 Python 3.3.1 (default, Apr 6 2013, 13:58:40) [GCC 4.7.2] on linux Type help, copyright, credits or license for more information. import sys sys.modules = dict(sys.modules) import test_imports Traceback (most recent call last): File stdin, line 1, in module File ./test_imports/__init__.py, line 1, in module from . import module SystemError: Parent module 'test_imports' not loaded, cannot perform relative import progval@Andromede:/tmp$ python3.2 Python 3.2.3 (default, May 6 2013, 01:46:35) [GCC 4.7.2] on linux2 Type help, copyright, credits or license for more information. import sys sys.modules = dict(sys.modules) import test_imports foo -- components: Interpreter Core messages: 188901 nosy: Valentin.Lorentz priority: normal severity: normal status: open title: sys.modules cannot be reassigned type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17953 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17940] extra code in argparse.py
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 rep...@bugs.python.org http://bugs.python.org/issue17940 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17940] extra code in argparse.py
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 rep...@bugs.python.org http://bugs.python.org/issue17940 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17940] extra code in argparse.py
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 rep...@bugs.python.org http://bugs.python.org/issue17940 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15642] Integrate pickle protocol version 4 GSoC work by Stefan Mihaila
Changes by Stefan Mihaila mstefa...@gmail.com: Added file: http://bugs.python.org/file30216/d0c3a8d4947a.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15642 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
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. This patch simply calls the os.cpu_count() from multiprocessing now and behaves as it would have previously. The test cases are also added to test_os similar to ones from multiprocessing. -- components: +2to3 (2.x to 3.x conversion tool) keywords: +patch nosy: +Yogesh.Chaudhari Added file: http://bugs.python.org/file30217/issue17914.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
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 multiprocessing. This patch simply calls the os.cpu_count() from multiprocessing now and behaves as it would have previously. Thanks, but it would be better to reuse Trent's C implementation instead of multiprocessing's: http://hg.python.org/sandbox/trent/file/dd1c2fd3aa31/Modules/posixmodule.c#l10213 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17945] tkinter/Python 3.3.0: peer_create doesn't instantiate Text
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17945 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
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 comments on Rietveld. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
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 rep...@bugs.python.org http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11406] There is no os.listdir() equivalent returning generator instead of list
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: -serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11406 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
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 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). That's AFAICT what all other platforms (Java, Ruby, etc) do, because it makes sense. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
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-core scaling performance, I would like to bail out if I can't calculate the number of cores (rather than report incorrect results). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17905] Add check for locale.h
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: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17905 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17953] sys.modules cannot be reassigned
Changes by Christian Heimes li...@cheimes.de: -- assignee: - brett.cannon keywords: +3.3regression nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17953 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17953] sys.modules cannot be reassigned
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. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17953 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17237] m68k aligns on 16bit boundaries.
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 at compile time. When PyASCIIObject will grow to 24 bytes the optimization will switched on and perhaps will have some effect. I prefer checks for features instead of concrete names. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17237 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17237] m68k aligns on 16bit boundaries.
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 off at compile time. When PyASCIIObject will grow to 24 bytes the optimization will switched on and perhaps will have some effect. I prefer checks for features instead of concrete names. This is a bugfix, please let's keep it simple. Checking for __m68k__ ensures that other architectures aren't affected by mistake. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17237 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17237] m68k aligns on 16bit boundaries.
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, int and long are * only aligned at 2-byte boundaries. Tests have shown that skipping * the optimised version will even speed up m68k, so we #ifdef * for the odd duck out here. */ Then we have an in-situ documentation point for why that ifdef is there and why m68k is “the odd duck” and this whitelist method is used. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17237 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
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_counting_supported() for rare need. But this looks even more ugly and I choose single function even if in most cases I need use strange idiom. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17237] m68k aligns on 16bit boundaries.
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 rep...@bugs.python.org http://bugs.python.org/issue17237 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17954] Support creation of extensible enums through metaclass subclassing
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. This is a reasonable design choice, but one that limits the applicability of the standard library enum solution for use cases that currently rely on this feature of a custom enum implementation (including flufl.enum, the original inspiration for this feature). An alternative reasonable design choice is to allow extension of enumerations (similar to flufl.enum) and relax the invariant to Enum members are an instance of that Enum or an Enum-derived parent class of that Enum (i.e. assert (all(issubclass(type(x), Enum) and type(x) in SomeEnum.mro() for x in SomeEnum)) There is no need to support this directly in the standard library, but it would be valuable to make it straightforward to support in an Enum variant by subclassing the standard metaclass (similar to the customisation mechanisms provided to support things like autonumbered enums through a derived metaclass). Currently, implementing this behaviour involves overriding a private method of the metaclass (EnumMetaclass._get_mixins) -- messages: 188920 nosy: ncoghlan priority: low severity: normal stage: needs patch status: open title: Support creation of extensible enums through metaclass subclassing type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17954 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17954] Support creation of extensible enums through metaclass subclassing
Changes by Nick Coghlan ncogh...@gmail.com: -- dependencies: +Code, test, and doc review for PEP-0435 Enum ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17954 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17947] Code, test, and doc review for PEP-0435 Enum
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, and this hack should not propagate beyond namedtuple (it should actually be deprecated in namedtuple as well). As far as the second point goes, I had already reviewed the PEP implementation before making the comment (that's why I am reasonably sure you can already do it just by overriding _get_mixins). I see it as similar to the changes that were already made to support autonumbered subtypes. However, also note that I said we should wait before doing anything about providing a supported mechanism for that customisation. I've now created issue 17954 to cover a possible refactoring and documentation of that part of the implementation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17947 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17237] m68k aligns on 16bit boundaries.
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 ASCII decoder on m68k. http://hg.python.org/cpython/rev/201ae2d02328 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17237 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17952] editors-and-tools section of devguide does not appear to be accurate
Changes by Ramchandra Apte maniandra...@gmail.com: -- 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 rep...@bugs.python.org http://bugs.python.org/issue17952 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17237] m68k aligns on 16bit boundaries.
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 rep...@bugs.python.org http://bugs.python.org/issue17237 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17936] O(n**2) behaviour when adding/removing classes
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, manually remove ourselves from all the base classes. It is because of the lack of 2) that the original version was always clearing out all stale weakrefs when new subclasses were added. -- Added file: http://bugs.python.org/file30218/subtype.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17936 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17237] m68k aligns on 16bit boundaries.
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, since python3.3 was recently made required and we had never built it before.) Otherwise I guess I could run “make test” on one of the earlier trees I used for the timing… but that machine is currently building six Linux kernel flavours from the src:linux package and thus will not be available for the next one and a half week or so… -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17237 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17237] m68k aligns on 16bit boundaries.
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 an installed Python. But at least you will be able to spot any hard crashes :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17237 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17237] m68k aligns on 16bit boundaries.
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 named test.__main__; 'test' is a package and cannot be directly executed 1|tglase@tglase:~ $ python3.2 -m test /usr/bin/python3.2: No module named test.__main__; 'test' is a package and cannot be directly executed Same when adding ‘-h’. bye, //mirabilos -- Gast: „Ein Bier, bitte!“ Wirt: „Geht auch alkoholfrei?“ Gast: „Geht auch Spielgeld?“ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17237 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17237] m68k aligns on 16bit boundaries.
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. Perhaps you have to install an additional package, python-dev perhaps? (note, on 2.7, it's python -m test.regrtest) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17237 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11406] There is no os.listdir() equivalent returning generator instead of list
Changes by Brian Curtin br...@python.org: -- nosy: -brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11406 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17237] m68k aligns on 16bit boundaries.
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 package, python-dev perhaps? tglase@tglase:~ $ l /usr/lib/python2.7/test/ __init__.py pystone.py* regrtest.py* test_support.py __init__.pyc pystone.pyc regrtest.pyc test_support.pyc tglase@tglase:~ $ l /usr/lib/python3.2/test/ __init__.py __pycache__/ pystone.py* regrtest.py* support.py Maybe it’s just not packaged… these are all I can find, and installing python3.2-dev doesn’t fix it. 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? bye, //mirabilos -- Using Lynx is like wearing a really good pair of shades: cuts out the glare and harmful UV (ultra-vanity), and you feel so-o-o COOL. -- Henry Nelson, March 1999 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17237 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17237] m68k aligns on 16bit boundaries.
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 the individual test failures. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17237 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17955] Minor updates to Functional HOWTO
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 opposite of. * (more significant) Describe compress(), the combinatoric functions in their own section, and accumulate(). -- assignee: docs@python components: Documentation files: functional.txt messages: 188931 nosy: akuchling, docs@python priority: low severity: normal stage: patch review status: open title: Minor updates to Functional HOWTO type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file30219/functional.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17955 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17945] tkinter/Python 3.3.0: peer_create doesn't instantiate Text
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 rep...@bugs.python.org http://bugs.python.org/issue17945 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17947] Code, test, and doc review for PEP-0435 Enum
Guido van Rossum added the comment: Sorry everyone, the frame hack needs to stay. This is not negotiable. -- nosy: +gvanrossum ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17947 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
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 the suggestions. I have applied them wherever applicable. However regarding And this I think will throw an exception in Python 3: `cpus = 1 or cpus == None`, because you can't compare None to 1. It does not throw any exceptions as of now. -- Added file: http://bugs.python.org/file30220/issue17914-1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17956] add ScheduledExecutor
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, leveraging on futures. Incidentally, this supersedes threading.Timer, which is quite fragile and inefficient. Here's a patch with test (I didn't write the documentation, I prefer to have some feedback first :-), the API is complete. There's one thing that bothers me with the current implementation: when a future is cancelled, like for regular ThreadPoolExecutor, it doesn't get removed from the work queue right away, but only when it gets dequeued. For a delayed future, this means that one has to wait for the next scheduled execution (i.e. worst case now + future.period) for it to be effectively cancelled and removed from the queue, and for the executor to be shutdown. I'm considering using a callback (Future.add_done_callback()), that's kind of hackish but I don't see any other way. -- components: Library (Lib) files: scheduled-1.diff keywords: needs review, patch messages: 188935 nosy: neologix, pitrou, r.david.murray priority: normal severity: normal stage: patch review status: open title: add ScheduledExecutor type: enhancement Added file: http://bugs.python.org/file30221/scheduled-1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17956 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue995907] memory leak with threads and enhancement of the timer class
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 tracker rep...@bugs.python.org http://bugs.python.org/issue995907 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17547] checking whether gcc supports ParseTuple __format__... erroneously returns yes with gcc 4.8
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 #17547) http://hg.python.org/cpython/rev/94a7475d3a5f New changeset f12e3ce66ae6 by Benjamin Peterson in branch 'default': merge 3.3 (#17547) http://hg.python.org/cpython/rev/f12e3ce66ae6 -- nosy: +python-dev resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17547 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17956] add ScheduledExecutor
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +bquinlan, gvanrossum ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17956 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17547] checking whether gcc supports ParseTuple __format__... erroneously returns yes with gcc 4.8
Benjamin Peterson added the comment: We really ought to just scrap that configure test. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17547 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17955] Minor updates to Functional HOWTO
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17955 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17937] Collect garbage harder at shutdown
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_Finalize calls. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17937 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17905] Add check for locale.h
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17905 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17947] Code, test, and doc review for PEP-0435 Enum
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). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17947 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17905] Add check for locale.h
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 there appears to be more places to fix. I'm reopening the issue. -- resolution: works for me - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17905 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17956] add ScheduledExecutor
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
Serhiy Storchaka added the comment: Yogesh, didn't you notice comments on Rietveld? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17953] sys.modules cannot be reassigned
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 the same dict as that contained in interp-modules. And this all goes out the window as the C code is expected to use interp-modules while the Python code in importlib only has access to sys.modules. The reason this used to work is your new dictionary was completely ignored and so we basically a no-op from the perspective of import (done in Python 2.7 but same result in any version up to Python 3.3):: import sys original_modules = sys.modules new_modules = sys.modules.copy() sys.modules = new_modules import pkg 'pkg' in original_modules True 'pkg' in new_modules False What really needs to happen is that sys.modules needs to be documented as something that cannot be replaced. If you really want to update it cleanly then do ``sys.modules.clear(); sys.modules.update(new_modules)``, but even that is tricky because removing certain modules will flat-out break Python. I have updated the issue to be a documentation one and added Python 3.4 to the affected versions. -- components: +Documentation -Interpreter Core keywords: +easy stage: - test needed type: behavior - versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17953 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1159051] Handle corrupted gzip files with unexpected EOF
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 http://bugs.python.org/issue1159051 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17947] Code, test, and doc review for PEP-0435 Enum
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 virtual attribute on the class. A virtual attribute is one that is looked up by __getattr__, as opposed to one that lives in __class__.__dict__ def __init__(self, fget): self.fget = fget def __get__(self, obj, objtype=None): return self.fget(obj) def __set__(self, obj, value): raise AttributeError(can't set attribute) def __delete__(self, obj): raise AttributeError(can't delete attribute) Now this is fishy because __get__ gets obj=None when called on a class and therefore self.fget(obj) raises an exception. But this gets caught somewhere in your code or tests and ignored. However, the right thing is still returned. I didn't have more time to investigate, but this must be cleaned out. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17947 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17947] Code, test, and doc review for PEP-0435 Enum
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 test_pickle_enum_function_with_module self.assertIs(Question.who, loads(dumps(Question.who))) _pickle.PicklingError: Can't pickle enum 'Question': attribute lookup __main__.Question failed 1 test failed: test_enum -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17947 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
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. -- Added file: http://bugs.python.org/file30223/issue17914-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17934] Add a frame method to clear expensive details
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 tracker rep...@bugs.python.org http://bugs.python.org/issue17934 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
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 code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17934] Add a frame method to clear expensive details
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17934 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14097] Improve the introduction page of the tutorial
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +akuchling ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14097 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17947] Code, test, and doc review for PEP-0435 Enum
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 http://bugs.python.org/issue17947 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17947] Code, test, and doc review for PEP-0435 Enum
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17947] Code, test, and doc review for PEP-0435 Enum
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
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 http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17947] Code, test, and doc review for PEP-0435 Enum
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17947] Code, test, and doc review for PEP-0435 Enum
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17947] Code, test, and doc review for PEP-0435 Enum
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17956] add ScheduledExecutor
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's heavily inspired by Java ScheduledExecutorService interface (pretty much like Python's Executor mirrors Java's ExecutorService). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17956 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16805] when building docs on Debian 7 -- ERROR: Error in note directive
Tshepang Lekhonkhobe added the comment: ping -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16805 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16805] when building docs on Debian 7 -- ERROR: Error in note directive
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15130] remove redundant paragraph in socket howto
Tshepang Lekhonkhobe added the comment: ping -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15130 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17957] remove outdated (and unexcellent) paragraph in whatsnew
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, tshepang priority: normal severity: normal status: open title: remove outdated (and unexcellent) paragraph in whatsnew versions: Python 2.6, Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30227/diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17957 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
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 http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16805] when building docs on Debian 7 -- ERROR: Error in note directive
Tshepang Lekhonkhobe added the comment: @ezio why remove 3.2 from applicable versions -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16805 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16805] when building docs on Debian 7 -- ERROR: Error in note directive
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 mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17957] remove outdated (and unexcellent) paragraph in whatsnew
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
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 equality checks do not raise exception. eg: cpus = None cpus == 1 False cpus == None True Thanks for pointing me out in the right direction to remove those invalid checks and showing the use of proper alternatives at other places in the patch -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17914] add os.cpu_count()
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17905] Add check for locale.h
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 implementation at the moment. I'm trying with http://www.crystax.net/en/android/ndk instead but still no luck. -- Added file: http://bugs.python.org/file30228/locale_h_configure.ac.patch2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17905 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8876] distutils should not assume that hardlinks will work
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17810] Implement PEP 3154 (pickle protocol 4)
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 will need to have some performance results in hand to justify the major changes it needs. If you can you work out a quick patch, I can run it through the benchmarks suite for pickle and measure the impact. Hopefully, we will see a good improvement though we can't be sure until we measure. And as for the BAIL_OUT opcode, it would be interesting to revisit its use now that we support binary framing. It could be helpful to add it to prevent the Unpickler from hanging if the other end forgot to close the stream. I am still not totally convinced. However if you make a good case for it, I would support to see it included. -- Added file: http://bugs.python.org/file30229/pickle4+methods.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17810 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17810] Implement PEP 3154 (pickle protocol 4)
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17838] Can't assign a different value for sys.stdin in IDLE
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 tracker rep...@bugs.python.org http://bugs.python.org/issue17838 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17838] Can't assign a different value for sys.stdin in IDLE
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 http://bugs.python.org/issue17838 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17934] Add a frame method to clear expensive details
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 (see issue 12857). It seems to me that the f_func pointer in that patch could serve the same purpose as the f_executing boolean flag in this patch, while providing additional information about the execution context. Some other possibly relevant traceback related resource management issues: issue 6116, issue 1565525, issue 9815 (picked up while searching for Eric's RFE above) (We may want to add a clear_frames convenience method to tracebacks as well) -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17934 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17947] Code, test, and doc review for PEP-0435 Enum
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 AttributeError, and so Python is calling __getattr__ anyway and so finds the virtual enum member. While this is cool, and it works, I think it's much less mysterious, magical, and downright confusing to keep the original behavior and call __getattr__ from _StealthProperty. On the other hand, it might make somebody think, and that's always good, so I'm happy to leave it your way. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17947 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17958] int(math.log(2**i, 2))
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(2**i, 2)) type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17958 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17947] Code, test, and doc review for PEP-0435 Enum
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17954] Support creation of extensible enums through metaclass subclassing
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 rep...@bugs.python.org http://bugs.python.org/issue17954 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com