[issue19504] Change "customise" to "customize".

2013-11-15 Thread Georg Brandl

Georg Brandl added the comment:

Can be closed?

--
nosy: +georg.brandl, vinay.sajip

___
Python tracker 

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



[issue19622] Default buffering for input and output pipes in subprocess module

2013-11-15 Thread Martin Panter

New submission from Martin Panter:

Currently the documentation for the “bufsize” parameter in the “subprocess” 
module says:

"""
Changed in version 3.2.4,: 3.3.1

bufsize now defaults to -1 to enable buffering by default to match the behavior 
that most code expects. In 3.2.0 through 3.2.3 and 3.3.0 it incorrectly 
defaulted to 0 which was unbuffered and allowed short reads. This was 
unintentional and did not match the behavior of Python 2 as most code expected.
"""

First of all the formatting is a bit screwy. There’s a colon in the wrong 
place, so it’s not obvious that the “changed in version” heading applies to the 
following paragraph.

The main issue is that I got the impression the default of 0 was a regression, 
and that Python 3.1 and Python 2 defaulted to -1. However, as far as I can tell 
the default was actually 0 in 3.1 and 2.

The change to -1 was for Issue 17488, which seems to be focussed on the 
behaviour of reading from a subprocess’s output pipe. In Python 2, file.read() 
blocks to read as much as possible, even when buffering is disabled. In Python 
3, you end up with either a FileIO or a BufferedIOBase object, and they have 
different read() behaviours.

Perhaps the documentation should say something like

"""
The “bufsize” argument now defaults to -1 to enable buffering. In 3.2.3, 3.3.0, 
and earlier, it defaulted to 0 which was unbuffered and allowed short reads.
"""

I would take out the “most code expects buffering” bits. Maybe most code 
expects the greedy read behaviour from output pipes, but I would say most code 
writing to an input pipe expects unbuffered behaviour. The big issue with 
buffering for me is that BufferedWriter.close() may raise a broken pipe 
condition.

If you want to mention Python 2, maybe say that Python 2 did not use buffering 
by default, but that file.read() always had blocking read behaviour, which can 
be emulated by using buffered reading in Python 3.

--
assignee: docs@python
components: Documentation
messages: 203010
nosy: docs@python, vadmium
priority: normal
severity: normal
status: open
title: Default buffering for input and output pipes in subprocess module
type: behavior
versions: Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue19621] Reimporting this and str.translate()

2013-11-15 Thread Eric Snow

Eric Snow added the comment:

The this module was actually the subject of a similar proposal recently: 
issue19499.  The same arguments there for leaving the module alone apply here.  
(Amon other things, it's a neat little artifact: 
http://www.wefearchange.org/2010/06/import-this-and-zen-of-python.html.)

--
nosy: +eric.snow
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> "import this" is cached in sys.modules

___
Python tracker 

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



[issue19621] Reimporting this and str.translate()

2013-11-15 Thread Chris Angelico

New submission from Chris Angelico:

In an interactive session, typing 'import this' a second time doesn't produce 
output (as the module's already imported). Peeking into the module shows a 
string and what looks like a translation dictionary, but doing the obvious 
thing:

>>> this.s.translate(this.d)

doesn't work, because str.translate() expects a dictionary that maps Unicode 
ordinals, not one-character strings.

Attached is a patch which makes Lib/this.py use s.translate() instead of the 
wordier comprehension. Dare I ask, is there any possible code that this change 
could break? :)

--
components: Library (Lib)
files: this-translate.patch
keywords: patch
messages: 203008
nosy: Rosuav
priority: normal
severity: normal
status: open
title: Reimporting this and str.translate()
type: enhancement
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file32645/this-translate.patch

___
Python tracker 

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



[issue19530] cross thread shutdown of UDP socket exhibits unexpected behavior

2013-11-15 Thread mpb

mpb added the comment:

> It's just a patch to avoid returning garbage in the address.

Right, which is why I pursued the point.  recvfrom should not return ambiguous 
data (the ambiguity being between shutdown and receiving a zero 
length message).  It is now possible to distinguish the two by looking at the 
src_addr.  (Arguably this could have been done before, but garbage in src_addr 
is not a reliable indicator, IMO.)

> But AFAICT, recvfrom() returning 0 is enough to know that the socket
> was shut down.

My example code clearly shows a zero length UPD message being sent and received 
prior to shutdown.

I admit, sending a zero length UDP message is probably pretty rare, but it is 
allowed and it does work.  And it makes more sense than returning garbage in 
src_addr.

> But two things to keep in mind:
> - it'll only work on "connected" datagram sockets

What will only work on connected datagram sockets?  Shutdown *already* works 
(ie, wakes up blocked threads) on non-connected datagram sockets on Linux.  
Shutdown does wake them up (it just happens to return an error *after* waking 
them up).  So... the only reason to connect the UDP socket (prior to calling 
shutdown) is to avoid the error (or, in Python, to avoid the raised Exception).

> - even then, I'm not sure it's supported by POSIX: I can't think of
> any spec specifying the behavior in case of cross-thread shutdown (and
> close won't unblock for example).  Also, I think HP-UX doesn't wake up
> the waiting thread in that situation.

Do you consider the POSIX specifications to be robust when it comes to 
threading?  It would not surprise me if there are other threading related grey 
areas in POSIX.

> So I'd still advise you to either use a timeout or a select().

My application only needs to run on Linux.  If I cared about portability, I 
might well do something else.

--

___
Python tracker 

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



[issue19620] tokenize documentation contains typos (argment instead of argument)

2013-11-15 Thread Christopher Welborn

Christopher Welborn added the comment:

Oops, forgot to mention the documentation I am speaking of is the actual doc 
strings. The actual test is to run:
import tokenize
help(tokenize)

or just:

`python -c "import tokenize;help(tokenize)" | grep "argment"`

--

___
Python tracker 

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



[issue19620] tokenize documentation contains typos (argment instead of argument)

2013-11-15 Thread Christopher Welborn

New submission from Christopher Welborn:

Documentation for tokenize contains typos, functions detect_encoding() and 
tokenize() at least. The lines are:

The tokenize() generator requires one argment, readline,...

It requires one argment, readline,

...where argment is supposed to be 'argument' i'm sure. Things like that bug me 
in my own code/docs, and since it's been there since 2.7 (Also in 3.3 and 3.4), 
I figured no one had noticed.

--
assignee: docs@python
components: Documentation
messages: 203005
nosy: cjwelborn, docs@python
priority: normal
severity: normal
status: open
title: tokenize documentation contains typos (argment instead of argument)
versions: Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

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



[issue19584] IDLE fails - Python V2.7.6 - 64b on Win7 64b

2013-11-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Report like this should initially go to python-list as the problem is probably 
idiosyncratic to your machine. I have a similar setup, just installed 2.7.6, 
and Idle seems to work fine.

Open a Windows console (AllPrograms/Accessories/CommandPrompt), cd to your 2.7 
director, and try to start idle as below

C:\Users\Terry>cd /programs/python27
C:\Programs\Python27>python -m idlelib.idle

You should see an error message. Perhaps about tkinter. If so, try 
re-installing and make sure that tcl/tk are checked to be installed.

--
nosy: +terry.reedy
type: crash -> behavior

___
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-15 Thread Christian Heimes

Christian Heimes added the comment:

Here are benchmarks on two Linux machine. It looks like SipHash24 takes 
advantage of newer CPUs. I'm a bit puzzled about the results. Or maybe my super 
simple and naive analyzer doesn't give sensible results...

https://bitbucket.org/tiran/pep-456-benchmarks/

--

___
Python tracker 

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



[issue19562] Added description for assert statement

2013-11-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Looking further, the current code has a message object, the month that fails 
the test and your patch removes that in adding the redundant message. I also 
see that your change would make the first assert match the next 2. But I would 
rather change the next two.

Sequences like
_DI4Y   = _days_before_year(5) 
# A 4-year cycle has an extra leap day over what we'd get from pasting
# together 4 single years.
assert _DI4Y == 4 * 365 + 1

are bizarre. The constant should be directly set to 4*365 + 1 and then 
_days_before_year(5) == _DI4Y tested in test_datetime.

--

___
Python tracker 

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



[issue17354] TypeError when running setup.py upload --show-response

2013-11-15 Thread Jason R. Coombs

Jason R. Coombs added the comment:

Berker reports in issue12853, msg202927 that the issue is fixed for Python 3.3 
and 3.4 by the patch for issue6286 applied as part of issue19544.

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



[issue12853] global name 'r' is not defined in upload.py

2013-11-15 Thread Jason R. Coombs

Changes by Jason R. Coombs :


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

___
Python tracker 

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



[issue12853] global name 'r' is not defined in upload.py

2013-11-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset aa3a7d5e0478 by Jason R. Coombs in branch '2.7':
Issue #12853: Correct NameError in distutils upload command.
http://hg.python.org/cpython/rev/aa3a7d5e0478

--
nosy: +python-dev

___
Python tracker 

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



[issue12853] global name 'r' is not defined in upload.py

2013-11-15 Thread Jason R. Coombs

Changes by Jason R. Coombs :


--
assignee: tarek -> jason.coombs

___
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-15 Thread Guido van Rossum

Guido van Rossum added the comment:

I think this is not ready for inclusion.  It works wonderfully when stepping 
over a yield[from], but I can't seem to get it to step nicely *out* of a 
generator.  (Details on request -- basically I put a "pdb.set_trace()" call in 
Tulip's fetch3.py example and step around.)

--

___
Python tracker 

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



[issue19562] Added description for assert statement

2013-11-15 Thread Terry J. Reedy

Changes by Terry J. Reedy :


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

___
Python tracker 

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



[issue19562] Added description for assert statement

2013-11-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Since failed asserts print the failed assert, repeating the assertion in a 
message is useless.
>>> assert 1 <= i
Traceback (most recent call last):
  File "", line 1, in 
assert 1 <= i
AssertionError

It is already obvious that i must be >= 1. So I would reject the patch.

> And isn't this too much defensive programming?

Whether stdlib python code should have asserts is a more interesting question. 
I will ask on pydev.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue19544] Port distutils as found in Python 2.7 to Python 3.x.

2013-11-15 Thread Jason R. Coombs

Jason R. Coombs added the comment:

I believe all identified issues have been ported/fixed.

--
assignee: eric.araujo -> jason.coombs
resolution:  -> fixed
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



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

2013-11-15 Thread STINNER Victor

New submission from STINNER Victor:

I propose to add new input_type and output_type to CodecInfo. These attributes 
would only be defined for base64, hex, ... codecs which are not the classic 
encode: str=>bytes, decode: bytes=>str codecs.

I also propose to modify str.encode() and bytes.encode() to only accept codecs 
using the right types. If the type doesn't match, the codec raises a 
LookupError.

This issue should avoid the denial of service attack when a compression codec 
is used, see:
https://mail.python.org/pipermail/python-dev/2013-November/130188.html

--
messages: 202996
nosy: haypo, lemburg, ncoghlan, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Blacklist base64, hex, ... codecs from bytes.decode() and str.encode()
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



[issue19557] ast - docs for every node type are missing

2013-11-15 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components:  -Devguide

___
Python tracker 

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



[issue19554] Enable all freebsd* host platforms

2013-11-15 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions:  -Python 2.6, Python 3.1, Python 3.2, Python 3.5

___
Python tracker 

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



[issue19548] 'codecs' module docs improvements

2013-11-15 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions:  -Python 3.2

___
Python tracker 

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



[issue19539] The 'raw_unicode_escape' codec buggy + not appropriate for Python 3.x

2013-11-15 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +terry.reedy

___
Python tracker 

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



[issue19618] test_sysconfig_module fails on Ubuntu 12.04

2013-11-15 Thread Berker Peksag

New submission from Berker Peksag:

This is probably related to issue 17679.

==
FAIL: test_sysconfig_module (distutils.tests.test_sysconfig.SysconfigTestCase)
--
Traceback (most recent call last):
  File "/home/berker/projects/cpython/Lib/distutils/tests/test_sysconfig.py", 
line 132, in test_sysconfig_module
self.assertEqual(global_sysconfig.get_config_var('CFLAGS'), 
sysconfig.get_config_var('CFLAGS'))
AssertionError: '-Wno-unused-result -g -O0 -Wall -Wstrict-prototypes' != 
'-Wno-unused-result -Werror=declaration-after-statement -g -O0[22 chars]ypes'
- -Wno-unused-result -g -O0 -Wall -Wstrict-prototypes
+ -Wno-unused-result -Werror=declaration-after-statement -g -O0 -Wall 
-Wstrict-prototypes

--
components: Distutils, Tests
messages: 202994
nosy: berker.peksag
priority: normal
severity: normal
status: open
title: test_sysconfig_module fails on Ubuntu 12.04
type: behavior
versions: Python 3.3, Python 3.4

___
Python tracker 

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



[issue19535] Test failures with -OO

2013-11-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I presume a test could detect docstring stripping with

def f(): 'docstring'
if f.__doc__ is None: 

This would cover the test_functools case, but I don't know about the others.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue7408] test_distutils fails on Mac OS X 10.5

2013-11-15 Thread Jason R. Coombs

Jason R. Coombs added the comment:

I'm declaring this fixed and watching the buildbots for confirmation.

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



[issue7408] test_distutils fails on Mac OS X 10.5

2013-11-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f4b364617abc by Jason R. Coombs in branch 'default':
Issue #7408: Forward port limited test from Python 2.7, fixing failing buildbot 
tests on BSD-based platforms.
http://hg.python.org/cpython/rev/f4b364617abc

--
nosy: +python-dev

___
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-15 Thread Guido van Rossum

Guido van Rossum added the comment:

I'd love it if someone could review this.  This would be a great improvement to 
debugging coroutines in asyncio.

--
stage:  -> patch review

___
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-15 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy: +larry
priority: normal -> release blocker

___
Python tracker 

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



[issue7408] test_distutils fails on Mac OS X 10.5

2013-11-15 Thread Jason R. Coombs

Jason R. Coombs added the comment:

In issue #19544, #6516 was ported to Python 3.4. After doing so, this issue 
re-emerges.

--
assignee: tarek -> jason.coombs
nosy: +jason.coombs
resolution: accepted -> 
status: closed -> open
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



[issue19544] Port distutils as found in Python 2.7 to Python 3.x.

2013-11-15 Thread Jason R. Coombs

Jason R. Coombs added the comment:

Thanks Victor.

Yes, it appears that there's yet another unported issue #7408, a follow-up to 
#6516.

--

___
Python tracker 

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



[issue19599] Failure of test_async_timeout() of test_multiprocessing_spawn: TimeoutError not raised

2013-11-15 Thread STINNER Victor

STINNER Victor added the comment:

Seen on another buildbot.

http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%203.x/builds/6809/steps/test/logs/stdio

==
FAIL: test_async_timeout (test.test_multiprocessing_fork.WithProcessesTestPool)
--
Traceback (most recent call last):
  File 
"/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/_test_multiprocessing.py",
 line 1726, in test_async_timeout
self.assertRaises(multiprocessing.TimeoutError, get, timeout=TIMEOUT2)
AssertionError: TimeoutError not raised by 


--

___
Python tracker 

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



[issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close

2013-11-15 Thread STINNER Victor

STINNER Victor added the comment:

> I think it's simply due to file descriptor inheritance

File handles are now non-inheritable by default in Python 3.4 (PEP 446). Does 
it change anything?

--
nosy: +haypo

___
Python tracker 

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



[issue19544] Port distutils as found in Python 2.7 to Python 3.x.

2013-11-15 Thread STINNER Victor

STINNER Victor added the comment:

> At changeset 015463176d2e2530e4f07cfbe97e41abac540a57, 
> test_make_distribution_owner_group() was failing on some buildbots.

The problem is that tempfile.mkdtemp() creates a directory with the
group 0. Files created in this directory also have the group 0.

The test uses os.getpid() to get the group identifier.

The test should use os.stat(self.tmp_dir).st_gid (and st_uid) instead
of os.getgid(), or the tmp_dir directory. Or the group of the
temporary directory should be changed to os.getgid().

I don't know if distutils should create tarball with the group 0 or
the group of the current user.

--

___
Python tracker 

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



[issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close

2013-11-15 Thread Charles-François Natali

Charles-François Natali added the comment:

> R. David Murray added the comment:
>
> neologix noted that *when redirection is used* the way that *all* windows 
> file handles are inherited changes.

That's true (but that was from Richard actually).

--

___
Python tracker 

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



[issue19530] cross thread shutdown of UDP socket exhibits unexpected behavior

2013-11-15 Thread Charles-François Natali

Charles-François Natali added the comment:

> mpb added the comment:
>
> Someone wrote a kernel patch based on my bug report.
>
> http://www.spinics.net/lists/netdev/msg257653.html

It's just a patch to avoid returning garbage in the address.
But AFAICT, recvfrom() returning 0 is enough to know that the socket
was shut down.

But two things to keep in mind:
- it'll only work on "connected" datagram sockets
- even then, I'm not sure it's supported by POSIX: I can't think of
any spec specifying the behavior in case of cross-thread shutdown (and
close won't unblock for example). Also, I think HP-UX doesn't wake up
the waiting thread in that situation.

So I'd still advise you to either use a timeout or a select().

Cheers,

--

___
Python tracker 

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



[issue6466] duplicate get_version() code between cygwinccompiler and emxccompiler

2013-11-15 Thread Jason R. Coombs

Jason R. Coombs added the comment:

emxccompiler is no longer present in Python 3.4, so this ticket has become 
invalid.

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



[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2013-11-15 Thread Jason R. Coombs

Changes by Jason R. Coombs :


--
status: open -> closed

___
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-15 Thread Benjamin Peterson

Benjamin Peterson added the comment:

You could use the Py_SAFE_DOWNCAST macro everywhere.

--

___
Python tracker 

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



[issue19544] Port distutils as found in Python 2.7 to Python 3.x.

2013-11-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c35311fcc967 by Andrew Kuchling in branch 'default':
Issue #19544 and Issue #1180: Restore global option to ignore  
~/.pydistutils.cfg in Distutils, accidentally removed in backout of distutils2 
changes.
http://hg.python.org/cpython/rev/c35311fcc967

--

___
Python tracker 

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



[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2013-11-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c35311fcc967 by Andrew Kuchling in branch 'default':
Issue #19544 and Issue #1180: Restore global option to ignore  
~/.pydistutils.cfg in Distutils, accidentally removed in backout of distutils2 
changes.
http://hg.python.org/cpython/rev/c35311fcc967

--
nosy: +python-dev

___
Python tracker 

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



[issue19544] Port distutils as found in Python 2.7 to Python 3.x.

2013-11-15 Thread STINNER Victor

STINNER Victor added the comment:

At changeset 015463176d2e2530e4f07cfbe97e41abac540a57, 
test_make_distribution_owner_group() was failing on some buildbots. 
test_distutils works fine on my Linux box, I ran the test as my haypo user and 
as root.

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%203.x/builds/5780/steps/test/logs/stdio

==
FAIL: test_make_distribution_owner_group 
(distutils.tests.test_sdist.SDistTestCase)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/distutils/tests/test_sdist.py",
 line 477, in test_make_distribution_owner_group
self.assertEquals(member.gid, os.getgid())
AssertionError: 0 != 1002

http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.x/builds/470/steps/test/logs/stdio

==
FAIL: test_make_distribution_owner_group 
(distutils.tests.test_sdist.SDistTestCase)
--
Traceback (most recent call last):
  File 
"/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/distutils/tests/test_sdist.py",
 line 477, in test_make_distribution_owner_group
self.assertEquals(member.gid, os.getgid())
AssertionError: 0 != 20

--
nosy: +haypo

___
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-15 Thread STINNER Victor

STINNER Victor added the comment:

Ping myself.

--

___
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-15 Thread STINNER Victor

STINNER Victor added the comment:

> The "I" parser format does not check for integer overflow.

The "O" format can be used with _PyLong_AsInt() instead.

--

___
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-15 Thread STINNER Victor

New submission from STINNER Victor:

On Windows 64-bit, Visual Studio generates a lot of warnings because Py_ssize_t 
values are downcasted to int.

Attached patch fixes all warnings and move the final downcast into 
compiler_addop_i(). This function uses an assertion to check that integer 
parameter fits into an C int type. I don't know if it's safe to "return 0" on 
overflow error.

The patch fixes also some indentation issues seen was I wrote the patch.

Nobody complained before, I don't know if the bugs can be seen in practice, so 
I prefer to not touch Python 2.7 nor 3.2.

--
files: compile_ssize_t.patch
keywords: patch
messages: 202976
nosy: benjamin.peterson, haypo, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Fix usage of Py_ssize_t type in Python/compile.c
versions: Python 3.4
Added file: http://bugs.python.org/file32644/compile_ssize_t.patch

___
Python tracker 

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



[issue17849] Missing size argument in readline() method for httplib's class LineAndFileWrapper

2013-11-15 Thread Rob

Changes by Rob :


--
nosy: +raymondr

___
Python tracker 

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



[issue6516] reset owner/group to root for distutils tarballs

2013-11-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 015463176d2e by Victor Stinner in branch 'default':
Issue #19544, #6516: no need to catch AttributeError on import pwd/grp
http://hg.python.org/cpython/rev/015463176d2e

--

___
Python tracker 

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



[issue19544] Port distutils as found in Python 2.7 to Python 3.x.

2013-11-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 015463176d2e by Victor Stinner in branch 'default':
Issue #19544, #6516: no need to catch AttributeError on import pwd/grp
http://hg.python.org/cpython/rev/015463176d2e

--

___
Python tracker 

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



[issue6516] reset owner/group to root for distutils tarballs

2013-11-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b08868fd5994 by Christian Heimes in branch 'default':
Issue #19544 and Issue #6516: quick workaround for failing builds
http://hg.python.org/cpython/rev/b08868fd5994

--

___
Python tracker 

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



[issue19616] Fix test.test_importlib.util.test_both() to set __module__

2013-11-15 Thread Brett Cannon

New submission from Brett Cannon:

Should help with traceback/test failure reporting.

--
assignee: brett.cannon
messages: 202971
nosy: brett.cannon
priority: low
severity: normal
stage: needs patch
status: open
title: Fix test.test_importlib.util.test_both() to set __module__
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



[issue19544] Port distutils as found in Python 2.7 to Python 3.x.

2013-11-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b08868fd5994 by Christian Heimes in branch 'default':
Issue #19544 and Issue #6516: quick workaround for failing builds
http://hg.python.org/cpython/rev/b08868fd5994

--

___
Python tracker 

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



[issue19504] Change "customise" to "customize".

2013-11-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e9d9bebb979f by Vinay Sajip in branch '2.7':
Issue #19504: Used American spelling for 'customize'.
http://hg.python.org/cpython/rev/e9d9bebb979f

New changeset 1c714c35c02a by Vinay Sajip in branch '3.3':
Issue #19504: Used American spelling for 'customize'.
http://hg.python.org/cpython/rev/1c714c35c02a

New changeset 08c7bc4266e6 by Vinay Sajip in branch 'default':
Issue #19504: Used American spelling for 'customize'.
http://hg.python.org/cpython/rev/08c7bc4266e6

--
nosy: +python-dev

___
Python tracker 

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



[issue19523] logging.FileHandler - using of delay argument case handle leaks

2013-11-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bbb227b96c45 by Vinay Sajip in branch '2.7':
Issue #19523: Closed FileHandler leak which occurred when delay was set.
http://hg.python.org/cpython/rev/bbb227b96c45

New changeset 058810fe1b98 by Vinay Sajip in branch '3.3':
Issue #19523: Closed FileHandler leak which occurred when delay was set.
http://hg.python.org/cpython/rev/058810fe1b98

New changeset a3640822c3e6 by Vinay Sajip in branch 'default':
Closes #19523: Merged fix from 3.3.
http://hg.python.org/cpython/rev/a3640822c3e6

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



[issue19596] Silently skipped tests in test_importlib

2013-11-15 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Agreed with both Brett and Serhiy.

--
nosy: +pitrou

___
Python tracker 

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



[issue19615] "ImportError: dynamic module does not define init function" when deleting and recreating .so files from different machines over NFS

2013-11-15 Thread Edward Catmur

Edward Catmur added the comment:

Report dlerror() if dlsym() fails.

The error output is now something like:

ImportError: /<...>/foo.cpython-34dm.so: undefined symbol: PyInit_bar

--
keywords: +patch
Added file: http://bugs.python.org/file32643/dynload_report_dlerror.patch

___
Python tracker 

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



[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2013-11-15 Thread Jason R. Coombs

Changes by Jason R. Coombs :


--
assignee: akuchling -> jason.coombs

___
Python tracker 

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



[issue6516] reset owner/group to root for distutils tarballs

2013-11-15 Thread Jason R. Coombs

Changes by Jason R. Coombs :


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



[issue19544] Port distutils as found in Python 2.7 to Python 3.x.

2013-11-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b9c9c4b2effe by Andrew Kuchling in branch 'default':
Issue #19544 and Issue #6516: Restore support for --user and --group parameters 
to sdist command as found in Python 2.7 and originally slated for Python 3.2 
but accidentally rolled back as part of the distutils2 rollback. Closes Issue 
#6516.
http://hg.python.org/cpython/rev/b9c9c4b2effe

--

___
Python tracker 

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



[issue6516] reset owner/group to root for distutils tarballs

2013-11-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b9c9c4b2effe by Andrew Kuchling in branch 'default':
Issue #19544 and Issue #6516: Restore support for --user and --group parameters 
to sdist command as found in Python 2.7 and originally slated for Python 3.2 
but accidentally rolled back as part of the distutils2 rollback. Closes Issue 
#6516.
http://hg.python.org/cpython/rev/b9c9c4b2effe

--
nosy: +python-dev

___
Python tracker 

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



[issue19590] Use specific asserts in test_email

2013-11-15 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

assertTrue(dtrt)

--

___
Python tracker 

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



[issue19615] "ImportError: dynamic module does not define init function" when deleting and recreating .so files from different machines over NFS

2013-11-15 Thread Edward Catmur

New submission from Edward Catmur:

foo.c:

#include 
static PyMethodDef mth[] = { {NULL, NULL, 0, NULL} };
static struct PyModuleDef mod = { PyModuleDef_HEAD_INIT, "foo", NULL, -1, mth };
PyMODINIT_FUNC PyInit_foo(void) { return PyModule_Create(&mod); }

bar.c:

#include 
static PyMethodDef mth[] = { {NULL, NULL, 0, NULL} };
static struct PyModuleDef mod = { PyModuleDef_HEAD_INIT, "bar", NULL, -1, mth };
PyMODINIT_FUNC PyInit_bar(void) { return PyModule_Create(&mod); }

setup.py:

from distutils.core import setup, Extension
setup(name='PackageName',
  ext_modules=[Extension('foo', sources=['foo.c']),
   Extension('bar', sources=['bar.c'])])

In an NFS mount:

host1$ python setup.py build
host1$ rm *.so; cp build/lib.*/foo*.so .; cp build/lib.*/bar*.so .
host1$ python -c 'import foo; input(); import bar'

While python is waiting for input, on another host in the same directory:

host2$ rm *.so; cp build/lib.*/bar*.so .; cp build/lib.*/foo*.so .

Back on host1:

ImportError: dynamic module does not define init function (PyInit_bar)

Attaching a debugger to Python after the ImportError and calling dlerror() 
shows the problem:

(gdb) print (char *)dlerror()
$1 = 0xe495210 "/<...>/foo.cpython-34dm.so: undefined symbol: PyInit_bar"

This is because dynload_shlib.c[1] caches dlopen handles by (device and) inode 
number; but NFS will reuse inode numbers even if a process on a client host has 
the file open; running lsof on Python, before:

python  16475 ecatmur  memREG0,3614000 55321147 
/<...>/foo.cpython-34dm.so (nfs:/export/user)

and after:

python  16475 ecatmur  memREG0,36  55321147 
/<...>/foo.cpython-34dm.so (nfs:/export/user) (path inode=55321161)

Indeed, bar.cpython-34dm.so now has the inode number that Python originally 
opened foo.cpython-34dm.so under:

host1$ stat -c '%n %i' *.so
bar.cpython-34dm.so 55321147
foo.cpython-34dm.so 55321161

Obviously, this can only happen on a filesystem like NFS where inode numbers 
can be reused even while a process still has a file open (or mapped).

We encountered this problem in a fairly pathological situation; multiple 
processes running in two virtualenvs with different copies of a zipped egg (of 
the same version!) were contending over the ~/.python-eggs directory created by 
pkg_resources[2] to cache .so files extracted from eggs.  We are working around 
the situation by setting PYTHON_EGG_CACHE to a virtualenv-specific location, 
which also fixes the contention issue.  (We should probably work out why the 
eggs are different, but fixing that is bound into our build/deployment system.)

I'm not sure exactly how to solve or even detect this issue; perhaps looking at 
the mtime of the .so might work?

If it is decided not to fix the issue it would be useful if 
_PyImport_GetDynLoadFunc could report the actual dlerror(); this would have 
saved us quite some time debugging it.  I'll work on a patch to do that.

  1. http://hg.python.org/cpython/file/tip/Python/dynload_shlib.c
  2. 
https://bitbucket.org/pypa/setuptools/src/ac127a3f46be3037c79f2c4076c7ab221cde21b2/pkg_resources.py?at=default#cl-1040

--
components: Interpreter Core
messages: 202963
nosy: ecatmur
priority: normal
severity: normal
status: open
title: "ImportError: dynamic module does not define init function" when 
deleting and recreating .so files from different machines over NFS
type: behavior
versions: Python 3.5

___
Python tracker 

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



[issue19614] support.temp_cwd should use support.rmtree

2013-11-15 Thread R. David Murray

New submission from R. David Murray:

Based on this error on one of the buildbots, it is clear that support.temp_cwd 
should be calling support.rmtree, and not shutil.rmtree, during cleanup:

[...]
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\runpy.py", line 160, 
in _run_module_as_main
"__main__", fname, loader, pkg_name)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\runpy.py", line 73, in 
_run_code
exec(code, run_globals)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\regrtest.py", 
line 1585, in 
main_in_temp_cwd()
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\regrtest.py", 
line 1560, in main_in_temp_cwd
main()
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\contextlib.py", line 
77, in __exit__
self.gen.throw(type, value, traceback)
  File 
"C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", 
line 868, in temp_cwd
yield cwd_dir
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\contextlib.py", line 
77, in __exit__
self.gen.throw(type, value, traceback)
  File 
"C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", 
line 822, in temp_dir
shutil.rmtree(path)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 477, 
in rmtree
return _rmtree_unsafe(path, onerror)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 376, 
in _rmtree_unsafe
onerror(os.rmdir, path, sys.exc_info())
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 374, 
in _rmtree_unsafe
os.rmdir(path)
PermissionError: [WinError 32] The process cannot access the file because it is 
being used by another process: 
'C:\\buildbot.python.org\\3.x.kloth-win64\\build\\build\\test_python_4744'
[...]

--
components: Tests
keywords: buildbot, easy
messages: 202962
nosy: r.david.murray
priority: normal
severity: normal
stage: needs patch
status: open
title: support.temp_cwd should use support.rmtree
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

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



[issue19613] test_nntplib: sporadic failures, test_article_head_body()

2013-11-15 Thread STINNER Victor

New submission from STINNER Victor:

http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.x/builds/3024/steps/test/logs/stdio

==
ERROR: test_article_head_body (test.test_nntplib.NetworkedNNTP_SSLTests)
--
Traceback (most recent call last):
  File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_nntplib.py", line 251, 
in wrapped
meth(self)
  File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_nntplib.py", line 178, 
in test_article_head_body
self.check_article_resp(resp, body, art_num)
  File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_nntplib.py", line 158, 
in check_article_resp
self.assertNotIn(article.lines[-1], (b".", b".\n", b".\r\n"))
IndexError: list index out of range

(...)
Re-running failed tests in verbose mode
Re-running test 'test_nntplib' in verbose mode
(...)
test_article_head_body (test.test_nntplib.NetworkedNNTPTests) ... ok

--
components: Tests
messages: 202961
nosy: haypo
priority: normal
severity: normal
status: open
title: test_nntplib: sporadic failures, test_article_head_body()
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



[issue19590] Use specific asserts in test_email

2013-11-15 Thread R. David Murray

R. David Murray added the comment:

Additional changes look good to me.

Unless (pun intended) Barry objects, I think I'll come down in favor of 
backporting all of these changes.  The tipping point is that I've always found 
myself experiencing cognitive dissonance reading the 'unless' calls, since they 
are the "opposite sense" of all of the other 'assert' style calls.  Having all 
these tests be the same in all active branches will also help reduce cognitive 
dissonance while debugging failures :)

--

___
Python tracker 

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



[issue19612] test_subprocess: sporadic failure of test_communicate_epipe()

2013-11-15 Thread STINNER Victor

New submission from STINNER Victor:

The test failed on a buildbot, see the message below. By the way, the test 
should use a value based on test.support.PIPE_MAX_SIZE rather than an hardcoded 
size of 2**20 bytes.


http://buildbot.python.org/all/builders/x86%20Windows%20Server%202008%20%5BSB%5D%203.x/builds/1661/steps/test/logs/stdio

test_communicate_epipe (test.test_subprocess.ProcessTestCase) ... ERROR
test_communicate_epipe_only_stdin (test.test_subprocess.ProcessTestCase) ... ok


==
ERROR: test_communicate_epipe (test.test_subprocess.ProcessTestCase)
--
Traceback (most recent call last):
  File 
"E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\test\test_subprocess.py",
 line 1095, in test_communicate_epipe
p.communicate(b"x" * 2**20)
  File 
"E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\subprocess.py",
 line 952, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
  File 
"E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\subprocess.py",
 line 1188, in _communicate
self.stdin.write(input)
OSError: [Errno 22] Invalid argument

--
(...)
test_communicate_epipe (test.test_subprocess.ProcessTestCase) ... ok
test_communicate_epipe_only_stdin (test.test_subprocess.ProcessTestCase) ... ok

--
components: Tests, Windows
keywords: buildbot
messages: 202959
nosy: haypo
priority: normal
severity: normal
status: open
title: test_subprocess: sporadic failure of test_communicate_epipe()
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



[issue19598] Timeout in test_popen() of test_asyncio.test_windows_utils.PopenTests

2013-11-15 Thread STINNER Victor

Changes by STINNER Victor :


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



[issue19598] Timeout in test_popen() of test_asyncio.test_windows_utils.PopenTests

2013-11-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d48ec67b3b0e by Guido van Rossum in branch 'default':
asyncio: Longer timeout in Windows test_popen. Fixes issue 19598.
http://hg.python.org/cpython/rev/d48ec67b3b0e

--
nosy: +python-dev

___
Python tracker 

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



[issue19596] Silently skipped tests in test_importlib

2013-11-15 Thread Brett Cannon

Brett Cannon added the comment:

As long as setting them to None satisfies the ABC that's fine with me.

--

___
Python tracker 

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



[issue19596] Silently skipped tests in test_importlib

2013-11-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

In this case we should do

test_package = None # Built-in modules cannot be a package.
test_module_in_package = None # Built-in modules cannobt be in a package.
...

And then tests will be skipped and not shown in test report.

--

___
Python tracker 

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



[issue19596] Silently skipped tests in test_importlib

2013-11-15 Thread Brett Cannon

Brett Cannon added the comment:

These tests can't be removed because the classes are inheriting from an ABC to 
make sure that those test cases are considered and dealt with, either by 
explicitly testing them or ignoring them because they don't apply to the 
finder/loader.

And since they are being ignored because the case has been considered and 
"tested" by doing nothing I don't want them listed as skipped since they aren't 
skipped based on some conditional result but instead because they literally 
can't be tested or don't apply. IOW testing packages with test_package() for 
the builtin loader wasn't skipped, it was tested by doing nothing since 
packages are flat-out not supported.

I say close this as rejected. I appreciate the sentiment but in this instance I 
think the skip label for the test is incorrect.

--

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

Changes by Nick Coghlan :


--
assignee: ncoghlan -> christian.heimes

___
Python tracker 

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



[issue19577] memoryview bind (the opposite of release)

2013-11-15 Thread Stefan Krah

Stefan Krah added the comment:

To my surprise, this line is 10% faster with a freelist:

./python -m timeit -s "import array; a = array.array('B', [0]*100); m = 
memoryview(a)" "m[30:40]"


I think the reason is that PyObject_GC_NewVar() is quite slow.

--

___
Python tracker 

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



[issue19608] devguide needs pictures

2013-11-15 Thread anatoly techtonik

anatoly techtonik added the comment:

Thanks for the proposal, but you know perfectly that I am not a designer. I 
don't believe that there are no talented people who find this ticket 
interesting. You just need to add tag:easy to is (or allow others to do), so it 
became visible to these people via OpenHatch or through PSF outreach 
initiatives.

--

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

Nick Coghlan added the comment:

I reviewed the latest PEP text at http://www.python.org/dev/peps/pep-0456/

I'm almost prepared to accept the current version of the implementation, but 
there's one technical decision to be clarified and a few placeholders in the 
PEP that need to be cleaned up prior to formal acceptance:

* The rationale for turning off the small string optimisation by default rather 
than setting the cutoff to 7 bytes isn't at all clear to me. A consistent 3-5% 
speed difference on the benchmark suite isn't trivial, and if we have the small 
string optimization off by default, why aren't we just deleting that code 
instead?

* A link to the benchmark suite at http://hg.python.org/benchmarks should be 
included at the appropriate places in the PEP

* The "Further things to consider" section needs to be moved to a paragraph 
under "Discussion" describing the current implementation (i.e. the hash 
equivalence is tolerated for simplicity and consistency)

* The "TBD" in the performance section needs to go. Reference should be made to 
the numbers in the small string optimisation section.

* The performance numbers need to be clear on what version of the feature 
branch was used to obtain them (preferably the one you plan to commit!).

--

___
Python tracker 

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



[issue6516] reset owner/group to root for distutils tarballs

2013-11-15 Thread Nick Coghlan

Nick Coghlan added the comment:

Patch looks good to me.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2013-11-15 Thread Nick Coghlan

Nick Coghlan added the comment:

Patch looks good to me.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue19609] Codec exception chaining shouldn't cover the initial codec lookup

2013-11-15 Thread Stefan Behnel

Stefan Behnel added the comment:

Thanks!

--
nosy: +scoder

___
Python tracker 

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



[issue19611] inspect.getcallargs doesn't properly interpret set comprehension code objects.

2013-11-15 Thread Ned Batchelder

Ned Batchelder added the comment:

BTW: I don't hold any illusions that this bug is important enough to fix, but I 
would be interested in hearing ideas about how I could work around it...

--

___
Python tracker 

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



[issue19611] inspect.getcallargs doesn't properly interpret set comprehension code objects.

2013-11-15 Thread Ned Batchelder

New submission from Ned Batchelder:

In 2.7, set comprehensions are compiled to code objects expecting an argument 
named ".0".  This convention is also used for the unnamed arguments needed by 
tuple arguments.  inspect.getcallargs understands the tuple argument case, but 
not the set comprehension case, and throws errors for correct arguments.

This is also true for generator expressions and dictionary comprehensions.

Demonstration:

#-
import inspect
import sys
import types

def make_set():
return {z*z for z in range(5)}

print(make_set())

# The set comprehension is turned into a code object expecting a single
# argument called ".0" with should be an iterator over range(5).
if sys.version_info < (3,):
setcomp_code = make_set.func_code.co_consts[1]
else:
setcomp_code = make_set.__code__.co_consts[1]
setcomp_func = types.FunctionType(setcomp_code, {})

# We can successfully call the function with the argument it expects.
print(setcomp_func(iter(range(5

# But inspect can't figure that out, because the ".0" argument also means
# tuple arguments, which this code object doesn't expect.
print(inspect.getcallargs(setcomp_func, iter(range(5

#-



When run on Python 3.3, this produces:

{0, 1, 4, 16, 9} 
{0, 1, 4, 16, 9}
{'.0': }

When run on Python 2.7, it produces:

set([0, 1, 4, 16, 9])
set([0, 1, 4, 16, 9])
Traceback (most recent call last):
  File "foo.py", line 17, in 
print(inspect.getcallargs(setcomp_func, iter(range(5
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/inspect.py",
 line 935, in getcallargs
assign(arg, value)
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/inspect.py",
 line 922, in assign
raise ValueError('too many values to unpack')
ValueError: too many values to unpack

--
components: Library (Lib)
messages: 202944
nosy: nedbat
priority: normal
severity: normal
status: open
title: inspect.getcallargs doesn't properly interpret set comprehension code 
objects.
versions: Python 2.7

___
Python tracker 

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



[issue19552] PEP 453: venv module and pyvenv integration

2013-11-15 Thread Nick Coghlan

Changes by Nick Coghlan :


--
assignee:  -> ncoghlan

___
Python tracker 

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



[issue19610] TypeError in distutils.command.upload

2013-11-15 Thread STINNER Victor

STINNER Victor added the comment:

> upload.upload_file() ... doesn't encode the value.

fix-upload-cmd.diff should fix this specific bug, but the first bug (accept 
tuple for classifiers) should be fixed before or you will get an unexpected 
behaviour (only send 1 classifier?).

--

___
Python tracker 

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



[issue19551] PEP 453: Mac OS X installer integration

2013-11-15 Thread Nick Coghlan

Nick Coghlan added the comment:

Based on a comment from MvL in issue 19550 (the Windows installer counterpart), 
it may be better to say something like "Install/update pip?" as a prompt (since 
leaving the option checked may also update an existing pip installation that is 
older than the bundled one)

--

___
Python tracker 

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



[issue19610] TypeError in distutils.command.upload

2013-11-15 Thread STINNER Victor

STINNER Victor added the comment:

I never undersood why, but classifiers must be a list, not a tuple. This is a 
bug in my opinion.

upload.upload_file() doesn't check if the tuple contains exactly 2 items. If 
the value is a tuple, it doesn't encode the value. This is another bug. I don't 
know in which cases a value should be a (key, value) tuple.

--
nosy: +eric.araujo, haypo, tarek

___
Python tracker 

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



[issue19609] Codec exception chaining shouldn't cover the initial codec lookup

2013-11-15 Thread Nick Coghlan

Nick Coghlan added the comment:

Fixed by narrowing the scope of the chaining in 
http://hg.python.org/cpython/rev/4ea622c085ca

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



[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-11-15 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

Hi folks,

I consider my implementation of PEP-3154 mostly feature complete at this point. 
I still have a few things left to do. For example, I need to update the 
documentation about the new protocol. However, these can mostly be done along 
the review process. Plus, I definitely prefer getting feedback sooner. :-) 

Please review at:

http://bugs.python.org/review/17810/

Thanks!

--
stage: needs patch -> patch review

___
Python tracker 

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



[issue19610] TypeError in distutils.command.upload

2013-11-15 Thread Berker Peksag

Changes by Berker Peksag :


--
keywords: +patch
Added file: http://bugs.python.org/file32642/fix-upload-cmd.diff

___
Python tracker 

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



[issue19610] TypeError in distutils.command.upload

2013-11-15 Thread Berker Peksag

New submission from Berker Peksag:

Python 3.4:

$ ../cpython/./python setup.py sdist upload -r test --show-response
...
...
Traceback (most recent call last):
  File "setup.py", line 24, in 
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
  File "/home/berker/projects/cpython/Lib/distutils/core.py", line 148, in setup
dist.run_commands()
  File "/home/berker/projects/cpython/Lib/distutils/dist.py", line 930, in 
run_commands
self.run_command(cmd)
  File "/home/berker/projects/cpython/Lib/distutils/dist.py", line 949, in 
run_command
cmd_obj.run()
  File "/home/berker/projects/cpython/Lib/distutils/command/upload.py", line 
65, in run
self.upload_file(command, pyversion, filename)
  File "/home/berker/projects/cpython/Lib/distutils/command/upload.py", line 
165, in upload_file
body.write(value)
TypeError: 'str' does not support the buffer interface


Python 3.3:

$ python3.3 setup.py sdist upload -r test --show-response
...
...
Traceback (most recent call last):
  File "setup.py", line 24, in 
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
  File "/usr/local/lib/python3.3/distutils/core.py", line 148, in setup
dist.run_commands()
  File "/usr/local/lib/python3.3/distutils/dist.py", line 917, in run_commands
self.run_command(cmd)
  File "/usr/local/lib/python3.3/distutils/dist.py", line 936, in run_command
cmd_obj.run()
  File "/usr/local/lib/python3.3/distutils/command/upload.py", line 66, in run
self.upload_file(command, pyversion, filename)
  File "/usr/local/lib/python3.3/distutils/command/upload.py", line 155, in 
upload_file
body.write(value)
TypeError: 'str' does not support the buffer interface

I also attached my setup.py.

--
components: Distutils
files: setup.py
messages: 202938
nosy: berker.peksag
priority: normal
severity: normal
stage: patch review
status: open
title: TypeError in distutils.command.upload
type: behavior
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file32641/setup.py

___
Python tracker 

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



[issue19609] Codec exception chaining shouldn't cover the initial codec lookup

2013-11-15 Thread Nick Coghlan

New submission from Nick Coghlan:

The exception chaining from issue 17828 is triggering for the initial codec 
lookup. This is less than helpful:


Failed example:
str(result)
Expected:
Traceback (most recent call last):
  ...
LookupError: unknown encoding: UCS4
Got:
LookupError: unknown encoding: UCS4

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File ".../py3km/python/lib/python3.4/doctest.py", line 1291, in __run
compileflags, 1), test.globs)
  File "", line 1, in 
str(result)
  File "xslt.pxi", line 727, in lxml.etree._XSLTResultTree.__str__
(src/lxml/lxml.etree.c:143584)
  File "xslt.pxi", line 750, in lxml.etree._XSLTResultTree.__unicode__
(src/lxml/lxml.etree.c:143853)
LookupError: decoding with 'UCS4' codec failed (LookupError: unknown
encoding: UCS4)


--
assignee: ncoghlan
messages: 202937
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: Codec exception chaining shouldn't cover the initial codec lookup
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



[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-11-15 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti :


Removed file: http://bugs.python.org/file32639/f87b455af573.diff

___
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-15 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti :


Added file: http://bugs.python.org/file32640/8434af450da0.diff

___
Python tracker 

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



[issue19593] Use specific asserts in importlib tests

2013-11-15 Thread Nick Coghlan

Nick Coghlan added the comment:

Adding a dependency on the PEP 451 implementation - we should merge that first 
to ensure it doesn't encounter any conflicts.

--
dependencies: +Implementation for PEP 451 (importlib.machinery.ModuleSpec)

___
Python tracker 

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



[issue19608] devguide needs pictures

2013-11-15 Thread Nick Coghlan

Nick Coghlan added the comment:

Feel free to draw some and send a patch.

--
nosy: +ncoghlan

___
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-15 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti :


Added file: http://bugs.python.org/file32639/f87b455af573.diff

___
Python tracker 

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



[issue19598] Timeout in test_popen() of test_asyncio.test_windows_utils.PopenTests

2013-11-15 Thread STINNER Victor

STINNER Victor added the comment:

> Likely. Can you suggest a fix?

Replace the timeout of 2 seconds with a timeout of 10 seconds.

It looks like the test checks the overlapped I/O API, not the timing.
If you want to test exactly the timing, another test is needed (ex:
measure the elapsed time and then ensure that the time is in a range).

--

___
Python tracker 

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



[issue19608] devguide needs pictures

2013-11-15 Thread anatoly techtonik

New submission from anatoly techtonik:

http://docs.python.org/devguide/

it covers pretty much complicated stuff, which takes a lot of time to grasp. 
Pictures help to save hours if not weeks. There needs to be some immediate 
intro picture at the top of front page illustrating transformation of Python 
code through the toolchain to machine execution instructions.

--
components: Devguide
messages: 202933
nosy: ezio.melotti, techtonik
priority: normal
severity: normal
status: open
title: devguide needs pictures

___
Python tracker 

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



[issue16510] Using appropriate checks in tests

2013-11-15 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +Use specific asserts in array tests, Use specific asserts in 
datetime tests, Use specific asserts in http.cookiejar tests, Use specific 
asserts in weakref tests

___
Python tracker 

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



[issue19607] Use specific asserts in weakref tests

2013-11-15 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The proposed patch makes the weakref module tests use more specific asserts. 
This will provide more useful failure report.

--
components: Tests
files: test_weakref_asserts.patch
keywords: patch
messages: 202932
nosy: fdrake, pitrou, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Use specific asserts in weakref tests
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file32638/test_weakref_asserts.patch

___
Python tracker 

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



[issue19606] Use specific asserts in http.cookiejar tests

2013-11-15 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The proposed patch makes the http.cookiejar module tests use more specific 
asserts. This will provide more useful failure report.

--
components: Tests
files: test_http_cookiejar_asserts.patch
keywords: patch
messages: 202931
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Use specific asserts in http.cookiejar tests
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file32637/test_http_cookiejar_asserts.patch

___
Python tracker 

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



[issue19605] Use specific asserts in datetime tests

2013-11-15 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The proposed patch makes the datetime module tests use more specific asserts. 
This will provide more useful failure report.

--
components: Tests
files: test_datetime_asserts.patch
keywords: patch
messages: 202930
nosy: belopolsky, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Use specific asserts in datetime tests
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file32636/test_datetime_asserts.patch

___
Python tracker 

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



[issue19604] Use specific asserts in array tests

2013-11-15 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The proposed patch makes the array module tests use more specific asserts. This 
will provide more useful failure report.

--
components: Tests
files: test_array_asserts.patch
keywords: patch
messages: 202929
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Use specific asserts in array tests
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file32635/test_array_asserts.patch

___
Python tracker 

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



  1   2   >