[issue15116] remove out-of-date Mac application scripting documentation

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7ca742d808b2 by Ned Deily in branch '2.7':
Issue #15116: Remove references to appscript as it is no longer being
http://hg.python.org/cpython/rev/7ca742d808b2

New changeset 0f0256e4a1ef by Ned Deily in branch '3.2':
Issue #15116: Remove references to appscript as it is no longer being
http://hg.python.org/cpython/rev/0f0256e4a1ef

New changeset 1b1f7ec5ddb8 by Ned Deily in branch '3.3':
Issue #15116: merge from 3.2
http://hg.python.org/cpython/rev/1b1f7ec5ddb8

New changeset 6053e0e1f05b by Ned Deily in branch 'default':
Issue #15116: merge from 3.3
http://hg.python.org/cpython/rev/6053e0e1f05b

--
nosy: +python-dev

___
Python tracker 

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



[issue15116] remove out-of-date Mac application scripting documentation

2013-02-02 Thread Ned Deily

Changes by Ned Deily :


--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
versions: +Python 3.4

___
Python tracker 

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



[issue17047] Fix double double words words

2013-02-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

These are correct as they are:

Lib/tkinter/tix.py:149:"""Locates a bitmap file of the name name.xpm or 
name in one of the
Lib/tkinter/tix.py:160:"""Locates an image file of the name name.xpm, 
name.xbm or name.ppm

Modules/_io/iobase.c:79:"Change the stream position to byte offset offset. 
offset is\n"


Modules/socketmodule.c:3547:   ensures that that doesn't happen. */
Modules/binascii.c:41:** I have attempted to break with this tradition, but I 
guess that that
Doc/c-api/intro.rst:436::c:func:`sum_sequence` example above.  It so happens 
that that example doesn't
<'that that' is awkward, but the two 'that's are different>

Modules/posixmodule.c:9747:Return the value of extended attribute attribute on 
path.\n\
Modules/posixmodule.c:9825:Set extended attribute attribute on path to value.\n\
Modules/posixmodule.c:9890:Remove extended attribute attribute on path.\n\
PC/msvcrtmodule.c:133:Create a C runtime file descriptor from the file handle 
handle. The\n\


Doc/c-api/long.rst:206:   Return a C :c:type:`size_t` representation of of 
*pylong*.  *pylong* must be


False doubles from typos (which should also be changed):
Lib/test/test_socket.py:845:# Try udp, but don't barf it it doesn't 
exist
/it it/if it/

Éric, I am puzzled by your comment. The only two 'the the's in Serhiy's report 
(that Firefox finds) are

python-gdb.py:1466:'''Is this frame "collect" within the the 
garbage-collector?'''


Misc/HISTORY:3055:  environment after Distutils set it.  Instead, have 
Distutils set the the

and both look like wrong doubles and not 'that the'.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue11159] Sax parser crashes if given unicode file name

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d3e7aea8a550 by Serhiy Storchaka in branch '2.7':
Issue #11159: SAX parser now supports unicode file names.
http://hg.python.org/cpython/rev/d3e7aea8a550

New changeset d2622ca8493a by Serhiy Storchaka in branch '3.2':
Issue #11159: Add tests for testing SAX parser support of non-ascii file names.
http://hg.python.org/cpython/rev/d2622ca8493a

New changeset b85ba45b9579 by Serhiy Storchaka in branch '3.3':
Issue #11159: Add tests for testing SAX parser support of non-ascii file names.
http://hg.python.org/cpython/rev/b85ba45b9579

New changeset 107a06f1a542 by Serhiy Storchaka in branch 'default':
Issue #11159: Add tests for testing SAX parser support of non-ascii file names.
http://hg.python.org/cpython/rev/107a06f1a542

--
nosy: +python-dev

___
Python tracker 

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



[issue11159] Sax parser crashes if given unicode file name

2013-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Fixed. Thank you for the report.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue17100] rotating an ordereddict

2013-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> That's O(n), with many spurious insertions and deletions.

Any implementation is O(n).

> deques already allow rotating.

I agree that the rotation makes some sense for such collections as deque or 
OrderedDict (although it is easy implemented in user code). But there are no 
rotate_at() and rotate_after() in deque.

--

___
Python tracker 

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



[issue12568] Add functions to get the width in columns of a character

2013-02-02 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
stage:  -> patch review
type:  -> enhancement

___
Python tracker 

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



[issue17100] rotating an ordereddict

2013-02-02 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> > That's O(n), with many spurious insertions and deletions.
> 
> Any implementation is O(n).

For rotate() perhaps (but still, it can be more efficient in that it can
just move the list head once instead of repeatedly deleting and
inserting elements). But rotate_at() / rotate_after() can probably be
O(1), unless I'm missing something.

> > deques already allow rotating.
> 
> I agree that the rotation makes some sense for such collections as
> deque or OrderedDict (although it is easy implemented in user code).
> But there are no rotate_at() and rotate_after() in deque.

That's because a deque is not a mapping ;-) In other words, if a deque
was enough I'd be using a deque, not a OrderedDict.

--

___
Python tracker 

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



[issue12568] Add functions to get the width in columns of a character

2013-02-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

In this part of width.py,
w = unicodedata.east_asian_width(c)
if c == 'A':
# ambiguous
raise ValueError("ambiguous character %x" % (ord(c)))

I presume that 'c' should be 'w'.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue17100] rotating an ordereddict

2013-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> But rotate_at() / rotate_after() can probably be O(1), unless I'm missing 
> something.

Hmm, perhaps. But only for current implementation. With more effective 
deque-like implementation (when linked list items grouped in fixed-size chunks) 
it will be O(n).

--

___
Python tracker 

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



[issue17103] ampersand "&" in path prevents from compiling pthon

2013-02-02 Thread gheorghe mosteoru

New submission from gheorghe mosteoru:

I've be trying to compile python in a folder which had '&' (ampersand) in the 
path and i couldn't. 

First configure got some weird output:

configure: creating ./config.status
config.status: creating Makefile.pre
sed: -e expression #1, char 435: unknown option to `s'
config.status: creating Modules/Setup.config
sed: -e expression #1, char 447: unknown option to `s'
config.status: creating Misc/python.pc
sed: -e expression #1, char 438: unknown option to `s'
config.status: creating Misc/python-config.sh
sed: -e expression #1, char 452: unknown option to `s'
config.status: creating Modules/ld_so_aix
sed: -e expression #1, char 441: unknown option to `s'
config.status: creating pyconfig.h
creating Modules/Setup
creating Modules/Setup.local
creating Makefile

Then when I've run make I've got:

make: *** No rule to make target `/Modules/posixmodule.c', needed by 
`Modules/posixmodule.o'.  Stop.

--
components: Build
messages: 181151
nosy: gheorghe.mosteoru
priority: normal
severity: normal
status: open
title: ampersand "&" in path prevents from compiling pthon
type: compile error
versions: Python 3.4

___
Python tracker 

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



[issue17100] rotating an ordereddict

2013-02-02 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> > But rotate_at() / rotate_after() can probably be O(1), unless I'm
> missing something.
> 
> Hmm, perhaps. But only for current implementation. With more effective
> deque-like implementation (when linked list items grouped in
> fixed-size chunks) it will be O(n).

Does your deque-like implementation preserve O(1) deletion?

--

___
Python tracker 

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



[issue17104] Tk() not defined in Tkinter module

2013-02-02 Thread zephyr

New submission from zephyr:

There are two cases of this issues:

1)Terminal-importing the Tkinter module and creating a Tk() object runs fine 
for the first instance but exiting the interpreter and trying to create a 
object for the next instance gives error:'Tk() is not defined'

2)IDE-importing the Tkinter module and creating a Tk() object produces 
error-'Tk() is not defined'.

--
components: None
messages: 181153
nosy: zephyr
priority: normal
severity: normal
status: open
title: Tk() not defined in Tkinter module
type: compile error
versions: Python 2.7

___
Python tracker 

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



[issue17048] calendar should understand full- vs. half-width characters

2013-02-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

For this particular East Asian local, the problem is the double spacing between 
the double-width characters (the Chinese numbers 1 to 7). This is potentially 
easily fixed for this locale. But do all locales have abbreviated weekday names 
that fit in 2 columns?

In looking at whether this issue should be classified as a bug or feature 
issue, I only found this:
'''
 class calendar.LocaleTextCalendar(firstweekday=0, locale=None)

This subclass of TextCalendar can be passed a locale name in the 
constructor and will return month and weekday names in the specified locale.'''

The current code does this, though not gracefully. I suspect that adding "-t 
html" to the command line, to use class calendar.LocaleHTMLCalendar, would work 
better.

[Doc note 1: I suspect the next sentence "If this locale includes an encoding 
all strings containing month and weekday names will be returned as unicode.", 
which is unchanged from 2.x, is obsolete and perhaps should just be removed.

Doc note 2: I could not find any doc for the command line interface in 
8.2. calendar — General calendar-related functions. Unless I am missing 
something, a new section should be added.]

#12568 will add a new feature that will only go in the 'next' release. So if 
this issue depends on that issue, it is effectively a new feature also.

--
nosy: +rhettinger, terry.reedy
stage:  -> needs patch
type:  -> enhancement
versions: +Python 3.4 -Python 2.7, Python 3.2

___
Python tracker 

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



[issue17060] IDLE -- jump to home should not go past the PS1 and PS2 prompts

2013-02-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

On my Win 7 system, with 3.3.0, the first Home sends the cursor to the 
beginning of the user entry, after '>>> '. The second sends it to the beginning 
of the display line. And so forth, as intended. See #3851. (It worked the same 
with Win xp and 3.1) If are getting different behavior, what os and py versions?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue17061] tokenize unconditionally emits NL after comment lines & blank lines

2013-02-02 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +meador.inge

___
Python tracker 

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



[issue17068] peephole optimization for constant strings

2013-02-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

It would also be nice to optimize '{}{}{}'.format('https://', host, uri).
Either seems a bit much to ask from a fairly naive compiler :-).

--
nosy: +terry.reedy
stage:  -> needs patch
versions: +Python 3.4

___
Python tracker 

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



[issue11159] Sax parser crashes if given unicode file name

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 706218e0facb by Serhiy Storchaka in branch '2.7':
Fix tests for issue #11159.
http://hg.python.org/cpython/rev/706218e0facb

New changeset a7c074d9cbfb by Serhiy Storchaka in branch '3.2':
Fix tests for issue #11159.
http://hg.python.org/cpython/rev/a7c074d9cbfb

New changeset 2bf01f03ff40 by Serhiy Storchaka in branch '3.3':
Fix tests for issue #11159.
http://hg.python.org/cpython/rev/2bf01f03ff40

New changeset 4ab386b00aaf by Serhiy Storchaka in branch 'default':
Fix tests for issue #11159.
http://hg.python.org/cpython/rev/4ab386b00aaf

--

___
Python tracker 

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



[issue6972] zipfile.ZipFile overwrites files outside destination path

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c3ab8a698d2f by Serhiy Storchaka in branch '2.7':
Fix translating of illegal characters on Windows (issue #6972).
http://hg.python.org/cpython/rev/c3ab8a698d2f

--

___
Python tracker 

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



[issue6972] zipfile.ZipFile overwrites files outside destination path

2013-02-02 Thread Georg Brandl

Georg Brandl added the comment:

The patch introduced a Cyrillic "C" into the docs, see below.  This makes the 
LaTeX build fail.

+  ``foo/bar`` on Unix, and ``С:\foo\bar`` becomes ``foo\bar`` on Windows.
  ^^

--
nosy: +georg.brandl
status: closed -> open

___
Python tracker 

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



[issue17100] rotating an ordereddict

2013-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Does your deque-like implementation preserve O(1) deletion?

Ah, OrderedDict should provide O(1) deletion for arbitrary key. Then deque-
like implementation should use variable-size chunks and rotate_at() / 
rotate_after() are possible with O(1).

--

___
Python tracker 

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



[issue6972] zipfile.ZipFile overwrites files outside destination path

2013-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There are different test fails on Windows:

http://buildbot.python.org/all/builders/x86%20XP-5%203.3/builds/405/steps/test/logs/stdio
==
ERROR: test_extract_hackers_arcnames (test.test_zipfile.TestsWithSourceFile)
--
Traceback (most recent call last):
  File "D:\Buildslave\3.3.moore-windows\build\lib\test\test_zipfile.py", line 
585, in test_extract_hackers_arcnames
writtenfile = zipfp.extract(arcname, targetpath)
  File "D:\Buildslave\3.3.moore-windows\build\lib\zipfile.py", line 1212, in 
extract
return self._extract_member(member, path, pwd)
  File "D:\Buildslave\3.3.moore-windows\build\lib\zipfile.py", line 1253, in 
_extract_member
os.makedirs(upperdirs)
  File "D:\Buildslave\3.3.moore-windows\build\lib\os.py", line 269, in makedirs
mkdir(name, mode)
FileNotFoundError: [WinError 3] The system cannot find the path specified: 
'target\\subdir\\subsub\\foo'

http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.3/builds/428/steps/test/logs/stdio
==
FAIL: test_extract_hackers_arcnames (test.test_zipfile.TestsWithSourceFile)
--
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.3.kloth-win64\build\lib\test\test_zipfile.py", 
line 586, in test_extract_hackers_arcnames
self.assertEqual(writtenfile, correctfile)
AssertionError: 'target\\subdir\\subsub' != 'target\\subdir\\subsub\\foo\\bar'
- target\subdir\subsub
+ target\subdir\subsub\foo\bar
? 

--

___
Python tracker 

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



[issue6972] zipfile.ZipFile overwrites files outside destination path

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b6b707063991 by Serhiy Storchaka in branch '2.7':
Fix a Cyrillic "C" inroduced into the docs by patch for issue #6972.
http://hg.python.org/cpython/rev/b6b707063991

New changeset ede0f27988f2 by Serhiy Storchaka in branch '3.2':
Fix a Cyrillic "C" inroduced into the docs by patch for issue #6972.
http://hg.python.org/cpython/rev/ede0f27988f2

New changeset 785b8b49c3bf by Serhiy Storchaka in branch '3.3':
Fix a Cyrillic "C" inroduced into the docs by patch for issue #6972.
http://hg.python.org/cpython/rev/785b8b49c3bf

New changeset 25294188c4ea by Serhiy Storchaka in branch 'default':
Fix a Cyrillic "C" inroduced into the docs by patch for issue #6972.
http://hg.python.org/cpython/rev/25294188c4ea

--

___
Python tracker 

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



[issue6972] zipfile.ZipFile overwrites files outside destination path

2013-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> The patch introduced a Cyrillic "C" into the docs, see below.

Thank you. Fixed.

--

___
Python tracker 

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



[issue13966] Add disable_interspersed_args() to argparse.ArgumentParser

2013-02-02 Thread László Attila Tóth

László Attila Tóth added the comment:

Unfortunatelly the implementation bugous as of now. I wrote additional tests.

self.parser = ErrorRaisingArgumentParser()
self.parser.add_argument('-a', action='store_true')
self.parser.add_argument('-b')
self.parser.add_argument('rem', nargs=argparse.REMAINDER)
self.assertEquals(self.parser.parse_args('-b 4 -a  -b 5'.split()), NS(a=True, 
b='5', rem=[]))

This part is OK. But with the new option:
self.parser.disable_interspersed_args()
self.assertEquals(self.parser.parse_args('-b 4 -a -b 5'.split()), NS(a=False, 
b='4',  rem=['-a', '-b', '5']))

This assertation also passes because it contains the actual result, which is 
unexpected. This is because the code doesn't handle properly the arguments that 
are non-options, such as '-b' in this case.

I can't see a good solution for this.

--

___
Python tracker 

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



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2013-02-02 Thread Petre

Changes by Petre :


--
nosy: +petre

___
Python tracker 

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



[issue17103] ampersand "&" in path prevents from compiling pthon

2013-02-02 Thread gheorghe mosteoru

gheorghe mosteoru added the comment:

I think this might be a bug in autoconf:

http://lists.gnu.org/archive/html/bug-autoconf/2012-08/msg0.html


The latest version of autoconf gives me a message when I try to run configure 
(for autoconf code itself) in that directory

checking whether build environment is sane... configure: error: unsafe absolute 
working directory name

--

___
Python tracker 

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



[issue6972] zipfile.ZipFile overwrites files outside destination path

2013-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here are patches which possible fixes some of this failures.

--
Added file: http://bugs.python.org/file28932/zipfile_fix_arcname_4-2.7.patch
Added file: http://bugs.python.org/file28933/zipfile_fix_arcname_4-3.x.patch

___
Python tracker 

___diff -r b6b707063991 Lib/test/test_zipfile.py
--- a/Lib/test/test_zipfile.py  Sat Feb 02 13:27:02 2013 +0200
+++ b/Lib/test/test_zipfile.py  Sat Feb 02 15:07:52 2013 +0200
@@ -434,8 +434,6 @@
 ('/foo/bar', 'foo/bar'),
 ('/foo/../bar', 'foo/bar'),
 ('/foo/../../bar', 'foo/bar'),
-('//foo/bar', 'foo/bar'),
-('../../foo../../ba..r', 'foo../ba..r'),
 ]
 if os.path.sep == '\\':
 hacknames.extend([
@@ -447,16 +445,22 @@
 (r'C:/foo/bar', 'foo/bar'),
 (r'C://foo/bar', 'foo/bar'),
 (r'C:\foo\bar', 'foo/bar'),
-(r'//conky/mountpoint/foo/bar', 'foo/bar'),
-(r'\\conky\mountpoint\foo\bar', 'foo/bar'),
+(r'//conky/mountpoint/foo/bar', 'conky/mountpoint/foo/bar'),
+(r'\\conky\mountpoint\foo\bar', 'conky/mountpoint/foo/bar'),
 (r'///conky/mountpoint/foo/bar', 'conky/mountpoint/foo/bar'),
 (r'\\\conky\mountpoint\foo\bar', 'conky/mountpoint/foo/bar'),
 (r'//conky//mountpoint/foo/bar', 'conky/mountpoint/foo/bar'),
 (r'\\conky\\mountpoint\foo\bar', 'conky/mountpoint/foo/bar'),
-(r'//?/C:/foo/bar', 'foo/bar'),
-(r'\\?\C:\foo\bar', 'foo/bar'),
+(r'//?/C:/foo/bar', '_/C_/foo/bar'),
+(r'\\?\C:\foo\bar', '_/C_/foo/bar'),
 (r'C:/../C:/foo/bar', 'C_/foo/bar'),
 (r'a:b\ce|f"g?h*i', 'b/c_d_e_f_g_h_i'),
+('../../foo../../ba..r', 'foo/ba..r'),
+])
+else:  # Unix
+hacknames.extend([
+('//foo/bar', 'foo/bar'),
+('../../foo../../ba..r', 'foo../ba..r'),
 ])
 
 for arcname, fixedname in hacknames:
@@ -469,7 +473,8 @@
 
 with zipfile.ZipFile(TESTFN2, 'r') as zipfp:
 writtenfile = zipfp.extract(arcname, targetpath)
-self.assertEqual(writtenfile, correctfile)
+self.assertEqual(writtenfile, correctfile,
+ msg="extract %r" % arcname)
 self.check_file(correctfile, content)
 shutil.rmtree('target')
 
@@ -482,7 +487,8 @@
 
 with zipfile.ZipFile(TESTFN2, 'r') as zipfp:
 writtenfile = zipfp.extract(arcname)
-self.assertEqual(writtenfile, correctfile)
+self.assertEqual(writtenfile, correctfile,
+ msg="extract %r" % arcname)
 self.check_file(correctfile, content)
 shutil.rmtree(fixedname.split('/')[0])
 
diff -r b6b707063991 Lib/zipfile.py
--- a/Lib/zipfile.pySat Feb 02 13:27:02 2013 +0200
+++ b/Lib/zipfile.pySat Feb 02 15:07:52 2013 +0200
@@ -1050,11 +1050,14 @@
 arcname = os.path.splitdrive(arcname)[1]
 arcname = os.path.sep.join(x for x in arcname.split(os.path.sep)
 if x not in ('', os.path.curdir, os.path.pardir))
-# filter illegal characters on Windows
 if os.path.sep == '\\':
+# filter illegal characters on Windows
 illegal = ':<>|"?*'
 table = string.maketrans(illegal, '_' * len(illegal))
 arcname = arcname.translate(table)
+# remove trailing dots
+arcname = (x.rstrip('.') for x in arcname.split(os.path.sep))
+arcname = os.path.sep.join(x for x in arcname if x)
 
 targetpath = os.path.join(targetpath, arcname)
 targetpath = os.path.normpath(targetpath)
diff -r 25294188c4ea Lib/test/test_zipfile.py
--- a/Lib/test/test_zipfile.py  Sat Feb 02 13:28:42 2013 +0200
+++ b/Lib/test/test_zipfile.py  Sat Feb 02 15:08:04 2013 +0200
@@ -548,8 +548,6 @@
 ('/foo/bar', 'foo/bar'),
 ('/foo/../bar', 'foo/bar'),
 ('/foo/../../bar', 'foo/bar'),
-('//foo/bar', 'foo/bar'),
-('../../foo../../ba..r', 'foo../ba..r'),
 ]
 if os.path.sep == '\\':  # Windows.
 hacknames.extend([
@@ -571,6 +569,12 @@
 (r'\\?\C:\foo\bar', 'foo/bar'),
 (r'C:/../C:/foo/bar', 'C_/foo/bar'),
 (r'a:b\ce|f"g?h*i', 'b/c_d_e_f_g_h_i'),
+('../../foo../../ba..r', 'foo/ba..r'),
+])
+else:  # Unix
+hacknames.extend([
+('//foo/bar', 'foo/bar'),
+('../../foo../../ba..r', 'foo../ba..r'),
 ])
 
 for arcname, fixedname in hacknames:
@@ -583,7 +587,8 @@

[issue16142] ArgumentParser inconsistent with parse_known_args

2013-02-02 Thread Radu Ciorba

Radu Ciorba added the comment:

"- if the unknown option is given first then both options are treated as 
unknown and returned in the list of remaining arguments."
I don't think this case is correct behaviour. There is no way to determine if u 
accepts arguments or not. If nargs for -u is "?" or more, the current behavior 
is correct since everything after -u would be an argument for this option.

--
nosy: +Radu.Ciorba

___
Python tracker 

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



[issue16142] ArgumentParser inconsistent with parse_known_args

2013-02-02 Thread Andrei Vereha

Changes by Andrei Vereha :


--
nosy: +Andrei.Vereha

___
Python tracker 

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



[issue16468] argparse only supports iterable choices

2013-02-02 Thread Radu Ciorba

Changes by Radu Ciorba :


--
nosy: +Radu.Ciorba

___
Python tracker 

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



[issue17102] tarfile extract can write files outside the destination path

2013-02-02 Thread R. David Murray

R. David Murray added the comment:

Please see issue issue 1044.  I have no opinion here, I just remembered that 
this had been discussed before.

--
nosy: +r.david.murray

___
Python tracker 

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




[issue17104] Tk() not defined in Tkinter module

2013-02-02 Thread R. David Murray

R. David Murray added the comment:

Please provide a complete example of the failures.  Your report doesn't 
currently provide enough information to reproduce the reported issue.

If the reported error message is accurate, it looks at first glance like the 
error message at least could use some improvement, since (at least as a 
non-tkinter user) I have no idea what it would mean for Tk() to be defined, 
since it isn't a Python identifier.  On the other hand, if that error message 
comes from Tk itself and not Python, then it is probably correct.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue13756] Python3.2.2 make fail on cygwin

2013-02-02 Thread Roumen Petrov

Roumen Petrov added the comment:

Jason Tishler wrote:
> Jason Tishler added the comment:
>
>> Is this still an issue on 3.3/3.4?
> I presume so.
This build is broken since SOABI implementation.
>
>> Does the patch still work?
> I haven't tried it on 3.3 yet, so I don't know if it will apply cleanly.
Attached "0001-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch" for head.
This patch is part of split issue3871 into small independent changes.

Roumen

--
Added file: 
http://bugs.python.org/file28934/0001-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch

___
Python tracker 

___>From 23031e941eaab013ef65ed7b2cdb08742a72e68d Mon Sep 17 00:00:00 2001
From: Roumen Petrov 
Date: Sat, 2 Feb 2013 00:04:12 +0200
Subject: [PATCH 1/5] CYGWIN-issue13756: Python make fail on cygwin

---
 Lib/distutils/command/build_ext.py | 7 ---
 Makefile.pre.in| 4 ++--
 Modules/makesetup  | 2 +-
 3 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/Lib/distutils/command/build_ext.py 
b/Lib/distutils/command/build_ext.py
index f7c71b3..eac04a5 100644
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -705,13 +705,6 @@ class build_ext(Command):
 return ext.libraries + [pythonlib]
 else:
 return ext.libraries
-elif sys.platform[:6] == "cygwin":
-template = "python%d.%d"
-pythonlib = (template %
-   (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
-# don't extend ext.libraries, it may be shared with other
-# extensions, it is a reference to the original list
-return ext.libraries + [pythonlib]
 elif sys.platform[:6] == "atheos":
 from distutils import sysconfig
 
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 9570730..5190f4f 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -556,9 +556,9 @@ 
$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \
$(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) 
$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)
$(LN) -fsn Versions/Current/Resources $(PYTHONFRAMEWORKDIR)/Resources
 
-# This rule builds the Cygwin Python DLL and import library if configured
+# This rule builds the Python DLL and import library if configured
 # for a shared core library; otherwise, this rule is a noop.
-$(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS)
+$(DLLLIBRARY) libpython$(LDVERSION).dll.a: $(LIBRARY_OBJS)
if test -n "$(DLLLIBRARY)"; then \
$(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
$(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST); \
diff --git a/Modules/makesetup b/Modules/makesetup
index 40dfa9d..1a1fcf6 100755
--- a/Modules/makesetup
+++ b/Modules/makesetup
@@ -91,7 +91,7 @@ CYGWIN*) if test $libdir = .
 else
ExtraLibDir='$(LIBPL)'
 fi
-ExtraLibs="-L$ExtraLibDir -lpython\$(VERSION)";;
+ExtraLibs="-L$ExtraLibDir -lpython\$(LDVERSION)";;
 esac
 
 # Main loop
-- 
1.7.12.1

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



[issue6972] zipfile.ZipFile overwrites files outside destination path

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ebef003a2acd by Serhiy Storchaka in branch '2.7':
Fix the test and remove trailing dots on Windows for issue #6972.
http://hg.python.org/cpython/rev/ebef003a2acd

--

___
Python tracker 

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



[issue14340] Update embedded copy of expat - fix security & crash issues

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c73a1f96dd9b by Gregory P. Smith in branch '2.7':
Update the embedded copy of the expat XML parser to 2.1.0.  It brings
http://hg.python.org/cpython/rev/c73a1f96dd9b

--

___
Python tracker 

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



[issue14340] Update embedded copy of expat - fix security & crash issues

2013-02-02 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
versions:  -Python 2.7

___
Python tracker 

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



[issue15881] multiprocessing 'NoneType' object is not callable

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0a58fa8e9bac by Benjamin Peterson in branch '2.7':
Issue #15881: Fixed atexit hook in multiprocessing.
http://hg.python.org/cpython/rev/0a58fa8e9bac

--

___
Python tracker 

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



[issue14340] Update embedded copy of expat - fix security & crash issues

2013-02-02 Thread Georg Brandl

Georg Brandl added the comment:

Then I guess there is no reason not to put it in 3.2.4.

--

___
Python tracker 

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



[issue15483] CROSS: initialise include and library paths in setup.py

2013-02-02 Thread Roumen Petrov

Roumen Petrov added the comment:

I agree that current directory in library search path is different issue so I'm 
closing as fixed.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue15881] multiprocessing 'NoneType' object is not callable

2013-02-02 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
versions:  -Python 2.7

___
Python tracker 

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



[issue15881] multiprocessing 'NoneType' object is not callable

2013-02-02 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
status: open -> closed

___
Python tracker 

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



[issue13994] incomplete revert in 2.7 Distutils left two copies of customize_compiler

2013-02-02 Thread Benjamin Peterson

Benjamin Peterson added the comment:

It's not clear to me at all what needs to happen here, so I'm just going to 
have to drop it for 2.7.4.

--
priority: release blocker -> normal

___
Python tracker 

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



[issue15819] Unable to build Python out-of-tree when source tree is readonly.

2013-02-02 Thread Roumen Petrov

Roumen Petrov added the comment:

To update .hgtouch is not enough.
Grammar, AST and importlib should left in source tree as before.

--
nosy: +rpetrov

___
Python tracker 

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



[issue15483] CROSS: initialise include and library paths in setup.py

2013-02-02 Thread Roumen Petrov

Changes by Roumen Petrov :


--
type: behavior -> compile error

___
Python tracker 

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



[issue6972] zipfile.ZipFile overwrites files outside destination path

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5a68052b52ea by Serhiy Storchaka in branch '2.7':
Preserve backslashes in malicious zip files for testing issue #6972.
http://hg.python.org/cpython/rev/5a68052b52ea

--

___
Python tracker 

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



[issue17034] Use Py_CLEAR() in stringobject.c and bytesobject.c

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4d120cea3507 by Serhiy Storchaka in branch '2.7':
Issue #17034: Use Py_CLEAR() in stringobject.c.
http://hg.python.org/cpython/rev/4d120cea3507

New changeset 8a747dec89c5 by Serhiy Storchaka in branch '3.2':
Issue #17034: Use Py_CLEAR() in bytesobject.c.
http://hg.python.org/cpython/rev/8a747dec89c5

New changeset 7e34c176aa6f by Serhiy Storchaka in branch '3.3':
Issue #17034: Use Py_CLEAR() in bytesobject.c.
http://hg.python.org/cpython/rev/7e34c176aa6f

New changeset 33bef5e211af by Serhiy Storchaka in branch 'default':
Issue #17034: Use Py_CLEAR() in bytesobject.c.
http://hg.python.org/cpython/rev/33bef5e211af

--
nosy: +python-dev

___
Python tracker 

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



[issue3754] cross-compilation support for python build

2013-02-02 Thread Roumen Petrov

Roumen Petrov added the comment:

I agree that cross-compilation is now usable.
Issues related to build and test outside source tree more or less are permanent 
but out of cross-compilation scope.
Also parts of patches posted in this issue now are in separate defects or 
enhancements.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue17034] Use Py_CLEAR() in stringobject.c and bytesobject.c

2013-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Actually it is a part of issue16445 or issue16447. Now they will be a little 
smaller.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue3871] cross and native build of python for mingw* hosts

2013-02-02 Thread Roumen Petrov

Roumen Petrov added the comment:

Please do not post to this thread.
Follow python bugs list for result of patch-split. I will try to post parts of 
this patch to already opened issues or to open new one if necessary.

As basis will be used py3k-20121004-MINGW.patch with following main changes:
- prefer posix installation scheme
- use of system libffi

Lets keep issue open as reference until is reached usable level.

--
components: +Build -Cross-Build

___
Python tracker 

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



[issue17100] rotating an ordereddict

2013-02-02 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger

___
Python tracker 

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



[issue6972] zipfile.ZipFile overwrites files outside destination path

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ab4b8da79a5f by Serhiy Storchaka in branch '2.7':
Fix test for issue #6972.
http://hg.python.org/cpython/rev/ab4b8da79a5f

--

___
Python tracker 

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



[issue17100] rotating an ordereddict

2013-02-02 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Please don't rush to make patches.  It isn't even clear that this is a good 
idea.

AFAICT, none of the many extant implementation of ordered dictionaries in any 
language currently implement a rotate operation.

FWIW, the iter() and move_to_end() methods are likely your best bet for 
implementing a rotate function using the current API and without doing any 
ordered dictionary key lookups:

>>> from collections import OrderedDict
>>> from itertools import islice
>>> 
>>> def rotate(d, n):
# quick demo
if n > 0:
for k in list(islice(d, n)):
d.move_to_end(k)
elif n < 0:
for k in list(islice(reversed(d), -n)):
d.move_to_end(k, 0)
   
>>> d = collections.OrderedDict.fromkeys('abcdefghijk')
>>> list(d)
['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k']
>>> rotate(d, 3)
>>> list(d)
['d', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'a', 'b', 'c']
>>> rotate(d, -3)
>>> list(d)
['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k']

--

___
Python tracker 

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



[issue3871] cross and native build of python for mingw* hosts

2013-02-02 Thread Ray Donnelly

Ray Donnelly added the comment:

Great Roumen, please split into new issues then make a new overall tracking 
issue, then this one can be left for historians and archaeologists.

For Posix installation scheme I've got:

https://github.com/niXman/mingw-builds/blob/master/patches/Python-3.3.0/0050-mingw-sysconfig-like-posix.patch

It needs some changes to allow for normal NT scheme when not using MinGW though.

For system libffi there's:

https://github.com/niXman/mingw-builds/blob/master/patches/Python-3.3.0/0035-mingw-system-libffi.patch

When you make your new patches I will base a new set of patches on them.

--

___
Python tracker 

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



[issue17100] rotating an ordereddict

2013-02-02 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
Removed message: http://bugs.python.org/msg181184

___
Python tracker 

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



[issue1597850] Cross compiling patches for MINGW

2013-02-02 Thread Roumen Petrov

Roumen Petrov added the comment:

Proposed patch is mostly for cross compilation in general. Now this is 
implemented differently and I think that all proposed updates are already 
addressed.

Also I can not  see relation with gcc( mingw ) builds.

What about to close issue as fixed ?

--

___
Python tracker 

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



[issue6672] Add Mingw recognition to pyport.h to allow building extensions

2013-02-02 Thread Roumen Petrov

Roumen Petrov added the comment:

Version against current (2013-02-02) source.

--
versions: +Python 3.4
Added file: 
http://bugs.python.org/file28935/0002-MINGW-issue6672-add-mingw-recognition-to-pyport.h-to.patch

___
Python tracker 

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



[issue6972] zipfile.ZipFile overwrites files outside destination path

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 434b50c7bbed by Serhiy Storchaka in branch '3.2':
Fix the test for issue #6972.
http://hg.python.org/cpython/rev/434b50c7bbed

New changeset 8b33f3a4a200 by Serhiy Storchaka in branch '3.3':
Fix the test for issue #6972.
http://hg.python.org/cpython/rev/8b33f3a4a200

New changeset 7a47fd7f2fdc by Serhiy Storchaka in branch 'default':
Fix the test for issue #6972.
http://hg.python.org/cpython/rev/7a47fd7f2fdc

--

___
Python tracker 

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



[issue16398] deque.rotate() could be much faster

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f7b01daffe01 by Raymond Hettinger in branch 'default':
Issue 16398: Use memcpy() in deque.rotate().
http://hg.python.org/cpython/rev/f7b01daffe01

--

___
Python tracker 

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



[issue17105] Python 3.2 segfault

2013-02-02 Thread Damian

New submission from Damian:

Hi. While porting a library of mine (https://stem.torproject.org/) to python 3 
I've been reliably encountering a python segmentation fault while running its 
integration tests. After many hours of head scratching I've narrowed the repro 
to the following script...



import queue
import socket

class Demo(object):
  def __init__(self, control_socket_file):
demo_queue = queue.Queue()

try:
  raise ValueError()
except ValueError as exc:
  demo_queue.put(exc)

for i in range(20):
  control_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  control_socket.connect(("www.google.com", 80))
  control_socket_file = control_socket.makefile(mode = "rw", newline = "") 

  Demo(control_socket_file)



atagar@morrigan:~$ python3 --version
Python 3.2
atagar@morrigan:~$ python3 demo.py 
Segmentation fault



Yes, I realise that the script is stupidly convoluted but it was the minimal 
amount of code I could get to in order to reproduce the problem. Some things to 
note...

* You must have an object that gets a reference to an open socket based file.

* You need to have a try/catch block and enqueue that exception. If you get rid 
of the try/catch or enqueue something else then no segfault for you.

* The segfault isn't entirely reliable (seems so happen half the time or so), 
hence the loop.


While this repro script is pointless, it's the last issue preventing me from 
moving to python 3. At this point I'm out of idea so help would be greatly 
appreciated.

Thanks! -Damian

Python: Python 3.2 (r32:88445, Oct 20 2012, 14:09:50)
Platform: Ubuntu 11.04

PS. If the advice is 'upgrade python, 3.2 had some segfault bugs' then a 
pointer to those bugs would be appreciated. I've sunk quite a few hours into 
this issue so it would be nice to finally figure out what's up.

--
messages: 181190
nosy: atagar
priority: normal
severity: normal
status: open
title: Python 3.2 segfault
type: crash
versions: Python 3.2

___
Python tracker 

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



[issue16398] deque.rotate() could be much faster

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cb5cde9e5ac5 by Raymond Hettinger in branch '2.7':
Issue 16398: Use memcpy() in deque.rotate().
http://hg.python.org/cpython/rev/cb5cde9e5ac5

--

___
Python tracker 

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



[issue16686] audioop overflow issues

2013-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Since there is no one who want to review the patch for this dirty buggy module, 
I will test and review it myself yet once and then commit.

--

___
Python tracker 

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



[issue14340] Update embedded copy of expat - fix security & crash issues

2013-02-02 Thread Georg Brandl

Georg Brandl added the comment:

Then I guess there is no reason not to put it in 3.2.4.

--

___
Python tracker 

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



[issue16398] deque.rotate() could be much faster

2013-02-02 Thread Simon Law

Simon Law added the comment:

Raymond, looking at your patch, can we assert that deque->leftblock is never 
equal to deque->rightblock? If not, you need to use memmove() instead of 
memcpy(), which is unsafe for overlapping arrays.

It is not clear to me that this invariant is true. At the very least, an 
assertion should be there to protect future refactorings.

--

___
Python tracker 

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



[issue17105] Python 3.2 segfault

2013-02-02 Thread Stefan Krah

Stefan Krah added the comment:

Thanks for the report. I cannot reproduce it with the latest 3.2 version.
Perhaps the version shipped with Ubuntu 11.04 has this problem.

--
nosy: +doko, skrah

___
Python tracker 

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



[issue16398] deque.rotate() could be much faster

2013-02-02 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Even when leftblock == rightblock, a memcpy() will work fine.  When the block 
extends off the end, it *always* creates a newblock and never wraps around to 
the current block.  Data doesn't get overwritten in any scenario.

--

___
Python tracker 

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



[issue16398] deque.rotate() could be much faster

2013-02-02 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Also note, len>=1 and |n| < len//2, so even within a single block, memcpy() 
doesn't overwrite data.

--

___
Python tracker 

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



[issue16398] deque.rotate() could be much faster

2013-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It is possible to use only one new block (or even none). It should a little 
speed up rotate(). I will open a new issue when prepare a patch.

--

___
Python tracker 

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



[issue17105] Python 3.2 segfault

2013-02-02 Thread Stefan Krah

Stefan Krah added the comment:

IOW, my advice is to get Python 3.3 from hg.python.org and see if
you can reproduce the issue.

--

___
Python tracker 

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



[issue13886] readline-related test_builtin failure

2013-02-02 Thread Nadeem Vawda

Nadeem Vawda added the comment:

You're right; it breaks backspacing over multibyte characters. I should
have tested it more carefully before committing. I'll revert the changes.

--
resolution: fixed -> 
stage: committed/rejected -> needs patch
status: closed -> open

___
Python tracker 

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



[issue13886] readline-related test_builtin failure

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e6952acd5a55 by Nadeem Vawda in branch '3.2':
Back out fix for issue #13886; it introduced a new bug in interactive readline 
use.
http://hg.python.org/cpython/rev/e6952acd5a55

--

___
Python tracker 

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



[issue17105] Python 3.2 segfault

2013-02-02 Thread Damian

Damian added the comment:

Thanks. I snagged the 3.3 tarball from 'http://www.python.org/download/' after 
your first comment. Compilation just finished and it works there...

atagar@morrigan:~$ ~/Desktop/Python-3.3.0/python --version
Python 3.3.0
atagar@morrigan:~$ ~/Desktop/Python-3.3.0/python demo.py 

*sigh*

Feel free to resolve this ticket.

--

___
Python tracker 

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



[issue17105] Python 3.2 segfault

2013-02-02 Thread Stefan Krah

Stefan Krah added the comment:

Thanks for testing. The problem with the Ubuntu Python

  "Python 3.2 (r32:88445, Oct 20 2012, 14:09:50)"

is that it seems to be a patched 3.2.0, while we're already at 3.2.3.


So it might be worth reporting this issue to Ubuntu.

--
resolution:  -> works for me
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue16398] deque.rotate() could be much faster

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset efb8d80af320 by Raymond Hettinger in branch 'default':
Issue 16398:  Add assertions to show why memcmp is safe.
http://hg.python.org/cpython/rev/efb8d80af320

--

___
Python tracker 

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



[issue13886] readline-related test_builtin failure

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5c7e884b205a by Nadeem Vawda in branch '3.3':
Back out fix for issue #13886; it introduced a new bug in interactive readline 
use.
http://hg.python.org/cpython/rev/5c7e884b205a

--

___
Python tracker 

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



[issue16398] deque.rotate() could be much faster

2013-02-02 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Serhiy, it is intentional that a new block is created.  Also, note the deque 
implementation uses freelisting (block reuse) so getting a "new block" is very 
cheap.   Please leave this design unchanged -- it makes it very easy to reason 
about the deques work and how they perform.  It also contributes to the 
invariants being understandable.

--

___
Python tracker 

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



[issue13886] readline-related test_builtin failure

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8b8c6abda7e8 by Nadeem Vawda in branch 'default':
Back out fix for issue #13886; it introduced a new bug in interactive readline 
use.
http://hg.python.org/cpython/rev/8b8c6abda7e8

--

___
Python tracker 

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



[issue13886] readline-related test_builtin failure

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5bf91dfb1e34 by Nadeem Vawda in branch '2.7':
Back out fix for issue #13886; it introduced a new bug in interactive readline 
use.
http://hg.python.org/cpython/rev/5bf91dfb1e34

--

___
Python tracker 

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



[issue16398] deque.rotate() could be much faster

2013-02-02 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger

___
Python tracker 

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



[issue1597850] Cross compiling patches for MINGW

2013-02-02 Thread Han-Wen Nienhuys

Han-Wen Nienhuys added the comment:

yeah, whatever.

(only 7 years to close an issue. Yay for open-source.)

--
status: open -> closed

___
Python tracker 

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



[issue17106] Crash in IO reading text file as binary via email library

2013-02-02 Thread R. David Murray

New submission from R. David Murray:

I came across this by making a mistake, but it shouldn't crash:

rdmurray@hey:~/python/p32>touch temp
rdmurray@hey:~/python/p32>./python  
Python 3.2.3+ (3.2:e6952acd5a55+, Feb  2 2013, 15:04:21) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from email import message_from_binary_file as mb
>>> m = mb(open('temp'))
python: ./Modules/_io/textio.c:1454: textiowrapper_read_chunk: Assertion 
`((PyObject*)(input_chunk))->ob_type))->tp_flags & ((1L<<27))) != 0)' 
failed.
zsh: abort  ./python


This is a regression relative to 3.2.3:

Python 3.2.3 (default, Sep 16 2012, 16:35:39) 
[GCC 4.5.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from email import message_from_binary_file as mb
>>> m = mb(open('temp'))
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.2/email/__init__.py", line 63, in
message_from_binary_file
return BytesParser(*args, **kws).parse(fp)
  File "/usr/lib/python3.2/email/parser.py", line 124, in parse
return self.parser.parse(fp, headersonly)
  File "/usr/lib/python3.2/email/parser.py", line 68, in parse
data = fp.read(8192)
  File "/usr/lib/python3.2/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
TypeError: 'str' does not support the buffer interface

--
components: IO
keywords: 3.2regression
messages: 181210
nosy: georg.brandl, pitrou, r.david.murray
priority: release blocker
severity: normal
stage: needs patch
status: open
title: Crash in IO reading text file as binary via email library
type: crash
versions: Python 3.2

___
Python tracker 

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



[issue17106] Crash in IO reading text file as binary via email library

2013-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I see "TypeError: 'str' does not support the buffer interface" on current 3.2 
and default.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue17106] Crash in IO reading text file as binary via email library

2013-02-02 Thread R. David Murray

R. David Murray added the comment:

It might not crash on a debug build.  I haven't tried that.

--

___
Python tracker 

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



[issue17106] Crash in IO reading text file as binary via email library

2013-02-02 Thread R. David Murray

R. David Murray added the comment:

I mean, non-debug build.

--

___
Python tracker 

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



[issue16398] deque.rotate() could be much faster

2013-02-02 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
Removed message: http://bugs.python.org/msg181206

___
Python tracker 

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



[issue16398] deque.rotate() could be much faster

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 12ef5a4bba63 by Raymond Hettinger in branch 'default':
Issue 16398: One more assertion for good measure.
http://hg.python.org/cpython/rev/12ef5a4bba63

--

___
Python tracker 

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



[issue17106] Crash in IO reading text file as binary via email library

2013-02-02 Thread R. David Murray

R. David Murray added the comment:

OK, this happens in debug mode in 3.2.3, so it is not a regression.  Still 
something to be looked in to, since that assert presumably has a purpose.

--
keywords:  -3.2regression
priority: release blocker -> normal
type: crash -> behavior
versions: +Python 3.3, Python 3.4

___
Python tracker 

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



[issue17106] Crash in IO reading text file as binary via email library

2013-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There is a simpler crasher:

import io
io.TextIOWrapper(io.StringIO()).read(1)

--

___
Python tracker 

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



[issue17106] assertion error in IO reading text file as binary

2013-02-02 Thread R. David Murray

Changes by R. David Murray :


--
title: Crash in IO reading text file as binary via email library -> assertion 
error in IO reading text file as binary

___
Python tracker 

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



[issue17106] assertion error in IO reading text file as binary

2013-02-02 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Well, if a proper type check is made later, then the assert can go.
Also, the PyBytes_Size() result should be checked for error, which incidentally 
ensures the argument is a bytes object.

--

___
Python tracker 

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



[issue8765] Tests unwillingly writing unicocde to raw streams

2013-02-02 Thread Ezio Melotti

Changes by Ezio Melotti :


--
stage:  -> patch review
type:  -> behavior

___
Python tracker 

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



[issue15369] pybench and test.pystone poorly documented

2013-02-02 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't really think they deserve documenting.

pystones can arguably be a cheap and easy way of comparing performance of 
different systems *using the exact same Python interpreter*. It's the only 
point of running pystones.

As for pybench, it probably had a point when there wasn't anything better, but 
I don't think it has anymore. We have a much better benchmarks suite right now, 
and we also have a couple specialized benchmarks in the tools directory.

--
nosy: +pitrou

___
Python tracker 

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



[issue15633] httplib.response is not closed after all data has been read

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8dcf94c2fef5 by Antoine Pitrou in branch '2.7':
Issue #15633: httplib.HTTPResponse is now mark closed when the server sends 
less than the advertised Content-Length.
http://hg.python.org/cpython/rev/8dcf94c2fef5

--
nosy: +python-dev

___
Python tracker 

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



[issue15633] httplib.response is not closed after all data has been read

2013-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 03c536afeb7e by Antoine Pitrou in branch '3.2':
Issue #15633: httplib.HTTPResponse is now mark closed when the server sends 
less than the advertised Content-Length.
http://hg.python.org/cpython/rev/03c536afeb7e

New changeset 7d504068bc58 by Antoine Pitrou in branch '3.3':
Issue #15633: httplib.HTTPResponse is now mark closed when the server sends 
less than the advertised Content-Length.
http://hg.python.org/cpython/rev/7d504068bc58

New changeset 9f9287357af9 by Antoine Pitrou in branch 'default':
Issue #15633: httplib.HTTPResponse is now mark closed when the server sends 
less than the advertised Content-Length.
http://hg.python.org/cpython/rev/9f9287357af9

--

___
Python tracker 

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



[issue15633] httplib.response is not closed after all data has been read

2013-02-02 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I've committed the patch into 2.7 and then ported it to 3.x. Please reopen if 
the problem still occurs with the patch.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue17107] test_sni in test_urllib2net could be enabled

2013-02-02 Thread Antoine Pitrou

New submission from Antoine Pitrou:

Right now test_sni in test_urllib2net is skipped with the message "test 
disabled - test server needed". But the ssl module now has server-side SNI 
support, and therefore we could implement this test with a local server (and 
perhaps move it to test_urllib2_localnet).

--
components: Tests
messages: 181222
nosy: pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: test_sni in test_urllib2net could be enabled
type: enhancement
versions: Python 3.4

___
Python tracker 

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



[issue17102] tarfile extract can write files outside the destination path

2013-02-02 Thread Gregory P. Smith

Gregory P. Smith added the comment:

given issue 1044, this is not high priority.  i still think it'd be useful.

--
priority: high -> normal

___
Python tracker 

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



[issue16698] test_posix.test_getgroups fails on some systems

2013-02-02 Thread Ned Deily

Ned Deily added the comment:

The problem is as documented for issue10433: 
http://docs.python.org/2/library/os.html#os.getgroups

Here's a patch that skips the failing test when Python is built on OS X with a 
deployment target less than 10.6.  Currently on releases prior to 3.3.0, the 
build deployment target defaults to 10.5 or earlier unless it is explicitly 
overridden at configure time with MACOSX_DEPLOYMENT_TARGET (Issue11485).  The 
patch seems to work OK on 2.7.  I'm about to test with 3.2 and later.

--
keywords: +patch
nosy: +benjamin.peterson, georg.brandl
stage: needs patch -> patch review
Added file: http://bugs.python.org/file28936/issue16698_27.patch

___
Python tracker 

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



[issue17108] import silently prefers package over module when both available

2013-02-02 Thread Shai Berger

New submission from Shai Berger:

Consider the following directory structure:

a-\
  __init__.py
  b.py
  b-|
__init__.py

Now, in Python (I checked 2.7.3 and 3.2.3, haven't seen the issue mentioned 
anywhere so I suspect it is also in later Pythons), if you import a.b, you 
always get the package (that is, the b folder), and the module (b.py) is 
silently ignored. I tested by putting the line """print("I'm a package")""" in 
a/b/__init__.py and """print("I'm a module")""" in a/b.py.

This becomes a real problem with tools which find modules dynamically, like 
test harnesses.

I'd expect that in such cases, Python should "avoid the temptation to guess", 
and raise an ImportError.

Thanks, Shai.

--
components: Interpreter Core
messages: 181225
nosy: shai
priority: normal
severity: normal
status: open
title: import silently prefers package over module when both available
type: behavior
versions: Python 2.7, Python 3.2

___
Python tracker 

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



[issue16686] audioop overflow issues

2013-02-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I do not have the knowledge needed to review the code, but I took a brief look. 
The three doc patches need a verb to be proper English. "Samples truncated in 
case of overflow." should be "Samples are truncated in case of overflow." in 
both places. I think "Samples wrapped around in case of overflow." could be 
rewritten as "Samples wrap around in case of overflow.", though adding 'are' 
works too.

In the C code comment:

 /* Passing a short** for an 's' argument is correct only
if the string contents is aligned for interpretation
as short[]. Due to the definition of PyBytesObject,
-   this is currently (Python 2.6) the case. */
+   this is currently (Python 2.6) the case.
+   XXX: It's not true for memoryview. */

Is whatever the case in 2.6 only (if so, drop obsolete) or since 2.6. If the 
latter, I would rewrite as "this is the case since Python 2.6.".
The addition is not clear to me. Are you implying that something should be made 
true for memory view (in a future patch)?

--

___
Python tracker 

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



  1   2   >