[issue14810] Bug in tarfile

2012-05-16 Thread Lars Gustäbel

Changes by Lars Gustäbel :


--
assignee:  -> lars.gustaebel

___
Python tracker 

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



[issue14838] IDLE Will not load on reinstall

2012-05-16 Thread Cain

New submission from Cain :

After reinstalling Python 3.2.2, I have been unable to load IDLE - it simply 
refuses to respond. I have tried upgrading to 3.3 also, and still have the same 
problem - following multiple uninstalls, reinstalls and searching, I can't 
appear to find any solution to this problem which does appear to have occurred 
to others in the past with no solution that I can find.

Any ideas?

--
components: IDLE
messages: 160952
nosy: BugReporter
priority: normal
severity: normal
status: open
title: IDLE Will not load on reinstall
type: behavior
versions: Python 3.2, Python 3.3

___
Python tracker 

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



[issue14652] Better error messages for wsgiref validator failures

2012-05-16 Thread Jeff McNeil

Jeff McNeil  added the comment:

I went through the patch real quick and I noticed that your using single 
element tuples in your string formatting.  That makes sense in situations where 
the argument might itself be a tuple, however, not on calls to len() as that 
will return an integer.

--
nosy: +mcjeff

___
Python tracker 

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



[issue14134] xmlrpc.client.ServerProxy needs timeout parameter

2012-05-16 Thread Jeff McNeil

Jeff McNeil  added the comment:

I would think it might make more sense just to make the change to the Transport 
object.  Since there's an argument for a transport on ServerProxy already, that 
seems more straightforward and keeps the network layer isolated.

Otherwise, it seems slightly ambiguous to me. Consider that maybe I passed in a 
transport and a timeout, why wasn't my timeout honored?  Though, I guess 
use_datetime already behaves that way.

--
nosy: +mcjeff

___
Python tracker 

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



[issue14823] Simplify threading.Lock.acquire() description

2012-05-16 Thread Q

Q  added the comment:

Well, as threading is a Python wrapper, this could easily be fixed. (I am not 
certain whether it *should* be fixed or not -- perhaps things are fine just as 
they are, at least with that particular detail. ) 

But this is good to know, thank you.

--

___
Python tracker 

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



[issue11880] add a {dist-info} category to distutils2

2012-05-16 Thread Daniel Holth

Daniel Holth  added the comment:

Implemented in https://bitbucket.org/dholth/cpython/changeset/c493a5179621

Advice on writing the unit test would be appreciated.

--

___
Python tracker 

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



[issue10530] distutils2 should allow the installing of python files with invalid syntax

2012-05-16 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue14715] test.support.DirsOnSysPath should be replaced by importlib.test.util.import_state

2012-05-16 Thread Eric V. Smith

Eric V. Smith  added the comment:

The current tests don't like setting sys.modules to [].

I like resetting everything (including sys.modules) back to the original state. 
Otherwise some tests, which do things like "import foo", affect later tests.

So, I think I'll leave the patch as-is. I'll rename it, fix all references to 
it, then check it in. After that I'll start using it in other tests.

--

___
Python tracker 

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



[issue14715] test.support.DirsOnSysPath should be replaced by importlib.test.util.import_state

2012-05-16 Thread Eric V. Smith

Eric V. Smith  added the comment:

Actually, I was planning on resetting everything, but I haven't gotten that to 
work yet. I can't figure out why (but I will!).

With the current patch, where things are not reset, the only test I had to 
change was test_path_importer_cache_empty_string. That change is in the 
attached -0 diff.

I can't decide which way I prefer it. I might add a parameter to control the 
behavior.

--

___
Python tracker 

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



[issue14715] test.support.DirsOnSysPath should be replaced by importlib.test.util.import_state

2012-05-16 Thread Brett Cannon

Brett Cannon  added the comment:

So from what I can tell you are advocating not resetting anything by default 
but instead only save the details and then reset it later. That's fine with me 
(aligns more with the warnings context manager), the importlib tests will 
simply need to be updated so as to fix their assumptions that everything gets 
cleared.

--

___
Python tracker 

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



[issue14836] Add next(iter(o)) to set.pop, dict.popitem entries.

2012-05-16 Thread Éric Araujo

Éric Araujo  added the comment:

> Use next(iter(s)) to return an arbitrary element
I would suggest s/return/get/

IIUC calling this twice in a row will get the same element; should the doc 
mention that?

--
nosy: +eric.araujo

___
Python tracker 

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



[issue13934] sqlite3 test typo

2012-05-16 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks!  The code patch should use unittest.skip instead of return (even if the 
rest of the file uses return, we can improve that one step at a time).

--
nosy: +eric.araujo

___
Python tracker 

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



[issue13210] Support Visual Studio 2010

2012-05-16 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

Kristjan,
 I'm trying to apply your most recent patch, but many of the hunks fail. I 
tried to find it by time, but failed to do so. Perhaps you know what revision 
that patch was against? Thanks.

--
nosy: +jason.coombs

___
Python tracker 

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



[issue14475] codecs.StreamReader.read behaves differently from regular files

2012-05-16 Thread Andrew

Andrew  added the comment:

Just got this behavior, with readlines(), which is unsurprising since it 
internally uses read() as described in the original bug report.

The break on line 468 of codecs.py seems to be the problem, it fixes it if I 
remove this conditional locally.

http://hg.python.org/cpython/file/f6a207d86154/Lib/codecs.py#l466

I may be overlooking something, but I would assume this should be checking if 
the character buffer extends to the EOF of the underlaying stream at this point?

As stated before can be reproduced by:
f = codecs.open(...)
f.read()
f.readlines()

--
nosy: +Andrew.S

___
Python tracker 

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



[issue14836] Add next(iter(o)) to set.pop, dict.popitem entries.

2012-05-16 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +rhettinger

___
Python tracker 

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



[issue9548] locale can be imported at startup but relies on too many library modules

2012-05-16 Thread STINNER Victor

STINNER Victor  added the comment:

> initializing the standard streams imports Lib/locale.py

It looks like only locale.getpreferredencoding() is needed to initialize 
standard streams. Another option is to add a locale encoding codec. I already 
proposed the idea in #13619 but it was rejected.

--

___
Python tracker 

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



[issue14837] Better SSL errors

2012-05-16 Thread Antoine Pitrou

New submission from Antoine Pitrou :

This patch tries to provide better SSL errors by using OpenSSL's official 
mnemonics. The sub-library mnemonic (e.g. "SSL", "PEM"...) is provided as the 
"library" attribute on an exception, and the reason mnemonic (e.g. 
"CERTIFICATE_VERIFY_FAILED") is provided as the "reason" attribute.

I'm welcoming of any comments or suggestions.

--
components: Extension Modules
files: ssl_errs.patch
keywords: patch
messages: 160939
nosy: exarkun, pitrou
priority: low
severity: normal
status: open
title: Better SSL errors
type: enhancement
versions: Python 3.3
Added file: http://bugs.python.org/file25621/ssl_errs.patch

___
Python tracker 

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



[issue14834] A list of broken links on the python.org website

2012-05-16 Thread Ned Deily

Ned Deily  added the comment:

Thanks for the report.  I've fixed the 2.0.1 and 2.5.6 (also 2.5.5) link 
problems you reported.  It looks like the .asc files for the entire 3.1.x 
release series do not exist; I've noised the release manager for that.  The 
/community/jobs section of the website is not maintained by python-dev;  I've 
copied your list of broken links to the pydotorg-www mailing list here:  
http://mail.python.org/pipermail/pydotorg-www/2012-May/001791.html

--
nosy: +benjamin.peterson, ned.deily
stage:  -> needs patch

___
Python tracker 

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



[issue14836] Add next(iter(o)) to set.pop, dict.popitem entries.

2012-05-16 Thread Terry J. Reedy

New submission from Terry J. Reedy :

There have been several requests for a set.get() (no args) or set.pick() method 
to get an item without deleting it as .pop() does. Probably the best answer is 
to use the simple generic composition next(iter(s)). The counter response is 
that it is hardly obvious and needs to be documented.

Suggesion: after the current

"pop() 
Remove and return an arbitrary element from the set. Raises KeyError if the set 
is empty."

add "Use next(iter(s)) to return an arbitrary element without removing it."

Then change the following to match.

"popitem() 
Remove and return an arbitrary (key, value) pair from the dictionary.

popitem() is useful to destructively iterate over a dictionary, as often used 
in set algorithms. If the dictionary is empty, calling popitem() raises a 
KeyError."

to

"popitem() 
Remove and return an arbitrary (key, value) pair from the dictionary. Raises 
KeyError if the dict is empty. Use next(iter(d)) to return an arbitrary pair 
without removing it."

The old comment about destructively iterating over a dict as a set belongs more 
with set.pop if it is not removed.

The idiom works with all iterators, but there is no other place I can think of 
to put it, and it is not needed for sequences.

--
assignee: docs@python
components: Documentation
keywords: patch
messages: 160937
nosy: docs@python, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Add next(iter(o)) to set.pop, dict.popitem entries.
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue1508864] threading.Timer/timeouts break on change of win32 local time

2012-05-16 Thread STINNER Victor

STINNER Victor  added the comment:

> threading.py imports time.time as _time.

threading is now using a monotonic clock: see the issue #14222 and the PEP 418.

--

___
Python tracker 

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



[issue8376] Tutorial offers dangerous advice about iterators: “__iter__() can just return self”

2012-05-16 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +terry.reedy
versions: +Python 3.3 -Python 2.6, Python 3.1

___
Python tracker 

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



[issue14813] Can't build under VS2008 anymore

2012-05-16 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset f6a207d86154 by Stefan Krah in branch 'default':
Issue 14813: Fix Visual Studio 2008 build after the move into the PC/VS9.0
http://hg.python.org/cpython/rev/f6a207d86154

--
nosy: +python-dev

___
Python tracker 

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



[issue14835] plistlib: output empty elements correctly

2012-05-16 Thread Sidney San Martín

New submission from Sidney San Martín :

plistlib’s output is currently byte-for-byte identical to Apple’s, except 
arrays and dictionaries are stored with self-closing tags (e.g. '') and 
plistlib outputs empty tags with a newline (e.g. '\n').

This tiny patch makes its output for empty arrays and dictionaries consistent 
with the OS’s.

--
assignee: ronaldoussoren
components: Library (Lib), Macintosh
files: plistlib_empty_objects.patch
keywords: patch
messages: 160934
nosy: ronaldoussoren, ssm
priority: normal
severity: normal
status: open
title: plistlib: output empty elements correctly
type: behavior
versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file25620/plistlib_empty_objects.patch

___
Python tracker 

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



[issue14813] Can't build under VS2008 anymore

2012-05-16 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Zitat von Stefan Krah :

> Stefan Krah  added the comment:
>
>> Preferably, the project files would be generated from the VS2010  
>> project files, but for the moment, manually editing to make them  
>> work again might be fine as well.
>
>
> Martin, Brian: Can I go ahead with vs-9.0.diff or would it interfere
> with your work?

It's fine with me.

--

___
Python tracker 

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



[issue14715] test.support.DirsOnSysPath should be replaced by importlib.test.util.import_state

2012-05-16 Thread Eric V. Smith

Eric V. Smith  added the comment:

Also for use in test_pkgutil.

--

___
Python tracker 

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



[issue14783] Update int() docstring from manual

2012-05-16 Thread Ezio Melotti

Changes by Ezio Melotti :


--
assignee: docs@python -> 
nosy: +ezio.melotti
stage:  -> needs patch
type:  -> enhancement

___
Python tracker 

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



[issue13031] small speed-up for tarfile.py when unzipping tarballs

2012-05-16 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Justin, perhaps of interest to the patch would be better if you provide any 
microbenchmark.

--

___
Python tracker 

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



[issue14826] urllib2.urlopen fails to load URL

2012-05-16 Thread Anthony Long

Anthony Long  added the comment:

http://maw.liquifire.com/maw?set=image[2302.000.13314%20a]&call=url[file:325x445]
 works properly. Notice the %20 instead of ' '

--
nosy: +antlong

___
Python tracker 

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



[issue14834] A list of broken links on the python.org website

2012-05-16 Thread Anthony Long

New submission from Anthony Long :

http://python.org/community/jobs/
http://python.org/community/jobs/www.austinfraser.com
  \_ error code: 404 (not found)
http://python.org/lumino.so
  \_ error code: 404 (not found)
http://python.org/community/jobs/www.osrecruit.com
  \_ error code: 404 (not found)
http://python.org/community/jobs/www.tech.myemma.com
  \_ error code: 404 (not found)
http://python.org/community/jobs/www.oxfordknight.co.uk
  \_ error code: 404 (not found)

http://python.org/download/releases/2.0.1/

http://python.org/download/releases/2.0.1/ftp/python/2.0.1/Python-2.0.1-Debug.zip
  \_ error code: 404 (not found)

http://python.org/download/releases/2.5.6/
http://python.org/download/releases/2.5.6/md5sum.py
  \_ error code: 404 (not found)

http://python.org/download/releases/3.1.4/
http://python.org/download/releases/3.1.4/python-3.1.4.msi.asc
  \_ error code: 404 (not found)
http://python.org/download/releases/3.1.4/python-3.1.4-pdb.zip.asc
  \_ error code: 404 (not found)
http://python.org/download/releases/3.1.4/python-3.1.4.amd64.msi.asc
  \_ error code: 404 (not found)
http://python.org/download/releases/3.1.4/python-3.1.4.amd64-pdb.zip.asc
  \_ error code: 404 (not found)

--
messages: 160929
nosy: antlong
priority: normal
severity: normal
status: open
title: A list of broken links on the python.org website

___
Python tracker 

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



[issue14833] Copyright date in footer of /pypi says 2011

2012-05-16 Thread Anthony Long

New submission from Anthony Long :

http://pypi.python.org/pypi

The copyright in the footer says 2011.

--
components: None
messages: 160928
nosy: antlong
priority: normal
severity: normal
status: open
title: Copyright date in footer of /pypi says 2011

___
Python tracker 

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



[issue13031] small speed-up for tarfile.py when unzipping tarballs

2012-05-16 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 

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



[issue14780] urllib.request could use the default CA store

2012-05-16 Thread James Oakley

James Oakley  added the comment:

Ok, perfect. I submitted a copy of the agreement.

--

___
Python tracker 

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



[issue14313] zipfile should raise an exception for unsupported compression methods

2012-05-16 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

> I still like NotImplementedError more than RuntimeError, though.

Well. here are patches for Python 3.2 and 2.7 (backported changeset
596b0eaeece8 + part of changeset fccdcd83708a).

--
Added file: 
http://bugs.python.org/file25618/zipfile_unsupported_compression-3.2.patch
Added file: 
http://bugs.python.org/file25619/zipfile_unsupported_compression-2.7.patch

___
Python tracker 

___diff -r 13900edf13be Lib/test/test_zipfile.py
--- a/Lib/test/test_zipfile.py  Wed May 16 15:01:40 2012 +0200
+++ b/Lib/test/test_zipfile.py  Wed May 16 23:00:01 2012 +0300
@@ -922,6 +922,17 @@
 caught."""
 self.assertRaises(RuntimeError, zipfile.ZipFile, TESTFN, "w", -1)
 
+def test_unsupported_compression(self):
+# data is declared as shrunk, but actually deflated
+data = (b'PK\x03\x04.\x00\x00\x00\x01\x00\xe4C\xa1@\x00\x00\x00'
+b'\x00\x02\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00x\x03\x00PK\x01'
+b'\x02.\x03.\x00\x00\x00\x01\x00\xe4C\xa1@\x00\x00\x00\x00\x02\x00\x00'
+b'\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+b'\x80\x01\x00\x00\x00\x00xPK\x05\x06\x00\x00\x00\x00\x01\x00\x01\x00'
+b'/\x00\x00\x00!\x00\x00\x00\x00\x00')
+with zipfile.ZipFile(io.BytesIO(data), 'r') as zipf:
+self.assertRaises(NotImplementedError, zipf.open, 'x')
+
 def test_null_byte_in_filename(self):
 """Check that a filename containing a null byte is properly
 terminated."""
diff -r 13900edf13be Lib/zipfile.py
--- a/Lib/zipfile.pyWed May 16 15:01:40 2012 +0200
+++ b/Lib/zipfile.pyWed May 16 23:00:01 2012 +0300
@@ -461,6 +461,28 @@
 self._UpdateKeys(c)
 return c
 
+
+compressor_names = {
+0: 'store',
+1: 'shrink',
+2: 'reduce',
+3: 'reduce',
+4: 'reduce',
+5: 'reduce',
+6: 'implode',
+7: 'tokenize',
+8: 'deflate',
+9: 'deflate64',
+10: 'implode',
+12: 'bzip2',
+14: 'lzma',
+18: 'terse',
+19: 'lz77',
+97: 'wavpack',
+98: 'ppmd',
+}
+
+
 class ZipExtFile(io.BufferedIOBase):
 """File-like object for reading an archive member.
Is returned by ZipFile.open().
@@ -487,6 +509,12 @@
 
 if self._compress_type == ZIP_DEFLATED:
 self._decompressor = zlib.decompressobj(-15)
+elif self._compress_type != ZIP_STORED:
+descr = compressor_names.get(self._compress_type)
+if descr:
+raise NotImplementedError("compression type %d (%s)" % 
(self._compress_type, descr))
+else:
+raise NotImplementedError("compression type %d" % 
(self._compress_type,))
 self._unconsumed = b''
 
 self._readbuffer = b''
diff -r e957b93571a8 Lib/test/test_zipfile.py
--- a/Lib/test/test_zipfile.py  Wed May 16 15:01:40 2012 +0200
+++ b/Lib/test/test_zipfile.py  Wed May 16 23:03:30 2012 +0300
@@ -859,6 +859,17 @@
 caught."""
 self.assertRaises(RuntimeError, zipfile.ZipFile, TESTFN, "w", -1)
 
+def test_unsupported_compression(self):
+# data is declared as shrunk, but actually deflated
+data = (b'PK\x03\x04.\x00\x00\x00\x01\x00\xe4C\xa1@\x00\x00\x00'
+b'\x00\x02\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00x\x03\x00PK\x01'
+b'\x02.\x03.\x00\x00\x00\x01\x00\xe4C\xa1@\x00\x00\x00\x00\x02\x00\x00'
+b'\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+b'\x80\x01\x00\x00\x00\x00xPK\x05\x06\x00\x00\x00\x00\x01\x00\x01\x00'
+b'/\x00\x00\x00!\x00\x00\x00\x00\x00')
+with zipfile.ZipFile(io.BytesIO(data), 'r') as zipf:
+self.assertRaises(NotImplementedError, zipf.open, 'x')
+
 def test_null_byte_in_filename(self):
 """Check that a filename containing a null byte is properly
 terminated."""
diff -r e957b93571a8 Lib/zipfile.py
--- a/Lib/zipfile.pyWed May 16 15:01:40 2012 +0200
+++ b/Lib/zipfile.pyWed May 16 23:03:30 2012 +0300
@@ -461,6 +461,28 @@
 self._UpdateKeys(c)
 return c
 
+
+compressor_names = {
+0: 'store',
+1: 'shrink',
+2: 'reduce',
+3: 'reduce',
+4: 'reduce',
+5: 'reduce',
+6: 'implode',
+7: 'tokenize',
+8: 'deflate',
+9: 'deflate64',
+10: 'implode',
+12: 'bzip2',
+14: 'lzma',
+18: 'terse',
+19: 'lz77',
+97: 'wavpack',
+98: 'ppmd',
+}
+
+
 class ZipExtFile(io.BufferedIOBase):
 """File-like object for reading an archive member.
Is returned by ZipFile.open().
@@ -485,6 +507,12 @@
 
 if self._compress_type == ZIP_DEFLATED:
 self._decompressor = zlib.decompressobj(-15)
+elif self._compress_type != ZIP_STORED:
+descr = compressor_names.get(self._compress_type)
+if descr:
+raise NotImplementedError("

[issue14584] Add gzip support to xmlrpc.server

2012-05-16 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count

2012-05-16 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 

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



[issue13849] Add tests for NUL checking in certain strs

2012-05-16 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

There are two issues. 1) what is the requested changed and is it technically 
correct; 2) if correct, should it be made from a policy viewpoint.

1) Alex, do I understand correctly that you see the behavior of disallowing 
nulls in paths as correct, and that you want an AssertRaises(..., TypeError) 
test added?

This rule seems like an OS rule, not a Python language rule. Is it uniform 
across all OSes?

The following is near the top of the 3.3 os module doc:

"Note: All functions in this module raise OSError in the case of invalid or 
inaccessible file names and paths, or other arguments that have the correct 
type, but are not accepted by the operating system."

On that basis, I would expect OSError. But perhaps the doc needs revision to 
accord with the reworking of OSErrors. On 3.3, Win7, I actually get

>>> os.stat("/tmp\x00abcds")
Traceback (most recent call last):
  File "", line 1, in 
os.stat("/tmp\x00abcds")
FileNotFoundError: [Error 2] The system cannot find the file specified: 
'/tmp\x00abcds'

It appears that os.stat did not check for embedded nulls but just passed the 
string to Windows.


2. I am not sure if I understand the opposition to adding tests. As I remember, 
the 2011 PyCon sprint partly focused on adding tests. Were they not added to 
3.2?

If the test is correct, it cannot break anything, and can catch future 
reversions (which do happen occasionally), besides helping other 
implementations. 3.2 will soon be a moot point, but I hope other 
implementations seriously work on 3.3 versions, and that we are willing to 
improve its test suite after the initial release.

If we are split here, discussion could move to pydev. It is not unusual that a 
specific issue raises a generic issue that needs broader discussion, but with 
the specific issue as a focal point.

Anyway, until there is a patch that we agree is technically correct, no 
decision need be made about commitment and the underlying generic policy.

--

___
Python tracker 

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



[issue14780] urllib.request could use the default CA store

2012-05-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Patch committed. I propose to close the issue, unless further enhancements are 
suggested.

--
resolution:  -> fixed
stage:  -> committed/rejected

___
Python tracker 

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



[issue14780] urllib.request could use the default CA store

2012-05-16 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset f2ed5de1c568 by Antoine Pitrou in branch 'default':
Issue #14780: urllib.request.urlopen() now has a `cadefault` argument to use 
the default certificate store.
http://hg.python.org/cpython/rev/f2ed5de1c568

--
nosy: +python-dev

___
Python tracker 

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



[issue14780] urllib.request could use the default CA store

2012-05-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Oh, by the way, could you sign and send a contributor agreement? See 
http://www.python.org/psf/contrib/
(it is not a copyright assignment, just a formal licensing agreement)

--

___
Python tracker 

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



[issue14780] urllib.request could use the default CA store

2012-05-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Ok, here's a patch with a test and documentation updates.

Ok, thanks! The only change I would make is that cadefault needs to be
False by default; particularly because some platforms don't have a
OpenSSL-compatible default CA store (Windows comes to mind) and all
HTTPS requests would then start failing.

You don't have to upload a new patch; I can change it when committing.

--

___
Python tracker 

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



[issue14702] os.makedirs breaks under autofs directories

2012-05-16 Thread Hynek Schlawack

Hynek Schlawack  added the comment:

I guess this is the magic in mkdir -p:

mkdir("expert", 0755)   = -1 EACCES (Permission denied)
chdir("expert") = 0
mkdir("tmp", 0755)  = -1 EEXIST (File exists)

I'm not sure how I feel about that. I think we have more or less a policy in os 
& shutil not to change directories unless really necessary (like make_archive).

--

___
Python tracker 

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



[issue14780] urllib.request could use the default CA store

2012-05-16 Thread James Oakley

James Oakley  added the comment:

Ok, here's a patch with a test and documentation updates.

--
Added file: 
http://bugs.python.org/file25617/cpython-urllib_urlopen_cadefault.patch

___
Python tracker 

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



[issue1635217] Warn against using requires/provides/obsoletes in setup.py

2012-05-16 Thread anatoly techtonik

anatoly techtonik  added the comment:

PEP 345 completely misses practical side. I need to specify dependencies for my 
package, so that people who checked out the source code could run `pip install 
.` in virtualenv and get everything fetched.

People reading the docs are more practical. What is the alternative if 
`requires` doesn't work and `install_requires` is not official?

--

___
Python tracker 

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



[issue14776] Add SystemTap static markers

2012-05-16 Thread Dave Malcolm

Changes by Dave Malcolm :


Removed file: 
http://bugs.python.org/file25615/cpython-systemtap-2012-05-16-001.patch

___
Python tracker 

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



[issue14813] Can't build under VS2008 anymore

2012-05-16 Thread Brian Curtin

Brian Curtin  added the comment:

I don't have time at the moment to test it, but the patch looks like it's 
probably ok.

--

___
Python tracker 

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



[issue14776] Add SystemTap static markers

2012-05-16 Thread Dave Malcolm

Changes by Dave Malcolm :


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

___
Python tracker 

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



[issue14776] Add SystemTap static markers

2012-05-16 Thread Dave Malcolm

Changes by Dave Malcolm :


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

___
Python tracker 

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



[issue13934] sqlite3 test typo

2012-05-16 Thread poq

poq  added the comment:

Sure, why not. Here you go.

--
Added file: http://bugs.python.org/file25616/sqlite3-version-doc.patch

___
Python tracker 

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



[issue14813] Can't build under VS2008 anymore

2012-05-16 Thread Stefan Krah

Stefan Krah  added the comment:

> Preferably, the project files would be generated from the VS2010 project 
> files, but for the moment, manually editing to make them work again might be 
> fine as well.


Martin, Brian: Can I go ahead with vs-9.0.diff or would it interfere
with your work?

--

___
Python tracker 

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



[issue14776] Add SystemTap static markers

2012-05-16 Thread Dave Malcolm

Dave Malcolm  added the comment:

(Sorry about msg160913; looks like my initial email response took about an hour 
to get through, and I'd subsequently commented using the webui form)

--

___
Python tracker 

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



[issue14776] Add SystemTap static markers

2012-05-16 Thread Dave Malcolm

Dave Malcolm  added the comment:

On Wed, 2012-05-16 at 16:41 +, Antoine Pitrou wrote:
> Antoine Pitrou  added the comment:
> 
> I tried the patch under Mageia 1 and got the following failure:
> 
> test_systemtap skipped -- Test systemtap script did not run; stderr was: 
> b"Pass 1: parsed user script and 72 library script(s) using 
> 56252virt/20964res/1828shr kb, in 70usr/0sys/82real ms.\nPass 2: analyzed 
> script: 1 probe(s), 1 function(s), 0 embed(s), 0 global(s) using 
> 56648virt/21492res/1900shr kb, in 10usr/0sys/3real ms.\nPass 3: using cached 
> /home/antoine/.systemtap/cache/15/stap_155c3565481f113c929ad94e10c2b48e_779.c\nPass
>  4: using cached 
> /home/antoine/.systemtap/cache/15/stap_155c3565481f113c929ad94e10c2b48e_779.ko\nPass
>  5: starting run.\nPass 5: run completed in 0usr/0sys/3real ms.\nPass 5: run 
> failed.  Try again with another '--vp 1' option.\n"

Thanks.  I'm attaching an updated patch which reworks test_systemtap so
that
  (a) it turns up the verbosity of stap invocations from "-v" to "-vv"
  (b) it tests the "hello world" stap script on a trivial binary
("true") before attempting to invoke sys.executable under stap

What does the error message look like with the extra verbosity?

The chmod invocation sounds like an issue with how Mageia have packaged
SystemTap, assuming that you're using a packaged build of systemtap.

--
Added file: 
http://bugs.python.org/file25615/cpython-systemtap-2012-05-16-001.patch

___
Python tracker 

___diff -r 0f6a6f59b002 .hgignore
--- a/.hgignore Wed May 16 19:08:36 2012 +0200
+++ b/.hgignore Wed May 16 13:34:52 2012 -0400
@@ -19,6 +19,7 @@
 python.exe$
 reflog.txt$
 tags$
+Python/pysystemtap.h
 Lib/plat-mac/errors.rsrc.df.rsrc
 Doc/tools/sphinx/
 Doc/tools/docutils/
diff -r 0f6a6f59b002 Lib/test/test_systemtap.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/Lib/test/test_systemtap.pyWed May 16 13:34:52 2012 -0400
@@ -0,0 +1,205 @@
+# Verify that systemtap static probes work
+#
+import subprocess
+import sys
+import sysconfig
+import os
+import unittest
+
+from test.support import run_unittest, TESTFN, unlink
+
+if '--with-systemtap' not in sysconfig.get_config_var('CONFIG_ARGS'):
+raise unittest.SkipTest("Python was not configured --with-systemtap")
+
+try:
+_, stap_version = subprocess.Popen(["stap", "-V"],
+   stdout=subprocess.PIPE,
+   stderr=subprocess.PIPE,
+   ).communicate()
+except OSError:
+# This is what "no stap" looks like.  There may, however, be other
+# errors that manifest this way too.
+raise unittest.SkipTest("Couldn't find stap on the path")
+
+def invoke_systemtap_script(script, cmd):
+# Start a child process, probing with the given systemtap script
+# (passed as stdin to the "stap" tool)
+# The script should be a bytes instance
+# Return (stdout, stderr) pair
+
+p = subprocess.Popen(["stap", "-", '-vv', '-c', cmd],
+ stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+out, err = p.communicate(input=script)
+return out, err
+
+# Verify that stap can run a simple "hello world"-style script
+# This can fail for various reasons:
+# - missing kernel headers
+# - permissions (a non-root user needs to be in the "stapdev" group)
+TRIVIAL_STAP_SCRIPT = b'probe begin { println("hello world") exit () }'
+
+out, err = invoke_systemtap_script(TRIVIAL_STAP_SCRIPT, 'true')
+if out != b'hello world\n':
+raise unittest.SkipTest("Test systemtap script did not run; stderr was: 
%s" % err)
+
+# We don't expect stderr to be empty, since we're invoking stap with "-vv": 
stap
+# will (we hope) generate debugging output on stderr.
+
+def invoke_python_under_systemtap(script, pythoncode=None, pythonfile=None):
+# Start a child python process, probing with the given systemtap script
+# (passed as stdin to the "stap" tool)
+# The script should be a bytes instance
+# Return (stdout, stderr) pair
+
+if pythonfile:
+pythoncmd = '%s %s' % (sys.executable, pythonfile)
+else:
+pythoncmd = '%s -c %r' % (sys.executable, pythoncode)
+
+# The process tree of a stap invocation of a command goes through
+# something like this:
+#stap ->fork/exec(staprun; exec stapio ->f/e(-c cmd); exec staprun -r)
+# and this trip through setuid leads to LD_LIBRARY_PATH being dropped,
+# which would lead to an --enable-shared build of python failing to be
+# find its libpython, with an error like:
+#error while loading shared libraries: libpython3.3dm.so.1.0: cannot
+#open shared object file: No such file or directory
+# Hence we need to jump through some hoops to expose LD_LIBRARY_PATH to
+# the inv

[issue14779] test_buffer fails on OS X universal 64-/32-bit builds

2012-05-16 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 967b06d56a69 by Stefan Krah in branch 'default':
Issue #14779: Get sizeof(void *) directly rather than relying on sysconfig.
http://hg.python.org/cpython/rev/967b06d56a69

--

___
Python tracker 

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



[issue14715] test.support.DirsOnSysPath should be replaced by importlib.test.util.import_state

2012-05-16 Thread Eric V. Smith

Eric V. Smith  added the comment:

Here's what I imagine the new function will look like. I propose moving it to 
test.support and using it outside of importlib, specifically for the PEP 420 
tests.

--
keywords: +patch
Added file: http://bugs.python.org/file25614/issue14715-0.diff

___
Python tracker 

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



[issue14776] Add SystemTap static markers

2012-05-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Sorry about that.  You're running a near-two-year-old version of
> systemtap (1.3); error messages (and of course much functionality) has
> improved since.

Fair enough. I think the main patch looks go to go. It's clean and
doesn't obscure core parts of the interpreter, which is enough as far as
I'm concerned :-)

As for the devguide patch, I wonder if the devguide's the right place:
do we want to document it for developers of Python, or for everyone?

--

___
Python tracker 

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



[issue14776] Add SystemTap static markers

2012-05-16 Thread Frank Ch. Eigler

Frank Ch. Eigler  added the comment:

Hi -

On Wed, May 16, 2012 at 06:29:09PM +, Antoine Pitrou wrote:
> [...]
> No obvious error message. Who the hell designs such UIs? This seems
> as stupidly unfriendly as dtrace...

Sorry about that.  You're running a near-two-year-old version of
systemtap (1.3); error messages (and of course much functionality) has
improved since.

- FChE

--

___
Python tracker 

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



[issue14798] pyclbr raises KeyError when the prefix of a dotted name is not a package

2012-05-16 Thread Petri Lehtinen

Petri Lehtinen  added the comment:

Hi Xavier. I see you have posted quite many patches in the recent days. Thanks 
for doing so!

You should sign the Python Software Foundation Contributor Agreement to make it 
possible for us to apply the patches. See http://www.python.org/psf/contrib/ 
for more information. Basically, you just print the agreement, sign it, and 
send it via e-mail to the PSF.

--

___
Python tracker 

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



[issue14776] Add SystemTap static markers

2012-05-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Still fails. So I tried the script by hand and got:


$ stap - -vv -c true --vp 1
Created temporary directory "/tmp/stapBvo9zS"
SystemTap translator/driver (version 1.3/0.152 non-git sources)
Copyright (C) 2005-2010 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
enabled features: AVAHI TR1_UNORDERED_MAP
Session arch: x86_64 release: 2.6.38.8-desktop-10.mga
probe begin { println("hello world") exit () }
Searched "/usr/share/systemtap/tapset/x86_64/*.stp", found 3
Searched "/usr/share/systemtap/tapset/*.stp", found 69
Pass 1: parsed user script and 72 library script(s) using 
56252virt/20976res/1840shr kb, in 80usr/0sys/5091real ms.
Pass 2: analyzed script: 1 probe(s), 1 function(s), 0 embed(s), 0 global(s) 
using 56648virt/21504res/1912shr kb, in 0usr/0sys/3real ms.
Pass 3: using cached 
/home/antoine/.systemtap/cache/15/stap_155c3565481f113c929ad94e10c2b48e_779.c
Pass 4: using cached 
/home/antoine/.systemtap/cache/15/stap_155c3565481f113c929ad94e10c2b48e_779.ko
Pass 5: starting run.
Running /usr/bin/staprun -v -v -c 'true' 
/tmp/stapBvo9zS/stap_155c3565481f113c929ad94e10c2b48e_779.ko
staprun:main:268 
modpath="/tmp/stapBvo9zS/stap_155c3565481f113c929ad94e10c2b48e_779.ko", 
modname="stap_155c3565481f113c929ad94e10c2b48e_779"
staprun:init_staprun:206 init_staprun
staprun:insert_module:60 inserting module
staprun:insert_module:79 module options: _stp_bufsize=0
Spawn waitpid result (0x8652802): 255
Pass 5: run completed in 0usr/0sys/3real ms.
Pass 5: run failed.  Try again with another '--vp 1' option.
Running rm -rf /tmp/stapBvo9zS
Spawn waitpid result (0x802): 0


No obvious error message. Who the hell designs such UIs? This seems as stupidly 
unfriendly as dtrace...

--

___
Python tracker 

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



[issue1635217] Warn against using requires/provides/obsoletes in setup.py

2012-05-16 Thread Éric Araujo

Éric Araujo  added the comment:

It may be good to document that requires/provides/obsoletes are effectively 
unused.

It is not appropriate for stdlib doc to talk about install_requires, which is 
specific to setuptools, and it’s better to talk about the new standard fields 
from PEP 345 anyway.

--
components:  -Distutils2
keywords: +easy
resolution: out of date -> 
stage: committed/rejected -> needs patch
status: closed -> open
title: Add example of distutils setup() with "requires" argument -> Warn 
against using requires/provides/obsoletes in setup.py
versions: +Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue14776] Add SystemTap static markers

2012-05-16 Thread Dave Malcolm

Dave Malcolm  added the comment:

> I tried the patch under Mageia 1 and got the following failure:
Thanks.  I'm attaching an updated patch which reworks test_systemtap so that
  (a) it turns up the verbosity of stap invocations from "-v" to "-vv"
  (b) it tests the "hello world" stap script on a trivial binary ("true") 
before attempting to invoke sys.executable under stap

What does the error message look like with the extra verbosity?

> (I also had to chmod +s staprun - scary :-))
The chmod invocation sounds like an issue with how Mageia have packaged 
SystemTap, assuming that you're using a packaged build of systemtap.

--
Added file: 
http://bugs.python.org/file25613/cpython-systemtap-2012-05-16-001.patch

___
Python tracker 

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



[issue14270] Can't install a project in a specific directory

2012-05-16 Thread Éric Araujo

Éric Araujo  added the comment:

Further changes are needed.

- The new dest_dir argument is not passed down to the internal functions, so I 
don’t understand how this is supposed to work.

- install_local_project needs a dest_dir argument too; Jonathan Fernandes 
started work on this at the last sprint.

- The test needs to be improved to really install a module and a script for 
example; I started to do that and also removed the usage of dist.Distribution 
(which is not the kind of distribution the install module works with: it uses 
database.Distribution and pypi.Dist (forgot the exact name) objects — yes, this 
is confusing as hell) but then the test code did not install anything; I ran 
out of time.  I think tests should avoid using dist.Distribution and MagicMock 
but stay as close to possible as real usage:
 - to test installing from a directory, create a temp dir with a setup.cfg 
file, a module and a script and call install_local_project (and other public 
functions that support a dir) with this dir as argument
 - to test installing from an archive, create files, archive them and call the 
public install function with the path to that file as argument
 - to test install_from_infos, call install_from_infos with a pypi.Something 
object pointing to an archive in a temp dir

That way, we could have confidence that all of this works, without explicitly 
using the internal functions in our tests.

--

___
Python tracker 

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



[issue14702] os.makedirs breaks under autofs directories

2012-05-16 Thread Andrew McNabb

Changes by Andrew McNabb :


Added file: http://bugs.python.org/file25612/makedirs.out

___
Python tracker 

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



[issue5342] packaging: add tests for old versions cleanup on update

2012-05-16 Thread Éric Araujo

Éric Araujo  added the comment:

Jonathan Fernandes started to work on this at the last Montreal sprint.  The 
tests would use install_local_project, which is missing a parameter to control 
the destination directory (see #14270).

--
assignee: tarek -> eric.araujo
dependencies: +Can't install a project in a specific directory
versions: +3rd party

___
Python tracker 

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



[issue14827] IDLE crash when typing ^ character on Mac OS X

2012-05-16 Thread Julien Pecqueur

Julien Pecqueur  added the comment:

Installing ActiveState's Tcl/Tk package fix the crash.
Thank you for your answers.

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



[issue14832] unittest's assertItemsEqual() method gives wrong order in error output

2012-05-16 Thread R. David Murray

R. David Murray  added the comment:

Thanks, fixed.  Appears to have been a mistake made when we refactored from 
expected/actual to first/second.

--
nosy: +r.david.murray
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue14702] os.makedirs breaks under autofs directories

2012-05-16 Thread Andrew McNabb

Changes by Andrew McNabb :


Added file: http://bugs.python.org/file25611/mkdir-p.out

___
Python tracker 

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



[issue14832] unittest's assertItemsEqual() method gives wrong order in error output

2012-05-16 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset ff52583a5576 by R David Murray in branch '2.7':
#14832: 'first' now really refers to first arg in unittest assertItemsEqual
http://hg.python.org/cpython/rev/ff52583a5576

--
nosy: +python-dev

___
Python tracker 

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



[issue14702] os.makedirs breaks under autofs directories

2012-05-16 Thread Andrew McNabb

Andrew McNabb  added the comment:

Some interesting information. If I do `os.mkdir('/net/prodigy/tmp')`, it gives 
"OSError: [Errno 13] Permission denied: '/net/prodigy/tmp'". However, if I 
instead do `os.mkdir('/net/prodigy/tmp/hi')`, it succeeds. (Note that I'm being 
careful to start from a fresh unmounted state in both cases).

I will post straces in a few minutes.

--

___
Python tracker 

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



[issue10374] distutils[2] should recreate scripts in the build tree

2012-05-16 Thread Éric Araujo

Éric Araujo  added the comment:

In distutils2, 99382aafa4c5 forces scripts to always be rebuilt and 
463d3014ee4a goes further and deletes the whole build dir to avoid installing 
scripts built from a previous build call with a different configuration (i.e. 
different list of scripts).

The same issue may affect other build commands; if a module is built and then 
removed from the source dir and setup.cfg/.py, I think the install command 
would still install it.  The dependency code should take setup.cfg and files 
referenced from hooks to decide if the source is newer, and it should delete 
built files for which there is no source.

--

___
Python tracker 

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



[issue1602] windows console doesn't print or input Unicode

2012-05-16 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Glenn, I do not know what you are using the interactive interpreter for, but 
for the unicode BMP, the Idle shell generally works better. I only use 
CommandPrompt for cross-checking behavior.

--

___
Python tracker 

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



[issue13166] Implement packaging.database.*Distribution.__str__

2012-05-16 Thread Éric Araujo

Éric Araujo  added the comment:

64b0bf5e0596 reverted the changes to d2.depgraph; more tests need to be added 
first to make sure the new output is still valid DOT.

--
assignee: tarek -> eric.araujo
title: Implement packaging.database.Distribution.__str__ -> Implement 
packaging.database.*Distribution.__str__

___
Python tracker 

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



[issue8330] Failures seen in test_gdb on buildbots

2012-05-16 Thread Dave Malcolm

Dave Malcolm  added the comment:

Oops; closing.  Thanks.

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



[issue13399] Don't print traceback for unrecognized actions, commands and options in packaging

2012-05-16 Thread Éric Araujo

Éric Araujo  added the comment:

91ac9c36f09e is also related to this.

pysetup --unknown-option silently does nothing and exits with 0.

--
assignee: tarek -> eric.araujo
versions: +3rd party

___
Python tracker 

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



[issue7719] distutils: ignore .nfsXXXX files

2012-05-16 Thread Éric Araujo

Éric Araujo  added the comment:

No improvements are done in distutils, only the smallest possible changes to 
fix bugs.  In distutils2 we use shutil.copytree.

--

___
Python tracker 

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



[issue14702] os.makedirs breaks under autofs directories

2012-05-16 Thread Andrew McNabb

Andrew McNabb  added the comment:

> Andrew, are you still with us?

I'm here, but it's been a busy few weeks. I'll see if I can spend some time on 
this today.

--

___
Python tracker 

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



[issue13849] Add tests for NUL checking in certain strs

2012-05-16 Thread Alex Gaynor

Alex Gaynor  added the comment:

I'm perfectly happy to write a patch for this, the only reason I didn't was 
Martin and others expressed opposition to committing it.  If there's a 
philosophicaly opposition to the patch I won't write it :)

--

___
Python tracker 

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



[issue14692] json.loads parse_constant callback not working anymore

2012-05-16 Thread Hynek Schlawack

Hynek Schlawack  added the comment:

Thanks Serhiy!

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



[issue14692] json.loads parse_constant callback not working anymore

2012-05-16 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 30d16d1e5175 by Hynek Schlawack in branch '2.7':
#14692 Fix json docs to reflect changes in json.load
http://hg.python.org/cpython/rev/30d16d1e5175

New changeset 4f27c4dc34ed by Hynek Schlawack in branch '3.2':
#14692 Fix json docs to reflect changes in json.load
http://hg.python.org/cpython/rev/4f27c4dc34ed

New changeset 0f6a6f59b002 by Hynek Schlawack in branch 'default':
#14692 Fix json docs to reflect changes in json.load
http://hg.python.org/cpython/rev/0f6a6f59b002

--
nosy: +python-dev

___
Python tracker 

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



[issue5730] setdefault speedup

2012-05-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Out of date, fixed in #13521.

--
nosy: +pitrou
resolution:  -> duplicate
status: open -> closed
superseder:  -> Make dict.setdefault() atomic

___
Python tracker 

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



[issue14832] unittest's assertItemsEqual() method gives wrong order in error output

2012-05-16 Thread Kylotan

New submission from Kylotan :

I have the following line in a unit test in 2.7.3:

self.assertItemsEqual(['a', 'b', 'c'], ['a', 'b', 'c', 'd'])

I expect this output:

AssertionError: Element counts were not equal:
First has 0, Second has 1:  'd'

Instead I get this output:

AssertionError: Element counts were not equal:
First has 1, Second has 0:  'd'

I would expect 'First' to refer to the first sequence I pass to 
assertItemsEqual, not the second, and vice versa.

(Obviously in a trivial example like this it appears unimportant, but when 
debugging why a test has failed, the unexpected ordering can cause problems.)

--
messages: 160887
nosy: Kylotan
priority: normal
severity: normal
status: open
title: unittest's assertItemsEqual() method gives wrong order in error output
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



[issue1479611] speed up function calls

2012-05-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Closing as terribly outdated (and not very promising).

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue12091] multiprocessing: simplify ApplyResult and MapResult with threading.Event

2012-05-16 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +sbt

___
Python tracker 

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



[issue8330] Failures seen in test_gdb on buildbots

2012-05-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Shouldn't this be closed?

--
nosy: +pitrou

___
Python tracker 

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



[issue14831] make r argument on itertools.combinations() optional

2012-05-16 Thread Dirkjan Ochtman

Dirkjan Ochtman  added the comment:

[[], [0], [1], [2], [0, 1], [0, 2], [1, 2], [0, 1, 2]]

That is, all possible combinations.

--

___
Python tracker 

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



[issue14776] Add SystemTap static markers

2012-05-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I tried the patch under Mageia 1 and got the following failure:

test_systemtap skipped -- Test systemtap script did not run; stderr was: b"Pass 
1: parsed user script and 72 library script(s) using 56252virt/20964res/1828shr 
kb, in 70usr/0sys/82real ms.\nPass 2: analyzed script: 1 probe(s), 1 
function(s), 0 embed(s), 0 global(s) using 56648virt/21492res/1900shr kb, in 
10usr/0sys/3real ms.\nPass 3: using cached 
/home/antoine/.systemtap/cache/15/stap_155c3565481f113c929ad94e10c2b48e_779.c\nPass
 4: using cached 
/home/antoine/.systemtap/cache/15/stap_155c3565481f113c929ad94e10c2b48e_779.ko\nPass
 5: starting run.\nPass 5: run completed in 0usr/0sys/3real ms.\nPass 5: run 
failed.  Try again with another '--vp 1' option.\n"


(I also had to chmod +s staprun - scary :-))

--

___
Python tracker 

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



[issue14831] make r argument on itertools.combinations() optional

2012-05-16 Thread Mark Dickinson

Mark Dickinson  added the comment:

Wait, what?  What results are you proposing for e.g.,

list(combinations(range(3)))

?  None of the obvious defaults for r (length of first argument?  0? 1?) look 
very interesting.

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue14757] INCA: Inline Caching meets Quickening in Python 3.3

2012-05-16 Thread stefan brunthaler

stefan brunthaler  added the comment:

> Perhaps that's just me, but I find the performance gains rather limited given 
> the sheer size of the changes.

Well there are a couple of things to keep in mind:

a) There is a substantial speedup potential in further interpretative
optimizations, but they come at increased complexity (mostly due to a
different instruction encoding). From the response on python-dev I
took away that this is not what people want.

b) The size is deceptive: the patch contains all resources, i.e., the
code gen *and* the generated files. I could split it up into three
separate patches to show that the *actual* intersection with existing
Python sources is very small. (Disregarding opcode.h, my guess is that
it's about a 100 lines.)

c) There are no reasonable compatbility implications (modulo code that
checks specific opcode values) and the memory consumption is
essentially nil (<= 100KiB, constant.)

There are further speedups available by ordering the interpreter
instructions (I have a paper on that called "Interpreter Instruction
Scheduling", and am currently working on a better algorithm [well, the
algorithm already exists, I'm just evaluating it].) I could easily add
that at no extra cost to the implementation, too.

> Is there any non-micro benchmark where the performance gains are actually 
> substantial (say, more than 20%)?

Hm, I don't know. Are there applications/frameworks running on Python
3 that I can benchmark with?

Based on my experience, the speedups should be achievable across the
board, primarily because the most frequent CALL_FUNCTION instructions
have optimized derivatives. In addition with the arithmetic and
COMPARE_OP derivatives this covers a wide array of dynamic instruction
frequency mixes. There exist further inlining capabilities, too, which
can be easily added to the code generator.
The only reason why some benchmarks don't achieve expected speedups
isdue to them using operations where the code-gen does not contain
optimized derivatives. There is still space for ~45 derivatives to
cover those (including some important application-specific ones.)

--

___
Python tracker 

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



[issue14815] random_seed uses only 32-bits of hash on Win64

2012-05-16 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

This is a reasonable change.  The benefits of using all 64-bits outweigh the 
small downside of losing the reproducibility of previously generated sequences 
that relied on the object hash.

--

___
Python tracker 

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



[issue14776] Add SystemTap static markers

2012-05-16 Thread Dave Malcolm

Changes by Dave Malcolm :


--
nosy: +fche, scox

___
Python tracker 

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



[issue2920] Patch to print symbolic value or errno in EnvironmentError.__str__()

2012-05-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This would still be a helpful improvement.

--
stage: patch review -> needs patch
versions: +Python 3.3 -Python 3.2

___
Python tracker 

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



[issue14819] Add `assertIsSubclass` and `assertNotIsSubclass` to `unittest.TestCase`

2012-05-16 Thread R. David Murray

Changes by R. David Murray :


--
status: open -> closed

___
Python tracker 

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



[issue14819] Add `assertIsSubclass` and `assertNotIsSubclass` to `unittest.TestCase`

2012-05-16 Thread R. David Murray

R. David Murray  added the comment:

I agree that testing for subclass is a rather specialized thing, and thus 
should be defined by a project that needs it.  Normal API-centric unit tests 
shouldn't, IMO, care whether X is a subclass of Y.  If you are using it to 
write a failing unit test to "drive" refactoring from one class to another, 
that is, I think, a very good example of a specialized use case (one I would 
certainly never use, for example) and you should just put it in your own 
project test codebase.

--
nosy: +r.david.murray
status: pending -> open

___
Python tracker 

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



[issue1508864] threading.Timer/timeouts break on change of win32 local time

2012-05-16 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +haypo

___
Python tracker 

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



[issue9548] locale can be imported at startup but relies on too many library modules

2012-05-16 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage:  -> patch review
versions: +Python 3.3 -Python 3.2

___
Python tracker 

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



[issue9251] Test for the import lock

2012-05-16 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
resolution:  -> fixed
stage: needs patch -> 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



[issue6544] Fix refleak in kqueue implementation

2012-05-16 Thread Antoine Pitrou

Changes by Antoine Pitrou :


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



[issue1615158] POSIX capabilities support

2012-05-16 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +neologix

___
Python tracker 

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



[issue12304] expose signalfd(2) in the signal module

2012-05-16 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +neologix
stage:  -> patch review

___
Python tracker 

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



[issue13609] Add "os.get_terminal_size()" function

2012-05-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I am closing as fixed. If you want to propose further enhancements, please open 
a new issue.

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



[issue11051] Improve Python 3.3 startup time

2012-05-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This is out of date now that importlib is the default import system.

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue14819] Add `assertIsSubclass` and `assertNotIsSubclass` to `unittest.TestCase`

2012-05-16 Thread Ezio Melotti

Ezio Melotti  added the comment:

I couldn't find any pointer to the discussion (maybe it happened on IRC), but 
the general goal is to provide only the most used/important assert methods and 
avoid bloating the API with less common ones.

--
status: open -> pending

___
Python tracker 

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



  1   2   >