[issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS

2010-03-25 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

STINNER Victor wrote:
> 
> STINNER Victor  added the comment:
> 
> MaL> It unconditionally overrides CFLAGS - even if it is not 
> MaL> set and defined by AC_PROG_CC as "-g -O2". That would need 
> MaL> to be corrected.
> MaL>
> MaL> Other than that it does help a little work around the mess :-)
> 
> I commited my patch: r79392 (trunk). I'm waiting for the buildbots before 
> porting to other branches :-)
> 
> On my Linux, .c files are now compiled with:
>  - "-fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall ..." (default)
>  - "-fno-strict-aliasing -g -Wall ..." (--with-pydebug): no more compiler 
> optimization hurting gdb ;-)

The patch you checked in still unconditionally overrides the
CFLAGS setting applied by AC_PROG_CC in case no CFLAGS variable
is set.

Please fix that or revert the patch.

--

___
Python tracker 

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



[issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS

2010-03-25 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

STINNER Victor wrote:
> 
> STINNER Victor  added the comment:
> 
>> I commited my patch: r79392 (trunk). I'm waiting for the buildbots before 
>> porting to other branches :-)
> 
> The buildbots look happy => r79401 (py3k), blocked in 2.6 and 3.1
> 
> The issue title was "configure: ignore AC_PROG_CC hardcoded CFLAGS", and not 
> "fix configure", so I can close the issue.

The issue now is: AC_PROG_CC no longer initializes CFLAGS if not set.

> Marc-Andre: open a new issue if you are motivated to fix "configure mess" :-)

Some other day...

--

___
Python tracker 

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



[issue8228] pprint, single/multiple items per line parameter

2010-03-25 Thread Dmitry Chichkov

Dmitry Chichkov  added the comment:

Quick, dirty and utterly incorrect patch that works for me. Includes 
issue_5131.patch (defaultdict support, etc). Targets trunk (2.6), revision 
77310.

--
keywords: +patch
Added file: http://bugs.python.org/file16640/issue_8228.dirty.patch

___
Python tracker 

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



[issue6543] traceback presented in wrong encoding

2010-03-25 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Storing unicode in c_filename would not solve the problem: "surrogateescape" 
characters are not printable.
There is no need to support non-decodable filenames in the import mechanism.

--

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-25 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

@Antoine Pitrou: ok, I think I'll have to be able to replicate the error in 
order to try to fix this. I'm gonna try on FreeBSD and another Linux box later 
today.

--

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-25 Thread Florent Xicluna

Florent Xicluna  added the comment:

I don't know if it is better to fix it in the ftplib or the ssl module.

The previous patch fixes it at the SSL level (stdlib only).
This patch implements the fix at the ftplib level (stdlib + test).

--
Added file: http://bugs.python.org/file16641/issue8108_ftplib_ssl_098m.diff

___
Python tracker 

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



[issue8229] Interpreter crash on application shutdown

2010-03-25 Thread tb220

New submission from tb220 :

Attached the error report generated by Windows. The problem occurs in 1 out of 
10 shutdowns.

--
components: Interpreter Core, Windows
files: cabb_appcompat.txt
messages: 101679
nosy: tb220
severity: normal
status: open
title: Interpreter crash on application shutdown
versions: Python 2.6
Added file: http://bugs.python.org/file16642/cabb_appcompat.txt

___
Python tracker 

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



[issue8229] Interpreter crash on application shutdown

2010-03-25 Thread tb220

Changes by tb220 :


--
type:  -> crash

___
Python tracker 

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



[issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS

2010-03-25 Thread STINNER Victor

STINNER Victor  added the comment:

MaL> The patch you checked in still unconditionally overrides the
MaL> CFLAGS setting applied by AC_PROG_CC in case no CFLAGS variable
MaL> is set.
MaL>
MaL> The issue now is: AC_PROG_CC no longer initializes CFLAGS 
MaL> if not set.

Sorry, but I don't understand. Why should it be initialized?

I don't like the default value because it enables optimization when 
--with-pydebug is used and I consider that as a bug. If no configure option is 
used, Python adds -O3 as before. About -g: Python always add it, so the -g from 
AC_PROG_CC was redundant.

In Makefile.pre.in, prefixes and suffixes are added to the CFLAGS: "CFLAGS= 
$(BASECFLAGS) @CFLAGS@ $(OPT) $(EXTRA_CFLAGS)". But I consider this as a 
separate issue.

--

___
Python tracker 

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



[issue8214] Add exception logging function to syslog module

2010-03-25 Thread Eric Smith

Eric Smith  added the comment:

Good point. So that makes the implementation more like:

import traceback
import syslog
import sys

def syslog_exception(etype, evalue, etb):
# The result of traceback.format_exception might contain
# embedded newlines, so we have the nested loops.
for line in traceback.format_exception(etype, evalue, etb):
for line in line.rstrip().split('\n'):
syslog.syslog(line)

def logexceptions(chain=True):
# Should we chain to the existing sys.excepthook?
current_hook = sys.excepthook if chain else None

def hook(etype, evalue, etb):
if current_hook:
current_hook(etype, evalue, etb)
syslog_exception(etype, evalue, etb)
sys.excepthook = hook

We could then make syslog_exception take a tuple instead of the 3 values. I'm 
not sure which is more convenient, or more widely used in other APIs.

Once it's moved into syslog, maybe syslog_exception named syslog.log_exception.

--

___
Python tracker 

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



[issue8214] Add exception logging function to syslog module

2010-03-25 Thread STINNER Victor

STINNER Victor  added the comment:

> Once it's moved into syslog, maybe syslog_exception named 
> syslog.log_exception.

In that case, how would be called the second function? Can write a patch with 
an unit test?

--

___
Python tracker 

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



[issue8214] Add exception logging function to syslog module

2010-03-25 Thread Eric Smith

Eric Smith  added the comment:

>> Once it's moved into syslog, maybe syslog_exception named 
>> syslog.log_exception.

That's "should be named", of course. Although on second thought maybe 
syslog.syslog_exception really is the right name, to mirror syslog.syslog.

> In that case, how would be called the second function? Can write a patch with 
> an unit test?

I'm not sure which second function you mean.

As far as the implementation, Sean's working on it, although I'm willing to 
help.

--

___
Python tracker 

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



[issue8229] Interpreter crash on application shutdown

2010-03-25 Thread tb220

tb220  added the comment:

Please let me know how I can provide you with additional information.

--

___
Python tracker 

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



[issue8214] Add exception logging function to syslog module

2010-03-25 Thread STINNER Victor

STINNER Victor  added the comment:

> I'm not sure which second function you mean.

"logexceptions" which replaces sys.excepthook. "log_exception" and 
"log_exceptions" are very close.

cgitb has a function "enable" which sets sys.excepthook.

--

___
Python tracker 

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



[issue8214] Add exception logging function to syslog module

2010-03-25 Thread Eric Smith

Eric Smith  added the comment:

Ah, I see. Yes, logexceptions needs a better name. Maybe 
enable_exception_logging.

--

___
Python tracker 

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



[issue8214] Add exception logging function to syslog module

2010-03-25 Thread Eric Smith

Eric Smith  added the comment:

Here's a version that would be more analogous to what the C implementation 
would look like. It uses a class instead of a closure to capture the "chain" 
value. The 2 exposed functions syslog_exception and enable_exception_logging 
are the new APIs in this proposal, which would be written in C as part of the 
syslog module. The class is a hidden implementation detail.


import traceback
import syslog
import sys

def syslog_exception(etype, evalue, etb):
# The result of traceback.format_exception might contain
# embedded newlines, so we have the nested loops.
for line in traceback.format_exception(etype, evalue, etb):
for line in line.rstrip().split('\n'):
syslog.syslog(line)

class _Hook(object):
def __init__(self, chain):
# Should we chain to the existing sys.excepthook?
self._current_hook = sys.excepthook if chain else None

def _hook(self, etype, evalue, etb):
if self._current_hook:
self._current_hook(etype, evalue, etb)
syslog_exception(etype, evalue, etb)

def enable_exception_logging(chain=True):
sys.excepthook = _Hook(chain)._hook

--

___
Python tracker 

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



[issue8224] subprocess.Popen raises WindowsError if there is a dot in program name

2010-03-25 Thread Eric Smith

Eric Smith  added the comment:

I agree with David that this is a Windows problem. I copied xcopy.exe into a 
local directory as xcopy.exe and xcopy.a.exe. When running this VBScript, the 
first line runs, the second gives me an error 0x8007002, "The system could not 
find the file specified".

WScript.CreateObject("WScript.Shell").Run "xcopy", 1, true
WScript.CreateObject("WScript.Shell").Run "xcopy.a", 1, true

I only tested on XP.

--
nosy: +eric.smith
resolution:  -> invalid
stage: test needed -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS

2010-03-25 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

STINNER Victor wrote:
> 
> STINNER Victor  added the comment:
> 
> MaL> The patch you checked in still unconditionally overrides the
> MaL> CFLAGS setting applied by AC_PROG_CC in case no CFLAGS variable
> MaL> is set.
> MaL>
> MaL> The issue now is: AC_PROG_CC no longer initializes CFLAGS 
> MaL> if not set.
> 
> Sorry, but I don't understand. Why should it be initialized?

Sorry, perhaps I wasn't clear enough.

The purpose of AC_PROG_CC is to setup the env vars depending on
the found C compiler. One of these settings is the CFLAGS env
var and you patch causes those settings to be overwritten
if CFLAGS has not been defined as env var before starting
./configure.

Since CFLAGS will most of the time not be set by the user
running ./configure, the patch effectively disables the
default settings determined based on the compiler by AC_PROG_CC.

> I don't like the default value because it enables optimization when 
> --with-pydebug is used and I consider that as a bug. If no configure option 
> is used, Python adds -O3 as before. About -g: Python always add it, so the -g 
> from AC_PROG_CC was redundant.

Right, but it's possible that AC_PROG_CC adds other flags
as well (it currently doesn't, but that may well change in
future versions of autoconf).

I'd suggest to only override the CFLAGS setting in case it
was defined before running the AC_PROG_CC code.

In addition, it may be useful to have --with-pydebug replace OPT
with "-O0" or add "-O0" to it the end of it.

> In Makefile.pre.in, prefixes and suffixes are added to the CFLAGS: "CFLAGS= 
> $(BASECFLAGS) @CFLAGS@ $(OPT) $(EXTRA_CFLAGS)". But I consider this as a 
> separate issue.

Right. That's for historic reasons. OPT is very old, BASECFLAGS
and EXTRA_CFLAGS are newer additions.

--

___
Python tracker 

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



[issue8229] Interpreter crash on application shutdown

2010-03-25 Thread R. David Murray

R. David Murray  added the comment:

A recipe for reproducing the problem would be the most useful thing.  I suspect 
the windows error report is pretty much useless in this context.

--
nosy: +r.david.murray
priority:  -> normal
stage:  -> test needed

___
Python tracker 

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



[issue7992] Backport capsule object

2010-03-25 Thread Florent Xicluna

Florent Xicluna  added the comment:

All windows buildbots fail to compile:

http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%20trunk
http://www.python.org/dev/buildbot/all/builders/x86%20XP-5%20trunk
http://www.python.org/dev/buildbot/all/builders/x86%20Windows7%20trunk

--
keywords: +buildbot
nosy: +flox

___
Python tracker 

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



[issue6081] str.format_from_mapping()

2010-03-25 Thread Eric Smith

Eric Smith  added the comment:

It occurs to me that Raymond's use case could be satisfied using existing 
Python, by slightly changing the format string. After all, str.format() 
supports mapping lookup already:

$ ./python.exe
Python 2.6.5+ (release26-maint:79421, Mar 25 2010, 08:51:39)
[GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> class Default(dict):
...  def __missing__(self, key):
...   return key
...
>>> s = '{m[name]} was born in {m[country]}'
>>> s.format(m=Default(name='Guido'))
'Guido was born in country'
>>>

Considering that, maybe the best thing is to do nothing. Or maybe update the 
documentation with this example.

Plus, you could mix and match this with *args as you'd like.

--

___
Python tracker 

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



[issue8230] Lib/test/sortperf.py fails to run

2010-03-25 Thread Patrick Sabin

New submission from Patrick Sabin :

There is a test file Lib/test/sortperf.py, which isn't properly updated
to python3, because it considers map and range returning a list instead of an 
iterator and therefore throwing an exception when run. I have attached a patch 
to fix it.

--
components: Tests
files: sortperf.diff
keywords: patch
messages: 101693
nosy: pyfex
severity: normal
status: open
title: Lib/test/sortperf.py fails to run
versions: Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file16643/sortperf.diff

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-25 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Florent, you shouldn't need to silence socket.error at this level.

I think what needs to happen is that, when unwrap() fails in 
SSLConnection.close(), handle_read() and handle_write() retry the unwrap() 
call. That's what I gather from the explanation of the new behaviour.

--

___
Python tracker 

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



[issue7992] Backport capsule object

2010-03-25 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

As Marc-André pointed out, you shouldn't have converted old uses of PyCObject. 
It breaks compatibility, and I don't think there's any point since 2.7 will 
probably be the last in the 2.x line.

--
nosy: +lemburg, pitrou

___
Python tracker 

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



[issue7992] Backport capsule object

2010-03-25 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

(if you want to be perfectionist, you can have those modules provide both a 
PyCObject and a PyCapsule interface...)

--

___
Python tracker 

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2010-03-25 Thread Nir Aides

Nir Aides  added the comment:

I upload an updated bfs.patch. Apply to updated py32 and ignore the error with:

$ patch -fp1 < bfs.patch
$ ./configure


> Please give understandable benchmark numbers, including an explicit 
> comparison with baseline 3.2, and patched 3.2 (e.g. gilinter.patch)

Below.

> Please also measure single-thread performance, because it looks like you are 
> adding significant work inside the core eval loop

Removed most of it now. last bit will be removed soon.

> Do you need a hi-res clock? gettimeofday() already gives you microseconds. It 
> looks like a bit of imprecision shouldn't be detrimental.

I use clock_gettime() to get the thread running time to calculate slice 
depletion. Wall clock can not help with that.

> The magic number DEADLINE_FACTOR looks gratuitous (why 1.1^20 ?) 

To my understanding it controls the CPU load (~6) beyond which threads tend to 
expire. Since expired threads are handled in FIFO order, IO threads do not 
preempt them (IO threads are chronically expired). So beyond that load IO 
threads become less responsive.

> By the way, I would put COND_SIGNAL inside the LOCK_MUTEX / UNLOCK_MUTEX pair 
> in bfs_yield().

Done.

Here are benchmark results of the UDP test as timed with ipython, where 
client.work() is a single run of the client:

System: Core 2 Duo (locked at 2.4 GHz) with Ubuntu Karmic 64 bit.

Vanilla Python 3.2: 

* Note on my system the original problem discussed in this issue report does 
not manifest since conditions wake up threads according to OS scheduling policy.

In [28]: %timeit -n3 client.work()
1.290 seconds (8127084.435 bytes/sec)
1.488 seconds (7045285.926 bytes/sec)
2.449 seconds (4281485.217 bytes/sec)
1.874 seconds (5594303.222 bytes/sec)
1.853 seconds (5659626.496 bytes/sec)
0.872 seconds (12023425.779 bytes/sec)
4.951 seconds (2117942.079 bytes/sec)
0.728 seconds (14409157.126 bytes/sec)
1.743 seconds (6016999.707 bytes/sec)
3 loops, best of 3: 1.53 s per loop

gilinter.patch:

In [31]: %timeit -n3 client.work()
5.192 seconds (2019676.396 bytes/sec)
1.613 seconds (6500071.475 bytes/sec)
3.057 seconds (3429689.199 bytes/sec)
3.486 seconds (3007596.468 bytes/sec)
4.324 seconds (2424791.868 bytes/sec)
0.964 seconds (10872708.606 bytes/sec)
3.510 seconds (2987722.960 bytes/sec)
1.362 seconds (7698999.458 bytes/sec)
1.013 seconds (10353913.920 bytes/sec)
3 loops, best of 3: 1.96 s per loop

PyCON patch:

In [32]: %timeit -n3 client.work()
2.483 seconds (4223256.889 bytes/sec)
1.330 seconds (7882880.263 bytes/sec)
1.737 seconds (6036251.315 bytes/sec)
1.348 seconds (7778296.679 bytes/sec)
0.983 seconds (10670811.638 bytes/sec)
1.419 seconds (7387226.333 bytes/sec)
1.057 seconds (9919412.977 bytes/sec)
2.483 seconds (4223205.791 bytes/sec)
2.121 seconds (4944231.292 bytes/sec)
3 loops, best of 3: 1.25 s per loop

bfs.patch:

In [33]: %timeit -n3 client.work()
0.289 seconds (36341875.356 bytes/sec)
0.271 seconds (38677439.991 bytes/sec)
0.476 seconds (22033958.947 bytes/sec)
0.329 seconds (31872974.070 bytes/sec)
0.478 seconds (21925125.894 bytes/sec)
0.242 seconds (43386204.271 bytes/sec)
0.213 seconds (49195701.418 bytes/sec)
0.309 seconds (33967467.196 bytes/sec)
0.256 seconds (41008076.688 bytes/sec)
3 loops, best of 3: 259 ms per loop


Output of cpued.py test:

Vanilla Python 3.2, gilinter.patch and PyCON patch all starve the pure Python 
threads and output the following:

$ ~/build/python/python32/python cpued.py 
t0 0 False
t1 0 False
t2-interactive 0 True
t2-interactive 1 True
t2-interactive 2 True
t2-interactive 3 True
t2-interactive 4 True
t2-interactive 5 True
t2-interactive 6 True
t2-interactive 7 True
.
.
.


Output from bfs.patch run:

$ ~/build/python/bfs/python cpued.py 
t0 0 False
t1 0 False
t2-interactive 0 True
t0 1 False
t1 1 False
t2-interactive 1 True
t0 2 False
t1 2 False
t2-interactive 2 True
t0 3 False
t1 3 False
t2-interactive 3 True
.
.
.

Note: I have not tested on other Posix systems, and expect to have some 
complications on Windows, since its thread timers are low resolution (10ms+), 
and there are issues with its high-precision wall clock. ...will soon know 
better.

--
Added file: http://bugs.python.org/file16644/bfs.patch

___
Python tracker 

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2010-03-25 Thread Nir Aides

Changes by Nir Aides :


Removed file: http://bugs.python.org/file16634/bfs.patch

___
Python tracker 

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2010-03-25 Thread Nir Aides

Changes by Nir Aides :


Removed file: http://bugs.python.org/file16567/linux-7946.patch

___
Python tracker 

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



[issue8032] Add gdb7 hooks to make it easier to debug Python

2010-03-25 Thread David Fraser

Changes by David Fraser :


--
nosy: +davidfraser

___
Python tracker 

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



[issue5872] New C API for declaring Python types

2010-03-25 Thread Gerhard Häring

Changes by Gerhard Häring :


--
nosy: +ghaering

___
Python tracker 

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



[issue7992] Backport capsule object

2010-03-25 Thread STINNER Victor

STINNER Victor  added the comment:

PyCapsule comes from issues #5630 and #5872.

--
nosy: +haypo

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-25 Thread Florent Xicluna

Florent Xicluna  added the comment:

You're right, there's no need to catch the socket error in "ftplib" module.

Here is the result of the "debugging" patch in the console:

$ ./python -m test.regrtest -uall test_ftplib
test_ftplib
success
success
success
success
success
success
success
success
2702 ssl want read
2801 ssl want read
2661 ssl want read
2274 ssl want read
16742 ssl want read
2397 ssl want read
1 test OK.



IMHO, there's no need to loop on "unwrap()", according to Darryl's analysis.

--
Added file: http://bugs.python.org/file16645/issue8108_print_ssl_want_read.diff

___
Python tracker 

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2010-03-25 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I use clock_gettime() to get the thread running time to calculate slice 
> depletion.

Ouch. CLOCK_THREAD_CPUTIME_ID is not a required part of the standard. Only 
CLOCK_REALTIME is guaranteed to exist.

By the way, it's not obvious cpued tests anything meaningful. I understand the 
bias you are trying to avoid but constructing artificial test cases is not very 
useful, because we are playing with heuristics and it's always possible to 
defeat some expectations. That's why benchmarks should try to model/represent 
real-world situations.


I've tried ccbench with your patch and there's a clear regression in latency 
numbers:

Background CPU task: Pi calculation (Python)

CPU threads=0: 0 ms. (std dev: 0 ms.)
CPU threads=1: 1 ms. (std dev: 0 ms.)
CPU threads=2: 0 ms. (std dev: 2 ms.)
CPU threads=3: 0 ms. (std dev: 2 ms.)
CPU threads=4: 2 ms. (std dev: 8 ms.)

Background CPU task: regular expression (C)

CPU threads=0: 0 ms. (std dev: 0 ms.)
CPU threads=1: 969 ms. (std dev: 577 ms.)
CPU threads=2: 1050 ms. (std dev: 577 ms.)
CPU threads=3: 1217 ms. (std dev: 577 ms.)
CPU threads=4: 1416 ms. (std dev: 577 ms.)

Vanilla py3k and py3k+gilinter both don't have this problem (on the regular 
expression workload).

IO bandwidth numbers are similar between the BFS patch:

Background CPU task: Pi calculation (Python)

CPU threads=0: 6952.7 packets/s.
CPU threads=1: 4350.3 ( 62 %)
CPU threads=2: 3332.2 ( 47 %)
CPU threads=3: 2632.0 ( 37 %)
CPU threads=4: 2052.0 ( 29 %)

and py3k + gilinter:

Background CPU task: Pi calculation (Python)

CPU threads=0: 7023.4 packets/s.
CPU threads=1: 5019.4 ( 71 %)
CPU threads=2: 4474.6 ( 63 %)
CPU threads=3: 2728.5 ( 38 %)
CPU threads=4: 2244.9 ( 31 %)

--

___
Python tracker 

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



[issue8229] Interpreter crash on application shutdown

2010-03-25 Thread Brian Curtin

Brian Curtin  added the comment:

Are you running a service? I can't say I'm too familiar with the file you 
uploaded, but the file contains a few things that lead me to believe you may 
be. As David said, it would be helpful to know what you were doing.

--
nosy: +brian.curtin

___
Python tracker 

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



[issue6231] ElementInclude may drop text

2010-03-25 Thread Neil Muller

Neil Muller  added the comment:

It looks like this issue was missed in the recent ElementTree update.

Attached is an updated diff for py3k.

--
nosy: +flox
Added file: http://bugs.python.org/file16646/ElementInclude_py3k.diff

___
Python tracker 

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



[issue6231] ElementInclude may drop text

2010-03-25 Thread Neil Muller

Neil Muller  added the comment:

Similiarly updated patch against current trunk

--
Added file: http://bugs.python.org/file16647/ElementInclude.diff

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-25 Thread Florent Xicluna

Changes by Florent Xicluna :


Removed file: http://bugs.python.org/file16641/issue8108_ftplib_ssl_098m.diff

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-25 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

Florent can you give me a clue on how to make python use OpenSSL 0.9.8k on 
Ubuntu?
Despite I compiled and installed 0.9.8k from sources the system version keeps 
being 0.9.8g and I guess that Python is using that one.
Do I have to recompile Python by using a directive to tell what specific 
OpenSSL version to use?

--

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-25 Thread Florent Xicluna

Florent Xicluna  added the comment:

Patch ftplib/test_ftplib updated.
It is as before (0.9.8k): SSL_ERROR_WANT_READ is ignored on connection unwrap().

--
Added file: http://bugs.python.org/file16648/issue8108_ftplib_ssl_098m_v2.diff

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-25 Thread Florent Xicluna

Florent Xicluna  added the comment:

Giampaolo, IMHO you need 0.9.8m to reproduce the issue.

I installed it from the Debian testing repo (I'm on debian).
~ $ apt-cache policy openssl
openssl:
  Installed : 0.9.8m-2
  Candidate : 0.9.8m-2
 Table de version :
 *** 0.9.8m-2 0
400 ftp://ftp.lip6.fr testing/main Packages
300 ftp://ftp.lip6.fr sid/main Packages
100 /var/lib/dpkg/status
 0.9.8g-15+lenny6 0
900 ftp://ftp.lip6.fr lenny/main Packages
900 http://security.debian.org lenny/updates/main Packages

Maybe you could catch it on "Lucid" repositories, and if you have some chance, 
it may be compatible with your ubuntu version.

--

___
Python tracker 

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2010-03-25 Thread Nir Aides

Nir Aides  added the comment:

> Ouch. CLOCK_THREAD_CPUTIME_ID is not a required part of the standard. Only 
> CLOCK_REALTIME is guaranteed to exist.

Right, however the man page at kernel.org says the following on 
CLOCK_THREAD_CPUTIME_ID: 
"Sufficiently recent versions of glibc and the Linux kernel support the 
following clocks"
http://www.kernel.org/doc/man-pages/online/pages/man2/clock_getres.2.html

The same statement shows up as early as 2003:
http://www.tin.org/bin/man.cgi?section=3&topic=clock_gettime

However, if this is indeed a problem on some systems (none Linux?), then a fall 
back could be attempted for them. 

There could also be a problem on systems where the counter exists but has low 
resolution 10ms+

What platforms do you think this could be a problem on?

> By the way, it's not obvious cpued tests anything meaningful. I understand 
> the bias you are trying to avoid but constructing artificial test cases is 
> not very useful, because we are playing with heuristics and it's always 
> possible to defeat some expectations. That's why benchmarks should try to 
> model/represent real-world situations.

I came up with cpued.py after reading the patches in an attempt to understand 
how they behave. In this case one thread is pure Python while the other 
occasionally releases the GIL, both CPU bound. I don't claim this is a 
real-world situation. However, it is a case in which bfs.patch behaves as 
expected.

> I've tried ccbench with your patch and there's a clear regression in latency 
> numbers.

Please specify system and test details so I can try to look into it. On my 
system ccbench behaves as expected:

$ ~/build/python/bfs/python ccbench.py
== CPython 3.2a0.0 (py3k) ==
== x86_64 Linux on '' ==

--- Throughput ---

Pi calculation (Python)

threads=1: 1252 iterations/s.
threads=2: 1199 ( 95 %)
threads=3: 1178 ( 94 %)
threads=4: 1173 ( 93 %)

regular expression (C)

threads=1: 491 iterations/s.
threads=2: 478 ( 97 %)
threads=3: 472 ( 96 %)
threads=4: 477 ( 97 %)

SHA1 hashing (C)

threads=1: 2239 iterations/s.
threads=2: 3719 ( 166 %)
threads=3: 3772 ( 168 %)
threads=4: 3464 ( 154 %)

--- Latency ---

Background CPU task: Pi calculation (Python)

CPU threads=0: 0 ms. (std dev: 1 ms.)
CPU threads=1: 0 ms. (std dev: 1 ms.)
CPU threads=2: 0 ms. (std dev: 1 ms.)
CPU threads=3: 0 ms. (std dev: 1 ms.)
CPU threads=4: 0 ms. (std dev: 1 ms.)

Background CPU task: regular expression (C)

CPU threads=0: 0 ms. (std dev: 0 ms.)
CPU threads=1: 6 ms. (std dev: 0 ms.)
CPU threads=2: 2 ms. (std dev: 2 ms.)
CPU threads=3: 1 ms. (std dev: 0 ms.)
CPU threads=4: 5 ms. (std dev: 7 ms.)

Background CPU task: SHA1 hashing (C)

CPU threads=0: 0 ms. (std dev: 1 ms.)
CPU threads=1: 0 ms. (std dev: 1 ms.)
CPU threads=2: 0 ms. (std dev: 1 ms.)
CPU threads=3: 1 ms. (std dev: 1 ms.)
CPU threads=4: 1 ms. (std dev: 0 ms.)

--

___
Python tracker 

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



[issue8231] Subprocess Startup Error - unable to create user config directory

2010-03-25 Thread cane

New submission from cane :

When trying to run Python 2.6.5 & 3.1 IDLE GUI on Windows 7, I receive the 
following error that the "IDLE's subprocess didnt make connection. Either IDLE 
can't start a subprocess or personal firewall software is blocking the 
connection."

I've researched this error and tried following the steps to troubleshoot this 
error without any success.  I do not have any firewall software installed or 
have the Microsoft firewall enabled.  When following issue 8099 and tring to 
set the TCL and TK library to the idle.py I get the error that I need to check 
the path and permissions. (see attached screenshot)

These workstations are setup in active directory enviroment where each username 
that logs into the workstation is a local administrator and the referenced 
"M:\" drive is a home directory that is mapped for them.

When the local administrator account logs into the workstation the user can 
execute the IDLE GUI without any issues.

I found reference in one article that the os.py creates a directory called 
".idlerc". 

I'm wondering if there is a way to hardcode a reference path that doesnt point 
to my "M:\" drive for this directory or is there something else that I can try 
to fix this issue?

Thanks,
Bryan

--
components: Windows
files: error.png
messages: 101708
nosy: cane
severity: normal
status: open
title: Subprocess Startup Error - unable to create user config directory
type: crash
versions: Python 2.6, Python 3.1
Added file: http://bugs.python.org/file16649/error.png

___
Python tracker 

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



[issue2768] os.fstat and other os.f* methods should use PyObject_AsFileDescriptor

2010-03-25 Thread Neil Muller

Neil Muller  added the comment:

Poking this issue with updated patches.

Patch against py3k.

--
Added file: http://bugs.python.org/file16650/posixmodule_comb_py3k.patch

___
Python tracker 

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



[issue2768] os.fstat and other os.f* methods should use PyObject_AsFileDescriptor

2010-03-25 Thread Neil Muller

Changes by Neil Muller :


Added file: http://bugs.python.org/file16651/posixmodule_comb.patch

___
Python tracker 

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



[issue6544] Fix refleak in kqueue implementation

2010-03-25 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis  added the comment:

This issue seems to have been fixed in r78386 (trunk), r79223 (2.6) and r78958 
(py3k). It should be still backported to 3.1.

--
nosy: +Arfrever

___
Python tracker 

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2010-03-25 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Please specify system and test details so I can try to look into it.

It's a dual-core Linux x86-64 system. But, looking at the patch again,
the reason is obvious:

#define CHECK_SLICE_DEPLETION(tstate) (bfs_check_depleted || 
(tstate->tick_counter % 1000 == 0))

`tstate->tick_counter % 1000` is replicating the behaviour of the old
GIL, which based its speculative operation on the number of elapsed
opcodes (and which also gave bad latency numbers on the regex workload).

By the way, I configure --with-computed-gotos.

--

___
Python tracker 

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



[issue1491] BaseHTTPServer incorrectly implements response code 100

2010-03-25 Thread Neil Muller

Neil Muller  added the comment:

Poking the issue with an updated patch for trunk.

--
Added file: http://bugs.python.org/file16652/BaseHTTPServer_continue_3.patch

___
Python tracker 

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



[issue2768] os.fstat and other os.f* methods should use PyObject_AsFileDescriptor

2010-03-25 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Actually, I'm not sure it's a good idea. For example, calling 
os.ftruncate(fobj) on a py3k file object will bypass the object's internal 
buffering, ignoring any pending buffered data; the right thing to do is to call 
fobj.truncate() instead.

It may be better to simply mention in the docs that fileno() can be used on 
file-like objects to get a file descriptor, if needed.

--
nosy: +loewis

___
Python tracker 

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2010-03-25 Thread Nir Aides

Nir Aides  added the comment:

> It's a dual-core Linux x86-64 system. But, looking at the patch again, the 
> reason is obvious:
>
> #define CHECK_SLICE_DEPLETION(tstate) (bfs_check_depleted || (tstate
> >tick_counter % 1000 == 0))
>
> `tstate->tick_counter % 1000` is replicating the behaviour of the old GIL, 
> which based its speculative operation on the number of elapsed opcodes (and 
> which also gave bad latency numbers on the regex workload).

The flag_check_depleted is there to work around this problem. It is raised by 
waiters which timeout.

What distribution and version of GNU/Linux are you using?

As for the CLOCK_THREAD_CPUTIME_ID clock, support was added to FreeBSD recently 
in version 7.1, which I guess is not good enough:
http://www.freebsd.org/releases/7.1R/relnotes.html

I did not find yet anything on Solaris. Do you know of an alternative way to 
measure thread running time on Posix?

--

___
Python tracker 

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2010-03-25 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> What distribution and version of GNU/Linux are you using?

$ cat /etc/mandriva-release 
Mandriva Linux release 2010.0 (Official) for x86_64

$ rpm -qv glibc
glibc-2.10.1-6.2mnb2

$ uname -a
Linux localhost 2.6.31.5-desktop-1mnb #1 SMP Fri Oct 23 00:05:22 EDT
2009 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3600+ GNU/Linux

I'll try on an Ubuntu system some other day, if I find the time.

> I did not find yet anything on Solaris. Do you know of an alternative
> way to measure thread running time on Posix?

No, but I'm not an expert.

--

___
Python tracker 

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



[issue8231] Unable to run IDLE without write-access to config directory

2010-03-25 Thread Brian Curtin

Brian Curtin  added the comment:

I just reproduced this by removing write access from my user for my home 
directory.

It seems odd that you wouldn't have write access to your home directory in the 
first place, but that's tangent to the issue. I'll see if there are other 
acceptable locations to attempt to place the config directory.

--
components: +Library (Lib)
nosy: +brian.curtin
priority:  -> normal
stage:  -> needs patch
title: Subprocess Startup Error - unable to create user config directory -> 
Unable to run IDLE without write-access to config directory
type: crash -> behavior

___
Python tracker 

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



[issue1491] BaseHTTPServer incorrectly implements response code 100

2010-03-25 Thread Neil Muller

Neil Muller  added the comment:

And a py3k version (although the conversion can be improved).

--
Added file: 
http://bugs.python.org/file16653/BaseHTTPServer_continue_3_py3k.patch

___
Python tracker 

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



[issue1491] BaseHTTPServer incorrectly implements response code 100

2010-03-25 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +orsenthil

___
Python tracker 

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



[issue2768] os.fstat and other os.f* methods should use PyObject_AsFileDescriptor

2010-03-25 Thread Neil Muller

Neil Muller  added the comment:

Fair enough.

Possible doc patch attached.

--
Added file: http://bugs.python.org/file16654/fileno_doc.diff

___
Python tracker 

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



[issue2768] os.fstat and other os.f* methods should use PyObject_AsFileDescriptor

2010-03-25 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee:  -> georg.brandl
components: +Documentation -Extension Modules
nosy: +georg.brandl

___
Python tracker 

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



[issue2768] os.fstat and other os.f* methods should use PyObject_AsFileDescriptor

2010-03-25 Thread Neil Muller

Neil Muller  added the comment:

More fleshed out doc patch. Mention caveats about using file descriptors 
directly, add note to ftruncate similar to that for other dangerous methods.

--
Added file: http://bugs.python.org/file16655/fileno_doc.diff

___
Python tracker 

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



[issue8032] Add gdb7 hooks to make it easier to debug Python

2010-03-25 Thread Dave Malcolm

Dave Malcolm  added the comment:

I'm attaching a new version of the patch (v4), against svn trunk (r79422)

Changes since v3:
  * added support for PySetObject (set/frozenset)
  * added support for PyBaseExceptionObject (BaseException)
  * fixed a signed vs unsigned char issue that led to exceptions in gdb for 
PyStringObject instances containing bytes in the range 0x80-0xff
  * handle the case of loops in the object reference graph.  In previous 
versions, the gdb prettyprinter would get stuck in infinite recursion following 
the pointers.  The new version keeps track of the set of all pointers we've 
visited so far, stopping the traversal at object's we've already reached 
(analagous to Py_ReprEnter and Py_ReprLeave).
  * unit tests for all of the above (full test suite passes on my machine thus: 
"Ran 35 tests in 13.547s"; this is a Fedora 12 x86_64 box with 
gdb-7.0.1-33.fc12)

--
Added file: 
http://bugs.python.org/file16656/add-gdb7-python-hooks-to-trunk-v4.patch

___
Python tracker 

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



[issue8032] Add gdb7 hooks to make it easier to debug Python

2010-03-25 Thread Dave Malcolm

Dave Malcolm  added the comment:

(adding diff from v3 to v4, for ease of review)

--
Added file: 
http://bugs.python.org/file16657/diff-of-gdb7-hooks-v4-relative-to-v3.diff

___
Python tracker 

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



[issue5103] ssl.SSLSocket timeout not working correctly when remote end is hanging

2010-03-25 Thread Jim Duchek

Jim Duchek  added the comment:

This is happening 'in the wild' to me fairly regularly.  Since it's not hanging 
in python, I can't watchdog/kill the thread it's happening in.  matejcik seems 
correct on fixing this, there's no need to unset the timeout here.

--
nosy: +Jim.Duchek

___
Python tracker 

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



[issue8032] Add gdb7 hooks to make it easier to debug Python

2010-03-25 Thread Jeffrey Yasskin

Changes by Jeffrey Yasskin :


--
nosy: +jyasskin

___
Python tracker 

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



[issue7992] Backport capsule object

2010-03-25 Thread Larry Hastings

Larry Hastings  added the comment:

This is also (naturally) being discussed on python-dev.  I've posted a long 
message there about it; you can find that message here:

http://mail.python.org/pipermail/python-dev/2010-March/098904.html

I don't know whether it's best to conduct such a discussion here, in 
Python-Dev, or both.  I assumed Python-Dev is superior because more people will 
see it.  If it makes sense to move the discussion here we can move it.

--

___
Python tracker 

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2010-03-25 Thread Nir Aides

Nir Aides  added the comment:

Well, on initial check the scheduler seems to work well with regular 
gettimeofday() wall clock instead of clock_gettime().

:)

/* Return thread running time in seconds (with nsec precision). */
static inline long double get_thread_timestamp(void) {
return get_timestamp(); // wall clock via gettimeofday()
/*struct timespec ts;
clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts);
return (long double) ts.tv_sec + ts.tv_nsec * 0.1;*/
}

Does it make things better on your system?

--

___
Python tracker 

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



[issue8232] webbrowser open(), open_new(), and open_new_tab() Broken Functionality

2010-03-25 Thread Jonathan Chao

New submission from Jonathan Chao :

webbrowser.open(), webbrowser.open_new(), and webbrowser.open_new_tab() all do 
the exact same thing, regardless of the flags that I set. In Firefox, 
open('www.google.com', new=0), open_new('www.google.com'), and 
open_new_tab('www.google.com') all open either three new www.google.com tabs 
(if "Open new windows in a new tab instead" is selected in FF options) or three 
new www.google.com windows (if "Open new windows in a new tab instead" is not 
selected in FF options). In Internet Explorer, three new www.google.com tabs 
are created.

The issue exhibits itself the same way whether or not I have the browser open 
before running the script.

Environment was a Windows Vista 32-bit machine, running Python 3.1.2.

Example script reads:
import webbrowser
import time
ff = webbrowser.get('firefox')
ff.open('www.google.com', new=0)
time.sleep(3)
ff.open_new('www.google.com')
time.sleep(3)
ff.open_new_tab('www.google.com')

--
components: Library (Lib)
messages: 101725
nosy: joncwchao
severity: normal
status: open
title: webbrowser open(), open_new(), and open_new_tab() Broken Functionality
type: behavior
versions: Python 3.1

___
Python tracker 

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



[issue7992] Backport capsule object

2010-03-25 Thread Larry Hastings

Larry Hastings  added the comment:

Florent: that's because the Windows build projects don't build capsule.c.  I 
don't have an appropriate Windows development environment; I'll try to fix them 
by hand tonight, but if that doesn't work we'll have to call for help from some 
Windows core developer.

--

___
Python tracker 

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



[issue7992] Backport capsule object

2010-03-25 Thread Brian Curtin

Brian Curtin  added the comment:

(adding myself to the nosy list as a Windows dev)

--
nosy: +brian.curtin

___
Python tracker 

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



[issue8232] webbrowser open(), open_new(), and open_new_tab() Broken Functionality

2010-03-25 Thread Brian Curtin

Brian Curtin  added the comment:

On Windows, the WindowsDefault class gets used and it doesn't make use of 
anything other than the URL (no 'new' or 'autoraise'). All it does is pass the 
URL onto os.startfile.

It should make a better attempt at running the URL. Patches welcome, or I'll 
try to come up with one shortly.

--
nosy: +brian.curtin
priority:  -> normal
stage:  -> needs patch

___
Python tracker 

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



[issue8232] webbrowser.open incomplete on Windows

2010-03-25 Thread Brian Curtin

Changes by Brian Curtin :


--
title: webbrowser open(), open_new(), and open_new_tab() Broken Functionality 
-> webbrowser.open incomplete on Windows

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-25 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

Ok, I've finally been able to reproduce the issue by installing OpenSSL 0.9.8m 
on my Ubuntu box.
By doing some debugging I'm starting to think that maybe there's something 
wrong with the shutdown() method implementation itself because no matter what, 
sooner or later it always ends up raising "error: [Errno 0] Error".

I've cheated by trapping shutdown() in a while loop waiting for it to succeed, 
I've tried to manually call handle_read() and handle_write(), I've also tried 
to set the socket back to blocking mode just to see if shutdown() would return 
but I've always ended up encountering "error: [Errno 0] Error".

IMHO, before going any further I'd investigate on why this call can just fail 
without providing any information about what happened.
>From the upper application's point of view there's nothing it can do in case 
>of such an error.
Assuming that "the remote side closed the connection abruptly" and close the 
socket is just wrong.

--

___
Python tracker 

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



[issue8233] extend py_compile to compile files from stdin

2010-03-25 Thread Piotr Ożarowski

New submission from Piotr Ożarowski :

Following issue 8140 - attached patches add functionality to take file names to 
be compiled from standard input in py_compile module (if '-' is the only 
parameter in args)

--
components: Library (Lib)
files: py_compile.py.diff
keywords: patch
messages: 101730
nosy: barry, piotr
severity: normal
status: open
title: extend py_compile to compile files from stdin
type: feature request
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file16658/py_compile.py.diff

___
Python tracker 

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



[issue8233] extend py_compile to compile files from stdin

2010-03-25 Thread Piotr Ożarowski

Changes by Piotr Ożarowski :


Added file: http://bugs.python.org/file16659/py_compile.py.diff

___
Python tracker 

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



[issue8233] extend py_compile to compile files from stdin

2010-03-25 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee:  -> barry

___
Python tracker 

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



[issue8229] Interpreter crash on application shutdown

2010-03-25 Thread tb220

tb220  added the comment:

The application consists of three processes: Process A provides a web interface 
to the remote user and watchdog services for process B, which A creates by 
using the multiprocessing module. Process B does the real work and provides a 
GUI to the local user. Process A communicates with process B via the xmlrpclib 
module. Both A and B are python processes. Process B uses the subprocess module 
to start process C, which is not a python process, and it communicates with it 
using the xmlrpclib module. Process B is the one that crashes every now and 
then when sys.exit is invoked.

I will try to produce the smallest possible application I can that still 
suffers from the problem and I will upload it.

--

___
Python tracker 

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



[issue8232] webbrowser.open incomplete on Windows

2010-03-25 Thread Brian Curtin

Brian Curtin  added the comment:

Minor correction: BackgroundBrowser gets used in this case, but it still lacks 
in the same area and causes what you are seeing.

--

___
Python tracker 

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



[issue8234] Spelling and text in howto/webservers

2010-03-25 Thread Yuv Gre

New submission from Yuv Gre :

A spelling mistake ("recommentation") and a bit rephrasing for clarity. I think 
better can be done, but more text would have to be moved around.

--
assignee: georg.brandl
components: Documentation
files: webservers_spelling.patch
keywords: patch
messages: 101733
nosy: georg.brandl, ubershmekel
severity: normal
status: open
title: Spelling and text in howto/webservers
type: behavior
versions: Python 2.7, Python 3.3
Added file: http://bugs.python.org/file16660/webservers_spelling.patch

___
Python tracker 

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



[issue8222] enabling SSL_MODE_AUTO_RETRY on SSL sockets

2010-03-25 Thread Bill Janssen

Bill Janssen  added the comment:

Looks like a good idea.

--

___
Python tracker 

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



[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface

2010-03-25 Thread Roger Serwy

Roger Serwy  added the comment:

Rather than change the core code of IDLE, I've attached an extension to achieve 
terminal-like behavior. It provides a toggle to enable/disable. However, this 
extension as-is only works on the 2.x series, although it can be modified 
slightly to work on 3.x.

--
Added file: http://bugs.python.org/file16661/Terminal.py

___
Python tracker 

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



[issue3851] IDLE: Pressing "Home" on Windows places cursor before ">>>" instead of after. Solution offered.

2010-03-25 Thread Roger Serwy

Changes by Roger Serwy :


--
status: open -> closed

___
Python tracker 

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



[issue8235] Support FreeBSD's SO_SETFIB in socketmodule.c

2010-03-25 Thread Kyle VanderBeek

New submission from Kyle VanderBeek :

FreeBSD has a [gs]etsockopt() constant used to cause a given socket to use an 
alternate routing table (FIB); it appeared in FreeBSD 7.1.  It would be useful 
to have this exposed as a constant in the socket module to allow special 
routing rules in complex environments.

--
components: Extension Modules
files: python-SO_SETFIB.patch
keywords: patch
messages: 101736
nosy: kylev
severity: normal
status: open
title: Support FreeBSD's SO_SETFIB in socketmodule.c
type: feature request
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file16662/python-SO_SETFIB.patch

___
Python tracker 

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2010-03-25 Thread Nir Aides

Changes by Nir Aides :


Removed file: http://bugs.python.org/file16644/bfs.patch

___
Python tracker 

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2010-03-25 Thread Nir Aides

Nir Aides  added the comment:

Uploaded an updated bfs.patch

The latency problem was related to the --with-computed-gotos flag. I fixed it 
and it seems to work fine now. 

I also switched to gettimeofday() so it should work now on all Posix with high 
resolution timer.

--
Added file: http://bugs.python.org/file16663/bfs.patch

___
Python tracker 

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



[issue8236] ./configure: ImportError: No module named asdl

2010-03-25 Thread Sridhar Ratnakumar

New submission from Sridhar Ratnakumar :

I'm seeing this error with 2.6 and 3.1 maint branches (not sure about 2.7) on 
both Linux & Mac 32-bit builds. Does not happen on Linux 64-bit though. Also 
this is possibly caused by a recent commit, as we never saw this issue before.

[...]
creating Makefile
./Parser/asdl_c.py -h ./Include ./Parser/Python.asdl
Traceback (most recent call last):
  File "/home/apy/as/pypm-trunk/bin/python", line 49, in 
execfile(__file__)
  File "./Parser/asdl_c.py", line 9, in 
import asdl
ImportError: No module named asdl
make: *** [Include/Python-ast.h] Error 1

--
components: Build, Interpreter Core
messages: 101738
nosy: srid
severity: normal
status: open
title: ./configure: ImportError: No module named asdl
type: compile error
versions: Python 2.6, Python 3.1

___
Python tracker 

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



[issue6538] MatchObject is not a hyperlink in the 're' module documentation

2010-03-25 Thread Brian Curtin

Brian Curtin  added the comment:

Fixed in trunk (r79430), release26-maint (r79631), py3k (r79434), and 
release31-maint (r79435). Thanks for the patch.

--
assignee: georg.brandl -> brian.curtin
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue8236] ./configure: ImportError: No module named asdl

2010-03-25 Thread Sridhar Ratnakumar

Changes by Sridhar Ratnakumar :


Added file: http://bugs.python.org/file16664/config.log

___
Python tracker 

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



[issue8236] ./configure: ImportError: No module named asdl

2010-03-25 Thread Sridhar Ratnakumar

Changes by Sridhar Ratnakumar :


Added file: http://bugs.python.org/file16665/pyconfig.h

___
Python tracker 

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



[issue8237] multiprocessing.Queue() blocks program

2010-03-25 Thread Erdem U. Altinyurt

New submission from Erdem U. Altinyurt :

multiprocessing.Queue() blocking program on my computer after adding 1400 entry 
(depending addition size).

Tested with 2.6.2 and 2.6.5(compiled from source with gcc 4.4.1)
Using 64 bit OpenSUSE  11.2.

Output is:
---

1398  done
1399  done
---

and enters deadlock because Q.put() cannot completed.
No problems with basic array with lock().
Here the result after pressing CTRL+C:

---
^CTraceback (most recent call last):
  File "", line 1, in 
  File "", line 5, in testQ
KeyboardInterrupt
>>> 
^CError in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/opt/python/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
  File "/opt/python/lib/python2.6/multiprocessing/util.py", line 269, in 
_exit_function
p.join()
  File "/opt/python/lib/python2.6/multiprocessing/process.py", line 119, in join
res = self._popen.wait(timeout)
  File "/opt/python/lib/python2.6/multiprocessing/forking.py", line 117, in wait
return self.poll(0)
  File "/opt/python/lib/python2.6/multiprocessing/forking.py", line 106, in poll
pid, sts = os.waitpid(self.pid, flag)
KeyboardInterrupt
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/opt/python/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
  File "/opt/python/lib/python2.6/multiprocessing/util.py", line 269, in 
_exit_function
p.join()
  File "/opt/python/lib/python2.6/multiprocessing/process.py", line 119, in join
res = self._popen.wait(timeout)
  File "/opt/python/lib/python2.6/multiprocessing/forking.py", line 117, in wait
return self.poll(0)
  File "/opt/python/lib/python2.6/multiprocessing/forking.py", line 106, in poll
pid, sts = os.waitpid(self.pid, flag)
KeyboardInterrupt

--
components: Library (Lib)
files: damine6.py
messages: 101740
nosy: eua
severity: normal
status: open
title: multiprocessing.Queue() blocks program
type: crash
versions: Python 2.6
Added file: http://bugs.python.org/file1/damine6.py

___
Python tracker 

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2010-03-25 Thread John Levon

Changes by John Levon :


--
nosy: +movement

___
Python tracker 

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