[issue16581] define PEP editor in PEP 1

2012-12-05 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Are there any comments on the patch from the PEP 1 authors?  PEP 1 says that I 
should assign this to one of the PEP authors.  Any takers, or is this something 
I can commit on the authors' behalf?

--

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



[issue16123] IDLE - deprecate running without a subprocess

2012-12-05 Thread Andrew Svetlov

Andrew Svetlov added the comment:

I think that usage is not officially supported, so we cannot grant this way 
will work forever.

--

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



[issue15346] Tkinter extention modules have no documentation

2012-12-05 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Patch is welcome!

--

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



[issue16613] ChainMap.new_child could use improvement

2012-12-05 Thread Vinay Sajip

New submission from Vinay Sajip:

ChainMap.new_child could IMO be improved through allowing an optional dict to 
be passed, which is used to create the child. The use case is that you 
sometimes need to temporarily push a new non-empty mapping in front of an 
existing chain. This could be achieved by changing new_child to the following, 
which is backwards-compatible:

def new_child(self, d=None):
'New ChainMap with a new dict followed by all previous maps.'
return self.__class__(d or {}, *self.maps)

--
components: Library (Lib)
messages: 176974
nosy: rhettinger, vinay.sajip
priority: normal
severity: normal
status: open
title: ChainMap.new_child could use improvement
type: enhancement
versions: Python 3.4

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



[issue16612] Integrate Argument Clinic specialized preprocessor into CPython trunk

2012-12-05 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

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



[issue8865] select.poll is not thread safe

2012-12-05 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

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



[issue12268] file readline, readlines readall methods can lose data on EINTR

2012-12-05 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

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



[issue16602] weakref can return an object with 0 refcount

2012-12-05 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

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



[issue14913] tokenize the source to manage Pdb breakpoints

2012-12-05 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

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



[issue14728] trace function not set, causing some Pdb commands to fail

2012-12-05 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

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



[issue14743] on terminating, Pdb debugs itself

2012-12-05 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

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



[issue16180] cannot quit pdb when there is a syntax error in the debuggee (must kill it)

2012-12-05 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

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



[issue13044] pdb throws AttributeError at end of debugging session

2012-12-05 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

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



[issue14912] Pdb does not stop at a breakpoint after a restart command and source changes

2012-12-05 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

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



[issue16482] pdb.set_trace() clobbering traceback on error

2012-12-05 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

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



[issue9633] pdb go stack up/down

2012-12-05 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

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



[issue16605] test_posix.test_fs_holes() fails on FreeBSD 9.0

2012-12-05 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

FreeBSD Buildbot has been updated to 9.1, and the issue is solved. This was 
clearly a 9.0 kernel bug.

Closing bug as Invalid.

Thanks for triaging this, Koobs.

--
resolution:  - invalid
status: open - closed

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



[issue16605] test_posix.test_fs_holes() fails on FreeBSD 9.0

2012-12-05 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
stage:  - committed/rejected

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



[issue16605] test_posix.test_fs_holes() fails on FreeBSD 9.0

2012-12-05 Thread koobs

koobs added the comment:

I have just upgraded the buildbot host to FreeBSD 9.1-RELEASE and cannot see 
failures in the 3.x and 3.3 branches over the last couple of builds.

I have been unable to isolate the commit that fixed it, but the relevant 
revision log is here if anybody wants to cast an eye over it for confirmation

http://svnweb.freebsd.org/base/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c?view=log

--

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2012-12-05 Thread Stefan Krah

Stefan Krah added the comment:

I think this commit broke the --without-threads buildbot:

http://buildbot.python.org/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/3581/steps/test/logs/stdio

--
nosy: +skrah

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



[issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS)

2012-12-05 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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



[issue16287] Sporadic test_utime() failures on Solaris

2012-12-05 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Doing ./python Lib/test/regrtest.py test_os for current default in Solaris 
10 Update 10, I don't see any test failure. I have run it 10.000 times.

I can't reproduce this.

What Solaris 10 version are you using, Trent?

--

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2012-12-05 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Will take a look.

--

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2012-12-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 26056f8a0afe by Andrew Svetlov in branch '3.2':
Skip pdb test for #13120 if threading is not available.
http://hg.python.org/cpython/rev/26056f8a0afe

New changeset 328a8824c1a7 by Andrew Svetlov in branch '3.3':
Merge: skip pdb test for #13120 if threading is not available.
http://hg.python.org/cpython/rev/328a8824c1a7

New changeset 4cb84c0fbee2 by Andrew Svetlov in branch 'default':
Merge: skip pdb test for #13120 if threading is not available.
http://hg.python.org/cpython/rev/4cb84c0fbee2

--

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



[issue16612] Integrate Argument Clinic specialized preprocessor into CPython trunk

2012-12-05 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
nosy: +mark.dickinson

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



[issue16614] argparse accepts partial parameters

2012-12-05 Thread Michael Edwards

New submission from Michael Edwards:

When running parse_args, ArgumentParser is liberal in accepting parameters. 
Partial matches will be accepted as arguments

(in the included example, --test bob, --tester bob, --testers bob all set the 
testers argument)

Perhaps this is documented, but it was super unexpected for me.

--
components: Library (Lib)
files: test.py
messages: 176981
nosy: Michael.Edwards
priority: normal
severity: normal
status: open
title: argparse accepts partial parameters
versions: Python 2.7
Added file: http://bugs.python.org/file28209/test.py

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



[issue16588] gcc 4.7 unused-but-set warnings on Python/thread_pthread.h

2012-12-05 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
resolution: fixed - 
stage: committed/rejected - patch review
status: closed - open
type: compile error - 
versions: +Python 2.7

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



[issue16588] gcc 4.7 unused-but-set warnings on Python/thread_pthread.h

2012-12-05 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed
type:  - compile error

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



[issue16588] gcc 4.7 unused-but-set warnings on Python/thread_pthread.h

2012-12-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0adfbafe8a99 by Jesus Cea in branch '2.7':
Closes #16588: Silence unused-but-set warnings in Python/thread_pthread.h
http://hg.python.org/cpython/rev/0adfbafe8a99

--

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2012-12-05 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Failed test is skipped if there are no threads.
Thanks for report, Stefan!

--

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



[issue16615] gcc 4.7 unused-but-set warnings

2012-12-05 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Spin-off of Issue #16588.

--

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



[issue16615] gcc 4.7 unused-but-set warnings

2012-12-05 Thread Jesús Cea Avión

New submission from Jesús Cea Avión:

GCC 4.7 is showing some compilation warning about setting variables never read.

--
assignee: jcea
messages: 176984
nosy: jcea
priority: normal
severity: normal
status: open
title: gcc 4.7 unused-but-set warnings
type: compile error
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

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



[issue16614] argparse should have an option to require un-abbreviated option names

2012-12-05 Thread R. David Murray

R. David Murray added the comment:

It is both documented 
(http://docs.python.org/dev/library/argparse.html#argument-abbreviations) and 
an important feature.

I thought there was an enhancement request in this tracker for making the 
behavior optional, but I couldn't find it when I looked, so I'm turning this 
into one.  If someone finds that there is already another issue this one can be 
closed as a dup.

I'm marking it low priority, though, because I think most people want the 
ability to abbreviate the option names.

--
keywords: +easy
nosy: +bethard, r.david.murray
priority: normal - low
stage:  - needs patch
title: argparse accepts partial parameters - argparse should have an option to 
require un-abbreviated option names
type:  - enhancement
versions: +Python 3.4 -Python 2.7

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



[issue13328] pdb shows code from wrong module

2012-12-05 Thread Xavier de Gaye

Changes by Xavier de Gaye xdeg...@gmail.com:


--
nosy: +xdegaye

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



[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2012-12-05 Thread Xavier de Gaye

Changes by Xavier de Gaye xdeg...@gmail.com:


--
nosy: +xdegaye

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



[issue16615] gcc 4.7 unused-but-set warnings

2012-12-05 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
assignee: jcea - 
nosy: +christian.heimes

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



[issue13044] pdb throws AttributeError at end of debugging session

2012-12-05 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Do we need to fix it at all?
On finalizing pdb can stop working at some time, but debugging on finalization 
stage can be still useful in certain cases.

Xavier, your proposition noticeably changes current behavior as I understand it.
For now set_trace() works as breakpoint set up by program, you can go out of 
debugged function and it's very convenient from my perspective.

--

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



[issue1209447] os.path.join() fails if 2nd arg is a UNC path

2012-12-05 Thread Pekka Klärck

Pekka Klärck added the comment:

It seems that joining UNC path to a directory root fails:

Python 2.7.3 (default, Sep 26 2012, 21:51:14) 
[GCC 4.7.2] on linux2
Type help, copyright, credits or license for more information.
 from ntpath import join
 join('c:\\', 'server\\mount\\dir')
'c:server\\mount\\dir'

When the first argument contains also something else everything works fine:

 join('c:\\dir', 'server\\mount\\dir')
'server\\mount\\dir'

I would say this is a bug. Obviously fixing this changes behavior, but I have 
hard time believing that anyone relies on the current buggy output.

On the other hand, I was today reported a bug in my software that was caused by 
this. Funny thing was that the bug was in code that was added as a workaround 
for issue #3426 (i.e. use `join(os.getcwdu(), path)` instead of `abspath(path)` 
when path is Unicode). Luckily adding another workaround for this issue is 
pretty easy.

--
nosy: +pekka.klarck

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



[issue16616] test_poll.PollTests.poll_unit_tests() is dead code

2012-12-05 Thread Richard Oudkerk

New submission from Richard Oudkerk:

PollTests.poll_unit_tests() is not run because its method name does not begin 
with test.  It looks it was accidentally disabled when test_poll() was 
converted to unittest in f56b25168142.

Renaming it test_poll_unit_tests() makes it run successfully (at least under 
Linux).

Is it sufficient to reenable it only for the 3.4 branch?

--
components: Tests
messages: 176989
nosy: georg.brandl, sbt
priority: normal
severity: normal
stage: needs patch
status: open
title: test_poll.PollTests.poll_unit_tests() is dead code
versions: Python 3.4

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



[issue15516] exception-handling bug in PyString_Format

2012-12-05 Thread Dave Malcolm

Changes by Dave Malcolm dmalc...@redhat.com:


--
stage:  - patch review

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



[issue16617] mimetypes.py UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2012-12-05 Thread Vladimir Kotulskiy

New submission from Vladimir Kotulskiy:

File C:\DevTools\Python27\lib\mimetypes.py, line 355, in init
db.read_windows_registry()
  File C:\DevTools\Python27\lib\mimetypes.py, line 259, in 
read_windows_registry
for ctype in enum_types(mimedb):
  File C:\DevTools\Python27\lib\mimetypes.py, line 249, in enum_types
ctype = ctype.encode(default_encoding) # omit in 3.x!
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal 
not in range(128)

--
components: Unicode, Windows
files: mimetypes.patch
keywords: patch
messages: 176990
nosy: Vladimir.Kotulskiy, ezio.melotti
priority: normal
severity: normal
status: open
title: mimetypes.py UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in 
position 0: ordinal not in range(128)
type: crash
versions: Python 2.7
Added file: http://bugs.python.org/file28210/mimetypes.patch

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



[issue16618] Different glob() results for strings and bytes

2012-12-05 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

glob ignores names which starts with dot if pattern is not starts with dot. But 
this is wrong for bytes pattern in Python 3.

 import glob
 glob.glob('*hg')
[]
 glob.glob(b'*hg')
[b'.hg']

The proposed patch fixes this inconsistency. Also it contains new tests for 
this and some other possible cases.

--
components: Library (Lib)
files: glob_dotfiles.patch
keywords: patch
messages: 176991
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Different glob() results for strings and bytes
type: behavior
versions: Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file28211/glob_dotfiles.patch

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



[issue16618] Different glob() results for strings and bytes

2012-12-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Python 2.7 is not needed the fix, however additional tests can be useful. Here 
is a patch.

--
components: +Tests
versions: +Python 2.7
Added file: http://bugs.python.org/file28212/glob_tests-2.7.patch

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



[issue16602] weakref can return an object with 0 refcount

2012-12-05 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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



[issue13044] pdb throws AttributeError at end of debugging session

2012-12-05 Thread Xavier de Gaye

Xavier de Gaye added the comment:

 On finalizing pdb can stop working at some time, but debugging on
 finalization stage can be still useful in certain cases.

Agreed that debugging on finalization stage is useful. Debugging on
finalization stage does not seem to work though:

===
class C:
def __del__(self):
print('deleted')

c = C()
import pdb; pdb.set_trace()
x = 1
===
$ python3 bar.py
 /tmp/bar.py(7)module()
- x = 1
(Pdb) step
--Return--
 /tmp/bar.py(7)module()-None
- x = 1
(Pdb) step
deleted
$
===


Maybe this is another issue.


 Xavier, your proposition noticeably changes current behavior as I understand
 it.  For now set_trace() works as breakpoint set up by program, you can go
 out of debugged function and it's very convenient from my perspective.

This proposition only sets the global trace function to None on
returning from the bottom frame, i.e. the oldest frame in the stack. So you can
still use  set_trace() as a hard-coded breakpoint and continue the debugging
session out of the debugged function.

--

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



[issue16617] mimetypes.py UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2012-12-05 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

This is a duplicate of issue9291.

--
nosy: +amaury.forgeotdarc
resolution:  - duplicate
status: open - closed
superseder:  - mimetypes initialization fails on Windows because of non-Latin 
characters in registry

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



[issue16614] argparse should have an option to require un-abbreviated option names

2012-12-05 Thread Chris Jerdonek

Chris Jerdonek added the comment:

David, is issue 14910 the one you were thinking of?

--
nosy: +chris.jerdonek

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



[issue13968] Support recursive globs

2012-12-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which implements recursive globbing which conforms to Bash 
globbing with globstar option.

For backward compatibility recursive globbing off by default and works only if 
new argument recursive is true (default is False). I am not sure this is a 
better variant. Possible the default should be True. '**' pattern is very 
unlikely in old code. However recursive globbing on arbitrary pattern and 
arbitrary tree is not safe, it can hang on recursive symlinks.

The patch contains changes from issue16618.

--
dependencies: +Different glob() results for strings and bytes
nosy: +loewis
Added file: http://bugs.python.org/file28213/glob_recursive.patch

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



[issue16618] Different glob() results for strings and bytes

2012-12-05 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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



[issue14910] argparse: disable abbreviation

2012-12-05 Thread R. David Murray

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


--
nosy: +Michael.Edwards

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



[issue16614] argparse should have an option to require un-abbreviated option names

2012-12-05 Thread R. David Murray

R. David Murray added the comment:

It is indeed.  And it even has a patch.  Don't know how I missed it.

--
resolution:  - duplicate
stage: needs patch - committed/rejected
superseder:  - argparse: disable abbreviation

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



[issue8865] select.poll is not thread safe

2012-12-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Test should check changed behavior. I.e. it should test that calling poll 
concurrently raises an exception.

--

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



[issue16597] file descriptor not being closed with context manager on IOError when device is full

2012-12-05 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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



[issue16619] LOAD_GLOBAL used to load `None` under certain circumstances

2012-12-05 Thread Bruno Dupuis

New submission from Bruno Dupuis:

We found some strange behaviour of the compiler in this discussion on 
python-list: 
http://mail.python.org/pipermail/python-list/2012-December/636104.html

The fact is, `return` and `return None` result in inconsistent bytecode 
depending on the context.

Consider :

 import dis
 def f(x):
... return None
... 
 dis.dis(f)
  2   0 LOAD_CONST   0 (None) 
  3 RETURN_VALUE 
 def g(x):
... return None
... print(x)
... 
 dis.dis(g)
  2   0 LOAD_GLOBAL  0 (None) 
  3 RETURN_VALUE 

  3   4 LOAD_GLOBAL  1 (print) 
  7 LOAD_FAST0 (x) 
 10 CALL_FUNCTION1 (1 positional, 0 keyword pair) 
 13 POP_TOP  

`return None` statement results in LOAD_GLOBAL 0 if there is some unreachable 
code after it. I first saw that as an optimization issue, but Ian Kelly's 
message http://mail.python.org/pipermail/python-list/2012-December/636117.html 
gives an extensive analysis and some examples:


  I think this should even be considered a bug, not just a missing
  optimization.  Consider:

   globals()['None'] = 42
   def f(x):
  ... return None
  ... print(x)
  ...
   f('test')
  42

  The use of the LOAD_GLOBAL allows None to effectively be reassigned.



Ian also points out in this message that `return` and `return None` don't 
result in the same bytecode when followed by trash code.

--
components: Interpreter Core
messages: 176999
nosy: Horpner, bruno.dupuis, ikelly, python-dev, stevenjd
priority: normal
severity: normal
status: open
title: LOAD_GLOBAL used to load `None` under certain circumstances
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

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



[issue8402] Add a function to escape metacharacters in glob/fnmatch

2012-12-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It is good, if stdlib has function for escaping any special characters, even if 
this function is simple. There are already escape functions for re and 
sgml/xml/html.

Private function glob.glob1 used in Lib/msilib and Tools/msi to prevent 
unexpected globbing in parent directory name. ``glob.glob1(dirname, pattern)`` 
should be replaced by ``glob.glob(os.path.join(fnmatch.escape(dirname), 
pattern)`` in external code.

--

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



[issue16620] Avoid using private function glob.glob1() in msi module and tools

2012-12-05 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Private function glob.glob1() used in Lib/msilib and Tools/msi to prevent 
unexpected globbing in parent directory name. ``glob.glob1(dirname, pattern)`` 
should be replaced by ``glob.glob(os.path.join(fnmatch.escape(dirname), 
pattern)`` in external code.

--
components: Demos and Tools, Library (Lib)
messages: 177001
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: Avoid using private function glob.glob1() in msi module and tools
type: enhancement
versions: Python 3.4

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



[issue16620] Avoid using private function glob.glob1() in msi module and tools

2012-12-05 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
dependencies: +Add a function to escape metacharacters in glob/fnmatch

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



[issue16621] sched module enhancement request

2012-12-05 Thread Carlos Ferreira

New submission from Carlos Ferreira:

The sched module available in the Python core lacks a simple but very useful 
which is waiting for new events scheduling.

Current version only process events that are present in the queue before the 
schedule.run() is issued or for events that are schedule while the scheduler is 
still active and processing events from the queue.

I propose a simple enhancement, by using an Event object from the threading 
module, so that the thread that is running the scheduler, waits for new events 
scheduling, after finishing processing all queued events.

The sched2.py is a modified version of the original sched.py (modified by means 
of a large hammer), which adds an alwaysRunning argument in the object 
constructor, a self.wakeUpEvent attribute which is the Event Object, a modified 
eterabs method to call the Event.set() and finally, a modified run() to wait 
for new events.

This modification is just a quick patch in order to pass the idea of what is 
being requested here. If there is a better way to do this, then it should be 
taken.

--
components: Library (Lib)
files: sched2.py
messages: 177002
nosy: carlosmf.pt
priority: normal
severity: normal
status: open
title: sched module enhancement request
type: enhancement
versions: Python 3.3
Added file: http://bugs.python.org/file28214/sched2.py

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



[issue16621] sched module enhancement request

2012-12-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also issue16165.

--
nosy: +serhiy.storchaka
versions: +Python 3.4 -Python 3.3

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



[issue13390] Hunt memory allocations in addition to reference leaks

2012-12-05 Thread Antoine Pitrou

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


--
versions: +Python 3.4 -Python 3.3

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



[issue16621] sched module enhancement request

2012-12-05 Thread Carlos Ferreira

Changes by Carlos Ferreira carlosmf...@gmail.com:


Removed file: http://bugs.python.org/file28214/sched2.py

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



[issue16621] sched module enhancement request

2012-12-05 Thread Carlos Ferreira

Carlos Ferreira added the comment:

Sorry, wrong file issued before...

--
Added file: http://bugs.python.org/file28215/sched2.py

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



[issue13390] Hunt memory allocations in addition to reference leaks

2012-12-05 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Here is an updated patch.
test_ctypes still leaks memory blocks with it:

$ ./python -m test -R 3:8 test_ctypes
[1/1] test_ctypes
beginning 11 repetitions
12345678901
...
test_ctypes leaked [2, 2, 1, 1, 1, 1, 1, 1] memory blocks, sum=10

--
nosy: +benjamin.peterson
Added file: http://bugs.python.org/file28216/debugblocks5.patch

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



[issue16569] Preventing errors of simultaneous access in zipfile

2012-12-05 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Seek can be very cheap. Anybody could actually measure it???

--

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



[issue16601] Restarting iteration over tarfile continues from where it left off.

2012-12-05 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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



[issue16619] LOAD_GLOBAL used to load `None` under certain circumstances

2012-12-05 Thread Matthew Barnett

Matthew Barnett added the comment:

The same problem occurs with both `False` and `True`.

--
nosy: +mrabarnett

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



[issue16619] LOAD_GLOBAL used to load `None` under certain circumstances

2012-12-05 Thread Bruno Dupuis

Bruno Dupuis added the comment:

To me, the whole issue is at line ~ 480 in peehole.c in the 
LOAD_NAME/LOAD_GLOBAL switch case.

This explains the difference between `return` and `return None` as the former 
is actually compiled to LOAD_CONST. OTOH, `return None` has to pass the optim 
pass to be changed in LOAD_CONST. The real bug is sometime it doesn't.

--

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



[issue16619] LOAD_GLOBAL used to load `None` under certain circumstances

2012-12-05 Thread Bruno Dupuis

Bruno Dupuis added the comment:

line 426 in peehole.c :

if (codestr[codelen-1] != RETURN_VALUE)
goto exitUnchanged;

before the optim. I'm quite sure it's here. i patch and see...

--

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



[issue16619] LOAD_GLOBAL used to load `None` under certain circumstances

2012-12-05 Thread Alex Gaynor

Changes by Alex Gaynor alex.gay...@gmail.com:


--
nosy: +alex

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



[issue16622] IDLE crashes on parentheses

2012-12-05 Thread Steve OBrien

New submission from Steve OBrien:

Working in IDLE on Mac OSX 10.8 when I type a parentheses IDLE crashes.
Here is the output of the crash report:

Process: Python [60507]
Path:/Applications/Python 3.3/IDLE.app/Contents/MacOS/Python
Identifier:  org.python.IDLE
Version: 3.3.0 (3.3.0)
Code Type:   X86-64 (Native)
Parent Process:  launchd [324]
User ID: 493825946

Date/Time:   2012-12-05 13:04:49.616 -0800
OS Version:  Mac OS X 10.8.2 (12C60)
Report Version:  10

Interval Since Last Report:  112281 sec
Crashes Since Last Report:   4
Per-App Interval Since Last Report:  27530 sec
Per-App Crashes Since Last Report:   3
Anonymous UUID:  337BE211-7572-210E-6815-99D0FE44035F

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x, 0x

Application Specific Information:
*** Terminating app due to uncaught exception 
'NSInternalInconsistencyException', reason: 'Error (1000) creating window shape'
terminate called throwing an exception
abort() called

Application Specific Backtrace 1:
0   CoreFoundation  0x7fff8e7050a6 
__exceptionPreprocess + 198
1   libobjc.A.dylib 0x7fff91e733f0 objc_exception_throw 
+ 43
2   CoreFoundation  0x7fff8e704e7c +[NSException 
raise:format:] + 204
3   AppKit  0x7fff8d7d0eb3 
_NXCreateWindowWithStyleMask + 276
4   AppKit  0x7fff8d86591f _NSCreateWindow + 64
5   AppKit  0x7fff8d6e14bd -[NSWindow 
_commonAwake] + 2159
6   AppKit  0x7fff8d79185b -[NSWindow 
_makeKeyRegardlessOfVisibility] + 88
7   AppKit  0x7fff8d7917c5 -[NSWindow 
makeKeyAndOrderFront:] + 25
8   Tk  0x000101410c99 XMapWindow + 156
9   Tk  0x00010137d3dc Tk_MapWindow + 89
10  Tk  0x0001013862ea MapFrame + 62
11  Tcl 0x0001012d8197 TclServiceIdle + 76
12  Tcl 0x0001012bc5b6 Tcl_DoOneEvent + 329
13  Tk  0x00010135c8c7 Tk_UpdateObjCmd + 162
14  Tcl 0x000101256c76 TclEvalObjvInternal 
+ 782
15  Tcl 0x000101257e68 Tcl_EvalObjv + 66
16  _tkinter.so 0x0001007d75be Tkapp_Call + 190
17  Python  0x0001000de02e PyEval_EvalFrameEx + 
29774
18  Python  0x0001000dd7cf PyEval_EvalFrameEx + 
27631
19  Python  0x0001000dd7cf PyEval_EvalFrameEx + 
27631
20  Python  0x0001000dd7cf PyEval_EvalFrameEx + 
27631
21  Python  0x0001000df1b8 PyEval_EvalCodeEx + 
2296
22  Python  0x00010003d67a function_call + 186
23  Python  0x0001d418 PyObject_Call + 104
24  Python  0x0001000d9003 PyEval_EvalFrameEx + 
9251
25  Python  0x0001000df1b8 PyEval_EvalCodeEx + 
2296
26  Python  0x00010003d67a function_call + 186
27  Python  0x0001d418 PyObject_Call + 104
28  Python  0x0001000d9003 PyEval_EvalFrameEx + 
9251
29  Python  0x0001000df1b8 PyEval_EvalCodeEx + 
2296
30  Python  0x00010003d67a function_call + 186
31  Python  0x0001d418 PyObject_Call + 104
32  Python  0x000100027b0a method_call + 138
33  Python  0x0001d418 PyObject_Call + 104
34  Python  0x0001000d5197 
PyEval_CallObjectWithKeywords + 87
35  _tkinter.so 0x0001007d58a8 PythonCmd + 456
36  Tcl 0x00010125392f 
TclInvokeStringCommand + 105
37  Tcl 0x000101256c76 TclEvalObjvInternal 
+ 782
38  Tcl 0x000101290138 TclExecuteByteCode + 
4379
39  Tcl 0x000101296d8f TclCompEvalObj + 460
40  Tcl 0x00010125823d TclEvalObjEx + 817
41  Tcl 0x0001012d8494 AfterProc + 86
42  Tcl 0x0001012d8391 
TimerHandlerEventProc + 104
43  Tcl 0x0001012bc2b3 Tcl_ServiceEvent + 
147
44  Tcl 0x0001012bc5a7 Tcl_DoOneEvent + 314
45  _tkinter.so 0x0001007d4e51 

[issue16619] LOAD_GLOBAL used to load `None` under certain circumstances

2012-12-05 Thread Chris Kaynor

Changes by Chris Kaynor ckay...@zindagigames.com:


--
nosy: +DragonFireCK
versions: +Python 2.6

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



[issue16619] LOAD_GLOBAL used to load `None` under certain circumstances

2012-12-05 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

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



[issue16619] LOAD_GLOBAL used to load `None` under certain circumstances

2012-12-05 Thread Bruno Dupuis

Bruno Dupuis added the comment:

This first patch spots the issue, but doesn't solve it if the bytecode of the 
function is  32700 (see PyCode_Optimize comment). However with this patch, we 
get the LOAD_CONST anytime for None, True and False.

There is two questions :

1- is it safe to strip all the code after RETURN_VALUE as the patch does?

2- to correct this bug, we will need a deep refactoring of PyCode_Optimize (so 
that it accepts any code length).

The other way, is not to rely on PyCode_Optimize to compile return 
None/True/False, but do modifictations in the compiler itself. This must be the 
right way to do this, but it's far beyond my C skills and python core knowledge.

--
keywords: +patch
Added file: http://bugs.python.org/file28217/16619-1.patch

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



[issue16623] argparse help formatter does not honor non-breaking space

2012-12-05 Thread Roy Smith

New submission from Roy Smith:

Running this code:

---
import argparse

p = argparse.ArgumentParser()
p.add_argument('--foo',
   help=u'This is a very long help string.  ex: 
--s3\u00A0s3://my.bucket/dir1/dir2')
p.parse_args()
---

produces:

---
$ ./arg.py  --help
usage: arg.py [-h] [--foo FOO]

optional arguments:
  -h, --help  show this help message and exit
  --foo FOO   This is a very long help string. ex: --s3
  s3://my.bucket/dir1/dir2
---

It should not be breaking the line at a non-breaking space.  I'm running:

Python 2.7.3 (default, Aug  1 2012, 05:14:39) 
[GCC 4.6.3] on linux2

--
components: Library (Lib)
messages: 177012
nosy: roysmith
priority: normal
severity: normal
status: open
title: argparse help formatter does not honor non-breaking space
type: behavior
versions: Python 2.7

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



[issue16619] LOAD_GLOBAL used to load `None` under certain circumstances

2012-12-05 Thread Terry J. Reedy

Terry J. Reedy added the comment:

(2.6 is security fix only)

Stripping truly dead code after return is really tricky in general because
a) it might be in a conditional block, and 
b) unreachable yield and assignment can affect compilation.
Assignments that make names local are detected on a first pass, but I do not 
know about yield. Anyway, I believe the policy has been to not do it.

The final patch will need a cpython-only test based on g(x), with dead code.

Possibly intersecting issues are proposals to change where optimization is done 
and, for testing, to add a generator to dis so its output can be directly 
captured and analyzed instead of having to redirect, capture, and parse stdout.

--
nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan, terry.reedy
stage:  - patch review
type:  - behavior
versions:  -Python 2.6

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



[issue16624] subprocess.check_output should allow specifying stdin as a string

2012-12-05 Thread Zack Weinberg

New submission from Zack Weinberg:

subprocess.check_output calls Popen.communicate but does not allow you to 
specify its argument (i.e. data to send to the child process's stdin).  It 
would be nice if it were enhanced to allow this.  Proposed patch attached (to 
the 2.7 subprocess.py; should apply with trivial changes in 3.x).

--
components: Library (Lib)
files: subprocess-check-output-allow-input.diff
keywords: patch
messages: 177014
nosy: zwol
priority: normal
severity: normal
status: open
title: subprocess.check_output should allow specifying stdin as a string
type: enhancement
Added file: 
http://bugs.python.org/file28218/subprocess-check-output-allow-input.diff

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



[issue16623] argparse help formatter does not honor non-breaking space

2012-12-05 Thread Chris Jerdonek

Changes by Chris Jerdonek chris.jerdo...@gmail.com:


--
nosy: +chris.jerdonek

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



[issue16622] IDLE crashes on parentheses

2012-12-05 Thread Roger Serwy

Roger Serwy added the comment:

Steve, please verify that you are using the correct version of Tkinter with 
IDLE. See http://www.python.org/download/mac/tcltk/

--
nosy: +ned.deily, serwy

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



[issue16619] LOAD_GLOBAL used to load `None` under certain circumstances

2012-12-05 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge

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



[issue16622] IDLE crashes on parentheses

2012-12-05 Thread Steve OBrien

Steve OBrien added the comment:

I have tried both 8.5.11.1 and 8.5.11.2.

--

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



[issue16619] LOAD_GLOBAL used to load `None` under certain circumstances

2012-12-05 Thread Bruno Dupuis

Bruno Dupuis added the comment:

We definitely need to put the code that loads constants with LOAD_CONST out of 
the optimization code. It's not optim, it's a language feature: None *is* a 
'singleton' constant.

I'm trying to figure out how to change compile.c to achieve this, as it's my 
first dive into the compiler code, it's not that easy.

Another approch is to strip unreachable nodes in AST, but

a) it's quite complex, as Terry said

b) it solves only this particular bug, not the general assertion None, True 
and False are reserved words bound to constants. It can not ever be loaded with 
LOAD_NAME or LOAD_GLOBAL

--

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



[issue16619] LOAD_GLOBAL used to load `None` under certain circumstances

2012-12-05 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Here's what I think we should do for 3.4. Nick, care to commment?

--
Added file: http://bugs.python.org/file28219/const-node.patch

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



[issue15516] exception-handling bug in PyString_Format

2012-12-05 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Wouldn't it be easier to write a Python class that raises an error from 
__int__() but succeeds in __long__()?

--
nosy: +benjamin.peterson

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



[issue16622] IDLE crashes on parentheses

2012-12-05 Thread Roger Serwy

Roger Serwy added the comment:

This looks like a duplicate of issue16177, but for version 3.3.0 instead of 
2.7.3. I'm closing this in favor of the prior report.

Steve, can you try the suggestion from msg172501 in #16177 ?

--
resolution:  - duplicate
status: open - closed
superseder:  - IDLE Crash on Open Parens

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



[issue16177] IDLE Crash on Open Parens

2012-12-05 Thread Roger Serwy

Roger Serwy added the comment:

Added version 3.3 as reported in #16622.

--
nosy: +Steve.OBrien
versions: +Python 3.3

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



[issue16612] Integrate Argument Clinic specialized preprocessor into CPython trunk

2012-12-05 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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



[issue16490] inspect.getargspec() and inspect.getcallargs() don't work for builtins

2012-12-05 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

David, please subscribe to Issue #16612.

--

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



[issue887237] Machine integers

2012-12-05 Thread Bruno Dupuis

Changes by Bruno Dupuis bdup...@lisael.org:


--
nosy: +bruno.dupuis

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



[issue11299] Allow deepcopying and pickling paused generators

2012-12-05 Thread Bruno Dupuis

Changes by Bruno Dupuis bdup...@lisael.org:


--
nosy: +bruno.dupuis

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



[issue15045] Make textwrap.dedent() consistent with str.splitlines(True) and str.strip()

2012-12-05 Thread Bruno Dupuis

Changes by Bruno Dupuis bdup...@lisael.org:


--
nosy: +bruno.dupuis

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



[issue1294232] Error in metaclass search order

2012-12-05 Thread Bruno Dupuis

Changes by Bruno Dupuis bdup...@lisael.org:


--
nosy: +bruno.dupuis

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



[issue16619] LOAD_GLOBAL used to load `None` under certain circumstances

2012-12-05 Thread Nick Coghlan

Nick Coghlan added the comment:

First reaction is +1 for finally switching to real constant nodes in the AST 
for 3.4+. This is an inherited behaviour from 2.x where these were ordinary 
names rather than true keywords, so we weren't able to completely disallow 
overwriting them.

As a smaller impact change for earlier versions, we should be able to do 
something in compiler_nameop [1] that picks up the 3 singleton names and allows 
only LOAD_CONST, erroring out otherwise.

http://hg.python.org/cpython/file/default/Python/compile.c#l2625

--

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



[issue16619] LOAD_GLOBAL used to load `None` under certain circumstances

2012-12-05 Thread Alex Gaynor

Alex Gaynor added the comment:

Nick, None was a constant even in 2k

--

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



[issue16531] Allow IPNetwork to take a tuple

2012-12-05 Thread pmoody

pmoody added the comment:

on it.

I'm not a huge fan of integer args for the first argument because of possible 
confusion between v4/v6.

--

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



[issue16619] LOAD_GLOBAL used to load `None` under certain circumstances

2012-12-05 Thread Nick Coghlan

Nick Coghlan added the comment:

True and False weren't, though (and even None wasn't a proper keyword)

--

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



[issue16619] LOAD_GLOBAL used to load `None` under certain circumstances

2012-12-05 Thread Nick Coghlan

Nick Coghlan added the comment:

The difference in the errors below is the reason the systematic fix in 
Benjamin's patch simply wasn't practical in 2.x (as it would have required a 
complex deprecation dance to turn None, True and False into real keywords):

Python 2.7.3 (default, Jul 24 2012, 10:05:38) 
[GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2
Type help, copyright, credits or license for more information.
 class C: pass
... 
 C.None
Traceback (most recent call last):
  File stdin, line 1, in module
AttributeError: class C has no attribute 'None'
 

Python 3.2.3 (default, Jun  8 2012, 05:36:09) 
[GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2
Type help, copyright, credits or license for more information.
 class C: pass
... 
 C.None
  File stdin, line 1
C.None
 ^
SyntaxError: invalid syntax

--

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



[issue16625] Exception on mode 'br'

2012-12-05 Thread Sworddragon

New submission from Sworddragon:

The mode 'br' on open() can cause an exception with the following message: 
ValueError: mode string must begin with one of 'r', 'w', 'a' or 'U', not 
'br'. Curriously most times the mode 'br' is working fine and I'm not able to 
create a simple test case where it fails. Only in one of my scripts it fails 
with an exception (in the attachments is an example).

--
components: Interpreter Core
files: error.log
messages: 177028
nosy: Sworddragon
priority: normal
severity: normal
status: open
title: Exception on mode 'br'
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file28220/error.log

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



[issue16484] pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules

2012-12-05 Thread Marius Gedminas

Marius Gedminas added the comment:

Considering many existing Python installations out there would it be possible 
to fix this on the server side?  I.e. lowercase the URL while redirecting?

--

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



[issue16625] Exception on mode 'br'

2012-12-05 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +pitrou

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



[issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings

2012-12-05 Thread Ben Hoyt

Ben Hoyt added the comment:

Ah, thanks for making this an issue of its own! As I commented over at 
Issue10551, it's a serious problem, and makes mimetypes.guess_type() unusable 
out of the box on Windows.

Yes, the fix in Issue4969 uses MIME\Database\Content Type, which is a mime 
type - file extension mapping, *not the other way around*.

So while this patch is definitely an improvement (for the most part it doesn't 
produce wrong values!), but I'm not sure it's the way to go, for a few reasons:

1) Many of the most important keys aren't in the Windows registry (in 
HKEY_CLASSES_ROOT, where this patch looks). This includes .png, .jpg, and .gif. 
All of these important types fall back to the hard-coded types_map in 
mimetypes.py anyway.

2) Some that do exist are wrong in the registry (or at the least, different 
from the built-in types_map). This includes .zip, which is 
application/x-zip-compressed (at least in my registry) but should be 
application/zip.

3) It's slowish, as it has to load about 6000 registry keys (and more as you 
install more stuff on your system), but only about 200 of those have the 
Content Type subkey. On my machine (Windows 7, 64 bit CPython) this adds over 
100ms to the startup time even on subsequent runs when cached -- and I think 
100ms is pretty significant. Issue4969's version takes about 25ms, and 
reverting this completely would of course take 0ms.

4) Users and other programs can (and sometimes do!) change the Content Type 
keys in the registry -- whereas one wants mime type mappings to be consistent 
across systems. This last point is debatable for various reasons, and I think 
the above three points should carry the day, but I include it here for 
completeness. ;-)

For these reasons, I think we should revert the fix for Issue4969 and leave 
Windows users to get the default types_map as before, which is at least 
consisent -- and for mimetypes.guess_type(), you want consistency.

--
nosy: +benhoyt

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



  1   2   >