[issue18603] PyOS_mystricmp unused and no longer available

2013-10-21 Thread Georg Brandl

Georg Brandl added the comment:

Well, if the functions are part of the stable ABI (which it seems they are, as 
they don't fall under some exclusion defined by PEP 384) they shouldn't be 
removed if we take PEP 384 seriously.

--
nosy: +loewis

___
Python tracker 

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



[issue19294] test_asyncio fails intermittently on OS X 10.4

2013-10-21 Thread Ned Deily

Ned Deily added the comment:

Success! (I think.) On my elderly 10.4 machine, as of f33cc4a175a4:

tag: tip
user:Guido van Rossum 
date:Mon Oct 21 20:57:25 2013 -0700
files:   Lib/test/test_asyncio/test_events.py
description:
Unsilence several asyncio AIX tests that no longer hang, and silence a new hang.

test_asyncio now runs successfully repeatedly.  If I go back 4 mods on the 
default branch (to 4f1121ae1cb5), before your last three pushes this evening, 
test_asyncio fails with the "Bad file descriptor" every time.

--

___
Python tracker 

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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread David Edelsohn

David Edelsohn added the comment:

You have to try harder to break it again. aixfix2.diff still works. ;-)

--

___
Python tracker 

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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread Guido van Rossum

Guido van Rossum added the comment:

"And there was much rejoicing."

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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c2e018c54689 by Guido van Rossum in branch 'default':
Fix asyncio issue #19293 (hangs on AIX).
http://hg.python.org/cpython/rev/c2e018c54689

--

___
Python tracker 

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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread Guido van Rossum

Changes by Guido van Rossum :


Removed file: http://bugs.python.org/file32291/aixfix.diff

___
Python tracker 

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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread Guido van Rossum

Changes by Guido van Rossum :


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

___
Python tracker 

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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread Guido van Rossum

Guido van Rossum added the comment:

Third try's a charm. Corrected aix fix.

--
Added file: http://bugs.python.org/file32292/aixfix2.diff

___
Python tracker 

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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread Guido van Rossum

Guido van Rossum added the comment:

Corrected aixfix.diff for CPython repo (the previous one was for the Tulip 
repo).

--

___
Python tracker 

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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread Guido van Rossum

Changes by Guido van Rossum :


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

___
Python tracker 

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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread David Edelsohn

David Edelsohn added the comment:

test_asyncio no longer hangs on AIX with the aixfix.diff patch. Thanks!

--

___
Python tracker 

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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread Guido van Rossum

Guido van Rossum added the comment:

Corrected aixfix.diff (the other one was for the Tulip repo).

--

___
Python tracker 

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



[issue18235] _sysconfigdata.py wrong on AIX installations

2013-10-21 Thread David Edelsohn

David Edelsohn added the comment:

I think I see the source of the confusion. test_distutils fails because it runs 
in the build tree and without files installed. The test does not use the 
installed version of sysconfig, so it looks for ./Modules/ld_so_aix, which 
fails. The kludge from 2000 was trying to make the test work. But after 
installation, the kludge defines variables incorrectly to build Modules after 
Python is installed.

Because the distutils test is testing in tree and not the installed version of 
Python, it is not testing what the end user will experience. I am unsure about 
the best way to make the test pass.

--

___
Python tracker 

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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread Guido van Rossum

Guido van Rossum added the comment:

David, try this fix (aixfix.diff).

--
Added file: http://bugs.python.org/file32291/aixfix.diff

___
Python tracker 

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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread Guido van Rossum

Guido van Rossum added the comment:

I think I know what that is -- the test should use a socketpair now. I'll see 
how quickly I can give you a patch for that. The other one is now committed.

--

___
Python tracker 

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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread David Edelsohn

David Edelsohn added the comment:

With the latest changeset applied to default, the test_subprocess tests no 
longer hang, but test_write_pipe_disconnect_on_close now hangs.

The attached patch changes test_event.py to not skip test_subprocess_* but now 
skips test_write_pipe_disconnect_on_close.

--
Added file: http://bugs.python.org/file32290/issue19293.patch3

___
Python tracker 

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



[issue19263] enum.py : Enum.__new__(). __objclass__

2013-10-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b9019b942435 by Ethan Furman in branch 'default':
Close #19263:  add tests to ensure __objclass__ correctly set.
http://hg.python.org/cpython/rev/b9019b942435

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



[issue19294] test_asyncio fails intermittently on OS X 10.4

2013-10-21 Thread Guido van Rossum

Guido van Rossum added the comment:

I committed a patch that should hopefully fix issue 19293 -- maybe it will also 
reduce the flakiness of test_subprocess_shell() on OS X?

--

___
Python tracker 

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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread Guido van Rossum

Guido van Rossum added the comment:

Let's see how this fares. If it passes on the AIX buildbot, maybe see which of 
the tests we skipped on AIX can be re-enabled again?

--

___
Python tracker 

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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2a0bda8d283d by Guido van Rossum in branch 'default':
Switch subprocess stdin to a socketpair, attempting to fix issue #19293 (AIX 
hang).
http://hg.python.org/cpython/rev/2a0bda8d283d

--

___
Python tracker 

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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread Guido van Rossum

Guido van Rossum added the comment:

Thanks; I've applied and pushed your fix for the hang.

I think it's time to commit the sockpair.diff change; the test_write_pipe() 
failure looks related -- as you recall the problem doesn't really cause a hang, 
it causes a premature closing of a write pipe, the hangs were just due to the 
test structure (unfortunate, really).

I'll let you know when.

--

___
Python tracker 

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



[issue19335] codeop misclassifies incomple code with 'nonlocal'

2013-10-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The bug is not in Idle. Its interpreter is a subclass of 
code.InteractiveInterpreter (II) and that (and its subclass InteractiveConsole) 
have the bug.

C:\Programs\Python33>python -m code
Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:06:53) [MSC v.1600 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> def a():
...  def b():
...   nonlocal c
  File "", line None
SyntaxError: no binding for nonlocal 'c' found

II.runsource compiles cumulative source with codeop.CommandCompile, which wraps 
codeop._maybe_compile. That returns None (source incomplete), raises (source 
complete but invalid), or return code (source complete and valid) to be 
executed. It mis-classifies the code in question.

>>> import codeop as op
>>> src = '''def a():
  def b():
 nonlocal c
'''
>>> op.CommandCompiler()(src)
Traceback (most recent call last):
...
SyntaxError: no binding for nonlocal 'c' found

PyShell.ModifiedInterpreter.runsource wraps II.runsource.
   return InteractiveInterpreter.runsource(self, source, filename)

Someone needs to compare _maybe_compile to the equivalent C code used by the 
real interpreter.

--
components: +Library (Lib) -IDLE
title: IDLE over-enthusiastically verifies 'nonlocal' usage -> codeop 
misclassifies incomple code with 'nonlocal'

___
Python tracker 

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



[issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris

2013-10-21 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

I mean "/usr/lib/chkpass.so".

--

___
Python tracker 

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



[issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris

2013-10-21 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

"/usr/bin/chkpass.so" has both SONAME and RPATH.

Would you mind, anyway, to elaborate a bit your use case, including some 
example?. Thanks!.

--

___
Python tracker 

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



[issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris

2013-10-21 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
keywords: +needs review -patch

___
Python tracker 

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



[issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris

2013-10-21 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Patch looks good. Any other reviewer?

Maciej, do you know about any generally available library in Solaris with 
SONAME and RPATH?. A test would be nice.

Would this patch solve the "locate the C library" using ctypes, in Solaris? :-).

--

___
Python tracker 

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



[issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals

2013-10-21 Thread paul j3

paul j3 added the comment:

parse_args() would see ['-foo', 'bar1,bar2,bar3', 'pos1', 'pos2'].  The 
splitting on space is done by the shell.  So having your own code split 
'bar1,bar2,bar3' is simplest.  But that would be messed up if the user entered 
'bar1, bar2, bar3...'.  You could also ask the user to use quotes - "bar1, 
bar2, bar3".

--

___
Python tracker 

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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread David Edelsohn

David Edelsohn added the comment:

Other than the skipped tests, test_asyncio now passes on AIX except for:

FAIL: test_write_pipe (test.test_asyncio.test_events.PollEventLoopTests)
--
Traceback (most recent call last):
  File "/home/dje/src/cpython/Lib/test/test_asyncio/test_events.py", line 875, 
in test_write_pipe
self.assertEqual(b'2345', data)
AssertionError: b'2345' != b''

--

___
Python tracker 

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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread David Edelsohn

David Edelsohn added the comment:

The testsuite is hanging in test_asyncio again and 
test_subprocess_close_client_stream needs to be skipped.

--
Added file: http://bugs.python.org/file32289/issue19293.patch2

___
Python tracker 

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



[issue19334] test_asyncio hanging for 1 hour (non-AIX version)

2013-10-21 Thread David Edelsohn

Changes by David Edelsohn :


--
nosy: +David.Edelsohn

___
Python tracker 

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



[issue19337] MMAP: Bus error (core dump) under heavy read/write

2013-10-21 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue19274] make zipfile.PyZipFile more usable

2013-10-21 Thread Christian Tismer

Christian Tismer added the comment:

added that with tests.

--

___
Python tracker 

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



[issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals

2013-10-21 Thread Paul Hawkins

Paul Hawkins added the comment:

I ran into this bug the first time I needed nargs + in a tool.  

I found of course that if the option with the nargs is followed by another 
option before the positional arguments it will work as expected.  But then the 
help would have to point this out, and it still could be used incorrectly (so 
then I get a mail about a bug in my tool.) ;-)>

My workaround was to use action=append instead of nargs, then user would just 
have to give the option for each nargs desired.  Since my use would be short 
this was OK.  But the usage message does not reflect the multiple use nature of 
this option

But what I expected to find in the doc was a way to specify the use of a 
separator char between the nargs option arguments.  For example specify that 
',' is the separator arg (currently a space is the separator.)  So if option is 
-foo the cli could be:

myprog.py -foo bar1,bar2,bar3 pos1 pos2

(Of course I could just have the tool take a comma delimited single argument 
and parse it in the tool's logic, but again then a custom usage message would 
be needed.)

Has this solution been considered?

--
nosy: +phawkins

___
Python tracker 

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



[issue19281] add __objclass__ to the docs

2013-10-21 Thread Ethan Furman

Ethan Furman added the comment:

The proposed text is something along the lines of:

__objclass__: 1) Indicates this callable requires an instance of the given type 
(or a subclass) as its first positional argument; e.g. CPython sets this for 
unbound methods that are implemented in C rather than Python.  2) The class 
where this object was defined.

So, any ideas for improvement, and, more importantly, where in the docs should 
this go?

--

___
Python tracker 

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



[issue19274] make zipfile.PyZipFile more usable

2013-10-21 Thread Christian Tismer

Christian Tismer added the comment:

@georg:
> While reviewing: is it intended that the filter is only called for 
> directories and not for individual files?

Not really. I will add this, later. Just wanted to see if this makes
sense and it's worth the effort to extend it.

--

___
Python tracker 

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



[issue19335] IDLE over-enthusiastically verifies 'nonlocal' usage

2013-10-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

A test will be a challenge since the three lines have to be run as if entered 
interactively. This may require new code to inject lines into the interactive 
processing stream, or a least a re-factoring of existing code.

--

___
Python tracker 

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



[issue17400] ipaddress should make it easy to identify rfc6598 addresses

2013-10-21 Thread pmoody

pmoody added the comment:

I have a change that needs to be submitted for the parser then I'll come back 
to the caching.

The pedant in me would like like to keep the addresses ordered because that 
makes it clear where to add new networks as iana changes classifications, but 
it may just make more sense to put rfc1918 at the top.

--

___
Python tracker 

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



[issue17400] ipaddress should make it easy to identify rfc6598 addresses

2013-10-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 07a5610bae9d by Peter Moody in branch 'default':
#17400; NEWS and ipaddress.rst change
http://hg.python.org/cpython/rev/07a5610bae9d

--

___
Python tracker 

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



[issue17400] ipaddress should make it easy to identify rfc6598 addresses

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

About 2e8dd5c240b7
It might be a good idea to cache the two lists in a class or module variable in 
order to speed things up. It might also be a good idea to move the most common 
networks like 192.168.0.0/16 to the top of the list.

--

___
Python tracker 

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



[issue19294] test_asyncio fails intermittently on OS X 10.4

2013-10-21 Thread Guido van Rossum

Guido van Rossum added the comment:

I find it pretty suspicious that when this fails it is always connecting the 
stdin pipe. That code is also suspect in the AIX failure (issue 19293), 
although for a different reason.

The only theory I have at this point is that perhaps there's a platform bug on 
OS X 10.4 and before where the pipe is considered invalid if the process 
already exits? But the subprocess shouldn't be exiting, so this theory is no 
good, unless there's also a bug that causes the fork or exec to fail. :-(

Maybe this will go away if we replace the stdin pipe with a socket pair, as we 
are proposing for issue 19293, without ever understanding why.

--

___
Python tracker 

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



[issue19334] test_asyncio hanging for 1 hour (non-AIX version)

2013-10-21 Thread Guido van Rossum

Guido van Rossum added the comment:

I haven't seen any such hangs. I've seen one test_asyncio failure on FreeBSD 
6.4 3.x, which is the following weirdness.

http://buildbot.python.org/all/builders/x86%20FreeBSD%206.4%203.x/builds/4116/steps/test/logs/stdio

test test_asyncio crashed -- Traceback (most recent call last):
  File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/regrtest.py", 
line 1276, in runtest_inner
test_runner()
  File 
"/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_asyncio/__init__.py",
 line 31, in test_main
run_unittest(suite())
  File 
"/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_asyncio/__init__.py",
 line 21, in suite
__import__(mod_name)
  File 
"/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_asyncio/test_base_events.py",
 line 10, in 
from asyncio import base_events
  File 
"/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/asyncio/__init__.py", 
line 13, in 
from .futures import *
  File 
"/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/asyncio/futures.py", line 
12, in 
from . import events
ImportError: cannot import name 'events'

Sadly there's no more info about this -- does this mean events.py is corrupt? 
Or is one of the imports in events.py breaking? Then why doesn't it show the 
failing line?

--

___
Python tracker 

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



[issue19340] test_sysconfig.test_srcdir fails when sys.base_prefix="/"

2013-10-21 Thread Sunny K

New submission from Sunny K:

While working on issue7757, i noticed that test_srcdir fails when python is 
built with prefix "".

This is because in Lib/sysconfig.py, _safe_realpath() is called on srcdir which 
normalises //lib to /lib. In the test case, it is compared directly to the 
output of get_makefile_filename().


==
FAIL: test_srcdir (__main__.TestSysConfig)
--
Traceback (most recent call last):
  File "/lib/python3.4/test/test_sysconfig.py", line 356, in test_srcdir
srcdir)
AssertionError: '//lib/python3.4/config-3.4dm' != '/lib/python3.4/config-3.4dm'
- //lib/python3.4/config-3.4dm
? -
+ /lib/python3.4/config-3.4dm

~/cpython$ python3.4
Python 3.4.0a3+ (default:dad1debba93c+, Oct 22 2013, 02:32:50)
[GCC 4.4.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.prefix
'/'
>>> sys.base_prefix
'/'
>>>

--
components: Tests
messages: 200849
nosy: sunfinite
priority: normal
severity: normal
status: open
title: test_sysconfig.test_srcdir fails when sys.base_prefix="/"
type: behavior
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



[issue19339] telnetlib: time.monotonic() should be used instead of time.time() for timeout

2013-10-21 Thread STINNER Victor

STINNER Victor added the comment:

Patch for telnetlib of Python 3.3.

--
keywords: +patch
Added file: http://bugs.python.org/file32288/telnetlib_monotonic.patch

___
Python tracker 

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



[issue17400] ipaddress should make it easy to identify rfc6598 addresses

2013-10-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2e8dd5c240b7 by Peter Moody in branch 'default':
#17400; ipaddress should make it easy to identify rfc6598 addresses
http://hg.python.org/cpython/rev/2e8dd5c240b7

--
nosy: +python-dev

___
Python tracker 

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



[issue19339] telnetlib: time.monotonic() should be used instead of time.time() for timeout

2013-10-21 Thread Charles-François Natali

Charles-François Natali added the comment:

You can go ahead!

--

___
Python tracker 

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



[issue19170] telnetlib: use selectors

2013-10-21 Thread Charles-François Natali

Changes by Charles-François Natali :


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



[issue19331] Revise PEP 8 recommendation for class names

2013-10-21 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Oct 21, 2013, at 08:41 PM, Nick Coghlan wrote:

>That said, I quite like Paul's suggestions.

As do I.

--

___
Python tracker 

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



[issue19263] enum.py : Enum.__new__(). __objclass__

2013-10-21 Thread Ethan Furman

Ethan Furman added the comment:

Well, with all the changes to inspect to properly locate attributes in the 
class and metaclass mro, __objclass__ is necessary to get the home class 
correct (without it inspect thinks it lives in the EnumMeta metaclass).

--

___
Python tracker 

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



[issue16500] Add an 'atfork' module

2013-10-21 Thread Charles-François Natali

Charles-François Natali added the comment:

> Well it is customary for callback-based APIs to hold strong references to 
> their callbacks. If a library wants to avoid leaks, it should register a 
> single callback which will then walk the current "live" resources and protect 
> them.

I guess that the custom usage makes sense.
I'd just like a note in the doc, if possible ;-)

--

___
Python tracker 

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



[issue10977] Concrete object C API considered harmful to subclasses of builtin types

2013-10-21 Thread Eric Snow

Eric Snow added the comment:

I had roughly the same idea, Nick, though my approach to address backward 
compatibility was more complicated.  Definitely worth at least looking into for 
3.5.

--

___
Python tracker 

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



[issue19331] Revise PEP 8 recommendation for class names

2013-10-21 Thread Nick Coghlan

Nick Coghlan added the comment:

That said, I quite like Paul's suggestions.

--

___
Python tracker 

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



[issue19331] Revise PEP 8 recommendation for class names

2013-10-21 Thread Nick Coghlan

Nick Coghlan added the comment:

Lots of builtins, collections and itertools use lowercase names as well, as do 
some older stdlib types (array, mmap, socket).

The only clear dividing lines I can really discern are that ABCs *must* start 
with a capital, as should classes paired with a separate factory function.

--

___
Python tracker 

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



[issue19335] IDLE over-enthusiastically verifies 'nonlocal' usage

2013-10-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This started as a python-list thread. On that thread, Peter Otten verified the 
behavior on Linux, so it is not specific to the Windows pythonw executable. He 
also verified on 3.2 (which gets security fixes only) and 3.4. I just checked 
2.7. On that thread, I verified a) the three lines submitted by themselves as a 
file cause the same error message, as they should ("must refer to pre-existing 
bindings in an enclosing scope ") and b) Python in interactive mode 
syntax-checks lines as entered, even for compound statements. I just verified 
that Idle behaves the same when started with -n (no subprocess):
C:\Programs\Python33>python -m idlelib.idle -n

Summary: Idle acts as if it syntax-checks the cumulative input instead of just 
the line entered. (But I have not looked as the code.)

The three lines constitute a test if they can be run from a test file.

--
nosy: +terry.reedy
stage:  -> needs patch
versions: +Python 2.7, Python 3.4 -Python 3.2

___
Python tracker 

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



[issue19185] Allow multiprocessing Pool initializer to return values

2013-10-21 Thread Matteo Cafasso

Matteo Cafasso added the comment:

On 09/10/13 22:59, Richard Oudkerk wrote:
> Yes.  But my point was that somebody might have used such a function as the 
> initializer argument.  The proposed change would break a program which does
>
>  with Pool(initializer=os.nice, initargs=(incr,)) as p:
>  ...
Indeed in cases like that the backward compatibility would break if the 
passed function is accepting a fixed amount of positional arguments.

--

___
Python tracker 

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



[issue10977] Concrete object C API considered harmful to subclasses of builtin types

2013-10-21 Thread Nick Coghlan

Nick Coghlan added the comment:

I haven't fully thought this one through, but perhaps we could:
- deprecate calling the current concrete APIs with subclasses (since doing
so may break subclass invariants)
- add "PyBaseDict_*" APIs (etc) that subclass implementations can call.
- offer a compatibility header for earlier versions that #defines the new
APIs back to the old ones

This would be 3.5 PEP territory, though.

--

___
Python tracker 

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



[issue19338] multiprocessing: sys.exit() from a child with a non-int exit code exits with 0

2013-10-21 Thread Brodie Rao

Changes by Brodie Rao :


--
nosy: +jnoller, sbt

___
Python tracker 

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



[issue19338] multiprocessing: sys.exit() from a child with a non-int exit code exits with 0

2013-10-21 Thread Brodie Rao

Brodie Rao added the comment:

Here's the patch for 3.3.

--
keywords: +patch
Added file: http://bugs.python.org/file32286/multiprocessing-sys-exit-3.3.patch

___
Python tracker 

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



[issue19338] multiprocessing: sys.exit() from a child with a non-int exit code exits with 0

2013-10-21 Thread Brodie Rao

Changes by Brodie Rao :


Added file: http://bugs.python.org/file32287/multiprocessing-sys-exit-2.7.patch

___
Python tracker 

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



[issue19170] telnetlib: use selectors

2013-10-21 Thread STINNER Victor

STINNER Victor added the comment:

FYI I just create #19339: "telnetlib: time.monotonic() should be used instead 
of time.time() for timeout".

--

___
Python tracker 

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



[issue19339] telnetlib: time.monotonic() should be used instead of time.time() for timeout

2013-10-21 Thread STINNER Victor

New submission from STINNER Victor:

While reading the patch attached to #19170, I saw that telnetlib uses 
time.time() to compute a timeout. This is wrong: the system clock may jump 
forward or backward (ex: summer/winter time, NTP adjust, manual clock change by 
the administrator, etc.).

time.monotonic() should be used instead. I will work on a patch when #19170 
will be fixed (just to avoid conflicts).

--
messages: 200834
nosy: haypo, neologix
priority: normal
severity: normal
status: open
title: telnetlib: time.monotonic() should be used instead of time.time() for 
timeout
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



[issue19338] multiprocessing: sys.exit() from a child with a non-int exit code exits with 0

2013-10-21 Thread Brodie Rao

New submission from Brodie Rao:

Normally:

  $ python
  >>> import sys
  >>> sys.exit('foo')
  foo
  $ echo $?
  1

However, with multiprocessing:

  >>> import sys
  >>> from multiprocessing import Process
  >>> p = Process(target=lambda: sys.exit('foo'))
  >>> p.start()
  >>> foo
  
  >>> p.join()
  >>> p.is_alive()
  False
  >>> p.exitcode
  0

p.exitcode should be 1, not 0. sys.exit() with a non-int object should always 
exit with 1.

This regression was introduced in da5b370f41a1 on the 2.7 branch (making it 
into the 2.7.4 release) and 4346cba353b4 on the 3.2 branch (making it into the 
3.2.5 release).

Less important things to note:

- multiprocessing calls str() on the object passed to sys.exit() to print it 
out. The interpreter doesn't do that with the argument is a unicode object (it 
tries to let sys.stderr encode it and print it).

- The interpreter also ignores all exceptions in this process.

I'll attach patches for the 2.7 and 3.3 branches that just addresses the exit 
code problem.

--
components: Library (Lib)
messages: 200833
nosy: brodie
priority: normal
severity: normal
status: open
title: multiprocessing: sys.exit() from a child with a non-int exit code exits 
with 0
type: behavior
versions: Python 2.7, 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



[issue19270] Document that sched.cancel() doesn't distinguish equal events and can break order

2013-10-21 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

> This module has been around for a long time and no users have reported 
> any issues with respect to event ordering.  The logic is essentially 
> the same as is used in popular event loops like Tornado.
> Please don't just make-up a new invariant for this module.

+1

--

___
Python tracker 

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



[issue19270] Document that sched.cancel() doesn't distinguish equal events and can break order

2013-10-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> 4. Mixed strategy. First use identity search, then equality search,
> and only if found several equals events fallback to slow variant. This
> is too complicated. It will work as expected in most normal cases, but
> in rare cases... This behavior would hard to document and understand.

You're right. So perhaps this should simply be documented as is.

--

___
Python tracker 

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



[issue19270] Document that sched.cancel() doesn't distinguish equal events and can break order

2013-10-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> I'm not strong on a new invariant, however I think bug #1 would deserve 
> fixing:

How would you do this?

1. Use identity instead equality to search canceled event. It will break code 
where an user cancels an event by time and priority: 
scheduler.cancel(Event(time, priority, ...)).

2. Always cancel chronologically last (first) of equals events. This requires 
popp-ing and push-ing all events. Too slow.

3. Add an ordered number to the event. This will slow down all too.

4. Mixed strategy. First use identity search, then equality search, and only if 
found several equals events fallback to slow variant. This is too complicated. 
It will work as expected in most normal cases, but in rare cases... This 
behavior would hard to document and understand.

If you have better idea, patch is welcome.

--

___
Python tracker 

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



[issue12029] Catching virtual subclasses in except clauses

2013-10-21 Thread Yuriy Taraday

Yuriy Taraday added the comment:

Can someone please point out why do we have to do that dance with recursion 
limit?

I've came upon this problem as well. I had some (bad) API I had to work with. 
It always raised the same exception with the only difference in the message. So 
I thought I could do something like this:

def message_contains(msg):
class _MyExc(object):
def __instancecheck__(self, exc):
return msg in exc.args[0]
return _MyExc

But after I tried it in number of different ways I found out that it's not 
possible.

So here's another reason to change this behavior.

--
nosy: +yorik.sar

___
Python tracker 

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



[issue19270] Document that sched.cancel() doesn't distinguish equal events and can break order

2013-10-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I'm not strong on a new invariant, however I think bug #1 would deserve fixing:

> 1. sched.cancel() can remove wrong event (because it uses equality instead 
> identity).

--

___
Python tracker 

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



[issue19217] Calling assertEquals for moderately long list takes too long

2013-10-21 Thread Michael Foord

Michael Foord added the comment:

pprint is also likely to have performance issues. I agree with Ezio that a diff 
consisting of more than 30(x2) lines is not likely to be directly useful 
anyway. 

A test for the changed behaviour would be nice.

--

___
Python tracker 

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



[issue16500] Add an 'atfork' module

2013-10-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> One of the main use cases for atfork hooks would be the numerous
stdlib objects which have locks (or locks themselves): most of such
objects have arbitrary lifetimes (e.g. logging, events, open files,
etc).
> The risk of leak is IMO much greater.

Well it is customary for callback-based APIs to hold strong references to their 
callbacks. If a library wants to avoid leaks, it should register a single 
callback which will then walk the current "live" resources and protect them.
(i.e. the resource lifetime issue should be solved by library or application 
code, not by the atfork module)

By the way, +0 to raising and aborting the fork when there's an exception. The 
only annoyance I can think about is a buggy library which would prevent the 
user from forking.

--

___
Python tracker 

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



[issue19337] MMAP: Bus error (core dump) under heavy read/write

2013-10-21 Thread Ribhi Kamal

Changes by Ribhi Kamal :


Removed file: http://bugs.python.org/file32285/core.gz

___
Python tracker 

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



[issue19337] MMAP: Bus error (core dump) under heavy read/write

2013-10-21 Thread Ribhi Kamal

Changes by Ribhi Kamal :


--
status: open -> closed

___
Python tracker 

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



[issue19337] MMAP: Bus error (core dump) under heavy read/write

2013-10-21 Thread Ribhi Kamal

Ribhi Kamal added the comment:

I figured I was doing something wrong... sorry about that

--
components:  -Library (Lib)
resolution: invalid -> 
status: closed -> open
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



[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-21 Thread Stefan Krah

Stefan Krah added the comment:

Antoine Pitrou  wrote:
> Done. Can you please watch for failures and ensure they get fixed?

Thanks! Yes, I'll keep an eye on it.

--

___
Python tracker 

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



[issue19337] MMAP: Bus error (core dump) under heavy read/write

2013-10-21 Thread Charles-François Natali

Charles-François Natali added the comment:

> 3- From another process, like bash, continuously write to the file.

That's the problem: reducing (actually truncating in your case) a file 
currently mmaped *can only result in a core dump*: when you try to read from a 
location in memory which doesn't correspond anymore to a position in the file 
(since it got truncated), which value could the kernel return?

The page you're trying to read from isn't mapped anymore, so you get a segfault.

Apparently it's even documented in the main page:
"""
The effect of changing the size of the underlying file of a mapping on the 
pages that correspond to added or removed regions of
   the file is unspecified.
"""

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



[issue19337] MMAP: Bus error (core dump) under heavy read/write

2013-10-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Confirm on 2.7 and 3.x.

--
components: +Library (Lib)
nosy: +serhiy.storchaka
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



[issue19337] MMAP: Bus error (core dump) under heavy read/write

2013-10-21 Thread Ribhi Kamal

Ribhi Kamal added the comment:

Code dump attached

--
Added file: http://bugs.python.org/file32285/core.gz

___
Python tracker 

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



[issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris

2013-10-21 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +jcea

___
Python tracker 

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



[issue19337] MMAP: Bus error (core dump) under heavy read/write

2013-10-21 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo, neologix, pitrou, sbt

___
Python tracker 

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



[issue19337] MMAP: Bus error (core dump) under heavy read/write

2013-10-21 Thread Ribhi Kamal

New submission from Ribhi Kamal:

I was about to use memory mapping for something when I discovered that the code 
example posted on python.org causes python to core dump. %100 reproducible

The steps are really simple. 
1- Create a file and map it using mmap.mmap
2- In a while loop, contintously read the file
3- From another process, like bash, continuously write to the file.

After about 5 iterations from the reader, python core dumps.

Reader code (python):
#!/usr/bin/python2.7

import mmap
import time

with open("hello.txt", "wb") as f:
f.write("Hello Python! 1234123412341234\n")

with open("hello.txt", "r+b") as f:
# memory-map the file, size 0 means whole file
mm = mmap.mmap(f.fileno(), 0)
count=0
while count < 100:
   mm.seek(0)
   print mm.readline()
   time.sleep(0.1)
   count = count + 1

# close the map
mm.close()


Writer code (linux shell/bash):
#!/bin/bash
count=0
while true
do
 ((count++))
 echo $count > hello.txt
done


Now run the reader, then launch the writer in a terminal. In my case I get the 
following output:
>110
>
>462
>
>Bus error (core dumped)


Python 2.7.3
Linux 3.2.0-54-generic #82-Ubuntu SMP Tue Sep 10 20:09:12 UTC 2013 i686 i686 
i386 GNU/Linux
Ubuntu 12.04.3 LTS
Intel(R) Core(TM)2 CPU  6300  @ 1.86GHz

--
components: IO
messages: 200820
nosy: rbhkamal
priority: normal
severity: normal
status: open
title: MMAP: Bus error (core dump) under heavy read/write
type: crash
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



[issue19288] __contains__() of dbm.gnu databases fails with str

2013-10-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
type:  -> behavior

___
Python tracker 

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



[issue19287] __contains__() of dbm.ndbm databases fails with str

2013-10-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM. Could you please sign a contributor agreement ([1], [2]) Arfrever?

[1] http://www.python.org/psf/contrib/
[2] http://www.python.org/psf/contrib/contrib-form/

--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
priority: release blocker -> normal

___
Python tracker 

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



[issue19331] Revise PEP 8 recommendation for class names

2013-10-21 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +ncoghlan

___
Python tracker 

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



[issue19331] Revise PEP 8 recommendation for class names

2013-10-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

s/should be followed/may be followed/

As an other point of reference, for a long time the synchronization classes in 
the threading module were actually mediated by function wrappers, e.g.:

  def Lock(*args, **kwargs):
  return _Lock(*args, **kwargs)

(this was to "discourage subclassing", IIRC)

--
nosy: +pitrou

___
Python tracker 

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



[issue19326] asyncio: child process exit isn't detected if its stdin/stdout/stderr FDs have been inherited by a child process

2013-10-21 Thread Charles-François Natali

Charles-François Natali added the comment:

> This is by design. Let me try to defend the design.

OK, if that's a know limitation, then that's fine.
It would be nice to add maybe a note somewhere in the documentation, so that 
people don't get bitten by this (and also probably add a test for 
process_exited).

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



[issue19331] Revise PEP 8 recommendation for class names

2013-10-21 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +r.david.murray

___
Python tracker 

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



[issue19336] No API to get events from epoll without allocating a list

2013-10-21 Thread Maciej Fijalkowski

Changes by Maciej Fijalkowski :


--
nosy: +fijall

___
Python tracker 

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



[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Antoine, could we make that option official on my build slave? Currently
> I'm subverting the build system by exporting an environment variable.

Done. Can you please watch for failures and ensure they get fixed?

--

___
Python tracker 

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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread Guido van Rossum

Guido van Rossum added the comment:

New, improved version of sockpair.diff.

--
Added file: http://bugs.python.org/file32284/sockpair.diff

___
Python tracker 

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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread Guido van Rossum

Changes by Guido van Rossum :


Removed file: http://bugs.python.org/file32282/sockpair.diff

___
Python tracker 

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



[issue12029] Catching virtual subclasses in except clauses

2013-10-21 Thread Ethan Furman

Changes by Ethan Furman :


--
nosy: +ethan.furman

___
Python tracker 

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



[issue19330] Use public classes for contextlib.suppress and redirect_stdout

2013-10-21 Thread Ethan Furman

Changes by Ethan Furman :


--
nosy: +ethan.furman

___
Python tracker 

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



[issue18685] Restore re performance to pre-PEP393 level

2013-10-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Rebased patch to tip and added non-ASCII tests for main re functions.

--
Added file: http://bugs.python.org/file32283/sre_optimize_2.patch

___
Python tracker 

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



[issue19331] Revise PEP 8 recommendation for class names

2013-10-21 Thread Ethan Furman

Changes by Ethan Furman :


--
nosy: +ethan.furman

___
Python tracker 

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



[issue19326] asyncio: child process exit isn't detected if its stdin/stdout/stderr FDs have been inherited by a child process

2013-10-21 Thread Guido van Rossum

Guido van Rossum added the comment:

This is by design. Let me try to defend the design.

As long as one of the pipes is still open the parent might be interested in it. 
The Protocol object does get notified of the process's exit, via 
process_exited(), and if at that point it wants to be done, it can close the 
pipes itself. (To do that, call transport.get_pipe_transport(FD).close().) Once 
that's done the subprocess protocol's connection_lost() method will be called.

I suppose an alternative approach might be to assume that when the subprocess 
exist the parent should close the pipes and be done, but there's a race 
condition there: there may still be data in one of the pipes (stdout or stderr) 
that should be processed before calling connection_lost(), similar to how we 
delay the socket connection_lost() call until we have processed all data read 
from it.

So I don't think that alternative is viable.

--

___
Python tracker 

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



[issue17123] Add OCSP support to ssl module

2013-10-21 Thread Larry Hastings

Changes by Larry Hastings :


--
nosy:  -larry

___
Python tracker 

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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread Guido van Rossum

Guido van Rossum added the comment:

Attached is a version of Richard's patch that I like better (sockpair.diff).

- instead of dropping the ValueError, check for ISFIFO and ISSOCK
- pass the read end of the socket pair to Popen()

--
Added file: http://bugs.python.org/file32282/sockpair.diff

___
Python tracker 

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



[issue19336] No API to get events from epoll without allocating a list

2013-10-21 Thread Alex Gaynor

New submission from Alex Gaynor:

select.epoll should expose an api such as `iterpoll` which returns an iterator 
over the ready events, rather than a list. Allocating a list is wasteful in 
many cases (e.g. twisted's event loop) and it'd be nice to have an API that was 
less wasteful.

--
messages: 200810
nosy: alex
priority: normal
severity: normal
status: open
title: No API to get events from epoll without allocating a list

___
Python tracker 

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



[issue19335] IDLE over-enthusiastically verifies 'nonlocal' usage

2013-10-21 Thread Chris Angelico

New submission from Chris Angelico:

IDLE tries to be helpful, but it errors on something that isn't yet an error. 
Pasting in this code works fine:

>>> def a():
def b():
nonlocal q
q+=1
q=1
b()
return q

>>> a()
2

But typing it, line by line, results in an error:

>>> def a():
def b():
nonlocal q

SyntaxError: no binding for nonlocal 'q' found

This doesn't occur with interactive command-line Python. A small issue, more of 
curiosity value than anything else - I don't have a non-trivial use-case where 
this causes problems.

--
components: IDLE
messages: 200809
nosy: Rosuav
priority: normal
severity: normal
status: open
title: IDLE over-enthusiastically verifies 'nonlocal' usage
versions: 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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread Guido van Rossum

Guido van Rossum added the comment:

Brilliant. It works for me too on OS X.

David, can you check this on AIX?

--

___
Python tracker 

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



[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-21 Thread Ethan Furman

Ethan Furman added the comment:

Thanks, Charles-François!

The problem occurred when I tried to push the commit and was told there was 
trailing white-space.  Naturally I then ran the de-whitespacing tool which of 
course removed the whitespace from those lines where you added the \x20s back 
on.  I'll remember to do those conversions next time, and thanks for fixing it 
-- I'm not sure I would have found it any time soon.

--

___
Python tracker 

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



[issue19293] test_asyncio hanging for 1 hour (AIX version, hangs in test_subprocess_interactive)

2013-10-21 Thread Richard Oudkerk

Richard Oudkerk added the comment:

The following uses socketpair() instead of pipe() for stdin, and works for me 
on Linux:

diff -r 7d94e4a68b91 asyncio/unix_events.py
--- a/asyncio/unix_events.pySun Oct 20 20:25:04 2013 -0700
+++ b/asyncio/unix_events.pyMon Oct 21 17:15:19 2013 +0100
@@ -272,8 +272,6 @@
 self._loop = loop
 self._pipe = pipe
 self._fileno = pipe.fileno()
-if not stat.S_ISFIFO(os.fstat(self._fileno).st_mode):
-raise ValueError("Pipe transport is for pipes only.")
 _set_nonblocking(self._fileno)
 self._protocol = protocol
 self._buffer = []
@@ -442,9 +440,16 @@
 self._finished = False
 self._returncode = None

+if stdin == subprocess.PIPE:
+stdin_w, stdin_r = socket.socketpair()
+else:
+stdin_w = stdin_r = None
 self._proc = subprocess.Popen(
-args, shell=shell, stdin=stdin, stdout=stdout, stderr=stderr,
+args, shell=shell, stdin=stdin_r, stdout=stdout, stderr=stderr,
 universal_newlines=False, bufsize=bufsize, **kwargs)
+if stdin_r is not None:
+stdin_r.close()
+self._proc.stdin = open(stdin_w.detach(), 'rb', buffering=bufsize)
 self._extra['subprocess'] = self._proc

 def close(self):

--

___
Python tracker 

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



  1   2   3   >