[issue6028] Interpreter aborts when chaining an infinite number of exceptions

2013-04-25 Thread Phil Connell

Changes by Phil Connell :


--
nosy: +pconnell

___
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-04-25 Thread Nick Coghlan

New submission from Nick Coghlan:

The base64 module is currently restricted specifically to bytes and bytearray 
objects. By using memoryview, it could effectively decode any input type that 
provides an 8-bit C contiguous view of the underlying data.

--
components: Library (Lib)
messages: 187760
nosy: ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: base64 module should use memoryview
type: enhancement
versions: Python 3.4

___
Python tracker 

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



[issue17828] More informative error handling when encoding and decoding

2013-04-25 Thread Nick Coghlan

Nick Coghlan added the comment:

I tracked down the proximate cause of the weird exception in the bytes.decode 
case: the base64 module only accepts bytes and bytearray objects, instead of 
using memoryview to accept anything that supports the buffer API and provides a 
C-contiguous 8-bit view of the underlying data. Raised as issue 17839.

--

___
Python tracker 

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



[issue17840] base64_codec uses assert for runtime validity checks

2013-04-25 Thread Nick Coghlan

New submission from Nick Coghlan:

encodings.base64_codec currently uses "assert errors=='strict'" in a few 
places, since it doesn't actually support any of the Unicode specific error 
handling modes.

This should either be discarded entirely (and document that the error handling 
mode is irrelevant for this codec), or else turned into a real check that 
raises ValueError if an unsupported error mode is passed in.

I have a slight preference for just ignoring the error mode as irrelevant 
(since this isn't a text encoding in the normal Unicode serialisation-as-bytes 
sense).

--
components: Library (Lib)
messages: 187762
nosy: ncoghlan
priority: normal
severity: normal
stage: test needed
status: open
title: base64_codec uses assert for runtime validity checks
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue17828] More informative error handling when encoding and decoding

2013-04-25 Thread Nick Coghlan

Nick Coghlan added the comment:

Here's an example of the specific type errors raised by additional checks in 
the text-encoding specific methods. I believe the main improvement needed here 
is to mention the encoding name in the exception message:

"example".encode("rot_13")
Traceback (most recent call last):
  File "", line 1, in 
TypeError: encoder did not return a bytes object (type=str)


b'BZh91AY&SY\xc1uvK\x00\x00\x01F\x80\x00\x10\x00"\x04\x00\x00\x10 
\x000\xcd\x00\xc1\xa0P\xe2\xeeH\xa7\n\x12\x18.\xae\xc9`'.decode("bz2_codec")
Traceback (most recent call last):
  File "", line 1, in 
TypeError: decoder did not return a str object (type=bytes)

--

___
Python tracker 

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



[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2013-04-25 Thread Nick Coghlan

Nick Coghlan added the comment:

Also adding 17839 as a dependency, since part of the reason the base64 errors 
in particular are so cryptic is because the base64 module doesn't accept 
arbitrary PEP 3118 compliant objects as input.

--
dependencies: +base64 module should use memoryview

___
Python tracker 

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



[issue17827] Document codecs.encode and codecs.decode

2013-04-25 Thread Nick Coghlan

Nick Coghlan added the comment:

Note that in 2.7, these docs should have a ":versionadded: 2.4" marker, while 
in 3.3 and 3.4, they shouldn't have a version added marker at all.

These functions should also get an entry in the 3.4 What's New, even though 
they're not actually new.

--

___
Python tracker 

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



[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2013-04-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +2to3 fixers for missing codecs

___
Python tracker 

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



[issue17823] 2to3 fixers for missing codecs

2013-04-25 Thread Nick Coghlan

Nick Coghlan added the comment:

A more consistent alternative conversion:

"...".encode("base64") => codecs.encode("...", "base64_codec")
"...".encode("rot13") => codecs.encode("...", "rot_13")
"...".encode("zlib") => codecs.encode("...", "zlib_codec")
"...".encode("hex") => codecs.encode("...", "hex_codec")
"...".encode("bz2") => codecs.encode("...", "bz2_codec")

"...".decode("base64") => codecs.decode("...", "base64_codec")
"...".decode("rot13") => codecs.decode("...", "rot_13")
"...".decode("zlib") => codecs.decode("...", "zlib_codec")
"...".decode("hex") => codecs.decode("...", "hex_codec")
"...".decode("bz2") => codecs.decode("...", "bz2_codec")

--
nosy: +ncoghlan

___
Python tracker 

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



[issue17823] 2to3 fixers for missing codecs

2013-04-25 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 25.04.2013 10:14, Nick Coghlan wrote:
> 
> Nick Coghlan added the comment:
> 
> A more consistent alternative conversion:
> 
> "...".encode("base64") => codecs.encode("...", "base64_codec")
> "...".encode("rot13") => codecs.encode("...", "rot_13")
> "...".encode("zlib") => codecs.encode("...", "zlib_codec")
> "...".encode("hex") => codecs.encode("...", "hex_codec")
> "...".encode("bz2") => codecs.encode("...", "bz2_codec")
> 
> "...".decode("base64") => codecs.decode("...", "base64_codec")
> "...".decode("rot13") => codecs.decode("...", "rot_13")
> "...".decode("zlib") => codecs.decode("...", "zlib_codec")
> "...".decode("hex") => codecs.decode("...", "hex_codec")
> "...".decode("bz2") => codecs.decode("...", "bz2_codec")

It would be better to add back the aliases we had for these codecs.

--
nosy: +lemburg

___
Python tracker 

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



[issue17823] 2to3 fixers for missing codecs

2013-04-25 Thread Nick Coghlan

Nick Coghlan added the comment:

Sure, that's what issue 7475 is about, and if we do that, then the fixers can 
be simplified to just replace the method with the function call for the known 
set of non-text-model related codecs.

However, I also wanted to make a note of what the fixers should look like for a 
version of the fixer that can provide compatibility with 3.2+ rather than 
relying on the aliases being restored in 3.4

--

___
Python tracker 

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



[issue17841] Remove missing aliases from codecs documentation

2013-04-25 Thread Nick Coghlan

Changes by Nick Coghlan :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

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



[issue17841] Remove missing aliases from codecs documentation

2013-04-25 Thread Nick Coghlan

New submission from Nick Coghlan:

The aliases for the bytes-bytes and str-str codecs are not present in 3.3, so 
the aliases should be removed from the corresponding standard encoding tables 
in the documentation.

http://docs.python.org/3/library/codecs#standard-encodings

--
messages: 187769
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: Remove missing aliases from codecs documentation
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



[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2013-04-25 Thread Nick Coghlan

Nick Coghlan added the comment:

I also created issue 17841 to cover that that the 3.3 documentation incorrectly 
states that these aliases still exist, even though they were removed before 3.2 
was released.

--

___
Python tracker 

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



[issue17842] Add base64 module tests for a bytearray argument

2013-04-25 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Most base64 functions accepts str, bytes or bytearray. Lib/tests/test_base64.py 
tests only bytes (and sometimes str) arguments. At least one test case with 
bytearray argument needed for every function.

--
components: Tests
keywords: easy
messages: 187771
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: Add base64 module tests for a bytearray argument
type: enhancement
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



[issue17839] base64 module should use memoryview

2013-04-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +Add base64 module tests for a bytearray argument

___
Python tracker 

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



[issue17823] 2to3 fixers for missing codecs

2013-04-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> A more consistent alternative conversion:

What advantages `codecs.encode("...", "base64_codec")` has comparing with 
`base64.b64encode("...")`? The latter is at least more portable and powerfull 
(it allows to specify altchars).

I think that main problem with issue 7475 is that people don't think about a 
different (actually the most obvious) way to do base64 encoding.

--

___
Python tracker 

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



[issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings

2013-04-25 Thread Christian Heimes

New submission from Christian Heimes:

In ebb8c7d79f52 the file Lib/test/testbz2_bigmem.bz2 was added as test case for 
bug #14398.

The PSRT and webmaster teams have received half a dozen mails which complains 
about potential harmful content in the Python installers and Python source 
distribution. Apparently the file triggers a warning in several anti virus 
programs because it looks like a zip bomb.

I suggest that we remove the file from hg and create it on the fly during tests 
runs.

--
messages: 187773
nosy: benjamin.peterson, christian.heimes, georg.brandl, larry, michael.foord, 
nadeem.vawda
priority: release blocker
severity: normal
stage: needs patch
status: open
title: Lib/test/testbz2_bigmem.bz2 trigger virus warnings
type: behavior
versions: Python 2.7, 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



[issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings

2013-04-25 Thread Christian Heimes

Christian Heimes added the comment:

Example:

Virus was detected in the content (virus_detected)
Content contained "Trojan-ArcBomb.BZip.Agent" virus. Details: Virus: 
Trojan-ArcBomb.BZip.Agent; File: Python-2.7.4.tar.bz2; Sub File: 
//T3obr//Python-2.7.4/Lib/test/testbz2_bigmem.bz2; Vendor: Kaspersky Labs; 
Engine error code: 0x00014005; Engine version: 8.0.1.23; Pattern version: 
130425.042500.9895197; Pattern date: 2013.04.25 04:25:00

--

___
Python tracker 

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



[issue17842] Add base64 module tests for a bytearray argument

2013-04-25 Thread Kushal Das

Kushal Das added the comment:

Patch with bytearray based tests.

--
keywords: +patch
nosy: +kushaldas
Added file: http://bugs.python.org/file30012/issue17842_v1.patch

___
Python tracker 

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



[issue17838] Can't assign a different value for sys.stdin in IDLE

2013-04-25 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Once again, what system and version? The Idle user process is different on *nix 
and Windows -- python.exe versus pythonw.exe. In normal interactive mode, the 
interpreter continues to take statements from the console, which seems to be 
sys.__stdin__, after redirection. Sys.stdin is only used for input() statements 
and direct sys.stdin reads.

Python 3.3.1 (v3.3.1:d9893d13c628, Apr  6 2013, ...
>>> import sys
>>> sys.__stdin__
<_io.TextIOWrapper name='' mode='r' encoding='cp437'>
>>> sys.stdin = open('c:/python/mypy/tem.py')
>>> sys.stdin
<_io.TextIOWrapper name='c:/python/mypy/tem.py' mode='r' encoding='cp1252'>
>>> input()
'a, b = 1, 2'
>>> input()
'print("{a} apple and {b} bananas".format(**locals()))'
# These are the 'current' first two lines of the file.
>>> sys.__stdin__
<_io.TextIOWrapper name='' mode='r' encoding='cp437'>

With Idle, at least on Windows, sys.__stdin__ is None. If sys.stdin is the only 
reference to PseudoInputFile, rebinding leads to closure. With no connection to 
the Shell window, it would be impossible to send statements.

>>> import sys
>>> sys.stdin

>>> sys.__stdin__
>>> 

However, with 3.3.1 on Windows, I do not reproduce the problem.
>>> sys.stdin = open('c:/python/mypy/tem.py')
>>> sys.stdin
<_io.TextIOWrapper name='c:/python/mypy/tem.py' mode='r' encoding='cp1252'>
>>> input()
'a, b = 1, 2'
>>> input()
'print("{a} apple and {b} bananas".format(**locals()))'

So pythonw.exe seems to keep a reference other than either .stdin or .__stdin__.

--

___
Python tracker 

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



[issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings

2013-04-25 Thread Kushal Das

Changes by Kushal Das :


--
nosy: +kushaldas

___
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-04-25 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The proposed patch adds link to alternative interfaces for bytes-to-bytes 
codecs. I.e. base64.b64encode and base64.b64decode for base64_codec.

Patch for 2.7 should mention other functions/modules (due to lack of some of 
them).

--
assignee: docs@python
components: Documentation
files: doc_codecs_impl.patch
keywords: patch
messages: 18
nosy: docs@python, doerwalter, lemburg, ncoghlan, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Add link to alternatives for bytes-to-bytes codecs
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file30013/doc_codecs_impl.patch

___
Python tracker 

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



[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2013-04-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +Add link to alternatives for bytes-to-bytes codecs

___
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-04-25 Thread Kushal Das

Kushal Das added the comment:

Working on this.

--
nosy: +kushaldas

___
Python tracker 

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



[issue17272] request.full_url: unexpected results on assignment

2013-04-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2d4189e9bbe8 by Senthil Kumaran in branch 'default':
Issue #17272: Making the urllib.request's Request.full_url a descriptor.  Fixes
http://hg.python.org/cpython/rev/2d4189e9bbe8

--
nosy: +python-dev

___
Python tracker 

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



[issue17830] Fix test_keyword on Windows, clean up addCleanup

2013-04-25 Thread R. David Murray

R. David Murray added the comment:

The filecmp test failure is not because of using filecmp.  We want a binary 
comparison: the line endings of the generated file should match the line 
endings of the input file.  So either the _copy_file_without_generated_keywords 
code is buggy, or this is a real bug in keyword.py.  Probably the former.

As for addCleanup, I prefer the lambda version.  But I'm fine with using the 
non-lambda version if that is more common in the test suite.

--

___
Python tracker 

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



[issue17833] test_gdb broken PPC64 Linux

2013-04-25 Thread Siddhesh Poyarekar

Siddhesh Poyarekar added the comment:

It's not a change in glibc.  __pthread_cond_timedwait is the internal function 
name while pthread_cond_timedwait is the exported alias.  You're seeing 
__pthread_cond_timedwait here because either your glibc installation has debug 
symbols or you have debug info packages installed, which allows gdb to resolve 
the function name to the internal name.  Without glibc debug info you should 
see just pthread_cond_timedwait@@... or just pthread_cond_timedwait.

In any case, I guess you'd be better off just using 
.find("pthread_cond_timedwait") instead of startswith() since I've also seen 
this on ppc64, which might break your test again:

Thread 2 (Thread 0x3fffb7d1f200 (LWP 5746)):
#0  0x3fffb7f21ec8 in .pthread_cond_timedwait () from /lib64/libpthread.so.0

I'm not entirely sure what the preceding dot means, but it seems to indicate a 
function call outside the binary in ppc64.

--
nosy: +Siddhesh.Poyarekar

___
Python tracker 

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



[issue17833] test_gdb broken PPC64 Linux

2013-04-25 Thread David Edelsohn

David Edelsohn added the comment:

Thanks for explaining the issue with GLibc symbols.  The Python test definitely 
should not fail if debugging symbols are installed.

The "dot" symbols should no longer occur with modern PowerLinux installations.  
They were a carry-over from the AIX ABI on which the PPC64 Linux ABI is based.

--

___
Python tracker 

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



[issue17545] os.listdir and os.path.join inconsistent on empty path

2013-04-25 Thread Bernard Lang

Bernard Lang added the comment:

Thank you, David.

BTW, I sent a message on april 20 to d...@python.org about a bug in
the documentation regarding os.readlink(path)
on page  http://docs.python.org/2/library/os.html

and proposing an alternative text.

I got no reply.

This was not long ago  ... should I just wait ?

Sorry for asking you ... I know no one else.

Regards

Bernard

* R. David Murray , le 20-04-13, a écrit:
> 
> Changes by R. David Murray :
> 
> 
> --
> keywords: +easy
> stage:  -> needs patch
> 
> ___
> Python tracker 
> 
> ___

-- 
SVP  Ne plus m'écrire à bernard.l...@inria.fr mais à l'adresse ci-dessous

Please  No longer write to bernard.l...@inria.fr but to the address below

  bernard.l...@datcha.net   ,_  /\o\o/gsm  +33 6 6206 1693
  http://www.datcha.net/   ^  tel  +33 1 3056 1693
Je n'exprime que mon opinion - I express only my opinion
 CAGED BEHIND WINDOWS or FREE WITH LINUX

--

___
Python tracker 

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



[issue17838] Can't assign a different value for sys.stdin in IDLE

2013-04-25 Thread Guilherme Simões

Guilherme Simões added the comment:

I forgot to say I tested this in MacOS in the development version. It shouldn't 
happen in earlier versions because the method "close" of the class 
"PseudoInputFile" is not there. A quick fix to this bug would be to just remove 
this method, but then #17585 would have to be reopened.

--

___
Python tracker 

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



[issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings

2013-04-25 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



[issue17827] Document codecs.encode and codecs.decode

2013-04-25 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



[issue17828] More informative error handling when encoding and decoding

2013-04-25 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



[issue17839] base64 module should use memoryview

2013-04-25 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



[issue17838] Can't assign a different value for sys.stdin in IDLE

2013-04-25 Thread Roger Serwy

Roger Serwy added the comment:

Are you running with or without a subprocess?

--

___
Python tracker 

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



[issue17272] request.full_url: unexpected results on assignment

2013-04-25 Thread Senthil Kumaran

Senthil Kumaran added the comment:

I have committed the first patch which makes Request.full_url a descriptor. 
As I was looking at the changes to be introduced by second patch, I noticed 
that we do not have comprehensive test coverage for .full_url public attribute. 
All the tests are testing the methods like get_full_url.

The change for .full_url not to include fragments was introduced in 
63817:bf3359b7ed2e which says that for reasons that HTTP request should not 
include fragments, it was done. That's correct. Now, I would fear to introduce 
that bug again with the second patch wherein we inadvertently send a URL with 
fragment in a HTTP request.  To ensure this will not be the case, I think, 
increase in test coverage, understanding and documenting the exact expectation 
will be necessary if we have to change  Request.full_url behavior. I will be 
spending a little more time on it. I thought I will write down the points which 
should be taken care.

--
assignee:  -> orsenthil

___
Python tracker 

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



[issue17830] keyword.py main does not preserve line endings when rewriting keyword file

2013-04-25 Thread R. David Murray

R. David Murray added the comment:

Or both.

Zach, can you try this patch on Windows?  I tested it by setting my local 
keywords.py file to have DOS line endings, and it seems to work correctly.

Although this turns out to be a bug, it has never bothered anyone, so I don't 
have any intent to backport it.

--
title: Fix test_keyword on Windows, clean up addCleanup -> keyword.py main does 
not preserve line endings when rewriting keyword file
Added file: http://bugs.python.org/file30014/keyword_preserve_nl.patch

___
Python tracker 

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



[issue17545] os.listdir and os.path.join inconsistent on empty path

2013-04-25 Thread R. David Murray

R. David Murray added the comment:

I don't know if the docs team replies to messages or not.  I know that issues 
sometimes get opened up here that refer to emails to that alias.  You can open 
an issue here yourself for the doc bug, if you want to.

--

___
Python tracker 

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



[issue17830] keyword.py main does not preserve line endings when rewriting keyword file

2013-04-25 Thread Zachary Ware

Zachary Ware added the comment:

Your patch works for me.  And for what it's worth, I agree about not 
backporting; keywords are frozen and never going to change in 2.7 or 3.3 anyway.

I did find one other small bug in test_keyword; running the test via "-m 
test.test_keyword", test_real_grammar_and_keyword_file was skipped.  So I've 
patched your patch to include a fix; GRAMMAR_FILE is now an absolute path with 
relative elements derived from test_keyword.__file__ rather than a relative 
path.

--
Added file: http://bugs.python.org/file30015/test_keyword_patch.diff

___
Python tracker 

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



[issue17830] keyword.py main does not preserve line endings when rewriting keyword file

2013-04-25 Thread R. David Murray

R. David Murray added the comment:

I've committed this (in 58b0e301b78a), but it looks like the email to the 
tracker hasn't come through yet.  I'm going to blithely assume this will fix 
the buildbot failures, and will reopen it if I'm wrong.

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



[issue17838] Can't assign a different value for sys.stdin in IDLE

2013-04-25 Thread Guilherme Simões

Guilherme Simões added the comment:

Roger, I was running with a subprocess but I tried without one and now it works.

--

___
Python tracker 

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



[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2013-04-25 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue16970] argparse: bad nargs value raises misleading message

2013-04-25 Thread paul j3

paul j3 added the comment:

An integer nargs value is only used in one of 2 ways,

range(nargs)

'%s'*nargs

In both a negative value acts the same as a 0.

I don't think the original authors though much about 'what if the code user 
gives a negative value?', because nargs is counting things - the number of 
expected arguments.  For some actions that number is 0.  For other some sort of 
positive integer, or variable numbers like '*','+' make most sense.

To some degree nargs is modeled on the regex sequences, '*','+','?','{n}'.  
'{-1}' does not produce a regex error, though I can't make anything match it.

--

___
Python tracker 

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



[issue14555] clock_gettime/settime/getres: Add more clock identifiers

2013-04-25 Thread Kirsten Stevenson

Kirsten Stevenson added the comment:

I have added descriptions for CLOCK_BOOTTIME_ALARM and CLOCK_REALTIME_ALARM to 
the patch.

--
nosy: +ransomedheart08 -BreamoreBoy, Jim.Jewett, haypo
versions:  -Python 3.4
Added file: http://bugs.python.org/file30016/more_clock_ids.patch

___
Python tracker 

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



[issue17845] Clarify successful build message

2013-04-25 Thread Brett Cannon

New submission from Brett Cannon:

From:

  Python build finished, but the necessary bits to build these modules were not 
found:
  ossaudiodev   spwd
  To find the necessary bits, look in setup.py in detect_modules() for the 
module's name.

To:

  Python build successfully finished, but the necessary bits to build these 
optional modules were not found:

Notice the addition of "successfully" and "optional". Hopefully this will cause 
fewer new contributors to get thrown by this message.

--
components: Build
messages: 187794
nosy: brett.cannon
priority: normal
severity: normal
status: open
title: Clarify successful build message
versions: Python 3.4

___
Python tracker 

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



[issue17845] Clarify successful build message

2013-04-25 Thread Brett Cannon

Brett Cannon added the comment:

And just FYI, the pre-existing sentence already extends past 80 characters 
(84), so the new length of 104 shouldn't be a concern. Although we could 
re-format it into two lines::

  Python build finished successfully!
  The necessary bits to build these optional modules were not found:

--

___
Python tracker 

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



[issue17845] Clarify successful build message

2013-04-25 Thread Brett Cannon

Brett Cannon added the comment:

And I would probably go with "finished successfully" instead of "successfully 
finished".

--

___
Python tracker 

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



[issue17845] Clarify successful build message

2013-04-25 Thread Éric Araujo

Éric Araujo added the comment:

Using two lines sounds good, especially if the last one printed is the positive 
one (“build successful”).

Do you think there will be oppotions to backporting this?

--
nosy: +eric.araujo, ezio.melotti

___
Python tracker 

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



[issue17845] Clarify successful build message

2013-04-25 Thread Éric Araujo

Éric Araujo added the comment:

opposition* :)

--

___
Python tracker 

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



[issue17837] Support for building on ppc64p7

2013-04-25 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +David.Edelsohn

___
Python tracker 

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



[issue17837] Support for building on ppc64p7

2013-04-25 Thread David Edelsohn

David Edelsohn added the comment:

A POWER7 optimized build is fine, but how does recognizing an additional name 
help?  I assume this is just a first step before generating different compiler 
options based on the name.

--

___
Python tracker 

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



[issue17845] Clarify successful build message

2013-04-25 Thread Brett Cannon

Brett Cannon added the comment:

Can't backport; someone might be relying on the output to verify their 
automated build successfully built or something.

--

___
Python tracker 

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



[issue17845] Clarify successful build message

2013-04-25 Thread Harrison Morgan

Harrison Morgan added the comment:

As someone trying to get started contributing, I think this change makes it a 
good deal clearer (although at this point I already know that those modules are 
optional). The two line version looks better to me.

However, "necessary bits" still seems unclear. Would it be going too far to 
suggest that it gets changed to something like this?

Python build finished successfully!
The necessary third-party packages to build these optional modules were not 
found:

--
nosy: +harrison.morgan

___
Python tracker 

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



[issue17845] Clarify successful build message

2013-04-25 Thread Éric Araujo

Éric Araujo added the comment:

Brett: You’re right, too bad.

Harrison: “third-party packages” may be ambiguous (Python distributions vs. 
system dependencies), and “required” may conflict with “optional”.

I propose:

Some optional modules were not built because of missing system files:
...
Python interpreter built successfully!

--

___
Python tracker 

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



[issue17845] Clarify successful build message

2013-04-25 Thread Brett Cannon

Brett Cannon added the comment:

I guess the question is whether all the code is third-party or simply optional 
on some OS? Don't know the answer off the top of my head.

--

___
Python tracker 

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



[issue17845] Clarify successful build message

2013-04-25 Thread Brett Cannon

Brett Cannon added the comment:

I personally don't like the message re-ordering. It feels like "oops, you 
didn't build everything. Hey everything built fine!" It reads like there was a 
bug and we accidentally interpreted it as a success.

And it isn't necessarily system files. I mean sqlite3 is not a system package, 
it's a DB project that we happen to support.

--

___
Python tracker 

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



[issue17845] Clarify successful build message

2013-04-25 Thread Éric Araujo

Éric Araujo added the comment:

> I guess the question is whether all the code is third-party or simply
> optional on some OS? Don't know the answer off the top of my head.
In my Debian world it’s typical to use only the official repos, there are no 
third parties (except from the viewpoint of Python).  I used “system” instead 
of “third-party” in my proposition.  For me on Debian the optional deps really 
are “not installed at Python build time” (“not installed by default” or 
“optional” doesn’t really make sense, as there are multiple defaults, and 98% 
of the packages are not required to have a working system).

> I personally don't like the message re-ordering. It feels like "oops, you
> didn't build everything. Hey everything built fine!"
Well I distinguished “interpreter” and “optional modules” on purpose, not 
“everything”, but I agree it can be a fine distinction when you’re just getting 
started.  Let’s not reorder the messages.

> And it isn't necessarily system files. I mean sqlite3 is not a system package
Really?  If it doesn’t build because sqlite3 header files are not found, then 
that’s a missing system file to me.

(I used “file” instead of “package” because not everybody will install deps 
using the system package manager (if any), but that may be complicating things 
for no good reason.)

--

___
Python tracker 

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



[issue17845] Clarify successful build message

2013-04-25 Thread Brett Cannon

Brett Cannon added the comment:

I use homebrew on OS X and have it in a non-standard location which is not a 
systems directory (e.g. Developer/). When I hear "system", I think /usr, etc. 
which is not where people necessarily install third-party stuff.

--

___
Python tracker 

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



[issue17794] Priority Queue

2013-04-25 Thread Mark Dickinson

Mark Dickinson added the comment:

Hmm.  It's true that Python 3's comparison rules make PriorityQueue a bit less 
useful in its current form.

One possible workaround could be to introduce an optional "key" argument to the 
constructor that provides a callable used to map objects added to the queue to 
their priorities.  The default key would map each object to itself, as before, 
but for a use-case like this one the key could just be lambda x: x[0].

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue17845] Clarify successful build message

2013-04-25 Thread Harrison Morgan

Harrison Morgan added the comment:

Would "external libraries" work better? It's clearly not referring to Python 
packages. And could be installed by a system package manager, or by yourself in 
a non-standard location.

Python build finished successfully!
The necessary external libraries to build these optional modules were not found:

--

___
Python tracker 

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



[issue17845] Clarify successful build message

2013-04-25 Thread Brett Cannon

Brett Cannon added the comment:

"External libraries" works for me.

--

___
Python tracker 

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



[issue17846] Building Python on Windows - Supplementary info

2013-04-25 Thread michael kearney

New submission from michael kearney:

This is not a bug per se, though perhaps documentation rewrite might be 
appropriate.

I've been building python for windows for several years now. I have found that 
it is unnecessarily problematic. Perhaps my expectations are too high. When I 
started building python, I expected to build a whole stable version of python 
thing without error. In my experience, 
it is not true that one can build python on windows by simply loading the .sln 
file into Visual studio, selecting Debug or Release, and then clicking build.

Over time I have worked out steps that allow me to build all bits of python and 
minimize the aggravation and failures. These steps follow. Hopefully they will 
help folks to avoid some of the problems I encountered. Perhaps this will 
attract commentary that will document the way things actually should be done. I 
would be happy to stand corrected and know that there is a simple single point 
and click or single line command that would build python on windows.

Regardless, here you go. 

The online directions for downloading the development version source are fine 
and can be found at http://docs.python.org/devguide/. Mercurial must be 
installed on your machine. Stable released version source is available on the 
download page. 

Python building/rebuilding assumes the existence of subversion, perl, and a 
version of Visual Studio on your system. If you have all three, skip to step 
three. Otherwise download and install any of those
that are missing. If it is  necessary to have on hand multiple versions of 
python built from scratch, you should isolate them from each other by putting 
them in a container directory perhaps of the same name.

e.g. I use a style like python331/python331, python32/python32

where the subdirectory is the source root directory. I use the upper directory 
to isolate the external subprojects created by the buildbots described later. 
If you don't do this, the buildbots of one version can wipe out required 
subprojects of another version of python. I can assure you this will cause you 
a lot of confusion until you realize the source of the problem.

0. Download and install at least a subversion client and add the executable to 
your path.
   I got mine from Collabnet and here is how it appears in my path
   "C:\Program Files\CollabNet\Subversion Client"

1. Download and install  perl and add the executable to your path  
   I vaguely recall I downloaded ActivePerl
   Your Perl path will look something like this.
   C:\Perl\site\bin;C:\Perl\bin

2. Download and install VC++ express and add the bin area to your path
   Your VC++ bin path will look something like this:
   C:\Program Files\Microsoft Visual Studio 10.0\VC\bin

   I use the free version of VC++, which may be the source of all my 
   python build issues.
   When I load the solution file which you will see later, VC++
   complains that the version
   I have doesn't support various features. It is free though and I am 
   able to work with it. 

2  Download and install nasm:
   There are several downloading sites. This seems to be the latest and
   greatest. 
   http://www.windows7download.com/win7-nasm/ldyuniel.html

4. Download and build the external subprojects with the buildbots using 
   either: 
Tools\buildbot\external.bat # for 32 bit processors
Tools\buildbot\external-amd64.bat   # for 64 bit processors
from the root directory or your python distribution.
This step will download the correct versions of the external 
projects for this version of python. There are several projects

4. openssl is used for python on windows
   ssl rarely succeeds if you proceed to build using "pcbuild.sln: 

   The following steps will resolve many problems if you executing them 
   before building with the .sln file

   cd into the openssl directory created by the buildbots
 perl util\mkdef.pl crypto ssl update
 perl Configure VC-WIN32 --prefix=C:\opt\openssl-1.0.1d
 ms\do_nasm  

   You may get compilation errors anyway when you attempt to build the 
   .sln file with Visual Studio. The errors I have seen have always been 
   the same type, namely a forced error contained within a block of   
   conditional code. In all cases so far I have been able to comment out 
   the forced error. Most recently I had to comment out code blocks in 
   mdc2.h and idea.h.
   
   Historically, the openssl build has not had a "clean" function. This 
   used to cause me a lot of problems if rebuilding was required for  
   whatever reason. I cleaned the project by deleting and letting the 
   buildbot download again what was required. 

5. Finally Build python and its internal subprojects  
 open the solution "pcbuild.sln" in Visual Studio (VC++ in my case)
   - If you have an express version, then ignore the warning 
 select the  configuration  Release or Debug
"Release" builds python.exe
"Debug" builds python_d.exe 
  

[issue17837] Support for building on ppc64p7

2013-04-25 Thread David Edelsohn

David Edelsohn added the comment:

If I understand correctly, config.sub is imported from upstream FSF project.  I 
do not know how much CPython diverges from the upstream file and merges in 
local changes.

I'm still a little confused about what this patch accomplishes.  One can 
configure with CC or CFLAGS set for POWER7.  And one can test for processor 
feature support macros in the code.

--

___
Python tracker 

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



[issue17794] Priority Queue

2013-04-25 Thread Mark Dickinson

Mark Dickinson added the comment:

Example patch.  Items with equal priority are retrieved in LIFO order.

--
keywords: +patch
Added file: http://bugs.python.org/file30017/issue17794.patch

___
Python tracker 

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



[issue17794] Priority Queue

2013-04-25 Thread Mark Dickinson

Changes by Mark Dickinson :


Added file: http://bugs.python.org/file30018/issue17794.patch

___
Python tracker 

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



[issue17794] Priority Queue

2013-04-25 Thread Mark Dickinson

Changes by Mark Dickinson :


Removed file: http://bugs.python.org/file30017/issue17794.patch

___
Python tracker 

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



[issue17794] Priority Queue

2013-04-25 Thread Mark Dickinson

Mark Dickinson added the comment:

Hmm.  This looks like a duplicate of #7174.

--

___
Python tracker 

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



[issue17794] Priority Queue

2013-04-25 Thread Mark Dickinson

Mark Dickinson added the comment:

Fixed patch.

--
Added file: http://bugs.python.org/file30019/issue17794.patch

___
Python tracker 

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



[issue17794] Priority Queue

2013-04-25 Thread Mark Dickinson

Changes by Mark Dickinson :


Removed file: http://bugs.python.org/file30018/issue17794.patch

___
Python tracker 

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



[issue17838] Can't assign a different value for sys.stdin in IDLE

2013-04-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I confirm this bug.

Terry, 3.3.1 doesn't contains this bug. This is a regression introduced by 
issue17585.

A right solution is not easy. We should

1) Remove PseudoInputFile.close.
2) Do not print an exception in Executive.runcode, but transfer it via rpc back 
to PyShell.
3) In PyShell.runcode receive an exception and process it same way as in 
non-subprocess mode (note that in non-subrocess mode a messagebox asks "Exit? 
Do you want to exit altogether?", but in subprocess mode it now asks "Kill? The 
program is still running! Do you want to kill it?").

The hard part is transferring an exception.

--
nosy: +serhiy.storchaka
stage:  -> needs patch
versions: +Python 2.7, Python 3.3

___
Python tracker 

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



[issue17845] Clarify successful build message

2013-04-25 Thread R. David Murray

R. David Murray added the comment:

I'm afraid that "External libraries" is still misleading.  On 
package-manager-managed linux systems, it is often only the header files that 
are missing, the libraries are there.  It may well be that "necessary bits" is 
the most informative choice :).

With two lines I suppose you could be wordy and say "external libraries and/or 
header files", but that might take us beyond column 80 again.

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



[issue17836] multiprocessing exceptions with useful traceback

2013-04-25 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Duplicate of #13831.

--
resolution:  -> duplicate

___
Python tracker 

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



[issue13831] get method of multiprocessing.pool.Async should return full traceback

2013-04-25 Thread Richard Oudkerk

Richard Oudkerk added the comment:

It might be possible to come up with a hack so that when the exception is 
unpickled in the main process it gets a secondary exception chained to it using 
__cause__ or __context__ whose stringification contains the stringification of 
the original traceback.

--
versions: +Python 3.4 -Python 2.6, Python 3.3

___
Python tracker 

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



[issue16347] configure.ac patch

2013-04-25 Thread Antonio Cavallo

Antonio Cavallo added the comment:

I suppose to reduce the noise is better close this, thanks

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



[issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings

2013-04-25 Thread Nadeem Vawda

Nadeem Vawda added the comment:

Oh dear. I'll update the test suite over the weekend. In the meanwhile, 
Christian, can you confirm which versions are affected? The file should only 
have been included in 2.7 and 3.2.

--
assignee:  -> nadeem.vawda

___
Python tracker 

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



[issue17836] multiprocessing exceptions with useful traceback

2013-04-25 Thread Richard Oudkerk

Changes by Richard Oudkerk :


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



[issue17847] Glossary lacks permalinks

2013-04-25 Thread Antoine Pitrou

New submission from Antoine Pitrou:

If you look at http://docs.python.org/dev/glossary.html, the glossary entries 
don't have a permalink next to them (even though the "Glossary" heading has 
one).

--
assignee: georg.brandl
components: Documentation
messages: 187821
nosy: georg.brandl, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: Glossary lacks permalinks
type: behavior
versions: Python 2.7, 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



[issue17847] Glossary lacks permalinks

2013-04-25 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +eric.araujo, ezio.melotti

___
Python tracker 

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



[issue17847] Glossary lacks permalinks

2013-04-25 Thread Berker Peksag

Berker Peksag added the comment:

Probably duplicate of issue 15693?

--
nosy: +berker.peksag

___
Python tracker 

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



[issue17712] test_gdb failures

2013-04-25 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Here is a patch.

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

___
Python tracker 

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



[issue15693] expose glossary link on hover

2013-04-25 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee: docs@python -> georg.brandl
nosy: +georg.brandl
stage:  -> patch review
type: enhancement -> behavior
versions: +Python 3.1, Python 3.4

___
Python tracker 

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



[issue17847] Glossary lacks permalinks

2013-04-25 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ah, thanks for noticing this.

--
resolution:  -> duplicate
status: open -> closed
superseder:  -> expose glossary link on hover

___
Python tracker 

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



[issue15693] expose glossary link on hover

2013-04-25 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage: patch review -> 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-04-25 Thread Ben Hoyt

Ben Hoyt added the comment:

I just hit this issue in a big way -- would have been nice for this fix to go 
into Python 2.7.4. :-)

It was quite hard to track down (as in, a day or two of debugging :-) because 
the symptoms didn't point directly to namedtuple. In our setup we 
pickle/unpickle some big files, and the symptoms we noticed were extremely high 
memory usage after *un*pickling -- as in, 3x what we were getting before 
upgrading from Python 2.6. We first tracked it down to unpickling, and then 
from there narrowed it down to namedtuple.

The first "fix" I discovered was that I could use pickletools.optimize() to 
reduce the memory-usage-after-unpickling back down to sensible levels. I don't 
know enough about pickle to know exactly why this is -- perhaps fragmentation 
due to extra unpickling data structures allocated on the heap, that optimize() 
removes?

Here's the memory usage of our Python process after unpickling a ~9MB pickle 
file (protocol 2) which includes a lot of namedtuples. This is on Python 2.7.4 
64-bit. With the original collections.py -- "normal" means un-optimized pickle, 
"optimized" means run through pickletools.optimize():

Memory usage after loading normal: 106664 KB
Memory usage after loading optimized: 31424 KB

With collections.py modified so namedtuple's templates include "def 
__getstate__(self): return None":

Memory usage after loading normal: 33676 KB
Memory usage after loading optimized: 26392 KB

So you can see the Python 2.7 version of namedtuple makes the process use 
basically 3x the RAM when unpickled (without pickletools.optimize). Note that 
Python 2.6 does *not* do this (it doesn't define __dict__ or use OrderedDict so 
doesn't have this issue). And for some Python 3.3(.1) doesn't have the issue 
either, even though that does define __dict__ and use OrderedDict. I guess 
Python 3.3 does pickling (or garbage collection?) somewhat differently.

You can verify this yourself using the attached unpickletest.py script. Note 
that I'm running on Windows 7, but I presume this would happen on Linux/OS X 
too, as this issue has nothing to do with the OS. The script should work on 
non-Windows OSes, but you have to type in the RAM usage figures manually (using 
"top" or similar).

Note that I'm doing a gc.collect() just before fetching the memory usage figure 
just in case there's uncollected cyclical garbage floating around, and I didn't 
want that to affect the measurement.

I'm not sure I fully understand the cause (of where all this memory is going), 
or the fix for that matter. The OrderedDict is being pickled along with the 
namedtuple instance, because an OrderedDict is returned by __dict__, and pickle 
uses that. But is that staying in memory on unpickling? Why does optimizing the 
pickle fix the RAM usage issue to a large extent?

In any case, I've made the __getstate__ fix in our code, and that definitely 
fixes the RAM usage for us. (We're also going to be optimizing our pickles from 
now on.)

--
nosy: +benhoyt
Added file: http://bugs.python.org/file30021/unpickletest.py

___
Python tracker 

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



[issue17845] Clarify successful build message

2013-04-25 Thread Harrison Morgan

Harrison Morgan added the comment:

Perhaps "necessary bits" really is the best way to put it. Here's one more 
suggestion, though:

Python build finished successfully!
External libraries and/or header files needed to build these optional modules 
were not found:

Dropping the definite article and rearranging it to use "needed" instead of 
"necessary" keeps it at 93 characters, only 9 more than the current message. 
I'm not sure, but I think the "and/" could be dropped, too.

That, at least, gives you something to put into Google.

--

___
Python tracker 

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



[issue16177] IDLE Crash on Open Parens

2013-04-25 Thread Eric Schulz

Changes by Eric Schulz :


--
nosy: +lostdog

___
Python tracker 

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



[issue16177] IDLE Crash on Open Parens

2013-04-25 Thread Guilherme Simões

Guilherme Simões added the comment:

I couldn't confirm this bug in versions 2.7, 3.3 or 3.4 on the Mac even while 
using the same user configuration.

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



[issue17794] Priority Queue

2013-04-25 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I'm working on this one.  Expect a patch shortly.

--
assignee:  -> rhettinger

___
Python tracker 

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



[issue11597] Can't get ConfigParser.write to write unicode strings

2013-04-25 Thread Eugene Klimov

Eugene Klimov added the comment:

some workaround

import configparser
import codecs

cfg = configparser.ConfigParser()
cfg.write(codecs.open('filename','wb+','utf-8'))

--
nosy: +Eugene.Klimov

___
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-04-25 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
priority: normal -> high

___
Python tracker 

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



[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-04-25 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I would like to see Proto4 include an option for compression (zlib,bz2) or 
somesuch and become self-decompressing upon unpickling.  The primary use cases 
for pickling involve writing to disk or transmitting across a wire -- both use 
cases benefit from compression (with reduced read/write times).

--
nosy: +rhettinger

___
Python tracker 

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



[issue17837] Support for building on ppc64p7

2013-04-25 Thread Bohuslav "Slavek" Kabrda

Bohuslav "Slavek" Kabrda added the comment:

So, to give it a little background: I need this for Fedora builds on ppc64p7. 
Just the name recognition helps, because the name is passed automatically by 
rpmbuild to configure (== if not recognized, build fails). So this is basically 
a way for configure to recognize ppc64p7 as ppc, nothing more. Doing little 
googling told me that PHP already accepted patch like this [1] (although I know 
that Python doesn't have to do what other languages do...)

[1] 
https://github.com/php/php-src/commit/52d1add0fe385d0e0d8b1132edd11168eb7fe0e4#config.sub

--

___
Python tracker 

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



[issue17845] Clarify successful build message

2013-04-25 Thread Ezio Melotti

Ezio Melotti added the comment:

See also #13472 for a related discussion.

--
keywords: +easy
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



[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-04-25 Thread Charles-François Natali

Charles-François Natali added the comment:

> I would like to see Proto4 include an option for compression
> (zlib,bz2) or somesuch and become self-decompressing upon unpickling.

I don't see what this would bring over explicit compression:
- depending on the use case, you may want to use different compression 
algorithms, e.g. for disk you may want higher compression ratio like 
bzip2/lzma, but for wire you'd prefer something fast like snappy
- supporting multiple compression algorithms and levels would complicate the API
- this would probably complicate the code, since you'd have to support optional 
compression, and have a way to indicate which format is used
- that's really mixing two entirely different concepts (serialization vs 
compression)

--
nosy: +neologix

___
Python tracker 

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



[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-04-25 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> I don't see what this would bring over explicit compression:
> - depending on the use case, you may want to use different compression 
> algorithms, e.g. for disk you may want higher compression ratio like 
> bzip2/lzma, but for wire you'd prefer something fast like snappy
> - supporting multiple compression algorithms and levels would complicate the 
> API
> - this would probably complicate the code, since you'd have to support 
> optional compression, and have a way to indicate which format is used
> - that's really mixing two entirely different concepts (serialization vs 
> compression)

I agree with Charles-François.
A feature that may be actually nice to have in the pickle protocol would
be some framing, to help with streaming unpickling (right now unpickling
a stream can read almost one byte at a time, IIRC).
However, that would also make the protocol and the pickler significantly
more complex.

--

___
Python tracker 

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