[issue17642] IDLE add font resizing hot keys

2013-04-06 Thread Raymond Hettinger

New submission from Raymond Hettinger:

Add the standard hot keys for resizing fonts (i.e. on a Mac, CMD-plus and 
CMD-minus).

--
components: IDLE
keywords: easy
messages: 186118
nosy: rhettinger
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE add font resizing hot keys
type: enhancement
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17642
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13922] argparse handling multiple -- in args improperly

2013-04-06 Thread paul j3

paul j3 added the comment:

I am working on an alternative solution that moves the '--' removal to the 
consume_positionals() method, and only does it if there is a corresponding '-' 
in the arg_strings_pattern.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13922
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17642] IDLE add font resizing hot keys

2013-04-06 Thread Edmond Burnett

Changes by Edmond Burnett eburn...@gmail.com:


--
nosy: +edmond.burnett

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17642
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--
nosy: +serhiy.storchaka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17629
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17620
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2013-04-06 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


--
assignee:  - pitrou
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17620
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17642] IDLE add font resizing hot keys

2013-04-06 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
nosy: +giampaolo.rodola

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17642
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, credits or license for more information.
 import weakref
 x = {1, 2, 3}
 ref = weakref.ref(x, lambda ref: print(done))
 ref.__callback__
function lambda at 0x1004f56d0
 del x
done
 ref.__callback__  # Returns None

I encountered this while writing a tool to show graphs of Python objects and 
their references to each other:  I wanted to be able to annotate each edge of 
the graph.  For something like a function, it's easy to use introspection to 
compare the reference target with f.__code__, f.__annotations__, etc.  For a 
weakref, I couldn't find an easy way to retrieve the callback (or even 
determine whether there *was* a callback associated to the weakref).  One can 
do a gc.get_referents call and hope that if there's exactly one object 
returned it's the callback, but that won't work so well with weakref.ref 
subclasses.

Patch attached:  it has tests but no doc updates as yet.

--
components: Interpreter Core
files: weakref___callback__.patch
keywords: patch
messages: 186122
nosy: mark.dickinson
priority: normal
severity: normal
stage: patch review
status: open
title: Expose weakref callback for introspection purposes.
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file29685/weakref___callback__.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17643
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 this tree somewhere in 
Lib/test (look at the directories under it - we can add a new one, like 
filecmpdata/) and then refer to it in the tests. This will remove a huge amount 
of code and should also make it easier to understand what exactly the contents 
of this tree are. For example then I can use other system Linux tools to 
explore the directory and figure out what I'd expect the tests to do.

When test data is very small and contained, it makes sense to just create it 
while the test is running. But the patch has  120 LOC for that with functions 
calling other functions. For someone not intimately familiar with the tests, 
it's hard to follow which files get created and their contents.

Other comments:

* Don't use external functions with 'self' to serve essentially as methods. 
Test classes can derive from some common class that provides such 
functionality. [not sure this will be relevant after the above refactoring]
* If you do pretty much the same thing for every tearDown, also consider 
refactoring it into a base class.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15518
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue17643
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue17643
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13477] tarfile module should have a command line

2013-04-06 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


Added file: http://bugs.python.org/file29686/issue13477_v4.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13477] tarfile module should have a command line

2013-04-06 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


Removed file: http://bugs.python.org/file29311/issue13477_v2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker rep...@bugs.python.org
http://bugs.python.org/issue15596
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 replace dialog after it is used (closes #17625)
http://hg.python.org/cpython/rev/7746d238c4bb

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17625
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue17538
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker rep...@bugs.python.org
http://bugs.python.org/issue17550
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17644
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17644
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue17643
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17538
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 then again, I’m responsible for the breakage 
:)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16804
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 in 
_Py_Mangle() to trigger.

--
files: mem2.py
messages: 186135
nosy: arigo
priority: normal
severity: normal
status: open
title: assert fails in _Py_Mangle
versions: Python 2.7
Added file: http://bugs.python.org/file29688/mem2.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17645
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17645] assert fails in _Py_Mangle

2013-04-06 Thread Armin Rigo

Changes by Armin Rigo ar...@users.sourceforge.net:


--
components: +Interpreter Core
type:  - crash

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17645
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17645
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker rep...@bugs.python.org
http://bugs.python.org/issue17638
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 found in IDLE's 
configuration. Instead it queries the font size in the text widget and scales 
accordingly with a relative offset. 

IDLE needs a better way to broadcast font configuration changes. Right now, the 
Code Context extension uses polling every second to check for font changes. I 
bring this point up because properly incorporating font zooming may require 
refactoring some code. Incorporating Line Numbers, from #17535 would likely 
need to rely on this font size broadcasting as well.

--
nosy: +roger.serwy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17642
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15596] pickle: Faster serialization of Unicode strings

2013-04-06 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
stage:  - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15596
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: +benjamin.peterson
Added file: http://bugs.python.org/file29691/fix_format_spec.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17644
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--
versions:  -Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14010
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 function for each 
bit of logic, wrapped by the various existing APIs. The new helper functions 
are refactored as generators so as not to create unnecessary transient lists 
(not that stacks usually get very big anyway).

I've fully tested the replacement module, and it passes all the traceback tests 
in the standard suite.

--
components: Library (Lib)
files: traceback.diff
keywords: patch
messages: 186142
nosy: isoschiz
priority: normal
severity: normal
status: open
title: traceback.py has a lot of code duplication
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file29692/traceback.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17646
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2013-04-06 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17646
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 #14010: Fix a crash when iterating or deleting deeply nested filters
http://hg.python.org/cpython/rev/846bd418aee5

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14010
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue14010
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue14010
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue17644
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue14010
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 would be more confusing than useful to offer the same values in 
two places, though I'm open to discussion on this.

I've re-organised the dis module docs a bit. I've put Bytecode at the top, as I 
think it's a more intuitive API than the functions, which have somewhat 
counter-intuitive names due to the module's history.

--
Added file: http://bugs.python.org/file29694/dis_api3.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11816
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2013-04-06 Thread Thomas Kluyver

Changes by Thomas Kluyver tak...@gmail.com:


Added file: http://bugs.python.org/file29695/test_peepholer.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11816
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue17646
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: convert an assert() into a proper exception in _Py_Mangle().
http://hg.python.org/cpython/rev/6e7c6c06f3ba

New changeset 0e0a3df5b08d by Antoine Pitrou in branch '2.7':
Issue #17645: convert an assert() into a proper exception in _Py_Mangle().
http://hg.python.org/cpython/rev/0e0a3df5b08d

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17645
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue17645
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue17643
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 iterator constructor and to dealloc.  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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14010
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 only, or add a gc.collect (but I'm not 
sure if the latter is enough, either).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17643
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue17643
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14010
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

 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?

 --

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue14010
 ___

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14010
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 interpreter could monitor the actual stack 
size and take appropriate actions when it is running low on space.  The would 
save us from putting in expensive fine grained checks throughout the source 
code.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14010
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 patch for issue #14010 (changeset aaaf36026511).
http://hg.python.org/cpython/rev/7b75f0bd9a5e

New changeset 504eed5a82a3 by Serhiy Storchaka in branch 'default':
Revert a premature patch for issue #14010 (changeset 846bd418aee5).
http://hg.python.org/cpython/rev/504eed5a82a3

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14010
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17343
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue14010
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2771] Test issue

2013-04-06 Thread Mark Dickinson

Mark Dickinson added the comment:

msg137617
message 137617
message #137617

--
nosy: +mark.dickinson

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2771
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17644
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2013-04-06 Thread Phil Connell

Changes by Phil Connell pconn...@gmail.com:


Removed file: http://bugs.python.org/file29679/zipimport_ns.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17633
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2013-04-06 Thread Phil Connell

Changes by Phil Connell pconn...@gmail.com:


Added file: http://bugs.python.org/file29679/zipimport_ns.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17633
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue17633
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17135
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

However, I'm happy to either attach my diff to that issue, refactor mine in 
terms of that one, or whatever you think is best.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17646
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12820
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 windows)

Ideally, the coloured output from the test sets would be preserved so that 
problems could be easily identified and stand out (See attached image for 
demonstration of problem)

This might be scoffed at as a minor problem because nobody uses 
SetConsoleTextAttribute anyways, and even if they do it would only affect the 
windows platform. But just the same, preserving coloured output on windows 
should be doable.

I'd be happy to work on a patch for this myself, but I'm new to the python tree 
and am not completely sure where to find what I'm looking for. I think an if 
mswindows: clause wherever stdout.read() is would probably work, but I'm not 
sure where that would be.

--
components: IO, Windows
files: unit-tests.png
messages: 186168
nosy: Caitlin.Potter
priority: normal
severity: normal
status: open
title: subprocess.communicate() should preserve colored output on Windows
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file29699/unit-tests.png

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17647
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 approximately 200 million rows)

I see this has already been closed, but figured I should record my observation 
for the historical record.

--
nosy: +roysmith

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17629
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17629] Expose string width to Python

2013-04-06 Thread Roy Smith

Roy Smith added the comment:

Um, make that msg185972.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17629
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2013-04-06 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
assignee: pitrou - 

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17620
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 is patch which removes the old doctests and converts them to unittest.

Reviews will be helpful.

--
assignee: orsenthil
files: remove_doctests.patch
keywords: patch
messages: 186171
nosy: eric.araujo, ezio.melotti, orsenthil, r.david.murray
priority: normal
severity: normal
status: open
title: test_urllib2 convert doctests to unittest
versions: Python 3.4
Added file: http://bugs.python.org/file29700/remove_doctests.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17648
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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


class TestStuff(TestCase):
def setUp(self):
self.stack = ExitStack()

self.stack.enter_context(my_context_manager())
self.stack.enter_context(my_context_manager2())
self.stack.enter_context(my_context_manager3())

self.stack.enter()
self.addCleanup(self.stack.exit)

--
nosy: +Julian

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15351
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tabify/untabify dialog box.
http://hg.python.org/cpython/rev/5451b82104f3

New changeset 54f6d8c4dfaf by Roger Serwy in branch 'default':
#16887: merge with 3.3.
http://hg.python.org/cpython/rev/54f6d8c4dfaf

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16887
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue16887
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17238] IDLE: Enhance import statement completion

2013-04-06 Thread Roger Serwy

Changes by Roger Serwy roger.se...@gmail.com:


--
nosy: +roger.serwy
title: Enhance import statement completion - IDLE: Enhance import statement 
completion

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17238
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue17610
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 Python/Python-ast.c
cc: Python/Python-ast.c: No such file or directory
cc: No input files specified
*** [Python/Python-ast.o] Error code 1

Stop in /usr/ports/lang/python27/work/Python-2.7.4/portbld.shared.

--
messages: 186176
nosy: pfg
priority: normal
severity: normal
status: open
title: Python/Python-ast.c: No such file or directory
type: compile error
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17649
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/file29702/from_object.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15984
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com