[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface
Phil Webster added the comment: After reading about beginners having difficulty with IDLE's terminal behavior, I wrote a (very) simple patch to disable left clicking in the text area. I realize that this doesn't solve the problem completely (and the fact that there is already a patch here), but I wanted to become familiar with the contribution process. Thanks for your patience with me! -- nosy: +philwebster Added file: http://bugs.python.org/file30173/Issue2704.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2704 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17870] Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function
Mark Dickinson added the comment: I'll take a look. -- assignee: - mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17870 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17927] Argument copied into cell still referenced by frame
Changes by Phil Connell pconn...@gmail.com: -- nosy: +pconnell ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17927 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17927] Argument copied into cell still referenced by frame
Changes by Phil Connell pconn...@gmail.com: -- nosy: +isoschiz ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17927 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16523] attrgetter and itemgetter signatures in docs need cleanup
Roundup Robot added the comment: New changeset 6f2412f12bfd by Ezio Melotti in branch '3.3': #16523: improve attrgetter/itemgetter/methodcaller documentation. http://hg.python.org/cpython/rev/6f2412f12bfd New changeset c2000ce25fe8 by Ezio Melotti in branch 'default': #16523: merge with 3.3. http://hg.python.org/cpython/rev/c2000ce25fe8 New changeset 5885c02120f0 by Ezio Melotti in branch '2.7': #16523: improve attrgetter/itemgetter/methodcaller documentation. http://hg.python.org/cpython/rev/5885c02120f0 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16523 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16523] attrgetter and itemgetter signatures in docs need cleanup
Ezio Melotti added the comment: Fixed, thanks for the review! -- assignee: docs@python - ezio.melotti resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16523 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16396] Importing ctypes.wintypes on Linux gives a traceback
Ezio Melotti added the comment: That patch is more a workaround than an actual fix. Lib/ctypes/wintypes.py should either fail with an ImportError or be importable. For the former it's possible to catch the ValueError and turn it into an ImportError, or perhaps raise it if some precondition is missing; for the latter, either the creation of that signle class is skipped if _type_ 'v' is not supported, or a way to define it that works on other platforms too should be found instead. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16396 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17877] Skip test_variable_tzname when the zoneinfo database is missing
Ezio Melotti added the comment: The attached patch checks if /usr/share/zoneinfo or /usr/lib/zoneinfo exist FTR these two locations are described by `man tzfile`: This page describes the structure of the timezone files used by tzset(3). These files are typically found under one of the directories /usr/lib/zoneinfo or /usr/share/zoneinfo. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17877 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17877] Skip test_variable_tzname when the zoneinfo database is missing
Roundup Robot added the comment: New changeset f7b552020d44 by Ezio Melotti in branch '3.3': #17877: skip test if the Olson's TZ database is missing. http://hg.python.org/cpython/rev/f7b552020d44 New changeset 492eba054e59 by Ezio Melotti in branch 'default': #17877: merge with 3.3. http://hg.python.org/cpython/rev/492eba054e59 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17877 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17877] Skip test_variable_tzname when the zoneinfo database is missing
Changes by Ezio Melotti ezio.melo...@gmail.com: -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17877 ___ ___ 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: IMO, this shouldn't be implemented atop thread, but ought to be a regular thread pool: this way, you won't get behind if some task takes too long to execute, the thread pool can start new threads as needed, and we get the general work submit/cancel (through future) for free. Also, it would probably deserve a new interface in concurrent.futures, as ScheduledExecutor, with new schedule(delay, fn, *args, **kwargs) and schedule_periodic(delay, fn, *args, **kwargs) for one-shot and periodic calls. It would be much more consistant than an ad-hoc implementation in the threading module. -- nosy: +neologix ___ 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
[issue17809] FAIL: test_expanduser when $HOME ends with /
koobs added the comment: Spoil Ezio and learn me some python dev guide conventions, with an updated patch generated via hg diff, containing a comment, and including a bug #ID reference -- Added file: http://bugs.python.org/file30174/test_posixpath_v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17809 ___ ___ 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
R. David Murray added the comment: I take your point; I knew there was something bothering me about how the tasks were handled but I didn't consciously see the bug. I like the idea of a ScheduledExecutor. Yael, thanks a lot for working through this, but I think we should probably close this issue and open a new one for adding a ScheduledExecutor to concurrent.futures, and make see-also link from the Timer class to it. Would you be interested in working on it? -- ___ 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
[issue17932] Win64: possible integer overflow in iterobject.c
Ronald Oussoren added the comment: Create a class with a __getitem__ method but no __iter__: class Seq (object): def __len__(self): return 5 def __getitem__(self, idx): if idx len(self): raise IndexError(idx) return idx * 2 i = iter(Seq()) -- nosy: +ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17932 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1545463] New-style classes fail to cleanup attributes
Roundup Robot added the comment: New changeset 8a5bebea9fec by Antoine Pitrou in branch 'default': Issue #1545463: At shutdown, defer finalization of codec modules so that stderr remains usable. http://hg.python.org/cpython/rev/8a5bebea9fec -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1545463 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17912] thread states should use a doubly-linked list
Antoine Pitrou added the comment: Your patch looks fine to me, thank you. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17912 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17809] FAIL: test_expanduser when $HOME ends with /
Antoine Pitrou added the comment: Looks good to me. -- nosy: +pitrou stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17809 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17858] Different documentation for identical methods
R. David Murray added the comment: Added review comments with suggestions on improving the wording further. Once we agree on wording we could apply this to the _thread docs as well, I suppose. Ah, I see that one of the changes I found problematic was suggested by Ezio :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17858 ___ ___ 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
New submission from Antoine Pitrou: I think we may want to add a finalize() or close() method on frame objects which would clear all local variables (as well as dereference the globals dict, perhaps), after having optionally run a generator's close() method (if the frame belongs to a generator). If I'm not mistaken, it should allow breaking reference cycles, and remove the need for complex traceback processing, which Twisted currently also does: http://twistedmatrix.com/trac/browser/trunk/twisted/python/failure.py#L89 Note that generator cleanup through the frame has a patch in issue17807. (spinned off from issue17911) -- components: Interpreter Core messages: 188718 nosy: ncoghlan, pitrou priority: normal severity: normal stage: needs patch status: open title: Add a frame method to clear expensive details type: enhancement versions: Python 3.4 ___ 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
[issue17934] Add a frame method to clear expensive details
Changes by Antoine Pitrou pit...@free.fr: -- dependencies: +Generator cleanup without tp_del ___ 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
[issue17911] Extracting tracebacks does too much work
Antoine Pitrou added the comment: Ok, I've spinned off the frame clearing suggestion to issue17934. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17911 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17935] Failed compile on XP buildbot
New submission from Antoine Pitrou: OpenSSL fails compiling on the XP-4 buildbot. Judging by the errors below (snipped), the nasm version may be too old (?) to understand some of the assembler instructions used in the source. David, could you perhaps take a look? http://buildbot.python.org/all/buildslaves/bolen-windows Build: cd d:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\PCbuild\ d:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\PCbuild\python_d.exe build_ssl.py Release Win32 -a Found a working perl at 'c:\Perl\bin\perl.exe' Executing ssl makefiles: nmake /nologo -f ms\nt.mak Building OpenSSL nasm -f win32 -o tmp32\sha1-586.obj tmp32\sha1-586.asm tmp32\sha1-586.asm:2646: warning: label alone on a line without a colon might be in error tmp32\sha1-586.asm:2647: error: parser: instruction expected tmp32\sha1-586.asm:2648: error: symbol `vmovdqa' redefined tmp32\sha1-586.asm:2648: error: parser: instruction expected tmp32\sha1-586.asm:2649: error: symbol `vmovdqa' redefined tmp32\sha1-586.asm:2649: error: parser: instruction expected tmp32\sha1-586.asm:2650: error: symbol `vmovdqa' redefined tmp32\sha1-586.asm:2650: error: parser: instruction expected tmp32\sha1-586.asm:2651: error: symbol `vmovdqa' redefined tmp32\sha1-586.asm:2651: error: parser: instruction expected tmp32\sha1-586.asm:2658: error: symbol `vmovdqa' redefined tmp32\sha1-586.asm:2658: error: parser: instruction expected tmp32\sha1-586.asm:2659: error: symbol `vmovdqa' redefined tmp32\sha1-586.asm:2659: error: parser: instruction expected tmp32\sha1-586.asm:2660: error: symbol `vmovdqa' redefined tmp32\sha1-586.asm:2660: error: parser: instruction expected tmp32\sha1-586.asm:2662: error: symbol `vmovdqa' redefined -- components: Build keywords: buildbot messages: 188720 nosy: db3l, loewis, pitrou priority: high severity: normal status: open title: Failed compile on XP buildbot type: compile error versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17935 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17807] Generator cleanup without tp_del
Antoine Pitrou added the comment: Updated patch keeping PyGen_NeedsFinalizing() for backwards compatibility (always returning 0). -- Added file: http://bugs.python.org/file30175/gen4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17807 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17927] Argument copied into cell still referenced by frame
Changes by Guido van Rossum gu...@python.org: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17927 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17927] Argument copied into cell still referenced by frame
Guido van Rossum added the comment: Here's a new version that copies the cell into the arg slot instead of just clearing it, with matching code in super() that looks in the cell. I'd appreciate a review from another senior core dev. -- keywords: +needs review -patch Added file: http://bugs.python.org/file30176/cellfree2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17927 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17862] itertools.chunks(iterable, size, fill=None)
Serhiy Storchaka added the comment: A week ago I implemented chunks() on C for issue17804. This is an equivalent of such Python code for unlimited sequences: def chunks(seq, size, start=0): for i in itertools.count(start, size): yield seq[i: i + size] or simpler for limited sequences: def chunks(seq, size, start=0): for i in range(start, len(seq), size): yield seq[i: i + size] Later I gave up the idea when I saw the insignificance of the benefits. Personally I have such arguments against including it in stdlib: 1. While C implemented chunks() is faster than manual iteration, speed up of real loops is not worth the use of special function. 2. This idiom is used less than I expected (about two dozen times in stdlib, not counting tests and tools) and use chunks() saves too little number of lines. In any case Python implementation is only 2-3 lines. 3. This function is not very well suited for the itertools module, because it works with sequences and not with iterators. -- keywords: +patch nosy: +serhiy.storchaka Added file: http://bugs.python.org/file30177/iter_chunks.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17862 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17921] explicit empty check instead of implicit booleaness
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17921 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17936] O(2) behaviour when adding/removing classes
New submission from Kristján Valur Jónsson: We came across this curious phenomenon, when our progam was leaking dynamically created classes. It started spending CPU, to be fixed when gc was increased. The attached .py file demonstrates the problem. The problem is due to how child classes are added to the parent class, in this case, object. Obsolete code tries to look for a NULL pointer in the entire list of children. In addition, removing child classes is unnecessarily slow. the attached patch fixes these performance issues. -- components: Interpreter Core files: slowness.py keywords: patch messages: 188724 nosy: kristjan.jonsson priority: normal severity: normal status: open title: O(2) behaviour when adding/removing classes type: performance versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30178/slowness.py ___ 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
[issue17936] O(2) behaviour when adding/removing classes
Kristján Valur Jónsson added the comment: Adding the code change patch -- Added file: http://bugs.python.org/file30179/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
[issue17936] O(n**2) behaviour when adding/removing classes
Antoine Pitrou added the comment: Funny, I had once noticed this theoretical problem, but it didn't seem to matter concretely, so I hadn't posted about it :) -- nosy: +pitrou stage: - patch review title: O(2) behaviour when adding/removing classes - O(n**2) behaviour when adding/removing classes versions: -Python 2.7, Python 3.3 ___ 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
[issue17807] Generator cleanup without tp_del
Roundup Robot added the comment: New changeset c89febab4648 by Antoine Pitrou in branch 'default': Issue #17807: Generators can now be finalized even when they are part of a reference cycle. http://hg.python.org/cpython/rev/c89febab4648 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17807 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17807] Generator cleanup without tp_del
Antoine Pitrou added the comment: Committing for now, we'll see what people say. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17807 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17927] Argument copied into cell still referenced by frame
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17927 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17927] Argument copied into cell still referenced by frame
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17927 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11587] METH_KEYWORDS alone gives METH_OLDARGS is no longer supported!
Jesse Ogle added the comment: Same error with Python 3.3.1 Objects/methodobject.c: PyCFunction_Call() Switch contains case for METH_VARARGS | METH_KEYWORDS but not METH_KEYWORDS. I assume this is on purpose? -- nosy: +jogle versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11587 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths
Roundup Robot added the comment: New changeset 8952fa2c475f by Serhiy Storchaka in branch '2.7': Issue #17656: Skip test_extract_unicode_filenames if the FS encoding http://hg.python.org/cpython/rev/8952fa2c475f -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17656 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths
Serhiy Storchaka added the comment: Sorry, I thought I had corrected this test. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17656 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17935] Failed compile on XP buildbot
David Bolen added the comment: Yeah, the XP buildbot was pretty old, at nasm 2.02, so I updated to the same 2.09 as the Win7 buildbot, restarted the last build and it went through compilation fine. However, then it failed in test_ssl, and in checking, it looks like my Win7 buildbot is failing the same way. I thought it might just be an independent problem, but then found issue 15172 from last June (like Jeremy I have 2.09.02) which seems to say OpenSSL 1.0.1+ needs nasm 2.10. In Jeremy's case it only affected his 64-bit build, so maybe that's why I haven't seen it yet, but perhaps with the recent move to 1.0.1d it can affect 32-bit as well? Ah, or wait, there's also issue 17425 that seems to indicate 1.0.1d may be at fault for that test failure. Anyway, I installed the latest nasm 2.10.07 both both XP and Win7, and flushed the openssl tree in the 3.3 and 3.x build branches. In retrying the XP 3.x build it still fails test_ssl, so I don't think there's anything else I can change on the buildbot side as it looks like fixing that needs us to switch to 1.0.1e -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17935 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17912] thread states should use a doubly-linked list
Roundup Robot added the comment: New changeset 375d4fed4cf2 by Charles-Francois Natali in branch 'default': Issue #17912: Use a doubly linked-list for thread states. http://hg.python.org/cpython/rev/375d4fed4cf2 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17912 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17935] Failed compile on XP buildbot
Antoine Pitrou added the comment: Yes, the test_ssl failure is orthogonal. Thanks for fixing the compile issue! -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17935 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17656 ___ ___ 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
Tim Peters added the comment: There's another savings to be had when an index becomes the maximum: in that case, all the indices to its right are already at the maximum, so no need to overwrite them. This isn't as big a savings as skipping the search, but still buys about 10% more in the Python code. Like so: def cwr3(iterable, r): pool = tuple(iterable) n = len(pool) if n == 0 and r: return indices = [0] * r yield tuple(pool[i] for i in indices) rmax, nmax = r-1, n-1 j = rmax if n 1 else -1 while j = 0: newval = indices[j] + 1 if newval nmax: indices[j:] = [newval] * (r - j) j = rmax else: assert newval == nmax indices[j] = newval j -= 1 yield tuple(pool[i] for i in indices) -- ___ 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
[issue17912] thread states should use a doubly-linked list
Changes by Charles-François Natali cf.nat...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17912 ___ ___ 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
New submission from Antoine Pitrou: This is a patch to collect cyclic garbage one more time when all modules have been cleared. -- components: Interpreter Core files: gc_hard.patch keywords: patch messages: 188736 nosy: pitrou priority: low severity: normal stage: patch review status: open title: Collect garbage harder at shutdown type: resource usage versions: Python 3.4 Added file: http://bugs.python.org/file30180/gc_hard.patch ___ 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
[issue17938] Duplicate text in docs/reference/import statement
New submission from Stefan Chrobot: http://docs.python.org/3/reference/simple_stmts.html#the-import-statement After the Examples, there's a duplicated paragraph: The public names defined by a module are determined by checking the module’s namespace for a variable named __all__; if defined, it must be a sequence of strings which are names defined or imported by that module. The names given in __all__ are all considered public and are required to exist. If __all__ is not defined, the set of public names includes all names found in the module’s namespace which do not begin with an underscore character ('_'). __all__ should contain the entire public API. It is intended to avoid accidentally exporting items that are not part of the API (such as library modules which were imported and used within the module). The from form with * may only occur in a module scope. Attempting to use it in class or function definitions will raise a SyntaxError. The public names defined by a module are determined by checking the module’s namespace for a variable named __all__; if defined, it must be a sequence of strings which are names defined or imported by that module. The names given in __all__ are all considered public and are required to exist. If __all__ is not defined, the set of public names includes all names found in the module’s namespace which do not begin with an underscore character ('_'). __all__ should contain the entire public API. It is intended to avoid accidentally exporting items that are not part of the API (such as library modules which were imported and used within the module). The from form with * may only occur in a module scope. The wild card form of import — import * — is only allowed at the module level. Attempting to use it in class or function definitions will raise a SyntaxError. -- assignee: docs@python components: Documentation messages: 188737 nosy: docs@python, stefanchrobot priority: normal severity: normal status: open title: Duplicate text in docs/reference/import statement type: enhancement versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17938 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17939] Misleading information about slice assignment in docs
New submission from Stefan Chrobot: http://docs.python.org/3/reference/simple_stmts.html#assignment-statements The docs says: If the target is a slicing: The primary expression in the reference is evaluated. It should yield a mutable sequence object (such as a list). The assigned object should be a sequence object of the same type. This seems wrong, because the assigned object can be any iterable: a = [4, 5, 6] a[0:0] = range(1, 4) # a is now [1, 2, 3, 4, 5, 6] -- assignee: docs@python components: Documentation messages: 188738 nosy: docs@python, stefanchrobot priority: normal severity: normal status: open title: Misleading information about slice assignment in docs type: enhancement versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17939 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17938] Duplicate text in docs/reference/import statement
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17938 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17939] Misleading information about slice assignment in docs
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17939 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17927] Argument copied into cell still referenced by frame
Guido van Rossum added the comment: Ok, if I don't hear from anyone soon I'm going to commit. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17927 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie)
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: -Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17576 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17927] Argument copied into cell still referenced by frame
Amaury Forgeot d'Arc added the comment: with a unit test maybe? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17927 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17927] Argument copied into cell still referenced by frame
Antoine Pitrou added the comment: +1 for a unit test! -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17927 ___ ___ 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
New submission from Alex: In class HelpFormatter, class _Section, format_help(self) (lines 199 200), the two lines for func, args in self.items: func(*args) aren't necessary; the results of func are ignored. func is applied (again) on the next line when the output is joined into item_help. Cheers .a -- components: Library (Lib) messages: 188742 nosy: aho priority: normal severity: normal status: open title: extra code in argparse.py type: enhancement versions: Python 2.7 ___ 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
[issue11354] argparse: nargs could accept range of options count
paul j3 added the comment: Wouldn't it be simpler to use the re {m,n} notation to grab the appropriate number of arguments? In ArgumentParser _get_nargs_pattern we could add: +# n to m arguments, nargs is re like {n,m} +elif is_mnrep(nargs): +nargs_pattern = '([-A]%s)'%nargs # all others should be integers where is_mnrep() tests that the nargs string looks like '{m,n}' (or '{,n}' or '{m,}'). The resulting nargs_pattern will look like '([-A]{m,n})' In _format_args() a similar addition would be: +elif is_mnrep(action.nargs): +result = '%s%s' % (get_metavar(1)[0], action.nargs) 'FOO{2,5}' It would take more code to generate FOO FOO [FOO [FOO [FOO]]] A matching programmer input would be: parser.add_argument('Foo', nargs='{2,5}') though it wouldn't be much work to also translate a tuple. parser.add_argument('Foo', nargs=(2,5)) I'll try to test this implementation against wm's tests. -- nosy: +paul.j3 Added file: http://bugs.python.org/file30181/prelimary.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11354 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17908] Unittest runner needs an option to call gc.collect() after each test
Michael Foord added the comment: I'm afraid I'm inclined to agree with Antoine. This seems a relatively specialised problem and I'd expect to see it solved in the test system rather than in unittest itself. One solution, and something I'd like to see, is a way for test systems to extend the unittest command line handling so that they can add extra options. At the moment it's very painful to do. -- ___ 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
[issue17908] Unittest runner needs an option to call gc.collect() after each test
Guido van Rossum added the comment: TBH I would *love* for there to be a standardized way to extend the command line options! If it existed I would help myself. As it is, that's way to complicated. (Then again, most customizations to the default test runner are too complicated IMO. :-) -- ___ 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
[issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths
Changes by Antoine Pitrou pit...@free.fr: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17656 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17927] Argument copied into cell still referenced by frame
Nick Coghlan added the comment: Guido, did you try combining your first patch (clearing the local var when populating the cell) with your second patch (by only checking for a cell when the local var is cleared rather than when it is populated)? It seems slightly more logical to me to have a cell fallback for the local ref is NULL case than it does to special case local ref is not NULL. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17927 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16584] unhandled IOError filecmp.cmpfiles() if file not readable
Changes by Terry J. Reedy tjre...@udel.edu: -- assignee: - terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16584] unhandled IOError filecmp.cmpfiles() if file not readable
Roundup Robot added the comment: New changeset 1823cf6e1084 by Terry Jan Reedy in branch '2.7': Issue 16584: in filecomp._cmp, catch IOError as well as os.error. http://hg.python.org/cpython/rev/1823cf6e1084 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17941] namedtuple should support fully qualified name for more portable pickling
New submission from Eli Bendersky: [this came up as part of the Enum discussions. Full details in this thread: http://mail.python.org/pipermail/python-dev/2013-May/126076.html] namedtuple currently uses this code to obtain the __module__ for the class it creates dynamically so that pickling works: result.__module__ = _sys._getframe(1).f_globals.get('__name__', '__main__') This may not work correctly on all Python implementations, for example IronPython. To support some way to pickle on all implementations, namedtuple should support a fully qualified name for the class: Point = namedtuple('mymodule.Point', ['x', 'y']) If the name is a qualified dotted name, it will be split and the first part becomes the __module__. -- components: Library (Lib) messages: 188748 nosy: eli.bendersky, ncoghlan priority: normal severity: normal stage: needs patch status: open title: namedtuple should support fully qualified name for more portable pickling type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16584] unhandled IOError filecmp.cmpfiles() if file not readable
Terry J. Reedy added the comment: I don't use filecmp and cannot reproduce problem on Windows, for reason stated, but this looks correct, so I am taking Till's word that this fixes the problem, at least for him. Intentionally applied to 2.7 only for reason stated by Andrew. Till, if you submit more patches, especially any that are not so trivial, please sign PSF Contributor Licence Agreement. http://www.python.org/psf/contrib/ -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17927] Argument copied into cell still referenced by frame
Guido van Rossum added the comment: I thought about that but I like this version better because the super() code does not have to know the details of how to find the cell. On Wednesday, May 8, 2013, Nick Coghlan wrote: Nick Coghlan added the comment: Guido, did you try combining your first patch (clearing the local var when populating the cell) with your second patch (by only checking for a cell when the local var is cleared rather than when it is populated)? It seems slightly more logical to me to have a cell fallback for the local ref is NULL case than it does to special case local ref is not NULL. -- ___ Python tracker rep...@bugs.python.org javascript:; http://bugs.python.org/issue17927 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17927 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14146] IDLE: source line in editor doesn't highlight when debugging
Terry J. Reedy added the comment: 64 bit Win 7 with 32 bit debug build. Patch imported cleanly with all 3 branches. I cannot currently test 2.7. On 3.3 and 3.4, debugger worked fine relative to this issue: editor window highlight tracked line displayed in debugger as far as I checked. Normal selection and Shell Go to file/line highlight seem to work normally. Normal color marking seems not affected. I cannot think of any more manual tests. So if someone else checks 2.7 and it is also ok, I think you should apply this, so if there is any problem, it can show up in other usage. We can deal with a patched tk if and when it happens. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14146 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17942] IDLE Debugger: names, values misaligned
New submission from Terry J. Reedy: The IDLE debugger has subwindows to display name-object bindings for locals and (optionally) globals. They have a gray background. Text is black, object strings get a white background box. The issue is that the white box and text for each name is slightly raised relative to the name. This is somehow especially noticeable to me for something like 'd = 3', resulting in d3 with 3 boxed and raised a bit so it almost looks like a superscript. This is a fairly minor issue, so low priority now unless trivially fixed. But it should be part of polishing IDLE. I am hoping that this is not a tk bug that is terrible to work around. -- components: IDLE messages: 188752 nosy: roger.serwy, terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE Debugger: names, values misaligned type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com