[issue17649] Python/Python-ast.c: No such file or directory

2013-04-06 Thread Ramchandra Apte
Ramchandra Apte added the comment: if the Python/Python-ast.c file does not exist in the Python source directory, try re-extracting it (if the file still doesn't exist then you probably have a corrupt compressed file) -- nosy: +Ramchandra Apte ___ P

[issue15984] Wrong documentation for PyUnicode_FromObject()

2013-04-06 Thread Kyle Roberts
Kyle Roberts added the comment: I made a change to the documentation to reflect PyUnicode_FromObject()'s change in implementation details. Let me know if the wording is off or more information is needed. Thanks! -- keywords: +patch nosy: +kyle.roberts Added file: http://bugs.python.org

[issue17649] Python/Python-ast.c: No such file or directory

2013-04-06 Thread pfg
New submission from pfg: This happens when I run configure for python 2.7.2 on FreeBSD ... cc -c -fno-strict-aliasing -O2 -fno-strict-aliasing -pipe -march=nocona -DNDEBUG -O2 -fno-strict-aliasing -pipe -march=nocona -I. -IInclude -I./../Include -fPIC -DPy_BUILD_CORE -o Python/Python-ast.o Py

[issue17610] Qsort function misuse in typeobject.c

2013-04-06 Thread Zbigniew Halas
Zbigniew Halas added the comment: Thank you for the fix, attaching a patch for 2.7. -- keywords: +patch Added file: http://bugs.python.org/file29701/python_2.7_fix_slot_sorting_v1.patch ___ Python tracker

[issue17238] IDLE: Enhance import statement completion

2013-04-06 Thread Roger Serwy
Changes by Roger Serwy : -- nosy: +roger.serwy title: Enhance import statement completion -> IDLE: Enhance import statement completion ___ Python tracker ___ ___

[issue16887] IDLE - tabify/untabify applied when clicking Cancel

2013-04-06 Thread Roger Serwy
Roger Serwy added the comment: Closing the issue as fixed. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue16887] IDLE - tabify/untabify applied when clicking Cancel

2013-04-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset d7aa625147f7 by Roger Serwy in branch '2.7': #16887: IDLE now accepts Cancel in tabify/untabify dialog box. http://hg.python.org/cpython/rev/d7aa625147f7 New changeset 5451b82104f3 by Roger Serwy in branch '3.3': #16887: IDLE now accepts Cancel in t

[issue15351] Add to unittest.TestCase support for using context managers

2013-04-06 Thread Julian Berman
Julian Berman added the comment: Now that we have contextlib.ExitStack, I think we should consider that here. I.e., I think ExitStack deserves a method that calls its __enter__ and __exit__, say .enter() and .exit(), and then the idiom for this wouldn't require anything on TestCase, it'd be:

[issue17648] test_urllib2 convert doctests to unittest

2013-04-06 Thread Senthil Kumaran
New submission from Senthil Kumaran: Sometime back during an IRC conversation we realized that converting test_urllib2 doctests to proper unittest may help in various ways. a) Improve coverage report (?) Know what is covered and not. b) Helps expand it further when new features are added. Here

[issue17620] Python interactive console doesn't use sys.stdin for input

2013-04-06 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: pitrou -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue17629] Expose string width to Python

2013-04-06 Thread Roy Smith
Roy Smith added the comment: Um, make that msg185972. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue17629] Expose string width to Python

2013-04-06 Thread Roy Smith
Roy Smith added the comment: I'm the guy who was searching for astral characters in msg18597. I should mention that while what I did was certainly inefficient, the database was so much slower that it didn't have any observable impact on the overall process time (a bit over 2 days to insert ap

[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-06 Thread Caitlin Potter
New submission from Caitlin Potter: In migrating from GNU autoconf/automake build systems to a python-based build system (Waf), I've been slightly annoyed that coloured text output from unit test programs is lost on the windows platform (the gtest framework uses ::SetConsoleTextAttribute on wi

[issue12820] Tests for Lib/xml/dom/minicompat.py

2013-04-06 Thread Phil Connell
Phil Connell added the comment: I happened to spot this issue languishing, and the markups looked pretty straightforward, so I just went ahead and did them. Updated patch attached. -- nosy: +pconnell Added file: http://bugs.python.org/file29698/minicompat_tests_markedup.diff _

[issue17646] traceback.py has a lot of code duplication

2013-04-06 Thread Martin Morrison
Martin Morrison added the comment: I hadn't spotted that one! My refactor goes further (consolidates all duplicates, not just the tb ones), is implemented the way you suggested therein (print in terms of extract), and is "more efficient" in that it uses generators for all intermediate iterator

[issue17135] imp doc should direct to importlib

2013-04-06 Thread Kristian
Kristian added the comment: Here is the patch for this bug... Enjoy! I would be happy to work on this further if there are any problems or questions! Thanks! -- keywords: +patch nosy: +ktran13 Added file: http://bugs.python.org/file29697/patch.diff _

[issue17633] zipimport's handling of namespace packages is incorrect

2013-04-06 Thread Phil Connell
Phil Connell added the comment: Here's a test that fails without the patch and succeeds with the patch. -- Added file: http://bugs.python.org/file29696/test.diff ___ Python tracker _

[issue17633] zipimport's handling of namespace packages is incorrect

2013-04-06 Thread Phil Connell
Changes by Phil Connell : Added file: http://bugs.python.org/file29679/zipimport_ns.diff ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue17633] zipimport's handling of namespace packages is incorrect

2013-04-06 Thread Phil Connell
Changes by Phil Connell : Removed file: http://bugs.python.org/file29679/zipimport_ns.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue17644] str.format() crashes

2013-04-06 Thread Mark Dickinson
Mark Dickinson added the comment: > I wonder if having braces in the field name at all should be an error. There's some discussion of this in issue #12014; e.g. msg137617. I'm not sure what conclusion was reached. Eric? -- nosy: +mark.dickinson _

[issue2771] Test issue

2013-04-06 Thread Mark Dickinson
Mark Dickinson added the comment: msg137617 message 137617 message #137617 -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-b

[issue14010] deeply nested filter segfaults

2013-04-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I apologize for my negligence. -- stage: commit review -> needs patch ___ Python tracker ___ ___ P

[issue17343] Add a version of str.split which returns an iterator

2013-04-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: If someone wants whip-up a patch for str.iter_index(), I would be happy to review it. Be sure to add a test case to make sure that the results are non-overlapping: list(''.iter_index('aa')) == [0, 2] -- assignee: -> rhettinger

[issue14010] deeply nested filter segfaults

2013-04-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset e07e6d828150 by Serhiy Storchaka in branch '2.7': Revert a premature patch for issue #14010 (changeset d17d10c84d27). http://hg.python.org/cpython/rev/e07e6d828150 New changeset 7b75f0bd9a5e by Serhiy Storchaka in branch '3.3': Revert a premature pa

[issue14010] deeply nested filter segfaults

2013-04-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Isn't it exactly what Py_EnterRecursiveCall does? No, it isn't. Py_EnterRecursiveCall() counts calls and measures depth. It is sprinked all over the source code, everywhere a potentially recursive call could be made. Instead, it would be nice if the

[issue14010] deeply nested filter segfaults

2013-04-06 Thread Benjamin Peterson
Benjamin Peterson added the comment: It has no notion of how big the C stack is. 2013/4/6 Amaury Forgeot d'Arc : > > Amaury Forgeot d'Arc added the comment: > >> Or you could try to create some general purpose stack overflow >> protection that periodically makes sure there is enough stack remain

[issue14010] deeply nested filter segfaults

2013-04-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: > Or you could try to create some general purpose stack overflow > protection that periodically makes sure there is enough stack remaining > for C Python to function correctly. Isn't it exactly what Py_EnterRecursiveCall does? --

[issue17643] Expose weakref callback for introspection purposes.

2013-04-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ah, then we can probably keep using the same style. -- ___ Python tracker ___ ___ Python-bugs-list m

[issue17643] Expose weakref callback for introspection purposes.

2013-04-06 Thread Mark Dickinson
Mark Dickinson added the comment: True: I'm not sure what to do about that---there are other tests in that test module that also rely on del resulting in immediate cleanup. I'm not sure what other implementations are currently doing with this test module. I could mark the new test as cpython

[issue14010] deeply nested filter segfaults

2013-04-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: I would appreciate it if you would please revert this patch. We need to search for a solution that isn't as fine grained (i.e. not doing increments, decrements, and tests on every single call to iter_next). Ideally, the checks can be confined to the iter

[issue17643] Expose weakref callback for introspection purposes.

2013-04-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: "del x" will not be enough on non-refcounted implementations. -- ___ Python tracker ___ ___ Python-b

[issue17645] assert fails in _Py_Mangle

2013-04-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: This should be fixed now, thank you! -- nosy: +pitrou resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.3, Python 3.4 ___ Python tracker

[issue17645] assert fails in _Py_Mangle

2013-04-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 72f0fd0c4d90 by Antoine Pitrou in branch '3.3': Issue #17645: convert an assert() into a proper exception in _Py_Mangle(). http://hg.python.org/cpython/rev/72f0fd0c4d90 New changeset 6e7c6c06f3ba by Antoine Pitrou in branch 'default': Issue #17645:

[issue17646] traceback.py has a lot of code duplication

2013-04-06 Thread Benjamin Peterson
Benjamin Peterson added the comment: How much does this overlap with #17491? -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Py

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2013-04-06 Thread Thomas Kluyver
Changes by Thomas Kluyver : Added file: http://bugs.python.org/file29695/test_peepholer.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2013-04-06 Thread Thomas Kluyver
Thomas Kluyver added the comment: I've added docs and tests, and split the changes to test_peepholer into a separate patch. I haven't re-exposed details of the code object as attributes of Bytecode instances, because they're already available as e.g. bytecode.codeobj.co_names . I think it wou

[issue14010] deeply nested filter segfaults

2013-04-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, shame on me. Do I have to immediately revert patches or wait for your post-commit review? -- stage: patch review -> commit review ___ Python tracker

[issue17644] str.format() crashes

2013-04-06 Thread Benjamin Peterson
Benjamin Peterson added the comment: Here's a more comprehensive patch. It follows the PEP by allowing "{" and "}" inside "[]" in the field name. -- Added file: http://bugs.python.org/file29693/fix_format_spec.patch ___ Python tracker

[issue14010] deeply nested filter segfaults

2013-04-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset d17d10c84d27 by Serhiy Storchaka in branch '2.7': Issue #14010: Fix a crash when iterating or deleting deeply nested filters http://hg.python.org/cpython/rev/d17d10c84d27 -- ___ Python tracker

[issue14010] deeply nested filter segfaults

2013-04-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: This patch didn't have my sign-off. Applying it was premature. It is a somewhat heavy handed fix that slows all the common cases at the expense of an exotic case. -- ___ Python tracker

[issue14010] deeply nested filter segfaults

2013-04-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset aaaf36026511 by Serhiy Storchaka in branch '3.3': Issue #14010: Fix a crash when iterating or deleting deeply nested filters http://hg.python.org/cpython/rev/aaaf36026511 New changeset 846bd418aee5 by Serhiy Storchaka in branch 'default': Issue #140

[issue17646] traceback.py has a lot of code duplication

2013-04-06 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue17646] traceback.py has a lot of code duplication

2013-04-06 Thread Martin Morrison
New submission from Martin Morrison: traceback.py contains a lot of code duplication, which makes it fragile in the face of changes (i.e. special cases) to the stack/traceback output (I am separately working on just such a change). The attached patch refactors the code to reduce to a single fu

[issue14010] deeply nested filter segfaults

2013-04-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > - The tests with "range(100)" seems to duplicate those with recursion > limit. Oh, I forgot to remove old tests when had moved them to special test class. > - zip_iter should would be simpler with a "goto error;" Indeed. Thank you. -- version

[issue17644] str.format() crashes

2013-04-06 Thread Benjamin Peterson
Benjamin Peterson added the comment: Here is a patch, which fixes the issue. This brings up rather subtle issues. For example you can have "{[{}]}" but not "{[{]}" as a format string. I wonder if having braces in the field name at all should be an error. -- keywords: +patch nosy: +benj

[issue15596] pickle: Faster serialization of Unicode strings

2013-04-06 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue17642] IDLE add font resizing hot keys

2013-04-06 Thread Roger Serwy
Roger Serwy added the comment: IdleX provides this with the ZoomFont.py extension. (See http://idlex.sourceforge.net/extensions.html#Misc) It is useful for showing code on a projector so that students can easily read the screen. The implementation in ZoomFont.py does not change the font size f

[issue17638] test_ssl failure

2013-04-06 Thread Charles-François Natali
Charles-François Natali added the comment: > I don't know how to handle this in a non-hackish way, except by just ignoring > the issue :-) Sound fine to me :) -- resolution: -> invalid stage: -> committed/rejected status: open -> closed ___ Python

[issue17645] assert fails in _Py_Mangle

2013-04-06 Thread Armin Rigo
Armin Rigo added the comment: Modified the example to run in only 1+GB of RAM, so that it crashes also on 32-bit versions of the Python 2.7 interpreter in Windows (the most common around, I suppose). -- Added file: http://bugs.python.org/file29689/mem2x.py

[issue17645] assert fails in _Py_Mangle

2013-04-06 Thread Armin Rigo
Changes by Armin Rigo : -- components: +Interpreter Core type: -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue17645] assert fails in _Py_Mangle

2013-04-06 Thread Armin Rigo
New submission from Armin Rigo: Run this example on a 32-bit machine with more than 2GB of addressable RAM (e.g. by default, more or less anything but Windows). On Python 2.7 it raises "SystemError: Negative size passed to PyString_FromStringAndSize". On a debug version, it causes an assert i

[issue16804] python3 -S -m site fails

2013-04-06 Thread Éric Araujo
Éric Araujo added the comment: It seems to me that -m site is not a guaranteed API but just a way to inspect/debug your installation/environment, so I wouldn’t add tests that make it looks like behavior is more defined than “print stuff about site dirs”. I’d commit this simple fix as is (but

[issue17538] Document XML Vulnerabilties

2013-04-06 Thread Éric Araujo
Éric Araujo added the comment: Christian: there are people strongly disagreeing with the description of minidom as “lightweight”, could you edit the libary/xml.rst file you added to say “minimal” instead? See c2ae1ed03853 and #11379 if you want more info. -- _

[issue17643] Expose weakref callback for introspection purposes.

2013-04-06 Thread Mark Dickinson
Mark Dickinson added the comment: Ah yes; that's easier. New patch including doc updates. -- Added file: http://bugs.python.org/file29687/weakref___callback__2.patch ___ Python tracker

[issue17644] str.format() crashes

2013-04-06 Thread Ezio Melotti
Ezio Melotti added the comment: Confirmed on Linux too. This only affects 3.3+, on 2.7/3.2 it returns '5'. -- components: +Interpreter Core, Unicode nosy: +eric.smith, ezio.melotti, haypo, serhiy.storchaka priority: normal -> high stage: -> needs patch versions: +Python 3.4 __

[issue17644] str.format() crashes

2013-04-06 Thread Anton Poldnev
New submission from Anton Poldnev: Windows interpreter immediately crashes on this command: >>> "{[{}]}".format({"{}": 5}) -- messages: 186130 nosy: poldnev priority: normal severity: normal status: open title: str.format() crashes type: crash versions: Python 3.3 __

[issue17550] --enable-profiling does nothing (shell syntax bug in configure.ac)

2013-04-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2ab2a09901f9 by Georg Brandl in branch '3.3': fix variable reference to fix --enable-profiling (closes #17550) http://hg.python.org/cpython/rev/2ab2a09901f9 -- stage: -> committed/rejected ___ Python tra

[issue17538] Document XML Vulnerabilties

2013-04-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset f45902f8c7d7 by Christian Heimes in branch '3.2': Issue 17538: Document XML vulnerabilties http://hg.python.org/cpython/rev/f45902f8c7d7 -- ___ Python tracker

[issue17625] IDLE regression -- Search and Replace Window doesn't automatically clear

2013-04-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 13e5664c5d19 by Benjamin Peterson in branch '3.2': close search and replace dialog after it is used (closes #17625) http://hg.python.org/cpython/rev/13e5664c5d19 New changeset 7746d238c4bb by Benjamin Peterson in branch '3.3': close search and repla

[issue15596] pickle: Faster serialization of Unicode strings

2013-04-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Since protocol 0 is essentially dead in Python 3, I would like to propose something simpler and safer: only optimize the binary protocols. If noone beats me to it, I'll adapt Victor's patch for that. -- ___ Python t

[issue13477] tarfile module should have a command line

2013-04-06 Thread Berker Peksag
Changes by Berker Peksag : Removed file: http://bugs.python.org/file29311/issue13477_v2.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue13477] tarfile module should have a command line

2013-04-06 Thread Berker Peksag
Changes by Berker Peksag : Added file: http://bugs.python.org/file29686/issue13477_v4.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue17643] Expose weakref callback for introspection purposes.

2013-04-06 Thread Benjamin Peterson
Benjamin Peterson added the comment: Instead of a getset, I think you just use a read-only T_OBJECT member. -- nosy: +benjamin.peterson ___ Python tracker ___ ___

[issue17643] Expose weakref callback for introspection purposes.

2013-04-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Sounds fine to me. -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue15518] Provide test coverage for filecmp.dircmp.report methods.

2013-04-06 Thread Eli Bendersky
Eli Bendersky added the comment: A lot of the code in the tests is devoted to building the tested directory tree and populating it ( _setUpDirectories and related functions). You keep building and deleting this tree for every running test. I think that a better idea would be to just create thi

[issue17643] Expose weakref callback for introspection purposes.

2013-04-06 Thread Mark Dickinson
New submission from Mark Dickinson: It would be nice to be able to access the callback of a weakref as an attribute on the weakref itself. For example: Python 3.4.0a0 (default:2bf154ca43c6+, Apr 6 2013, 13:31:29) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credit

[issue17642] IDLE add font resizing hot keys

2013-04-06 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue17620] Python interactive console doesn't use sys.stdin for input

2013-04-06 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: -> pitrou nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17620] Python interactive console doesn't use sys.stdin for input

2013-04-06 Thread Drekin
Drekin added the comment: Sorry for typos. • interactive console doesn't use sys.stdin for input, why? • it uses sys.stdin.encoding, shouldn't it rather use sys.__stdin__.encoding if anything? • input() and hence code.interact() uses sys.stdin -- ___

[issue17629] Expose string width to Python

2013-04-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also the discussion at http://comments.gmane.org/gmane.comp.python.ideas/15640 . I agree with rejection. This is an implementation detail and different Python implementations (including future CPython versions) can have different internal string impleme

[issue17642] IDLE add font resizing hot keys

2013-04-06 Thread Edmond Burnett
Changes by Edmond Burnett : -- nosy: +edmond.burnett ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai