[issue18006] Set thread name in linux kernel

2013-05-19 Thread Charles-François Natali

Charles-François Natali added the comment:

It's a dupe of #15500.

--
nosy: +neologix
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> Python should support naming threads

___
Python tracker 

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



[issue18011] Inconsistency between b32decode() documentation, docstring and code

2013-05-19 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

b32decode() documentation says: "A TypeError is raised if s were incorrectly 
padded or if there are non-alphabet characters present in the string."

b32decode() docstring says: "binascii.Error is raised if the input is 
incorrectly padded or if there are non-alphabet characters present in the 
input."

Actually binascii.Error (which is a ValueError subtype) is raised if the input 
is incorrectly padded and TypeError is raised if there are non-alphabet 
characters present in the input.

At least 2 of 3 (documentation, docstring and implementation) should be 
corrected.

Base32 support was originally added in 3cc0d8fd4e2b (TypeError was used 
everywhere) and then modified in eb45f85c4c79 (TypeError was partially changed 
to binascii.Error).

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 189571
nosy: barry, docs@python, gvanrossum, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Inconsistency between b32decode() documentation, docstring and code
type: 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



[issue17996] socket module should expose AF_LINK

2013-05-19 Thread Charles-François Natali

Charles-François Natali added the comment:

Well, this just needs a patch :-)

--

___
Python tracker 

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



[issue17812] Quadratic complexity in b32encode

2013-05-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4b5467d997f1 by Serhiy Storchaka in branch '3.3':
Issue #17812: Fixed quadratic complexity of base64.b32encode().
http://hg.python.org/cpython/rev/4b5467d997f1

New changeset 1b5ef05d6ced by Serhiy Storchaka in branch 'default':
Issue #17812: Fixed quadratic complexity of base64.b32encode().
http://hg.python.org/cpython/rev/1b5ef05d6ced

--
nosy: +python-dev

___
Python tracker 

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



[issue17812] Quadratic complexity in b32encode

2013-05-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

That is why I proposed two patches.

--
versions: +Python 3.3

___
Python tracker 

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



[issue17812] Quadratic complexity in b32encode

2013-05-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
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



[issue18003] New lzma crazy slow with line-oriented reading.

2013-05-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I'm against implementing LZMAFile in a pure C. It was a great win that LZMAFile 
had implemented in a pure Python. However may be we could reuse the existing 
accelerated implementation of io.BufferedReader.

--

___
Python tracker 

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



[issue18011] Inconsistency between b32decode() documentation, docstring and code

2013-05-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which changes TypeError to binascii.Error in b32decode() and 
fixes the documentation and tests.

--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file30310/b32decode_exception.patch

___
Python tracker 

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



[issue18011] Inconsistency between b32decode() documentation, docstring and code

2013-05-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which changes TypeError to binascii.Error in b32decode() and 
fixes the documentation and tests.

--
Added file: http://bugs.python.org/file30311/b32decode_exception.patch

___
Python tracker 

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



[issue18011] Inconsistency between b32decode() documentation, docstring and code

2013-05-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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

___
Python tracker 

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



[issue18011] Inconsistency between b32decode() documentation, docstring and code

2013-05-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file30311/b32decode_exception.patch

___
Python tracker 

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



[issue17844] Add link to alternatives for bytes-to-bytes codecs

2013-05-19 Thread Nick Coghlan

Nick Coghlan added the comment:

I like this, both because it quite clearly defines the encode and decode 
directions, and allows notes the more direct entry points if the codec isn't 
being specified as an input string.

So +1 from me.

--

___
Python tracker 

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



[issue17844] Add link to alternatives for bytes-to-bytes codecs

2013-05-19 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Not a bad idea. More information is always better when it comes to
documentation :-)

--

___
Python tracker 

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



[issue17839] base64 module should use memoryview

2013-05-19 Thread Nick Coghlan

Nick Coghlan added the comment:

Oops, my review comments don't actually make sense because I looked at the 
patch in isolation, rather than checking the full context in the module. Sorry 
about that.

We have 2 different cases to deal with, only one of which currently has a 
helper function.

I suggest renaming _bytes_from_decode_data to "_bytes_for_decoding" and adding 
"_bytes_for_encoding". The difference between them is the implicit encoding of 
pure ASCII strings to bytes in the decoding case and the details of the error 
message thrown.

The encoding and decoding functions should then use the appropriate coercion 
helper for both the input data and for altchars.

--

___
Python tracker 

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



[issue17085] test_socket crashes the whole test suite

2013-05-19 Thread Etienne Robillard

Etienne Robillard added the comment:

since TIPC is silently included in python 2.7.3 and recents kernel memory
leaks were found in the linux TIPC kernel code, could this result in info 
disclosure in python when compiled with TIPC ? does the kernel module needs to 
be loaded to exploit the memleaks from within python ? 

http://www.openwall.com/lists/oss-security/2013/04/14/3

--
nosy: +erob

___
Python tracker 

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



[issue12082] Python/import.c still references fstat even with DONT_HAVE_FSTAT/!HAVE_FSTAT

2013-05-19 Thread Antoine Pitrou

Antoine Pitrou added the comment:

For those of you who are concerned with this issue, could you explain your use 
case on the following discussion thread: 
http://mail.python.org/pipermail/python-dev/2013-May/126285.html ?

I would personally like to remove HAVE_FSTAT and make Python unconditionally 
use fstat(). It will make the code quite simpler in some places.

--

___
Python tracker 

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



[issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive

2013-05-19 Thread R. David Murray

R. David Murray added the comment:

Tshepang: see the 'Development Cycle' section of the devguide.  Only security 
related commits are allowed to security branches, and since the docs are part 
of the source tree, that means no doc commits.  One reason for this is the same 
reason we only have one maintenance release (ignoring 2.7, it is an exception), 
and is a matter of practicality: reducing the load on developers.

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



[issue10766] optparse uses %s in gettext calls

2013-05-19 Thread R. David Murray

R. David Murray added the comment:

The #4391 fixes were only applied to the development branch.  So these could be 
applied to 3.4 at this point, but not 3.3.

--
nosy: +r.david.murray
status:  -> open
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue11011] More functools functions

2013-05-19 Thread R. David Murray

R. David Murray added the comment:

By my reading compose was also rejected, so I'm going to close this.  (See 
issue 1506122 for one previous rejection of compose.)

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

___
Python tracker 

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



[issue9856] Change object.__format__(s) where s is non-empty to a TypeError

2013-05-19 Thread R. David Murray

R. David Murray added the comment:

Since Eric indicated he'd close this unless someone felt strongly that the 
status quo should be changed, and the arguments are in favor of *maintaining* 
the status quo, I'm going to close this for him :)

--
nosy: +r.david.murray
resolution:  -> fixed
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



[issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive

2013-05-19 Thread Tshepang Lekhonkhobe

Tshepang Lekhonkhobe added the comment:

@murray thanks for the clarification; I saw that part of the devguide, but 
wasn't sure if doc fixes/improvements were exempt (even if not mentioned)

--

___
Python tracker 

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



[issue17085] test_socket crashes the whole test suite

2013-05-19 Thread Antoine Pitrou

Antoine Pitrou added the comment:

ddvento, I'm afraid you'll have to diagnose a bit more by tracing what happens 
during test_sendall_interrupted and test_sendall_interrupted_with_timeout. 
These test cases have a legitimate use for arming an alarm signal, but for some 
reason it seems the signal is triggered after those tests finish. Try printing 
exactly what happens at each step in those tests.

Etienne, I'm not sure what the issue specifically is. Is Linux TIPC has a 
memory leak issue, it isn't really Python's problem. If any case, it is a 
separate issue and therefore should be discussed on a separate bug entry.

--
nosy: +pitrou

___
Python tracker 

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



[issue11995] test_pydoc loads all Python modules

2013-05-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 58ace614df6b by Antoine Pitrou in branch '3.3':
Issue #11995: test_pydoc doesn't import all sys.path modules anymore.
http://hg.python.org/cpython/rev/58ace614df6b

New changeset 13d817cb72e7 by Antoine Pitrou in branch 'default':
Issue #11995: test_pydoc doesn't import all sys.path modules anymore.
http://hg.python.org/cpython/rev/13d817cb72e7

--
nosy: +python-dev

___
Python tracker 

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



[issue11995] test_pydoc loads all Python modules

2013-05-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 68d2337688c1 by Antoine Pitrou in branch '2.7':
Issue #11995: test_pydoc doesn't import all sys.path modules anymore.
http://hg.python.org/cpython/rev/68d2337688c1

--

___
Python tracker 

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



[issue11995] test_pydoc loads all Python modules

2013-05-19 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
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



[issue4470] smtplib SMTP_SSL not working.

2013-05-19 Thread Torsten Bronger

Torsten Bronger added the comment:

For five Ubuntu releases now, I apply this patch.  In contrast to Catalin's 
statement, it is not solved for me unless the upstream changes of two years ago 
haven't yet found their way into Ubuntu.  I'm currently using Python 2.7.4 on 
Ubuntu 13.04.  That said, the patch solves my issue every time.

--

___
Python tracker 

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



[issue18003] New lzma crazy slow with line-oriented reading.

2013-05-19 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I second Serhiy here. Wrapping the LZMAFile in a BufferedReader is the simple 
solution to the performance problem:

 ./python -m timeit -s "import lzma, io" "f=lzma.LZMAFile('words.xz', 'r')" 
"for line in f: pass"
10 loops, best of 3: 148 msec per loop

$ ./python -m timeit -s "import lzma, io" 
"f=io.BufferedReader(lzma.LZMAFile('words.xz', 'r'))" "for line in f: pass"
10 loops, best of 3: 44.3 msec per loop

$ time xzcat words.xz | wc -l
99156

real0m0.021s
user0m0.016s
sys 0m0.004s


Perhaps the top-level lzma.open() should do the wrapping for you, though.
Interestingly, opening in text (i.e. unicode) mode is almost as fast as with a 
BufferedReader:

$ ./python -m timeit -s "import lzma, io" "f=lzma.open('words.xz', 'rt')" "for 
line in f: pass"
10 loops, best of 3: 51.1 msec per loop

--
nosy: +pitrou

___
Python tracker 

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



[issue4470] smtplib SMTP_SSL not working.

2013-05-19 Thread Antoine Pitrou

Antoine Pitrou added the comment:

When you say "I apply this patch", you mean 
smtplib_05_shutdown_socket_v2.patch, right?

--

___
Python tracker 

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



[issue4470] smtplib SMTP_SSL not working.

2013-05-19 Thread Antoine Pitrou

Antoine Pitrou added the comment:

In any case, I'm growing wary of bugfix regressions right now, so I would only 
apply the patch on the default branch.

--
versions: +Python 3.4 -Python 2.6, Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue18012] cannot assign unicode keys to SimpleCookie

2013-05-19 Thread Florent Xicluna

New submission from Florent Xicluna:

from Cookie import SimpleCookie

cookie = SimpleCookie()
cookie[u'apple'] = u'green'
Traceback (most recent call last):
  File "", line 1, in 
  File 
"/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/Cookie.py",
 line 592, in __setitem__
self.__set(key, rval, cval)
  File 
"/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/Cookie.py",
 line 585, in __set
M.set(key, real_value, coded_value)
  File 
"/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/Cookie.py",
 line 459, in set
if "" != translate(key, idmap, LegalChars):
  File 
"/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/string.py",
 line 493, in translate
return s.translate(table, deletions)
TypeError: translate() takes exactly one argument (2 given)



The documentation don't say it's not supported.
And the error TypeError seems not appropriate.

--
components: Library (Lib)
messages: 189595
nosy: flox
priority: normal
severity: normal
status: open
title: cannot assign unicode keys to SimpleCookie
type: behavior
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



[issue18012] cannot assign unicode keys to SimpleCookie

2013-05-19 Thread R. David Murray

R. David Murray added the comment:

Python2 tends to document where unicode *is* supported, rather than where it is 
not.  And why would a TypeError be incorrect if the unicode type is not 
supported?

I do not think it likely that this falls into the 'bug' category at this point 
in the Python2 lifecycle.

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



[issue4470] smtplib SMTP_SSL not working.

2013-05-19 Thread Torsten Bronger

Torsten Bronger added the comment:

Sorry, after having had another look at it, I realised that I have a different 
SSMTP issue now, non-Python-related.  So for me, Ubuntu 13.04 indeed solves my 
old issue.

--

___
Python tracker 

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



[issue18012] cannot assign unicode keys to SimpleCookie

2013-05-19 Thread Florent Xicluna

Florent Xicluna added the comment:

you're right, this behavior is documented.

>>> u'read this short text'.translate(None, 'aeiou')
Traceback (most recent call last):
  File "", line 1, in 
TypeError: translate() takes exactly one argument (2 given)
>>> 

http://docs.python.org/2/library/stdtypes.html#str.translate

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



[issue5811] io.BufferedReader.peek(): Documentation differs from Implementation

2013-05-19 Thread Mark Lawrence

Mark Lawrence added the comment:

Looks like this has slipped under the radar.  I'll leave working on it to the 
experts :)

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue6237] Build errors when using LDFLAGS="-Wl,--no-undefined"

2013-05-19 Thread Mark Lawrence

Mark Lawrence added the comment:

Is this build issue still a problem some four years on?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue3559] Pasted \n not same as typed \n

2013-05-19 Thread Mark Lawrence

Mark Lawrence added the comment:

Could we borrow code from the ipython %paste command?  This issue is also 
referenced from #5124.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue2276] distutils out-of-date for runtime_library_dirs flag on OS X

2013-05-19 Thread Mark Lawrence

Mark Lawrence added the comment:

Is this still a problem or not?  If yes what can be done about it?  If no can 
we close it?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue3559] Pasted \n not same as typed \n

2013-05-19 Thread Roger Serwy

Roger Serwy added the comment:

The core problem is that IDLE only executes the shell buffer when the 
<> virtual event gets sent by physically pressing the Enter 
key. Pasting the clipboard contents with \n will not trigger the enter_callback 
function in Lib/idlelib/PyShell.py.

The MultiLineRun.py extension as part of IdleX intercepts the pasted text and 
splits the buffer on '\n' and then runs each line.

Mark, what you are suggesting is adding something like a "Paste and Execute" 
option for the shell and its right-click menu which mimics the %paste magic 
from IPython. That's doable.

--
nosy: +roger.serwy
versions: +Python 2.7, Python 3.3, Python 3.4 -Python 3.2

___
Python tracker 

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



[issue17988] ElementTree.Element != ElementTree._ElementInterface

2013-05-19 Thread Eli Bendersky

Changes by Eli Bendersky :


--
versions:  -Python 3.3

___
Python tracker 

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



[issue17988] ElementTree.Element != ElementTree._ElementInterface

2013-05-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 16a03959819a by Eli Bendersky in branch 'default':
Issue #17988: remove unused alias for Element and rename the used one
http://hg.python.org/cpython/rev/16a03959819a

--
nosy: +python-dev

___
Python tracker 

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



[issue17988] ElementTree.Element != ElementTree._ElementInterface

2013-05-19 Thread Eli Bendersky

Changes by Eli Bendersky :


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



[issue18003] New lzma crazy slow with line-oriented reading.

2013-05-19 Thread Michael Fox

Michael Fox added the comment:

io.BufferedReader works well for me. Thanks for the good suggestion.
Now python 3.3 and 3.4 have similar performance to each other and they
are only 2x slower than pyliblzma.

>From my perspective default wrapping with io.BufferedReader is a great
idea. I can't think of who would suffer. Maybe someone who wants to
open thousands of simultaneous streams wouldn't appreciate the memory
overhead. If that person exists then he would want an option to turn
it off.

m@air:~/q/topaz/parse_datalog$ time python2 lzmaperf.py
102368

real0m0.049s
user0m0.040s
sys 0m0.008s
m@air:~/q/topaz/parse_datalog$ time python3 lzmaperf.py
102368

real0m0.109s
user0m0.092s
sys 0m0.020s
m@air:~/q/topaz/parse_datalog$ time
~/tmp/cpython-23836f17e4a2/bin/python3 lzmaperf.py
102368

real0m0.101s
user0m0.084s
sys 0m0.012s

On Sun, May 19, 2013 at 7:07 AM, Antoine Pitrou  wrote:
>
> Antoine Pitrou added the comment:
>
> I second Serhiy here. Wrapping the LZMAFile in a BufferedReader is the simple 
> solution to the performance problem:
>
>  ./python -m timeit -s "import lzma, io" "f=lzma.LZMAFile('words.xz', 'r')" 
> "for line in f: pass"
> 10 loops, best of 3: 148 msec per loop
>
> $ ./python -m timeit -s "import lzma, io" 
> "f=io.BufferedReader(lzma.LZMAFile('words.xz', 'r'))" "for line in f: pass"
> 10 loops, best of 3: 44.3 msec per loop
>
> $ time xzcat words.xz | wc -l
> 99156
>
> real0m0.021s
> user0m0.016s
> sys 0m0.004s
>
>
> Perhaps the top-level lzma.open() should do the wrapping for you, though.
> Interestingly, opening in text (i.e. unicode) mode is almost as fast as with 
> a BufferedReader:
>
> $ ./python -m timeit -s "import lzma, io" "f=lzma.open('words.xz', 'rt')" 
> "for line in f: pass"
> 10 loops, best of 3: 51.1 msec per loop
>
> --
> nosy: +pitrou
>
> ___
> Python tracker 
> 
> ___

-- 

-
Michael

--

___
Python tracker 

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



[issue6294] Improve shutdown exception ignored message

2013-05-19 Thread Shriramana Sharma

Changes by Shriramana Sharma :


--
nosy: +jamadagni

___
Python tracker 

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



[issue14097] Improve the "introduction" page of the tutorial

2013-05-19 Thread Ezio Melotti

Ezio Melotti added the comment:

Here is an updated patch.

--
Added file: http://bugs.python.org/file30312/issue14097-3.diff

___
Python tracker 

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



[issue14097] Improve the "introduction" page of the tutorial

2013-05-19 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Please restore the section "A value can be assigned to several variables 
simultaneously".  This is easy to teach in this context and there's no other 
good place to put it.

Also, I'm unclear why you took out the Mark Lemburg's section on Unicode.

--

___
Python tracker 

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



[issue14097] Improve the "introduction" page of the tutorial

2013-05-19 Thread Ezio Melotti

Ezio Melotti added the comment:

> Please restore the section "A value can be assigned to several
> variables simultaneously".

The reason for removing it are:
 * generally it's not really useful/used IMHO;
 * it has potentially confusing side effects (e.g. x = y = 0 is the same as x = 
0; y = 0, but a = b = [] is not the same as a = []; b = []);
 * and more confusing side effects 
(http://mail.python.org/pipermail/python-dev/2012-November/122552.html ;);

IOW I think that teaching this (especially at this point of the tutorial where 
you can't/shouldn't yet explain the side effects) does more harm than good.
It could be mentioned later in the tutorial when object identity is explained 
in more detail (I'm planning to work on this next), and should be also covered 
in the language reference (if it's not there already).

> Also, I'm unclear why you took out the Mark Lemburg's section
> on Unicode.

I'm planning to write something about Unicode when bytes are introduced.  That 
section has been written with Python 2 in mind, where byte strings are the 
default but "there are also Unicode strings".  For Python 3, users already 
naturally associate strings with text and explaining the text/bytes dichotomy 
and Unicode can be postponed.

--

___
Python tracker 

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



[issue18013] cgi.FieldStorage does not parse W3C sample

2013-05-19 Thread Florent Xicluna

New submission from Florent Xicluna:

Trying to parse the W3C sample, it fails in 3.3 (while it passes on 2.7).
http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4 (last example)

   Content-Type: multipart/form-data; boundary=AaB03x

   --AaB03x
   Content-Disposition: form-data; name="submit-name"

   Larry
   --AaB03x
   Content-Disposition: form-data; name="files"
   Content-Type: multipart/mixed; boundary=BbC04y

   --BbC04y
   Content-Disposition: file; filename="file1.txt"
   Content-Type: text/plain

   ... contents of file1.txt ...
   --BbC04y
   Content-Disposition: file; filename="file2.gif"
   Content-Type: image/gif
   Content-Transfer-Encoding: binary

   ...contents of file2.gif...
   --BbC04y--
   --AaB03x--

(broken) test attached.

--
components: Library (Lib)
files: test_multipart_w3.diff
keywords: patch
messages: 189609
nosy: flox, orsenthil
priority: normal
severity: normal
status: open
title: cgi.FieldStorage does not parse W3C sample
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file30313/test_multipart_w3.diff

___
Python tracker 

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



[issue18013] cgi.FieldStorage does not parse W3C sample

2013-05-19 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
stage:  -> needs patch

___
Python tracker 

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



[issue15535] Fix pickling efficiency of named tuples in 2.7.3

2013-05-19 Thread Anselm Kruis

Anselm Kruis added the comment:

>> why the different fix for 3.3 
>
> I reverted the 2.7.4 addition of __dict__ rather than introduce more
> differences between point releases with possible unintended effects.

__dict__ was a 2.7.3 addition (changeset 26d5f022eb1a). Now unpickling of named 
tuples created by 2.7.3 and 2.7.4 fails.

--
nosy: +anselm.kruis

___
Python tracker 

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



[issue18003] New lzma crazy slow with line-oriented reading.

2013-05-19 Thread Nadeem Vawda

Nadeem Vawda added the comment:

I agree that making lzma.open() wrap its return value in a BufferedReader
(or BufferedWriter, as appropriate) is the way to go. I'm currently
travelling and don't have my SSH key with me - Serhiy, can you make the
change?

I'll put together a documentation patch that recommends using lzma.open()
rather than LZMAFile directly, and mentions the performance implications.


> Interestingly, opening in text (i.e. unicode) mode is almost as fast as with 
> a BufferedReader:

This is because opening in text mode returns a TextIOWrapper, which is
written in C, and presumably does its own buffering on top of
LZMAFile.read1() instead of calling LZMAFile.readline().


> From my perspective default wrapping with io.BufferedReader is a great
> idea. I can't think of who would suffer. Maybe someone who wants to
> open thousands of simultaneous streams wouldn't appreciate the memory
> overhead. If that person exists then he would want an option to turn
> it off.

If someone doesn't want the BufferedReader/BufferedWriter, they can
create an LZMAFile directly; we don't plan to remove that possibility. So
I don't think that should be a problem.

--

___
Python tracker 

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



[issue18014] Problem compiling on Windows, VC++Express 2010

2013-05-19 Thread Terry J. Reedy

New submission from Terry J. Reedy:

64-bit Win 7 Professional, using default F7 debug build -- F7
Running as normal user, not admin.

3.4: built Thursday, Saturday; failed Wednesday, Friday, today Sunday.

7> cl.exe -c -D_WIN32 -DUSE_DL_EXPORT -D_WINDOWS -DWIN32 -D_WINDLL -D_DEBUG 
-MDd -DHGBRANCH=\"default\" -DHGTAG=\"tip\" -DHGVERSION=\"79bf4e7e4004\" 
..\Modules\getbuildinfo.c 
-Fo"D:\Python\dev\cpython\PCbuild\Win32-temp-Debug\pythoncore\getbuildinfo.o" 
-I..\Include -I..\PC
7>  Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 
80x86
7>  Copyright (C) Microsoft Corporation.  All rights reserved.
7>  
7>  getbuildinfo.c
7>LINK : fatal error LNK1104: cannot open file 
'D:\Python\dev\cpython\PCbuild\python34_d.dll'

I 'updated' back about 24 hours to rev 83828: worked. Forward to rev 83829: 
failed. This made no sense so back to '28: failed. Delete python34_d.dll: 
works. Update to tip: works. Try again: fails.

What I believe to be the case: if python34_d.dll is rebuilt, python_d.exe is 
built. If not, it 'cannot be opened' even though it is sitting there. I cannot 
be sure if this was always the case as I did not try to rebuild very ofter.

--
3.3 I have not been able to rebuild python_d.exe since May 7. I currently get

7>..\PC\pylauncher.rc(16): error RC2104: undefined keyword or key name: FIELD3 
(for pywlauncher project)

10>..\PC\pylauncher.rc(16): error RC2104: undefined keyword or key name: FIELD3

9>..\PC\python_nt.rc(35): error RC2104: undefined keyword or key name: 
MS_DLL_ID (for pythoncore project)

Failure of pythoncore stops the dependent projects. I have no idea how I might 
work around this.

--
components: Build, Windows
messages: 189612
nosy: brian.curtin, steve.dower, terry.reedy, tim.golden
priority: normal
severity: normal
status: open
title: Problem compiling on Windows, VC++Express 2010
type: compile error
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



[issue18013] cgi.FieldStorage does not parse W3C sample

2013-05-19 Thread R. David Murray

Changes by R. David Murray :


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



[issue18013] cgi.FieldStorage does not parse W3C sample

2013-05-19 Thread Florent Xicluna

Florent Xicluna added the comment:

At first glance it seems related to rev d864328a74e4 , issue 4953

The check on self.bytes_read >= self.length returns True because length == -1.

--
nosy: +haypo

___
Python tracker 

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



[issue18013] cgi.FieldStorage does not parse W3C sample

2013-05-19 Thread Florent Xicluna

Changes by Florent Xicluna :


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



[issue18015] python 2.7.5 fails to unpickle namedtuple pickled by 2.7.3 or 2.7.4

2013-05-19 Thread Anselm Kruis

New submission from Anselm Kruis:

Change 18303391b981 breaks unpickling named tuples pickled by 2.7.3 and 2.7.4.

See closed issue #15535 for the full story. Unfortunately Raymond was wrong, 
when he wrote that the addition of __dict__ was a 2.7.4 change. It was added by 
changeset 26d5f022eb1a in 2.7.3.

Now 2.7.5 can't unpickle any named tuples pickled by 2.7.3, which is probably 
one of the most widely used python versions.


Example:

Pickle a namd tuple using 2.7.3 and unpickle it using 2.7.5.

anselm@Emmy:~$ python2.7
Python 2.7.3 (default, Sep 16 2012, 21:46:37) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import collections
>>> import pickletools
>>> import pickle
>>> N=collections.namedtuple("N","a")
>>> n=N(1)
>>> p=pickle.dumps(n, 2)
>>> p2=pickletools.optimize(p)
>>> pickletools.dis(p2)
0: \x80 PROTO  2
2: cGLOBAL '__main__ N'
   14: KBININT11
   16: \x85 TUPLE1
   17: \x81 NEWOBJ
   18: cGLOBAL 'collections OrderedDict'
   43: ]EMPTY_LIST
   44: ]EMPTY_LIST
   45: (MARK
   46: USHORT_BINSTRING 'a'
   49: KBININT11
   51: eAPPENDS(MARK at 45)
   52: aAPPEND
   53: \x85 TUPLE1
   54: RREDUCE
   55: bBUILD
   56: .STOP
highest protocol among opcodes = 2
>>> print repr(p2)
'\x80\x02c__main__\nN\nK\x01\x85\x81ccollections\nOrderedDict\n]](U\x01aK\x01ea\x85Rb.'


anselm@Emmy:~/sc/eclipsews/fg2py$ fg2python
Python 2.7.5 (default, May 18 2013, 17:02:17) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pickle
>>> import collections
>>> N=collections.namedtuple("N","a")
>>> pickle.loads('\x80\x02c__main__\nN\nK\x01\x85\x81ccollections\nOrderedDict\n]](U\x01aK\x01ea\x85Rb.')
Traceback (most recent call last):
  File "", line 1, in 
  File 
"/home/anselm/sc/eclipsews/fg2py/arch/rhel4u4-x86_64/lib/python2.7/pickle.py", 
line 1419, in loads
return Unpickler(file).load()
  File 
"/home/anselm/sc/eclipsews/fg2py/arch/rhel4u4-x86_64/lib/python2.7/pickle.py", 
line 895, in load
dispatch[key](self)
  File 
"/home/anselm/sc/eclipsews/fg2py/arch/rhel4u4-x86_64/lib/python2.7/pickle.py", 
line 1261, in load_build
d = inst.__dict__
AttributeError: 'N' object has no attribute '__dict__'


As we can see from the trace back, the problem arises from the pickle op-code 
'BUILD'. BUILD requires that the object to be build either has a method 
__setstate__ or has an attribute __dict__. Therefore I propose:

- Revert change 18303391b981 and add a __getstate__ method
  This is the Python 3 fix for the problem.

or

- Add a method __setstate__:

  def __setstate__(self, state): 
 """For compatibility with Python 2.7.3 and 2.7.4"""
 pass

--
components: Library (Lib)
messages: 189614
nosy: anselm.kruis, rhettinger
priority: normal
severity: normal
status: open
title: python 2.7.5 fails to unpickle namedtuple pickled by 2.7.3 or 2.7.4
type: behavior
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



[issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive

2013-05-19 Thread Éric Araujo

Éric Araujo added the comment:

An additional reason is that docs of branches in security mode are not rebuilt 
and published, so changes would be useless.

--

___
Python tracker 

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



[issue18003] New lzma crazy slow with line-oriented reading.

2013-05-19 Thread Nadeem Vawda

Nadeem Vawda added the comment:

> I agree that making lzma.open() wrap its return value in a BufferedReader
> (or BufferedWriter, as appropriate) is the way to go.

On second thoughts, there's no need to change the behavior for mode='wb'.
We can just return a BufferedReader for mode='rb', and leave the current
behavior (returning a raw LZMAFile) in place for mode='wb'.


I also ran some additional benchmarks for the bz2 and gzip modules. It
looks like those two modules would also benefit from having their open()
functions use io.BufferedReader:

[lzma]

  $ time xzcat src.xz | wc -l
  1057980

  real0m0.543s
  user0m0.556s
  sys 0m0.024s
  $ ../cpython/python -m timeit -s 'import lzma, io' 'f = lzma.open("src.xz", 
"r")' 'for line in f: pass'
  10 loops, best of 3: 2.01 sec per loop
  $ ../cpython/python -m timeit -s 'import lzma, io' 'f = 
io.BufferedReader(lzma.open("src.xz", "r"))' 'for line in f: pass'
  10 loops, best of 3: 795 msec per loop

[bz2]

  $ time bzcat src.bz2 | wc -l
  1057980

  real0m1.322s
  user0m1.324s
  sys 0m0.044s
  $ ../cpython/python -m timeit -s 'import bz2, io' 'f = bz2.open("src.bz2", 
"r")' 'for line in f: pass'
  10 loops, best of 3: 3.71 sec per loop
  $ ../cpython/python -m timeit -s 'import bz2, io' 'f = 
io.BufferedReader(bz2.open("src.bz2", "r"))' 'for line in f: pass'
  10 loops, best of 3: 2.04 sec per loop

[gzip]

  $ time zcat src.gz | wc -l
  1057980

  real0m0.310s
  user0m0.296s
  sys 0m0.028s
  $ ../cpython/python -m timeit -s 'import gzip, io' 'f = gzip.open("src.gz", 
"r")' 'for line in f: pass'
  10 loops, best of 3: 1.94 sec per loop
  $ ../cpython/python -m timeit -s 'import gzip, io' 'f = 
io.BufferedReader(gzip.open("src.gz", "r"))' 'for line in f: pass'
  10 loops, best of 3: 556 msec per loop

--

___
Python tracker 

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



[issue4470] smtplib SMTP_SSL not working.

2013-05-19 Thread R. David Murray

R. David Murray added the comment:

Lorenzo, any chance you could supply a unit test that fails without 
smtplib_05_shutdown_socket.diff applied?

--

___
Python tracker 

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



[issue18013] cgi.FieldStorage does not parse W3C sample

2013-05-19 Thread Florent Xicluna

Florent Xicluna added the comment:

This seems to fix it.

--
stage: needs patch -> patch review
Added file: http://bugs.python.org/file30314/patch_multipart_w3.diff

___
Python tracker 

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



[issue4470] smtplib SMTP_SSL not working.

2013-05-19 Thread Lorenzo M. Catucci

Lorenzo M. Catucci added the comment:

On Sun, 19 May 2013, R. David Murray wrote:

RDM> 
RDM> R. David Murray added the comment:
RDM> 
RDM> Lorenzo, any chance you could supply a unit test that fails without 
RDM> smtplib_05_shutdown_socket.diff applied?
RDM> 

It would really be a functional test, since the problem with half-open 
connection pile-up stems from smtp server's access control rules.

To test we should setup a fake smtp server, which forbids having multiple
connections from the same IP address, and connect twice in a row to the 
fake server. I'm not sure I'm able to implement both an smtpd.py server
serving more than one connection and the client code in a race-free way in 
the same "unit" test. Will try in the next week.

Thank you very much,

lorenzo

--

___
Python tracker 

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



[issue7146] [PATCH] platform.uname()[4] returns 'amd64' on Windows and 'x86-64' on Linux

2013-05-19 Thread Mark Lawrence

Mark Lawrence added the comment:

It appears from previous comments that this is not needed so can be closed.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue7262] codecs.open() + eol (windows)

2013-05-19 Thread Mark Lawrence

Mark Lawrence added the comment:

The docs still read the same.  Would someone in the know like to propose a doc 
patch please.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue17973] FAQ entry for: '+=' on a list inside tuple both succeeds and raises an exception

2013-05-19 Thread R. David Murray

R. David Murray added the comment:

Mark, I rather like your suggestion.  Do you think Guido will go for it? :)

In the meantime, I've attached a rewritten version of Ronald's FAQ entry.  I 
think the FAQ is why it fails when the extend succeeds, not why assigning to a 
tuple raises an error, so I revised the question and answer accordingly.

--
components: +Documentation
resolution: rejected -> 
stage:  -> patch review
status: closed -> open
title: '+=' on a list inside tuple both succeeds and raises an exception -> FAQ 
entry for: '+=' on a list inside tuple both succeeds and raises an exception
versions: +Python 3.4
Added file: 
http://bugs.python.org/file30315/augmented_tuple_assignment_faq.patch

___
Python tracker 

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



[issue7146] platform.uname()[4] returns 'amd64' on Windows and 'x86-64' on Linux

2013-05-19 Thread R. David Murray

R. David Murray added the comment:

Right, Marc-Andre indicates that cross-platform consistency is not a goal of 
the platform uname.  If someone wants to propose a patch for the possible 
enhancement to platform that Marc-Andre talked about, they can open a new issue.

--
nosy: +r.david.murray
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed
title: [PATCH] platform.uname()[4] returns 'amd64' on Windows and 'x86-64' on 
Linux -> platform.uname()[4] returns 'amd64' on Windows and 'x86-64' on Linux
type:  -> behavior

___
Python tracker 

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



[issue18016] subprocess should open stdin in mode w+b on windows

2013-05-19 Thread Jason Gross

New submission from Jason Gross:

Files opened on Windows in mode 'wb' have a limit on the number of characters 
that can be written to them (at once?); attempting to write too many bytes 
gives the confusing error “IOError: [Errno 22] Invalid argument”.  See 
http://support.microsoft.com/default.aspx?scid=kb;en-us;899149 and 
http://stackoverflow.com/questions/4226941/python-ioerror-errno-22-invalid-argument-when-using-cpickle-to-write-large.
  I have gotten this error when using subprocess.communicate(input=).  Please fix the subprocess library (and any other library that uses 
mode 'wb') to use mode 'w+b', at least on Windows.

--
components: Library (Lib)
messages: 189624
nosy: Jason.Gross
priority: normal
severity: normal
status: open
title: subprocess should open stdin in mode w+b on windows
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



[issue15392] Create a unittest framework for IDLE

2013-05-19 Thread Guilherme Simões

Changes by Guilherme Simões :


--
nosy: +Guilherme.Simões

___
Python tracker 

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



[issue17989] ElementTree.Element broken attribute setting

2013-05-19 Thread Joe Stuart

Joe Stuart added the comment:

Looks like a typo in arbitrary.

AttributeError: Can't set arbitraty attributes on Element

--

___
Python tracker 

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



[issue13657] IDLE doesn't support sys.ps1 and sys.ps2.

2013-05-19 Thread Alejandro Rodas

Alejandro Rodas added the comment:

I have reviewed the patch, and apart from setting the promt, I think it would 
be possible to set it at the beginning with the same approach:

def getprompt(self):
self.interp.runcommand(textwrap.dedent("""\
try:
print(sys.ps1, end="")
except:
import sys
sys.ps1, sys.ps2 = ">>> ", "... "
print(sys.ps1, end="")"""))

What I don't know is why ps1 and ps2 are the only attributes that are missing 
in the sys module within the ModifiedInterpreter. When I try 
InteractiveInterpreter in the original interpreter, it shows the 79 attributes 
that sys has originally.

--
nosy: +alex.rodas

___
Python tracker 

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



[issue17989] ElementTree.Element broken attribute setting

2013-05-19 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


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

___
Python tracker 

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



[issue15535] Fix pickling efficiency of named tuples in 2.7.3

2013-05-19 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
priority: release blocker -> normal
resolution: fixed -> 
status: closed -> open
versions:  -Python 3.2, 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



[issue18003] New lzma crazy slow with line-oriented reading.

2013-05-19 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue18015] python 2.7.5 fails to unpickle namedtuple pickled by 2.7.3 or 2.7.4

2013-05-19 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue15392] Create a unittest framework for IDLE

2013-05-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I was really sure that 'python_d -m test' worked a week ago, in the sense that 
test_idle was run without incident in its proper alphabetical sequence,  before 
I said so and uploaded the patch. Now, there are (different) error messages 
with both 'python_d -m test' and 'python_d -m test test_idle'. (I did not try 
the latter before, only 'python_d -m test.test_idle', with the added '.' whose 
importance I now understand.) One of the two error messages includes what David 
reported. When I can, will report the other, and also will try to 'hg update' 
to a week ago to reproduce the remembered success. If I cannot, I will try 
options to determine the boundaries of the bug in the interacton between 
unittest and regrtest and a decent workaround that avoids duplicating code 
while running under both unittest and regrtest.

I sent Todd the Windows files to examine, modify, and test.

(Nick: neither unittest nor regrtest can run tests hidden within patches on the 
tracker. However, the point is currently moot for this issue. It might someday 
be a python-dev or python-ideas post.)

--

___
Python tracker 

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



[issue18015] python 2.7.5 fails to unpickle namedtuple pickled by 2.7.3 or 2.7.4

2013-05-19 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



[issue17989] ElementTree.Element broken attribute setting

2013-05-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 65680e3a7f07 by Eli Bendersky in branch '3.3':
Issue #17989: fix typo in error message
http://hg.python.org/cpython/rev/65680e3a7f07

New changeset 19767536ce84 by Eli Bendersky in branch 'default':
Issue #17989: fix typo in error message
http://hg.python.org/cpython/rev/19767536ce84

--

___
Python tracker 

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



[issue17989] ElementTree.Element broken attribute setting

2013-05-19 Thread Eli Bendersky

Changes by Eli Bendersky :


--
resolution:  -> fixed
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



[issue18017] ctypes.PyDLL documentation

2013-05-19 Thread Marc Brünink

New submission from Marc Brünink:

The documentation for is not very clear regarding the usage of CDLL and PyDLL. 
Especially it is not obvious that you should use PyDLL whenever you call any 
function of the Python/C API. Since calling a Python/C API function without 
owning the GIL will most likely cause latent segfaults, I think it warrants a 
warning box in section 16.17.2.2 and maybe also somewhere prominent in 
http://docs.python.org/dev/c-api/intro.html.

For section 16.17.2.2 I would put a box next the decription of CDLL saying 
something like: "The Python GIL is released before a function call. It is not 
safe to call any Pyhon/C API function within the loaded library without 
acquiring the GIL first. Thus, if the loaded library calls functions of the 
Python/C API, for example in case it creates and returns a new Python object, 
and does not manually acquire and release the GIL, use PyDLL instead."

--
assignee: docs@python
components: Documentation
messages: 189629
nosy: Marc.Brünink, docs@python
priority: normal
severity: normal
status: open
title: ctypes.PyDLL documentation
versions: Python 3.5

___
Python tracker 

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



[issue18018] SystemError: Parent module '' not loaded, cannot perform relative import

2013-05-19 Thread Florent Xicluna

New submission from Florent Xicluna:

When executing a submodule, there's a SystemError in 3.3 where we used to 
receive a ValueError.

mkdir marsu
touch marsu/__init__.py
echo "from .houba import bi" >> marsu/pilami.py

./python marsu/pilami.py

Traceback (most recent call last):
  File "marsu/pilami.py", line 2, in 
from .houba import bi
SystemError: Parent module '' not loaded, cannot perform relative import


In Python 3.2 (or Python 2.7):

./python3.2 marsu/pilami.py

Traceback (most recent call last):
  File "marsu/pilami.py", line 2, in 
from .houba import bi
ValueError: Attempted relative import in non-package

--
components: Interpreter Core
keywords: 3.3regression
messages: 189630
nosy: brett.cannon, eric.snow, flox, ncoghlan
priority: normal
severity: normal
status: open
title: SystemError: Parent module '' not loaded, cannot perform relative import
type: 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



[issue14097] Improve the "introduction" page of the tutorial

2013-05-19 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Please add the "x = y = z = 0" example back.  It doesn't improve the tutorial 
to dumb it down or to leave out basic knowledge.  You may not like the feature 
but it is a long standing part of the core language.

--

___
Python tracker 

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



[issue18019] dictionary views lead to segmentation fault

2013-05-19 Thread Marcin Szamotulski

New submission from Marcin Szamotulski:

This simple snipet will crash python:
>>> d={}
>>> v=d.viewvalues()
>>> k=d.viewkeys()
>>> d[v]=k
>>> k
Segmentation fault

I am using python2.7.  Python3.2 does not have views while .keys() and 
.values() methods raise RuntimeError: maximum recursion depth exceeded, which 
is expected.

--
messages: 189632
nosy: Marcin.Szamotulski
priority: normal
severity: normal
status: open
title: dictionary views lead to segmentation fault
type: crash
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



[issue14097] Improve the "introduction" page of the tutorial

2013-05-19 Thread Ezio Melotti

Ezio Melotti added the comment:

Is it OK if I add it back to the next page, when I explain object identity?

--

___
Python tracker 

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



[issue18015] python 2.7.5 fails to unpickle namedtuple pickled by 2.7.3 or 2.7.4

2013-05-19 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
keywords: +patch
Added file: http://bugs.python.org/file30316/nt_pickle_fix.diff

___
Python tracker 

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



[issue14097] Improve the "introduction" page of the tutorial

2013-05-19 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> Is it OK if I add it back to the next page, 
> when I explain object identity?

Yes.  That would work.

--

___
Python tracker 

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



[issue18019] dictionary views lead to segmentation fault

2013-05-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3568f8f1ccac by Benjamin Peterson in branch '2.7':
add missing NULL check (closes #18019)
http://hg.python.org/cpython/rev/3568f8f1ccac

--
nosy: +python-dev
resolution:  -> fixed
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



[issue18018] SystemError: Parent module '' not loaded, cannot perform relative import

2013-05-19 Thread Nick Coghlan

Nick Coghlan added the comment:

For the specific case given, both error messages are misleading anyway - the 
problem is attempting to directly execute a module inside a package instead of 
using "-m".

However, for the case of attempting a relative import from a top level module, 
the old message is indeed preferable.

--

___
Python tracker 

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



[issue18018] SystemError: Parent module '' not loaded, cannot perform relative import

2013-05-19 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue734176] Make Tkinter.py's nametowidget work with cloned menu widgets

2013-05-19 Thread Greg Couch

Greg Couch added the comment:

We still apply that patch to the Python that we embed in our application 
and have for the last 10 years :-)

--

___
Python tracker 

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



[issue14097] Improve the "introduction" page of the tutorial

2013-05-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 796d1371605d by Ezio Melotti in branch '3.3':
#14097: improve the "introduction" page of the tutorial.
http://hg.python.org/cpython/rev/796d1371605d

New changeset 42dda22a6f8c by Ezio Melotti in branch 'default':
#14097: merge with 3.3.
http://hg.python.org/cpython/rev/42dda22a6f8c

--
nosy: +python-dev

___
Python tracker 

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



[issue9951] introduce bytes.hex method

2013-05-19 Thread Martin Panter

Changes by Martin Panter :


--
nosy: +vadmium

___
Python tracker 

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



[issue16024] Doc cleanup regarding path=fd, dir_fd, follow_symlinks, etc

2013-05-19 Thread Larry Hastings

Larry Hastings added the comment:

I would, but I can't get it to apply cleanly, either to tip or to historical 
revisions back in Sepember.  Kaleb, what revision is the branch that you 
generated the diff from?

--

___
Python tracker 

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