[issue15204] Deprecate the 'U' open mode

2013-11-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file27345/deprecate-U-mode-stage1_2.patch

___
Python tracker 

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



[issue15204] Deprecate the 'U' open mode

2013-11-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file26198/deprecate-U-mode-stage2.patch

___
Python tracker 

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



[issue19518] Add new PyRun_xxx() functions to not encode the filename

2013-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

PyRun_FileObject() looks misleading, because it works with FILE*, not with a 
file object.

--

___
Python tracker 

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



[issue3158] Doctest fails to find doctests in extension modules

2013-11-19 Thread Eric Snow

Eric Snow added the comment:

Larry: thoughts?

--
nosy: +larry

___
Python tracker 

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



[issue19506] subprocess.communicate() should use a memoryview

2013-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What is a performance for small chunks?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue19653] Generalize usage of _PyUnicodeWriter for repr(obj): add _PyObject_ReprWriter()

2013-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I supported patches for repr(list), repr(tuple) and repr(dict) because they 
made the code shorter and cleaner. But this patch is more questionable.

--

___
Python tracker 

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



[issue18294] zlib module is not completly 64-bit safe

2013-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--

___
Python tracker 

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



[issue19658] inspect.getsource weird case

2013-11-19 Thread Ronny Pfannschmidt

Changes by Ronny Pfannschmidt :


--
components: +Library (Lib)

___
Python tracker 

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



[issue19653] Generalize usage of _PyUnicodeWriter for repr(obj): add _PyObject_ReprWriter()

2013-11-19 Thread Eric Snow

Eric Snow added the comment:

As far as I'm aware, the performance of __repr__() for any object is not much 
of a concern.  Repr is mostly for debugging and interactive use, so it's 
already fast/efficient enough for the target consumers: us. :)  Making 
__repr__() easier to write or maintain is worth it as long as benefit outweighs 
the cost of the churn.

--
nosy: +eric.snow

___
Python tracker 

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



[issue19652] test_asyncio: test_subprocess_send_signal() hangs on buildbot "AMD64 Snow Leop 3.x"

2013-11-19 Thread Guido van Rossum

Guido van Rossum added the comment:

Oh, sorry, I didn't realize the name of the failing test was in the issue 
title. But even that's no excuse, because it's also in the log. :-(

Fortunately the line where we're hanging is also in the log: line 291 in 
selectors.py is in PollSelector. So that's settled. But we don't know if that's 
the first of the three tests that runs or not.

What's also strange is that several other tests (test_subprocess_kill() and 
test_subprocess_terminate()) also send signals, so they should work exactly the 
same way. But again we don't know if any of them are being run before the 
signal test.

Do you have any other traces from the same bot? Do they all fail in the same 
test? Is the test order randomized?

--

___
Python tracker 

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



[issue19660] decorator syntax: allow testlist instead of just dotted_name

2013-11-19 Thread Eric V. Smith

Changes by Eric V. Smith :


--
nosy: +eric.smith

___
Python tracker 

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



[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-11-19 Thread Christian Heimes

Christian Heimes added the comment:

The PEP should be ready now. I have addressed your input in 
http://hg.python.org/peps/rev/fbe779221a7a

--
assignee: christian.heimes -> ncoghlan

___
Python tracker 

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



[issue19660] decorator syntax: allow testlist instead of just dotted_name

2013-11-19 Thread James Powell

Changes by James Powell :


--
keywords: +patch
Added file: http://bugs.python.org/file32717/decorator-syntax.patch

___
Python tracker 

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



[issue19660] decorator syntax: allow testlist instead of just dotted_name

2013-11-19 Thread James Powell

New submission from James Powell:

Decorator syntax currently allows only a dotted_name after the @. As far as I 
can tell, this was a gut-feeling decision made by Guido. [1]

I spoke with Nick Coghlan at PyTexas about this, and he suggested that if 
someone did the work, there might be interest in revisiting this restriction.

The attached patch allows any testlist to follow the @.

The following are now valid:

@(lambda x:x)
def f():
pass

@(spam if p else eggs)
def f():
pass

@spam().ham().eggs()
def f():
pass

[1] http://mail.python.org/pipermail/python-dev/2004-August/046711.html

--
components: Interpreter Core
messages: 203456
nosy: james
priority: normal
severity: normal
status: open
title: decorator syntax: allow testlist instead of just dotted_name
type: enhancement
versions: Python 3.4, Python 3.5

___
Python tracker 

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



[issue19652] test_asyncio: test_subprocess_send_signal() hangs on buildbot "AMD64 Snow Leop 3.x"

2013-11-19 Thread STINNER Victor

STINNER Victor added the comment:

> I cannot help you unless you tell me which specific test is failing.

Oh, I didn't notice that test_subprocess_send_signal() is part of a mixin: 
SubprocessTestsMixin. Configure output:

checking sys/devpoll.h usability... no
checking sys/devpoll.h presence... no
checking for sys/devpoll.h... no
checking sys/epoll.h usability... no
checking sys/epoll.h presence... no
checking for sys/epoll.h... no
checking poll.h usability... yes
checking poll.h presence... yes
checking for broken poll()... no
checking for kqueue... yes

I don't know which selector was used: select, poll or maybe kqueue?

--

___
Python tracker 

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



[issue18566] In unittest.TestCase docs for setUp() and tearDown() don't mention AssertionError

2013-11-19 Thread Julian Gindi

Julian Gindi added the comment:

I did some further testing and it seems that you are right, testcase.SkipTest() 
never causes an error in setUp or tearDown but "raise AssertionError" does 
(even in setUp or tearDown). I went ahead and made relevant documentation 
changes, let me know what you think.

--
keywords: +patch
nosy: +Julian.Gindi
Added file: http://bugs.python.org/file32716/issue18566.patch

___
Python tracker 

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



[issue18294] zlib module is not completly 64-bit safe

2013-11-19 Thread STINNER Victor

STINNER Victor added the comment:

zlib_64bit-4.patch:

* fix usage of argument clinic, add a uint_converter
* fix zlib_Decompress_decompress(): use an unsigned int, not an int (remove 
int_converter())
* fix two bugs and unit tests

--
Added file: http://bugs.python.org/file32715/zlib_64bit-4.patch

___
Python tracker 

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



[issue19659] Document Argument Clinic?

2013-11-19 Thread STINNER Victor

New submission from STINNER Victor:

While modifying zlibmodule.c, Serhiy told me that argument clinic is now used 
in zlibmodule.c. Running "./python Tools/clinic/clinic.py -f 
Modules/zlibmodule.c" does modify the file, so I misuse argument clinic.

I saw Argument Clinic on Youtube but it didn't help...
http://www.youtube.com/watch?v=kQFKtI6gn9Y

Would it be possible to explain how to use clinic.py, explain the format, etc. 
in the Python documentation? Somewhere near Doc/c-api/.

--
messages: 203452
nosy: haypo, larry
priority: normal
severity: normal
status: open
title: Document Argument Clinic?
versions: Python 3.4

___
Python tracker 

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



[issue19506] subprocess.communicate() should use a memoryview

2013-11-19 Thread STINNER Victor

STINNER Victor added the comment:

> Hi, why does your patch change listobject.c?

Oops, the change is unrelated (#19578).

--

___
Python tracker 

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



[issue19506] subprocess.communicate() should use a memoryview

2013-11-19 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Hi, why does your patch change listobject.c?

--

___
Python tracker 

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



[issue19506] subprocess.communicate() should use a memoryview

2013-11-19 Thread STINNER Victor

STINNER Victor added the comment:

Attached subprocess_memoryview.patch uses a memoryview() to avoid memory copies.

The behaviour is undefined if two threads share the same Popen object and call 
the communicate() method at the same time. But I'm not sure that Popen is 
thread safe, it doesn't use any lock.

--
keywords: +patch
nosy: +pitrou, sbt
Added file: http://bugs.python.org/file32714/subprocess_memoryview.patch

___
Python tracker 

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



[issue19656] Add Py3k warning for non-ascii bytes literals

2013-11-19 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue19512] Avoid temporary Unicode strings, use identifiers to only create the string once

2013-11-19 Thread STINNER Victor

STINNER Victor added the comment:

No reaction, I close the issue. Reopen it if you still have complains ;-)

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

___
Python tracker 

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



[issue19518] Add new PyRun_xxx() functions to not encode the filename

2013-11-19 Thread STINNER Victor

STINNER Victor added the comment:

> Updated patch addressing some remarks of Serhiy and adding documentation.

Anyone for a new review?

--

___
Python tracker 

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



[issue19578] del list[a:b:c] doesn't handle correctly list_resize() failure

2013-11-19 Thread STINNER Victor

STINNER Victor added the comment:

Hum, my explanation is maybe not clear.

Without the patch, the operation succeed, but a MemoryError is raised, and the 
caller is not notified. So you enter an inconsistent state because your 
function may "succeed" whereas an exception is set.

With the patch, the operation succeed, but you get a MemoryError and the caller 
is notified of the failure.

--

___
Python tracker 

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



[issue19568] bytearray_setslice_linear() leaves the bytearray in an inconsistent state on memory allocation failure

2013-11-19 Thread STINNER Victor

STINNER Victor added the comment:

> Can you suppress the MemoryError if deletion succeeds? That would be ok IMO.

In case (1) and (3) (see below), the MemoryError might be suppressed, but I 
prefer to keep the exception to warn the user that something bad happened and 
its program will slowly leak memory.

Reminder that I found the error using failmalloc which is stupid tool: it 
injects random MemoryError errors. In practice, realloc() should never fail if 
the buffer is shrinked (becomes smaller). So I don't think that you should 
worry too much on the exact behaviour of this case :-)

Only the case (3) (bytearray grows) may appear in practice, and this case is 
handleded correctly (do nothing if realloc() failed, leave the bytearray object 
unchanged).


> Yes, but if a MemoryError occurred during slice assignment b[3:6] = b'ab', 
> the bytearray will be not consistent. For consistency we should copy 
> replacement bytes.

Correct, fixed in new patch.


New patch copying bytes if the memory allocation failed but we cannot restore 
removed bytes (case 2). I also added a long comment explaining the issue.

Behaviour with the patch 3:

Case 1: growth<0, lo == 0

>>> b=bytearray(b'asciiUNICODE'); b[:5]=b'#'
Traceback (most recent call last):
  File "", line 1, in 
MemoryError
>>> b
bytearray(b'asciiUNICODE')

=> b leaved unchanged (ok)


Case 2: growth<0, lo != 0

>>> b=bytearray(b'asciiUNICODE'); b[1:5]=b'#'
Traceback (most recent call last):
  File "", line 1, in 
MemoryError
>>> b
bytearray(b'a#UNICODE')

=> function succeed, but exception raised (and memory block not resized)


Case 3: growth>0

>>> b=bytearray(b'asciiUNICODE'); b[5:5]=b'###'
Traceback (most recent call last):
  File "", line 1, in 
MemoryError
>>> b
bytearray(b'asciiUNICODE')

=> b leaved unchanged (ok)

--
Added file: 
http://bugs.python.org/file32713/bytearray_setslice_mem_error-3.patch

___
Python tracker 

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



[issue19633] test_wave: failures on PPC64 buildbot

2013-11-19 Thread David Edelsohn

David Edelsohn added the comment:

By the way, test_wave also fails on zLinux, which also is Big Endian.

--

___
Python tracker 

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



[issue18295] Possible integer overflow in PyCode_New()

2013-11-19 Thread STINNER Victor

STINNER Victor added the comment:

Here is a patch adding Py_SAFE_DOWNCAST(). For update_star_args(), I changed 
the type instead, because I prefer to avoid Py_SAFE_DOWNCAST() when possible.

Modify PyEval_EvalCodeEx() and PyCode_New() to use Py_ssize_t would be more 
correct, but it may be slower if Py_ssize_t is larger than int, and I hope that 
nobody calls functions with more than INT_MAX parameters! It would be completly 
inefficient!

--
keywords: +patch
nosy: +christian.heimes, serhiy.storchaka
Added file: http://bugs.python.org/file32712/code_ssize_t.patch

___
Python tracker 

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



[issue9566] Compilation warnings under x64 Windows

2013-11-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 116bd550e309 by Victor Stinner in branch 'default':
Issue #9566, #19617: Fix more compiler warnings in compile.c on Windows 64-bit
http://hg.python.org/cpython/rev/116bd550e309

--

___
Python tracker 

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



[issue19617] Fix usage of Py_ssize_t type in Python/compile.c

2013-11-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 116bd550e309 by Victor Stinner in branch 'default':
Issue #9566, #19617: Fix more compiler warnings in compile.c on Windows 64-bit
http://hg.python.org/cpython/rev/116bd550e309

--

___
Python tracker 

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



[issue2943] Distutils should generate a better error message when the SDK is not installed

2013-11-19 Thread Matt Hickford

Matt Hickford added the comment:

For comparison, Ruby ships with a package manager, Gem. If a user tries to 
install a package with C extensions, they are given this user-friendly message:

> Please update your PATH to include build tools or download the DevKit from 
> 'http://rubyinstaller.org/downloads' and follow the instructions at 
> 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'

--

___
Python tracker 

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



[issue19637] test_subprocess.test_undecodable_env() failure on AIX

2013-11-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e651036191ad by Victor Stinner in branch 'default':
Issue #19637: fix test_undecodable_env() of test_subprocess on AIX
http://hg.python.org/cpython/rev/e651036191ad

--
nosy: +python-dev

___
Python tracker 

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



[issue19588] Silently skipped test in test_random

2013-11-19 Thread Julian Gindi

Julian Gindi added the comment:

Maybe some documentation could help express the purpose of this test, but I was 
able to make the changes mentioned below and the test seems to work better than 
it used to. The test no longer returns if a value is 'skipped'. This is my 
first attempt at a patch so apologies if this is not perfect.

--
keywords: +patch
nosy: +Julian.Gindi
Added file: http://bugs.python.org/file32711/issue19588.patch

___
Python tracker 

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



[issue18294] zlib module is not completly 64-bit safe

2013-11-19 Thread STINNER Victor

STINNER Victor added the comment:

zlib_64bit-3.patch: updated patch which fixes also the PyArg_ParseTuple() 
convert for C int and C unsigned int.

--
Added file: http://bugs.python.org/file32710/zlib_64bit-3.patch

___
Python tracker 

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



[issue9566] Compilation warnings under x64 Windows

2013-11-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ee4da7291211 by Victor Stinner in branch 'default':
Issue #9566, #19617: New try to fix compilation on Windows
http://hg.python.org/cpython/rev/ee4da7291211

--

___
Python tracker 

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



[issue19617] Fix usage of Py_ssize_t type in Python/compile.c

2013-11-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ee4da7291211 by Victor Stinner in branch 'default':
Issue #9566, #19617: New try to fix compilation on Windows
http://hg.python.org/cpython/rev/ee4da7291211

--

___
Python tracker 

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



[issue19626] test_email and Lib/email/_policybase.py failures with -OO

2013-11-19 Thread Francisco Martín Brugué

Francisco Martín Brugué added the comment:

small correction:

a fresh clone, then:
./configure --with-pydebug
make -j4
./python -OO -m test -v test_email

--

___
Python tracker 

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



[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-11-19 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Attached is a patch that takes a different approach to framing, putting it into 
an optional framing layer by means of a buffered reader/writer.

The framing structure is the same as in PEP 3154; a separate PYFRAMES magic is 
prepended to guard against protocol inconsistencies and to allow for automatic 
detection of framing.

--
nosy: +loewis
Added file: http://bugs.python.org/file32709/framing.diff

___
Python tracker 

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



[issue15204] Deprecate the 'U' open mode

2013-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Updated patch addresses Victor's comments.

--
Added file: http://bugs.python.org/file32708/deprecate-U-mode_2.patch

___
Python tracker 

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



[issue3158] Doctest fails to find doctests in extension modules

2013-11-19 Thread Zachary Ware

Zachary Ware added the comment:

Does this qualify as a new feature that needs to be in before beta 1?

--

___
Python tracker 

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



[issue19626] test_email and Lib/email/_policybase.py failures with -OO

2013-11-19 Thread Francisco Martín Brugué

Francisco Martín Brugué added the comment:

Actual tip:
changeset: 87276:2012e85638d9
date: Tue Nov 19 11:43:38 2013 -0800

It's a fresh clone, then:
make clean
./configure --with-pydebug
make -j4
./python -OO -m test -v test_email

== CPython 3.4.0a4+ (default:2012e85638d9, Nov 19 2013, 22:40:39) [GCC 4.7.2]
==   Linux-3.2.0-4-amd64-x86_64-with-debian-7.2 little-endian
==   /home/ci/Prog/cpython_test/cpython/build/test_python_30828
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=2, 
dont_write_bytecode=0, no_user_site=0, no_site=0, igno
re_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, 
isolated=0)
[1/1] test_email
test_b_case_ignored (test__encoded_words.TestDecode) ... ok

and so on


Ran 1516 tests in 8.313s

OK (skipped=1)
1 test OK.

--
nosy: +francismb
status: pending -> open

___
Python tracker 

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



[issue19655] Replace the ASDL parser carried with CPython

2013-11-19 Thread Benjamin Peterson

Benjamin Peterson added the comment:

We could take the opportunity to ast scripts to a Tools/ subdir. Then you could 
use whatever it is test_tools.py uses.

--

___
Python tracker 

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



[issue9566] Compilation warnings under x64 Windows

2013-11-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8d3e85dfa46f by Victor Stinner in branch 'default':
Issue #9566, #19617: Fix compilation on Windows
http://hg.python.org/cpython/rev/8d3e85dfa46f

--

___
Python tracker 

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



[issue19617] Fix usage of Py_ssize_t type in Python/compile.c

2013-11-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8d3e85dfa46f by Victor Stinner in branch 'default':
Issue #9566, #19617: Fix compilation on Windows
http://hg.python.org/cpython/rev/8d3e85dfa46f

--
nosy: +python-dev

___
Python tracker 

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



[issue19658] inspect.getsource weird case

2013-11-19 Thread Ronny Pfannschmidt

New submission from Ronny Pfannschmidt:

got:
>>> l = {}
>>> import inspect
>>> exec(compile('def fun(): pass', '', 'exec'), l, l)
>>> inspect.getsource(l['fun'])
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/private/.local/lib/python3.3/inspect.py", line 726, in getsource
lines, lnum = getsourcelines(object)
  File "/home/private/.local/lib/python3.3/inspect.py", line 715, in 
getsourcelines
lines, lnum = findsource(object)
  File "/home/private/.local/lib/python3.3/inspect.py", line 553, in findsource
if not sourcefile and file[0] + file[-1] != '<>':
IndexError: string index out of range


expected:
>>> l = {}
>>> import inspect
>>> exec(compile('def fun(): pass', '', 'exec'), l, l)
>>> inspect.getsource(l['fun'])
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/private/.local/lib/python3.3/inspect.py", line 726, in getsource
lines, lnum = getsourcelines(object)
  File "/home/private/.local/lib/python3.3/inspect.py", line 715, in 
getsourcelines
lines, lnum = findsource(object)
  File "/home/private/.local/lib/python3.3/inspect.py", line 563, in findsource
raise IOError('could not get source code')
OSError: could not get source code

this is a extraction, it appears that python in certein circumstances creates 
code objects with that setup on its own,
im still further investigating

--
messages: 203426
nosy: Ronny.Pfannschmidt
priority: normal
severity: normal
status: open
title: inspect.getsource weird case
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue19578] del list[a:b:c] doesn't handle correctly list_resize() failure

2013-11-19 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +skrah

___
Python tracker 

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



[issue19617] Fix usage of Py_ssize_t type in Python/compile.c

2013-11-19 Thread STINNER Victor

STINNER Victor added the comment:

Oops, I forgot to mention this issue number in the commit:
---
changeset:   87277:68fd86a83ece
tag: tip
user:Victor Stinner 
date:Tue Nov 19 22:23:20 2013 +0100
files:   Python/compile.c
description:
Issue #9566: compile.c uses Py_ssize_t instead of int to store sizes to fix
compiler warnings on Windows 64-bit. Use Py_SAFE_DOWNCAST() where the final
downcast is needed.

The bytecode doesn't support integer parameters larger than 32-bit yet.
---

I added some more Py_SAFE_DOWNCAST() in the final commit.

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

___
Python tracker 

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



[issue9566] Compilation warnings under x64 Windows

2013-11-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 68fd86a83ece by Victor Stinner in branch 'default':
Issue #9566: compile.c uses Py_ssize_t instead of int to store sizes to fix
http://hg.python.org/cpython/rev/68fd86a83ece

--

___
Python tracker 

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



[issue15204] Deprecate the 'U' open mode

2013-11-19 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy:  -gvanrossum, jackjansen

___
Python tracker 

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



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

2013-11-19 Thread Guido van Rossum

Guido van Rossum added the comment:

It's not fixed.  Let me paste in a session.  This uses the latest Tulip repo 
(simple_tcp_server.py was just added).  I've added "import pdb; 
pdb.set_trace()" to the top of the client() coroutine, to set a breakpoint (I'm 
a very unsophisticated pdb user :-).  I step over a yield-from, great.  Then I 
step into recv().  Note the final 'n' command.  This is at the return statement 
in recv().  At this point I expect to go back into the client() coroutine, but 
somehow the debugger loses control and the program finishes execution without 
giving control back.

bash-3.2$ ~/cpython/python.exe -m examples.simple_tcp_server
~/cpython/python.exe -m examples.simple_tcp_server
> /Users/guido/tulip/examples/simple_tcp_server.py(119)client()
-> reader, writer = yield from asyncio.streams.open_connection(
(Pdb) n
n
> /Users/guido/tulip/examples/simple_tcp_server.py(120)client()
-> '127.0.0.1', 12345, loop=loop)
(Pdb) 

> /Users/guido/tulip/examples/simple_tcp_server.py(122)client()
-> def send(msg):
(Pdb) 

> /Users/guido/tulip/examples/simple_tcp_server.py(126)client()
-> def recv():
(Pdb) 

> /Users/guido/tulip/examples/simple_tcp_server.py(132)client()
-> send("add 1 2")
(Pdb) 

> add 1 2
> /Users/guido/tulip/examples/simple_tcp_server.py(133)client()
-> msg = yield from recv()
(Pdb) s
s
--Call--
> /Users/guido/tulip/examples/simple_tcp_server.py(126)recv()
-> def recv():
(Pdb) n
n
> /Users/guido/tulip/examples/simple_tcp_server.py(127)recv()
-> msgback = (yield from reader.readline()).decode("utf-8").rstrip()
(Pdb) n
n
> /Users/guido/tulip/examples/simple_tcp_server.py(128)recv()
-> print("< " + msgback)
(Pdb) n
n
< 3.0
> /Users/guido/tulip/examples/simple_tcp_server.py(129)recv()
-> return msgback
(Pdb) n
n
> repeat 5 hello
< begin
< 1. hello
< 2. hello
< 3. hello
< 4. hello
< 5. hello
< end
client task done: Task(<_handle_client>)
bash-3.2$

--

___
Python tracker 

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



[issue18615] sndhdr.whathdr could return a namedtuple

2013-11-19 Thread Claudiu.Popa

Claudiu.Popa added the comment:

Ping, please review. I guess it is minimal enough to get into 3.4.

--

___
Python tracker 

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



[issue15204] Deprecate the 'U' open mode

2013-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could anyone please review the patch?

--

___
Python tracker 

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



[issue19655] Replace the ASDL parser carried with CPython

2013-11-19 Thread Eric Snow

Changes by Eric Snow :


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I propose to include frame size in previous frame. This will twice decrease the 
number of file reads.

--

___
Python tracker 

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



[issue14455] plistlib unable to read json and binary plist files

2013-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It's too large and complicated patch. I would like to have a chance to quick 
review it before committing. You will have time to commit.

--

___
Python tracker 

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



[issue14455] plistlib unable to read json and binary plist files

2013-11-19 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I for the most part agree with the comments and will provide an updated patch 
on thursday. Would you mind if I committed that without further review (due to 
cutting it awfully close to the deadline for beta 1)?

Some comments I want to reply to specifically:

* "Can the code be simpler, with only one pass?"

   Maybe, but not right now. 

* "This is inconsistent with _flatten()."

  I'll add a comment that explains why this is: _flatten (and this code) 
  can deal with arbitrary keys, but that is not supported by Apple's code.

  The type check in _write_object ensures that it is not possible to write
  archives that cannot be read back by Apple's Cocoa frameworks.

* "unusual indentation" (several times)

  I'll have to look at other stdlib code to find suitable indentation, this
  is indentation I've used in my code for a long time (I've also used 
  camelCase instead of pep8_style names for methods for a long time, which 
  is probably why I never noticed that I forgot to convert some method 
  name when cleaning up the naming conventions used in this module).

--

___
Python tracker 

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



[issue19654] test_tkinter sporadic failures on "x86 Tiger 3.x" buildbot

2013-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

We can add a print for a patchlevel.

--
keywords: +patch
Added file: http://bugs.python.org/file32707/test_tcl_patchlevel.patch

___
Python tracker 

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



[issue18032] set methods should specify whether they consume iterators "lazily"

2013-11-19 Thread Dustin Haffner

Dustin Haffner added the comment:

I've made an attempt at patching set_issubset() to match the Python from 
Raymond's message. I've rearranged the set_issubset function so that it checks 
for a set/frozenset, dict, or iterable in that order. In the iterable case it 
will create a temporary set and add elements to it as it consumes them from the 
iterable, returning early when possible.

This is my first patch, please let me know how I may improve it!

--
keywords: +patch
nosy: +dhaffner
Added file: http://bugs.python.org/file32706/issubset_improvement.patch

___
Python tracker 

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



[issue19657] List comprehension conditional evaluation order seems backwards

2013-11-19 Thread R. David Murray

Changes by R. David Murray :


--
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue2927] expose html.parser.unescape

2013-11-19 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the reviews!

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

___
Python tracker 

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



[issue19657] List comprehension conditional evaluation order seems backwards

2013-11-19 Thread Peter Otten

Peter Otten added the comment:

I believe you are misinterpreting what you are seeing. Empty lines read from a 
file do not produce an empty string, you get "\n" instead which is true in a 
boolean context.

Try

[line.split()[0] for line in lines if line.strip() and not line.startswith("#")]

or add an extra check for all-whitespace line

[... if line and not line.isspace() and not line.startswith("#")]

--
nosy: +peter.otten

___
Python tracker 

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



[issue2927] expose html.parser.unescape

2013-11-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7b9235852b3b by Ezio Melotti in branch 'default':
#2927: Added the unescape() function to the html module.
http://hg.python.org/cpython/rev/7b9235852b3b

--
nosy: +python-dev

___
Python tracker 

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



[issue19449] csv.DictWriter can't handle extra non-string fields

2013-11-19 Thread R. David Murray

R. David Murray added the comment:

Thanks, Tomas and Vajrasky.  I tweaked the patch slightly: Thomas's fix was 
better, since it doesn't incur the overhead of the repr unless an an error is 
detected (a micro-optimization, true, but an easy one).  I also chose to only 
check that 'fieldnames' is mentioned in the non-variable exception text; 
exactly how the rest of the message text is worded is not part of the API.

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

___
Python tracker 

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



[issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec)

2013-11-19 Thread Brett Cannon

Brett Cannon added the comment:

That's not the right fix for that test failure. If exec_module() is not meant 
to set import-related attributes like __cached__ because import itself (through 
_SpecMethods.init_module_attrs()) then test_frozen needs to be updated to not 
expect such attributes.

Honestly test_frozen should probably either be rolled into 
test_importlib.frozen or deleted instead of existing separately.

--

___
Python tracker 

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



[issue2927] expose html.parser.unescape

2013-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--

___
Python tracker 

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



[issue19657] List comprehension conditional evaluation order seems backwards

2013-11-19 Thread Garrett Cooper

New submission from Garrett Cooper:

I was a bit surprised when I ran into this issue when porting some nose tests 
from Windows to Linux:

#!/usr/bin/env python
with open('/etc/services') as fd:
lines = fd.readlines()
lines.append('')
SERVICES = [line.split()[0] for line in lines
if (line and not line.startswith('#'))]

$ python list_comprehension.py
Traceback (most recent call last):
  File "list_comprehension.py", line 5, in 
if (line and not line.startswith('#'))]
IndexError: list index out of range
$ python3.2 list_comprehension.py
Traceback (most recent call last):
  File "list_comprehension.py", line 4, in 
SERVICES = [line.split()[0] for line in lines
  File "list_comprehension.py", line 5, in 
if (line and not line.startswith('#'))]
IndexError: list index out of range
$ python -V
Python 2.7.5
$ python3.2 -V
Python 3.2.5

This is occurring of course because the .split() is being done on an empty line.

The docs don't note (at least in the list comprehension section [*]) that 
if-statements are evaluated after the value is generated for the current index 
in the loop. This seems very backwards because generating a value could in fact 
be very expensive, whereas determining whether or not a precondition has been 
met should be less expensive.

What could/should be done is one of two things: 1. evaluation order should be 
clearly spelled out in the docs, or 2. the list comprehension handling code 
should be changed to support evaluating the conditional statements before 
calculating a result. Otherwise discouraging use of [map+]filter (at least 
pylint does that) seems incredibly unwise as I can get the functionality I want 
in a single line as opposed to an unrolled loop.

[*] http://docs.python.org/2/tutorial/datastructures.html#list-comprehensions

--
messages: 203409
nosy: yaneurabeya
priority: normal
severity: normal
status: open
title: List comprehension conditional evaluation order seems backwards

___
Python tracker 

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



[issue19449] csv.DictWriter can't handle extra non-string fields

2013-11-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6e5afeada7ca by R David Murray in branch '3.3':
#19449: Handle non-string keys when generating 'fieldnames' error.
http://hg.python.org/cpython/rev/6e5afeada7ca

New changeset ee2c80eeca2a by R David Murray in branch 'default':
Merge: #19449: Handle non-string keys when generating 'fieldnames' error.
http://hg.python.org/cpython/rev/ee2c80eeca2a

New changeset e52d7b173ab5 by R David Murray in branch '2.7':
#19449: Handle non-string keys when generating 'fieldnames' error.
http://hg.python.org/cpython/rev/e52d7b173ab5

--
nosy: +python-dev

___
Python tracker 

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



[issue19636] Fix usage of MAX_PATH in posixmodule.c

2013-11-19 Thread Tim Golden

Tim Golden added the comment:

Fine with your volumepathname patch. The core of the code was contributed and I 
didn't check it too carefully as it clearly worked. (For some definition of 
"worked").

--

___
Python tracker 

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



[issue19656] Add Py3k warning for non-ascii bytes literals

2013-11-19 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

PEP 3112 had added bytes literals in 2.6. But bytes literals in 2.x are just 
synonyms to 8-bit string literals and allow non-ascii characters, while bytes 
literals in 3.x allows only ascii characters. For better forward compatibility 
with 3.x the proposed patch adds Py3k syntax warning for non-ascii bytes 
literals in 2.7.

--
components: Interpreter Core
files: py3kwarn_nonascii_bytes_literals.patch
keywords: patch
messages: 203406
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Add Py3k warning for non-ascii bytes literals
type: enhancement
versions: Python 2.7
Added file: 
http://bugs.python.org/file32705/py3kwarn_nonascii_bytes_literals.patch

___
Python tracker 

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



[issue19595] Silently skipped test in test_winsound

2013-11-19 Thread Zachary Ware

Zachary Ware added the comment:

I don't know that it's expected, but it doesn't appear to be unexpected.  
regrtest doesn't appear to know anything about expected failures or unexpected 
successes, mostly because both concepts appear at the individual test level 
while regrtest deals at the test module level.  unittest docs don't actually 
say what happens when an expected failure fails to fail.

As for this issue, it looks like the skipping of the test predates 
_have_soundcard and has_sound.  If there are no objections, I'll try the 
attached patch on default; if it causes failures, I'll try a 
'skipUnless(has_sound('SystemDefault')...', and if that work's I'll backport it 
to the other two branches.

--
assignee:  -> zach.ware
keywords: +patch
stage: test needed -> patch review
Added file: http://bugs.python.org/file32704/issue19595.diff

___
Python tracker 

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



[issue19652] test_asyncio: test_subprocess_send_signal() hangs on buildbot "AMD64 Snow Leop 3.x"

2013-11-19 Thread Guido van Rossum

Guido van Rossum added the comment:

I cannot help you unless you tell me which specific test is failing. But once 
you have a proposed fix I will review it. Thanks for advocating for the 
minority platforms!

--

___
Python tracker 

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



[issue2927] expose html.parser.unescape

2013-11-19 Thread Ezio Melotti

Ezio Melotti added the comment:

Here is the last iteration with a few minor tweaks and a couple more tests.

--
stage: patch review -> commit review
Added file: http://bugs.python.org/file32703/issue2927-3.diff

___
Python tracker 

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



[issue19550] PEP 453: Windows installer integration

2013-11-19 Thread Nick Coghlan

Nick Coghlan added the comment:

That sounds reasonable to me - thanks!

--

___
Python tracker 

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



[issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode()

2013-11-19 Thread Nick Coghlan

Nick Coghlan added the comment:

Yes, a private attribute on CodecInfo is probably better - the rest of the
patch would stay the same, it would just check for that attribute instead
of particular names.

--

___
Python tracker 

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



[issue19541] ast.dump(indent=True) prettyprinting

2013-11-19 Thread anatoly techtonik

anatoly techtonik added the comment:

Implemented more advanced interface with filtering and tests - here - 
https://bitbucket.org/techtonik/astdump/

Right now the output is not so detailed, but it may change if the need arises.

--

___
Python tracker 

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



[issue19550] PEP 453: Windows installer integration

2013-11-19 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I have now committed the changes to the installer. A demo installer can be 
found at

http://prof.beuth-hochschule.de/fileadmin/user/mvon_loewis/python-3.4.16027.msi

I'm skeptical about the lack of proper deinstallation: per convention, 
uninstallation of software ought to be "clean" on windows, i.e. return the 
system to the state it had before the installation.

Uninstallation currently isn't clean when pip installation is selected. I know 
this is what the PEP says, but I'm still unhappy, and I know that users will 
dislike it. So as a compromise, I made the installation of pip non-default, 
meaning that users have to opt into installing something that doesn't properly 
uninstall.

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

___
Python tracker 

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



[issue19655] Replace the ASDL parser carried with CPython

2013-11-19 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy: +skrah

___
Python tracker 

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



[issue12585] distutils dereferences symlinks for zip but not for bztar/gztar target

2013-11-19 Thread Erik Purins

Erik Purins added the comment:

Note that the zipfile module does not include a dereference option, but tarfile 
does.

The following links to python examples show that users are writing zipfiles 
with symlinks, so it is possible to preserve them in a zip archive.

https://gist.github.com/kgn/610907
http://doeidoei.wordpress.com/2010/11/23/compressing-files-with-python-symlink-trouble/

Maybe the right start is to add a dereference option to zipfile module?

--
nosy: +epu

___
Python tracker 

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



[issue8502] support plurals in pygettext

2013-11-19 Thread A.M. Kuchling

A.M. Kuchling added the comment:

Applied my documentation patch.

New changeset 4fe87b5df2d0 by Andrew Kuchling in branch '3.3':
#1098749: re-word gettext docs to not encourage using pygettext so much.
http://hg.python.org/cpython/rev/4fe87b5df2d0

--

___
Python tracker 

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



[issue1098749] Single-line option to pygettext.py

2013-11-19 Thread A.M. Kuchling

A.M. Kuchling added the comment:

I've applied a patch from #8502 that doesn't encourage the use of pygettext.py 
so strongly.

I raised the issue of deprecating pygettext.py on python-dev on Nov 11 2013; 
the thread starts at 
.  
Barry Warsaw and Philip Jenvey suggested deprecating it; Martin von Loewis was 
OK with continuing to maintain pygettext.  So I'll leave this issue open, in 
case anyone wants to review the patch and commit it.

--

___
Python tracker 

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



[issue1098749] Single-line option to pygettext.py

2013-11-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4fe87b5df2d0 by Andrew Kuchling in branch '3.3':
#1098749: re-word gettext docs to not encourage using pygettext so much.
http://hg.python.org/cpython/rev/4fe87b5df2d0

--
nosy: +python-dev

___
Python tracker 

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



[issue19550] PEP 453: Windows installer integration

2013-11-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e0c4a5b2b739 by Martin v. Löwis in branch 'default':
Issue #19550: Implement Windows installer changes of PEP 453 (ensurepip).
http://hg.python.org/cpython/rev/e0c4a5b2b739

--
nosy: +python-dev

___
Python tracker 

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



[issue19652] test_asyncio: test_subprocess_send_signal() hangs on buildbot "AMD64 Snow Leop 3.x"

2013-11-19 Thread STINNER Victor

STINNER Victor added the comment:

Ah, it looks like the test uses a child process. The following issue has a 
similar problem, we don't know that status of the child process:
http://bugs.python.org/issue19564

I proposed a patch in this issue for multiprocessing, to enable also 
faulthandler in the child process.

We can probably do something similar in asyncio with child process (enable 
faulthandler in unit tests with a short timeout).

--

___
Python tracker 

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



[issue19652] test_asyncio: test_subprocess_send_signal() hangs on buildbot "AMD64 Snow Leop 3.x"

2013-11-19 Thread Guido van Rossum

Guido van Rossum added the comment:

The traceback is pretty useless. So is the title of the other bug report "hangs 
for 1 hour" (which just means it hangs forever but the test runner kills it 
after one hour).

We would need to run the tests with -v so at least we can pinpoint which of the 
600 or so tests in test_asyncio is failing.

PS. Off-topic: "raise Exception(...)" is poor coding style:
  File 
"/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py", 
line 736, in main
raise Exception("Child error on {}: {}".format(test, result[1]))

--

___
Python tracker 

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



[issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode()

2013-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Blacklisting by name is slow and it prevents a user from defining a codec with 
blacklisted name.

What if just add private attribute ("_not_text"?) to unsafe codecs? If a codec 
has this attribute, than it should not be used it text encoding/decoding. 
Checking an attribute is much faster than comparing with a couple of strings.

Another possibility is an inheriting all unsafe codecs from special class.

--

___
Python tracker 

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



[issue19651] Mac OSX 10.9 segmentation fault 11 with Python 3.3.3

2013-11-19 Thread John Dobson

John Dobson added the comment:

Many thanks for your prompt assistance

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

___
Python tracker 

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



[issue19651] Mac OSX 10.9 segmentation fault 11 with Python 3.3.3

2013-11-19 Thread Ned Deily

Ned Deily added the comment:

Christian is correct. /System/Library/Frameworks is the location of the Apple 
supplied system Pythons and further Apple does not ship any version of Python 
3. So you should figure out how your /System/Library got altered and restore it 
to release state.

--

___
Python tracker 

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



[issue19651] Mac OSX 10.9 segmentation fault 11 with Python 3.3.3

2013-11-19 Thread Christian Heimes

Christian Heimes added the comment:

Your Python installation picks up the wrong readline module.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue19651] Mac OSX 10.9 segmentation fault 11 with Python 3.3.3

2013-11-19 Thread John Dobson

John Dobson added the comment:

mysite $ python -c 'import sys;print(sys.version)'
3.3.3 (v3.3.3:c3896275c0f6, Nov 16 2013, 23:39:35)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
mysite $ python -c 'import readline;print(readline.__file__)'
/System/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/readline.so
mysite $ ls -l $(python -c 'import readline;print(readline.__file__)')
-rwxrwxr-x  1 root  wheel  66400 13 May  2013 
/System/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/readline.so
mysite $ python
Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 16 2013, 23:39:35)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
 >>> 1
1
 >>> 2
Segmentation fault: 11
mysite $

I don't get to enter the final 3, the segmentation fault happens after 
the second input line.

*John Dobson,*


On 19/11/2013 14:26, Ned Deily wrote:
> Ned Deily added the comment:
>
> Works for me using the python.org 3.3.3 64-/32-bit installer.  Are you using 
> that Python 3.3.3?  Please show the results of typing the following commamds 
> and substituting for "python3.3" whatever command name you are using that 
> causes the segfault.
>
> python3.3 -c 'import sys;print(sys.version)'
> python3.3 -c 'import readline;print(readline.__file__)'
> ls -l $(python3.3 -c 'import readline;print(readline.__file__)')
> python3.3
> 1
> 2
> 3
> quit()
>
> You should see:
> $ python3.3 -c 'import sys;print(sys.version)'
> 3.3.3 (v3.3.3:c3896275c0f6, Nov 16 2013, 23:39:35)
> [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
> $ python3.3 -c 'import readline;print(readline.__file__)'
> /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/readline.so
> $ ls -l $(python3.3 -c 'import readline;print(readline.__file__)')
> -rwxrwxr-x  1 root  admin  66472 Nov 16 23:40 
> /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/readline.so
> $ python3.3
> Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 16 2013, 23:39:35)
> [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
 1
> 1
 2
> 2
 3
> 3
 quit()
> $
>
> --
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode()

2013-11-19 Thread Nick Coghlan

Nick Coghlan added the comment:

Future proofing is irrelevant at this point - this is just about what
can realistically be implemented in 3.4, not what can be implemented
with the luxury of several months to rearchitect the codec system (and
if we were going to do that, we'd just fix the type mapping
introspection problem).

There is no "codec registry" - there is only the default codec search
function, the encodings import namespace, the normalisation algorithm
and the alias dictionary.

It sounds to me like you still believe it is possible to stick the
genie back in the bottle and limit the codec system to what *you*
think is a good idea. It doesn't work like that - the codecs module
already provides a fully general data transformation system backed by
lazy imports, and that isn't going to change due to backwards
compatibility constraints. The only option we have is whether or not
we file off the rough edges and try to ease the transition for users
migrating from Python 2, where all of the standard library codecs fit
within the limits of the text model, so the general purpose codec
infrastructure almost never came into play. Getting rid of it is no
longer a realistic option - documenting it, improving the failure
modes and potentially adding some features (in Python 3.5+) are the
only improvements that are genuinely feasible.

--

___
Python tracker 

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



[issue19655] Replace the ASDL parser carried with CPython

2013-11-19 Thread Mark Lawrence

Mark Lawrence added the comment:

Are we at beta for 3.5 already? :)

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue19655] Replace the ASDL parser carried with CPython

2013-11-19 Thread Eli Bendersky

Eli Bendersky added the comment:

Larry, ease your worries: note that I only tagged this on version 3.5!

That said, this parser runs during the build and produces a .h file and .c file 
- these partake in the build; I verified that the generated code is *identical* 
to before, so there's not much to worry about. Still, I don't see a reason to 
land this before the beta branches. I'll do it onto the default branch after 
this weekend (assuming the reviews come through).

--

___
Python tracker 

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



[issue19654] test_tkinter sporadic failures on "x86 Tiger 3.x" buildbot

2013-11-19 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +db3l

___
Python tracker 

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



[issue19654] test_tkinter sporadic failures on "x86 Tiger 3.x" buildbot

2013-11-19 Thread Ned Deily

Ned Deily added the comment:

There's something odd going on with that buildbot.  The failures are from 
Serhly's new tests.  For 10.4 Tiger, the buildbot should be running Tk 8.4.  It 
does seem to have a third-party Tcl and Tk installed in /Library/Frameworks, 
which is good, but the logs don't show exactly what patch level it is.  David, 
can you identify what patch levels of Tcl and Tk are installed?  more 
/Library/Frameworks/Tcl.framework/tclConfig.sh 
/Library/Frameworks/Tk.framework/tkConfig.sh should work.

--
nosy: +ned.deily

___
Python tracker 

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



[issue19655] Replace the ASDL parser carried with CPython

2013-11-19 Thread Larry Hastings

Larry Hastings added the comment:

A week before beta?  How confident are you in this new parser?

--
nosy: +larry

___
Python tracker 

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



[issue19655] Replace the ASDL parser carried with CPython

2013-11-19 Thread Eli Bendersky

Eli Bendersky added the comment:

FWIW, asdl_c.py could use some "modernization", but I'll defer this to a later 
cleanup in order to do things gradually.

The same can be said for the Makefile rules - they can be simpler and more 
efficient (no need to invoke asdl_c / parse the ASDL twice, for example).

Incidentally, where would be a good place to put the ASDL tests? Can/should we 
reach into the Parser/ directory when running the Python regression tests (will 
this even work in an installed Python)? Or should I just plop asdl_test.py 
alongside asdl.py and mention that it should be run when asdl.py changes?

--

___
Python tracker 

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



[issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode()

2013-11-19 Thread STINNER Victor

STINNER Victor added the comment:

+/* A set would be faster, but when to build it, where to store it? */
+if (_PyUnicode_CompareWithId(codec_name, &PyId_base64) == 0 ||
+_PyUnicode_CompareWithId(codec_name, &PyId_uu) == 0 ||
+_PyUnicode_CompareWithId(codec_name, &PyId_quopri) == 0 ||
+_PyUnicode_CompareWithId(codec_name, &PyId_hex) == 0 ||
+_PyUnicode_CompareWithId(codec_name, &PyId_bz2) == 0 ||
+_PyUnicode_CompareWithId(codec_name, &PyId_zlib) == 0 ||
+PyUnicode_CompareWithASCIIString(codec_name, "rot-13") == 0
+   ) {
+is_text_codec = 0;
+}

This is slow and not future proof. It would be faster and simpler to have two 
registries: a register only for bytes.decode()/str.encode() and another for 
"custom codecs" for codecs.encode/decode (or 
(bytes|str).transform()/untransform()).

So "abc".encode("rot13") would simply fail with a LookupError.

--

___
Python tracker 

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



[issue19651] Mac OSX 10.9 segmentation fault 11 with Python 3.3.3

2013-11-19 Thread Ned Deily

Ned Deily added the comment:

Works for me using the python.org 3.3.3 64-/32-bit installer.  Are you using 
that Python 3.3.3?  Please show the results of typing the following commamds 
and substituting for "python3.3" whatever command name you are using that 
causes the segfault.

python3.3 -c 'import sys;print(sys.version)'
python3.3 -c 'import readline;print(readline.__file__)'
ls -l $(python3.3 -c 'import readline;print(readline.__file__)')
python3.3
1
2
3
quit()

You should see:
$ python3.3 -c 'import sys;print(sys.version)'
3.3.3 (v3.3.3:c3896275c0f6, Nov 16 2013, 23:39:35)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
$ python3.3 -c 'import readline;print(readline.__file__)'
/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/readline.so
$ ls -l $(python3.3 -c 'import readline;print(readline.__file__)')
-rwxrwxr-x  1 root  admin  66472 Nov 16 23:40 
/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/readline.so
$ python3.3
Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 16 2013, 23:39:35)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 1
1
>>> 2
2
>>> 3
3
>>> quit()
$

--

___
Python tracker 

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



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

2013-11-19 Thread Nick Coghlan

Nick Coghlan added the comment:

Victor is still -1, so to Python 3.5 it goes.

--
versions: +Python 3.5 -Python 3.4

___
Python tracker 

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



[issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode()

2013-11-19 Thread Nick Coghlan

Nick Coghlan added the comment:

Attached is a proof of concept for the blacklist approach (for 3.4, but without 
the fixes needed for the transform codec handling tests in test_codecs)

This does have the potential to add a reasonable amount of additional overhead 
to encoding and decoding for shortstrings. Since it isn't obvious where to 
store a set for faster checking against the blacklist, it may be worth 
benchmarking this naive approach before doing something more complicated.

Regardless, I don't plan to take this further myself any time soon - I just 
wanted to give it a firm nudge in the direction of the blacklist approach by 
providing a proof of concept.

--
keywords: +patch
Added file: 
http://bugs.python.org/file32702/issue19619_blacklist_proof_of_concept.diff

___
Python tracker 

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



  1   2   >