[issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory

2013-05-04 Thread Evgeny Kapun
Evgeny Kapun added the comment: To make fdopendir fail, just pass any valid FD which points to a non-directory, such as a file or a pipe. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17899

[issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory

2013-05-04 Thread Evgeny Kapun
Evgeny Kapun added the comment: Simple test: while True: try: listdir(0) except NotADirectoryError: pass -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17899 ___

[issue17862] itertools.chunks(iterable, size, fill=None)

2013-05-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: The reasons for the previous rejections still hold: more tools make the overall toolset harder to use, not being a primitive operation, dearth of real-world use-cases, not being prevalent in other functional languages, easily expressible with existing

[issue17897] Optimize unpickle prefetching

2013-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, I have no any interesting results. ;) If an effect exists, it should reveal itself only in rare cases and be very small. This patch may be considered rather as a tiny refactoring (it decreases a number of code lines). --

[issue17900] Recursive OrderedDict pickling

2013-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In additional the patch decreases the size of the pickled data, speeds up pickling and unpickling. $ ./python -c import collections, pickle; od = collections.OrderedDict((i, i) for i in range(10)); print(len(pickle.dumps(od))) Without patch: 1536827.

[issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory

2013-05-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17899 ___ ___

[issue17872] Crash in marshal.load() with bad reader

2013-05-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- type: behavior - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17872 ___ ___

[issue17776] IDLE Internationalization

2013-05-04 Thread Damien Marié
Damien Marié added the comment: A side note to justify the localization of IDLE: I think the internationalization part is important, It's a nearly invisible overhead for the code but it will be helpful for example: - In France, most of the highschool student have to learn python so they learn

[issue17868] pprint long non-printable bytes as hexdump

2013-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 1) A separate function might be better. I think this kind of output would be more useful while inspecting individual byte objects, rather than having it for arbitrary byte objects (that might be inside other containers). I don't think the general

[issue16429] Emit SyntaxWarning for code that risks UnboundLocalError

2013-05-04 Thread Daniel Urban
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16429 ___ ___

[issue17903] Python launcher for windows should search path for #!/usr/bin/env

2013-05-04 Thread Paul Moore
New submission from Paul Moore: The Python launcher for windows should recognise a hashbang line of #!/usr/bin/env python, and use the python executable found on PATH to run the script. If no python executable is present on PATH the launcher should fall back to the current behaviour (using

[issue17868] pprint long non-printable bytes as hexdump

2013-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is an alternative patch which outputs a bytes literal and a hexdump as a comment. -- Added file: http://bugs.python.org/file30121/pprint_bytes_hex_2.patch ___ Python tracker rep...@bugs.python.org

[issue17904] bytes should be listed as built-in function for 2.7

2013-05-04 Thread Florent Xicluna
New submission from Florent Xicluna: Looking into the summary table, there's no information about the `bytes` built-in alias for `str`: http://docs.python.org/2/library/functions.html IMHO it should appear in this table (as str, unicode, bytearray) with the appropriate `.. versionadded:`.

[issue5492] Error on leaving IDLE with quit() or exit() under Linux

2013-05-04 Thread Ger Luijten
Ger Luijten added the comment: Hello Roger, Thanks for the clear explanation! Greetings, Ger 2013/4/20 Roger Serwy rep...@bugs.python.org Roger Serwy added the comment: Good catch Terry! I've been testing using python -m idlelib.idle instead of importing it from an interactive prompt.

[issue3405] Add support for the new data option supported by event generate (Tk 8.5)

2013-05-04 Thread Alejandro Rodas
Changes by Alejandro Rodas alexrd...@gmail.com: -- nosy: +alex.rodas ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3405 ___ ___ Python-bugs-list

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Antoine, can you share the code for your benchmarks which show performance improvements when framing is enabled? I am seeing the same 10-15% slowdown even when pickling stuff to pure Python objects: The performance improvement is when unpickling, not when

[issue17868] pprint long non-printable bytes as hexdump

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le samedi 04 mai 2013 à 09:42 +, Serhiy Storchaka a écrit : However a simple specialized code can be used for special purposes, i.e. internally in the pprint module. I don't see how it can be reused and don't interested in a general function. I don't

[issue17806] Add keyword args support to str/bytes.expandtabs()

2013-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: FTR the reason to add this is consistency This always was a weak reason. and readability It is a matter of taste. For me s.expandtabs(3) looks more readable than s.expandtabs(tabsize=3). I don't see an urgent need for this feature and don't like a

[issue17868] pprint long non-printable bytes as hexdump

2013-05-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file30121/pprint_bytes_hex_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17868 ___

[issue17868] pprint long non-printable bytes as hexdump

2013-05-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file30122/pprint_bytes_hex_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17868 ___

[issue17868] pprint long non-printable bytes as hexdump

2013-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't understand how it would be useful in the pprint module if it can't be useful as a general function. How can it be used besides pprint/pformat functions? Just the nice way is different depending on the situations: if my bytes object is simply a

[issue17868] pprint long non-printable bytes as hexdump

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't understand how it would be useful in the pprint module if it can't be useful as a general function. How can it be used besides pprint/pformat functions? I don't understand your question. Do you never print some data at the command-line prompt? Or

[issue16316] Support xz compression in mimetypes module

2013-05-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 26068bfec70e by Serhiy Storchaka in branch '2.7': Issue #16316: mimetypes now recognizes the .xz and .txz (.tar.xz) extensions. http://hg.python.org/cpython/rev/26068bfec70e New changeset d04259af01ff by Serhiy Storchaka in branch '3.3': Issue

[issue16316] Support xz compression in mimetypes module

2013-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Have backported. -- resolution: - fixed status: open - closed versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16316 ___

[issue15809] IDLE console uses incorrect encoding.

2013-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If there are no objections I will commit the patch soon. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15809 ___

[issue16945] rewrite CGIHTTPRequestHandler to always use subprocess

2013-05-04 Thread Charles-François Natali
Charles-François Natali added the comment: The latest version of the patch passes on Linux, OpenIndiana and Windows. Note that I did apply the select()-hack on all platforms (not only Windows), because if I understood #427345 correctly, it's really there to bypass a non-standard IE behavior

[issue17868] pprint long non-printable bytes as hexdump

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: The idea is that the output of pprint should be something like (once #17530 is applied): pprint.pprint(b'\x7fELF\x01\x01\x01\x00\x00\n\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00\x01') (b'\x7fELF\x01\x01\x01\x00\x00\n\x00\x00'

[issue17819] removes need for CONFIG_SITE external configuration

2013-05-04 Thread Antonio Cavallo
Antonio Cavallo added the comment: So far it seems the special handling in config.site is restricted to these two bits ptc/ptmx (I'm targeting android in cross compiling at the moment). -- ___ Python tracker rep...@bugs.python.org

[issue17905] Add check for locale.h

2013-05-04 Thread Antonio Cavallo
New submission from Antonio Cavallo: This patch adds autoconf.ac check for the locale.h file in addition to langinfo.h. The patch contains also a fix to Python/fileutils.c file. The android ndk provides locale.h but no langinfo.h: this fixes the issue. BTW bionic doesn't have any runtime

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here are some numbers: # Without the patch $ ./python -m timeit -s import pickle, io; d=pickle.dumps(list(range(1000)), 4); b=io.BytesIO(d) b.seek(0); pickle.load(b) 1 loops, best of 3: 180 usec per loop $ ./python -m timeit -s import pickle, _pyio as

[issue17906] Add a string error handler to JSON encoder/decoder

2013-05-04 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Inspired by simplejson issue [1] which is related to standard json module too. JSON parser 3.3+ and wide builds of 3.2- raise an error on invalid strings (i.e. with unpaired surrogate), while narrow builds and some third-party parsers. Wide builds are

[issue7855] Add test cases for ctypes/winreg for issues found in IronPython

2013-05-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5f82b68c1f28 by Ezio Melotti in branch '3.3': #7855: Add tests for ctypes/winreg for issues found in IronPython. Initial patch by Dino Viehland. http://hg.python.org/cpython/rev/5f82b68c1f28 New changeset df655ebf74d7 by Ezio Melotti in branch

[issue7855] Add test cases for ctypes/winreg for issues found in IronPython

2013-05-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset e71406d8ed5d by Ezio Melotti in branch '2.7': #7855: Add tests for ctypes/winreg for issues found in IronPython. Initial patch by Dino Viehland. http://hg.python.org/cpython/rev/e71406d8ed5d -- ___

[issue7855] Add test cases for ctypes/winreg for issues found in IronPython

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: This should be fixed now. Thanks for the report and the patch (and thanks Zach for confirming that it works on Windows and for the review)! -- assignee: dino.viehland - ezio.melotti resolution: - fixed stage: patch review - committed/rejected status:

[issue16518] add buffer protocol to glossary

2013-05-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 003e4eb92683 by Ezio Melotti in branch '3.3': #16518: use bytes-like object throughout the docs. http://hg.python.org/cpython/rev/003e4eb92683 New changeset d4912244cce6 by Ezio Melotti in branch 'default': #16518: merge with 3.3.

[issue16518] add buffer protocol to glossary

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: The attached patch uses bytes-like objects in the error messages. -- Added file: http://bugs.python.org/file30124/issue16518-3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16518

[issue17904] bytes should be listed as built-in function for 2.7

2013-05-04 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17904 ___ ___ Python-bugs-list

[issue17859] improve error message for saving ints to file

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: binary-mode write requires bytes-like object, not 'int' Looks like the function that raises the error (Objects/abstract.c:352) doesn't have enough information to produce a message like that. I attached a patch to #16518 that improves this and other error

[issue17901] _elementtree.TreeBuilder raises IndexError on end if constructed with element_factory=None

2013-05-04 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +eli.bendersky stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17901 ___

[issue17868] pprint long non-printable bytes as hexdump

2013-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't understand your question. Do you never print some data at the command-line prompt? Or even as part of small test programs? To be honest, I very rarely even use pprint. I'm too lazy to import it. If I want to quickly get a hexdump, I use something

[issue17868] pprint long non-printable bytes as hexdump

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le samedi 04 mai 2013 à 15:41 +, Serhiy Storchaka a écrit : Which is why the proposal doesn't fit well with pprint/pformat. Perhaps I misunderstood your wish. I'm not against consider pprint as a black box, which does all good magic inside by default.

[issue1298835] Add a vendor-packages directory for system-supplied modules

2013-05-04 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- components: +Interpreter Core -Distutils2, Library (Lib) versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1298835

[issue1298835] Add a vendor-packages directory for system-supplied modules

2013-05-04 Thread Éric Araujo
Éric Araujo added the comment: Adding Nick to this discussion, since distutils-sig is talking about these issues right now. Previous discussions: http://mail.python.org/pipermail/python-list/2005-September/345116.html http://mail.python.org/pipermail/python-dev/2005-September/056682.html

[issue17906] Add a string error handler to JSON encoder/decoder

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I wonder if json should simply be less strict by default. If you pass the raw unescaped character, the json module accepts it: json.loads('{a: \ud8e9}') {'a': '\ud8e9'} It's only if you pass the escaped representation that json rejects it: json.loads('{a:

[issue17906] Add a string error handler to JSON encoder/decoder

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: See also #11489. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17906 ___ ___ Python-bugs-list mailing list

[issue17854] symmetric difference operation applicable to more than two sets

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: Return a new set with elements in an odd number of the sets. This wording is not really clear to me. IMHO the documentation is fine as is. The evaluation order works as usual, and, since the symmetric difference is an associative (and commutative) operation,

[issue1298835] Add a vendor-packages directory for system-supplied modules

2013-05-04 Thread Nick Coghlan
Nick Coghlan added the comment: The discussion on distutils-sig that Éric is referring to is one were I ended up pointing out that PEP 439 (bootstrapping pip in 3.4) needs to address this in some manner, so that pip (which installs to site-packages) doesn't end up fighting with system package

[issue17862] itertools.chunks(iterable, size, fill=None)

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: FWIW I'm +1 about adding grouper(), since it happened to me to use it and suggest more often than any other recipe (I think it's the only recipe I used/know), and even more often than some of the current itertools. The fact that has been requested several times

[issue17862] itertools.chunks(iterable, size, fill=None)

2013-05-04 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17862 ___ ___

[issue17877] Skip test_variable_tzname when the zoneinfo database is missing

2013-05-04 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: - ezio.melotti stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17877 ___

[issue17887] docs: summary page - generator vs iterator vs iterable

2013-05-04 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti type: - enhancement versions: +Python 2.7, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17887

[issue17890] argparse: mutually exclusive groups full of suppressed args can cause AssertionErrors

2013-05-04 Thread Yogesh Chaudhari
Yogesh Chaudhari added the comment: I am not sure if I am missing something. I had filled out the form at http://www.python.org/psf/contrib/contrib-form/ on the day I submitted the patch and even got back an email from Ewa Jodlowska. However, I don't see any * after my name. I submitted the

[issue1298835] Add a vendor-packages directory for system-supplied modules

2013-05-04 Thread Matthias Klose
Matthias Klose added the comment: there is more than one thing addressed with the 'dist-packages' choice of name. The primary reason is to have a directory where you only find python packages as distributed by the linux distribution, and where installers do not install to by default. Even if

[issue17115] __loader__ = None should be fine

2013-05-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset e39a8f8ceb9f by Brett Cannon in branch 'default': #17115,17116: Have modules initialize the __package__ and __loader__ http://hg.python.org/cpython/rev/e39a8f8ceb9f -- nosy: +python-dev ___ Python

[issue17115] __loader__ = None should be fine

2013-05-04 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- resolution: - fixed stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17115 ___

[issue17116] xml.parsers.expat.(errors|model) don't set the __loader__ attribute

2013-05-04 Thread Brett Cannon
Brett Cannon added the comment: New changeset e39a8f8ceb9f by Brett Cannon in branch 'default': #17115,17116: Have modules initialize the __package__ and __loader__ http://hg.python.org/cpython/rev/e39a8f8ceb9f -- resolution: - fixed stage: - committed/rejected status: open - closed

[issue17894] Edits to descriptor howto

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: Attached a patch that rephrases part of the suggestions made by Ned. -- nosy: +ezio.melotti Added file: http://bugs.python.org/file30125/issue17894.diff ___ Python tracker rep...@bugs.python.org

[issue5845] rlcompleter should be enabled automatically

2013-05-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset d5ef330bac50 by Antoine Pitrou in branch 'default': Issue #5845: Enable tab-completion in the interactive interpreter by default, thanks to a new sys.__interactivehook__. http://hg.python.org/cpython/rev/d5ef330bac50 -- nosy: +python-dev

[issue5845] rlcompleter should be enabled automatically

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: End-users will hopefully rejoice :) -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845

[issue17177] Document/deprecate imp

2013-05-04 Thread Brett Cannon
Brett Cannon added the comment: Just to keep on top of what is left to do for this to happen: * get_magic(): expose in importlib * find_module()/load_module(): eliminate all uses in the stdlib and fully deprecate * new_module(): use types.ModuleType() instead * reload(): relocate *

[issue17907] Deprecate imp.new_module() in favour of types.ModuleType

2013-05-04 Thread Brett Cannon
New submission from Brett Cannon: imp.new_module() does not need to exist since code can use types.ModuleType's constructor. -- components: Library (Lib) keywords: easy messages: 188388 nosy: brett.cannon priority: low severity: normal stage: test needed status: open title: Deprecate

[issue17177] Document/deprecate imp

2013-05-04 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- dependencies: +Deprecate imp.new_module() in favour of types.ModuleType ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17177 ___

[issue17115] __loader__ = None should be fine

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: Some buildbots are failing after this: http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/7840 http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%203.x/builds/4536 FAIL: test_everyone_has___loader__

[issue17177] Document/deprecate imp

2013-05-04 Thread Brett Cannon
Brett Cannon added the comment: While thinking about asking on G+ for feedback, I realized that if I get this to the point of a module-level warning, it won't be a big deal. It would be just like warnings you deal with when supporting old versions of Python along with newer versions where

[issue17177] Document/deprecate imp

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: This might be OK, however you won't be able to point to the alternatives in the deprecation message (e.g. new_module() is deprecated, use types.ModuleType() instead). This can still be done in the docs though. -- ___

[issue17177] Document/deprecate imp

2013-05-04 Thread Brett Cannon
Brett Cannon added the comment: Right, the docs would say the imp modules is deprecated; please see the module documentation for alternatives or something. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17177

[issue17408] second python execution fails when embedding

2013-05-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8c1385205a35 by Antoine Pitrou in branch '3.3': Issue #17408: Avoid using an obsolete instance of the copyreg module when the interpreter is shutdown and then started again. http://hg.python.org/cpython/rev/8c1385205a35 New changeset 0b34fd75b937

[issue17882] test_objecttypes fails for 3.2.4 on CentOS 6

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: 3.2 only gets security fixes, can you try with 3.3/default and see if it fails there? (The devguide has instructions about getting an updated clone and testing on 3.3/default if you need them.) -- nosy: +benjamin.peterson, ezio.melotti, loewis type: -

[issue17408] second python execution fails when embedding

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you for reporting! This should be fixed now. -- components: +Interpreter Core -None nosy: +pitrou resolution: - fixed stage: needs patch - committed/rejected status: open - closed versions: +Python 3.4 ___

[issue17115] __loader__ = None should be fine

2013-05-04 Thread Brett Cannon
Brett Cannon added the comment: It's because test_pydoc is actively deleting the __loader__ of a test module. I'll have a look to figure out why it's doing that. -- resolution: fixed - status: closed - open ___ Python tracker rep...@bugs.python.org

[issue16742] PyOS_Readline drops GIL and calls PyOS_StdioReadline, which isn't thread safe

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: So, could you propose a patch? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16742 ___ ___

[issue10363] Embedded python, handle (memory) leak

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Closing as the original issue is fixed. Other leaks should be reported as separate issues. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue15809] IDLE console uses incorrect encoding.

2013-05-04 Thread Roger Serwy
Roger Serwy added the comment: There is a problem. Adding the encoding comment to the top of the source causes off-by-one line errors in the traceback. Take as an example: 1/0 Traceback (most recent call last): File pyshell#0, line 2, in module ZeroDivisionError: integer division or

[issue1545463] New-style classes fail to cleanup attributes

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch adding a call to gc.collect() after cleaning up most modules, with tests. -- keywords: +patch nosy: +ncoghlan stage: commit review - patch review type: resource usage - enhancement versions: +Python 3.4 -Python 3.2 Added file:

[issue2262] Helping the compiler avoid memory references in PyEval_EvalFrameEx

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: This avenue doesn't look promising at all. Closing. -- resolution: - works for me stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2262

[issue17806] Add keyword args support to str/bytes.expandtabs()

2013-05-04 Thread Mark Dickinson
Mark Dickinson added the comment: For me s.expandtabs(3) looks more readable than s.expandtabs(tabsize=3). I disagree: I think the second is more readable, and I think it's especially helpful to those not intimately familiar with the language (which probably accounts for the vast majority

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

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: +1 for iterdir. However, if we get a separate scandir() returning entries with attributes, is iterdir() still useful? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11406

[issue16518] add buffer protocol to glossary

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: The attached patch uses bytes-like objects in the error messages. I'm surprised your patch doesn't touch Python/getargs.c. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16518

[issue16445] SEGFAULT when deleting Exception.message

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: This looks like it is fixed by Mark's commit. Other proposals should go into separate issues. -- nosy: +pitrou resolution: - fixed stage: needs patch - committed/rejected status: open - closed versions: -Python 3.2, Python 3.3, Python 3.4

[issue17705] Fill Character cannot be \0

2013-05-04 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17705 ___ ___ Python-bugs-list

[issue16518] add buffer protocol to glossary

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: FWIW I was grepping for buffer protocol/interface/api, and then double-checking for buffer in the resulting files. Python/getargs.c doesn't seem to mention the buffer protocol/interface/api at all. -- ___ Python

[issue14173] PyOS_FiniInterupts leaves signal.getsignal segfaulty

2013-05-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0201d8fa8bd0 by Antoine Pitrou in branch '2.7': Issue #14173: Avoid crashing when reading a signal handler during interpreter shutdown. http://hg.python.org/cpython/rev/0201d8fa8bd0 New changeset 0dfd5c7d953d by Antoine Pitrou in branch '3.3':

[issue14173] PyOS_FiniInterupts leaves signal.getsignal segfaulty

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: This should be fixed now. Thank you for diagnosing this bug! -- resolution: - fixed stage: - committed/rejected status: open - closed versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org

[issue6178] Core error in Py_EvalFrameEx 2.6.2

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: As an update (since someone else has this problem) this issue stopped once we converted from centos to archlinux (www.archlinux.org). May be an underlying issue with something in the centos environment. We used the same modules same configuration

[issue17115] __loader__ = None should be fine

2013-05-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset bb023c3426bc by Brett Cannon in branch 'default': #17115: Remove what appears to be a useless chunk of code which broke http://hg.python.org/cpython/rev/bb023c3426bc -- ___ Python tracker

[issue17115] __loader__ = None should be fine

2013-05-04 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17115 ___

[issue17115] __loader__ = None should be fine

2013-05-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 97b7bd87c44c by Brett Cannon in branch 'default': #17115: I hate you MS for not supporting C99. http://hg.python.org/cpython/rev/97b7bd87c44c -- ___ Python tracker rep...@bugs.python.org

[issue17289] readline.set_completer_delims() doesn't play well with others

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for reporting this. Do you want to contribute a proper patch? You'll find instructions at http://docs.python.org/devguide/ -- nosy: +pitrou stage: - needs patch versions: -Python 3.2 ___ Python tracker

[issue17890] argparse: mutually exclusive groups full of suppressed args can cause AssertionErrors

2013-05-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Wait a week and see what happens. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17890 ___ ___

[issue17855] Implement introspection of logger hierarchy

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Perhaps you should explain what the point of this is. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17855 ___

[issue17854] symmetric difference operation applicable to more than two sets

2013-05-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: If you take the union/intersection/symmetric difference of n sets, the result is a set with all items that appears in one/all/an odd number of the n sets. The union and intersection methods actually accept n inputs, because the result is obvious, useful, and

[issue11698] Improve repr for structseq objects to show named, but unindexed fields

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the patch. (Yes, I'm looking at this a bit late :-)) First, there seems to be a problem with the repr() of of.stat() results: ./python -c import os; print(os.stat('LICENSE')) posix.stat_result(st_mode=33204, st_ino=6553619, st_dev=2053, st_nlink=1,

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-05-04 Thread Phillip J. Eby
Phillip J. Eby added the comment: It looks like maybe basic2 should be importing basic, not basic2. Otherwise, you might as well just import basic2 directly and be done with it. ;-) Likewise, I think indirect should be importing from indirect2, not from itself? i.e., I'd expect that test to

[issue17894] Edits to descriptor howto

2013-05-04 Thread Ned Batchelder
Ned Batchelder added the comment: I worked with Ezio to make a new patch with the full edits. I have other ideas for edits to the rest of the document, but we can discuss those if you like these... -- Added file: http://bugs.python.org/file30127/descriptor_howto_2.patch

[issue17907] Deprecate imp.new_module() in favour of types.ModuleType

2013-05-04 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17907 ___

[issue17177] Document/deprecate imp

2013-05-04 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17177 ___

[issue17855] Implement introspection of logger hierarchy

2013-05-04 Thread R. David Murray
R. David Murray added the comment: I think that's what the link in the first message does. However, as I remember Bradon's talk, the short answer is: make it easy to discover (and therefore reason about) the hierarchy of logging objects that results from all the logging setup calls in an

[issue17908] Unittest runner needs an option to call gc.collect() after each test

2013-05-04 Thread Guido van Rossum
New submission from Guido van Rossum: It would be nice if there was a command-line option to tell the test runner to call gc.collect() after each test. See https://groups.google.com/d/msg/python-tulip/tstjvOQowIU/IRihc8NCHZUJ -- Glyph points out that always doing this is problematic because

[issue17894] Edits to descriptor howto

2013-05-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Please don't go crazy with this. I will look at the suggestions and make some edits to improve its readability but am not going to change it into a breezy conversational style. Instead, I'll likely put together a separate descriptor tutorial that

[issue17908] Unittest runner needs an option to call gc.collect() after each test

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: See also #17534. -- nosy: +ezio.melotti, michael.foord stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17908 ___

  1   2   >