[issue8067] OS X Installer: build errors on 10.6 when targeting 10.4 and earlier

2010-03-09 Thread Ned Deily

Ned Deily  added the comment:

Fix verified for 3.1 and py3k(3.2).

--

___
Python tracker 

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



[issue8067] OS X Installer: build errors on 10.6 when targeting 10.4 and earlier

2010-03-09 Thread Ronald Oussoren

Changes by Ronald Oussoren :


--
status: open -> closed

___
Python tracker 

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



[issue8094] Multiprocessing infinite loop

2010-03-09 Thread Benjamin VENELLE

New submission from Benjamin VENELLE :

Hi,

The following code results in an infinite loop -->

# 
import multiprocessing

def f(m):
print(m)

p = multiprocessing.Process(target=f, args=('pouet',))
p.start()
# 

I've firstly think about an issue in my code when Python loads this module so 
I've added a "if __name__ == '__main__':" and it works well. But, with the 
following code Python enters in the same infinite loop -->

proc.py:

# 
import multiprocessing

def f(m):
print(m)

class P:
def __init__(self, msg):
self.msg = msg

def start(self):
p = multiprocessing.Process(target=f, args=(self.msg,))
p.start()
# 

my_script.py:
# 
from proc import P

p = P("pouet")
p.start()
# 

It's like Python loads all parent's process memory space before starting 
process which issues in an infinite call to Process.start() ...

--
components: Library (Lib)
messages: 100707
nosy: Kain94
severity: normal
status: open
title: Multiprocessing infinite loop
type: crash
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



[issue8095] test_urllib2 crashes on OS X 10.3 attempting to retrieve network proxy configuration

2010-03-09 Thread Ned Deily

New submission from Ned Deily :

The current mechanism for urllib and urllib2 on OS X to retrieve network proxy 
information is to call _scproxy.c to query the OS X SystemConfiguration 
Framework.  _scproxy.c uses a schema key, 
kSCPropNetProxiesExcludeSimpleHostnames, that was introduced in OS X 10.4.  
Building on 10.3 results in a compile error.  Current python.org OS X 
installers are built using the 10.4u SDK with a deployment target of 10.3 to 
allow running on OS X 10.3.9.  When such pythons are installed on 10.3, 
attempts to use proxy support, such as is tested in test_urllib2, result in a 
crash:

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:  KERN_PROTECTION_FAILURE (0x0002) at 0x

Thread 0 Crashed:
0   _scproxy.so 0x000a77ac get_proxy_settings + 0x6c

Whether this is worth fixing is debatable, considering that 10.3 has not been 
supported by Apple for many years and that the use of network proxy  servers 
has likely been declining.  At a minimum, it would be better for it to fail 
without a crash but perhaps a README item would suffice.

--
assignee: ronaldoussoren
components: Macintosh
messages: 100708
nosy: ned.deily, orsenthil, ronaldoussoren
severity: normal
status: open
title: test_urllib2 crashes on OS X 10.3 attempting to retrieve network proxy 
configuration
type: crash
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue8095] test_urllib2 crashes on OS X 10.3 attempting to retrieve network proxy configuration

2010-03-09 Thread Ned Deily

Changes by Ned Deily :


Added file: http://bugs.python.org/file16508/Python.crash.log

___
Python tracker 

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



[issue8096] locale.format_string fails on mapping keys

2010-03-09 Thread Marcel Tschopp

New submission from Marcel Tschopp :

locale.format_string doesn't return same result as a normal "string" % format 
directive, but raises a TypeError.

>>> locale.format_string('%(key)s', {'key': 'Test'})
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/lib/python2.6/locale.py", line 225, in format_string
val[key] = format(perc.group(), val[key], grouping)
  File "/usr/local/lib/python2.6/locale.py", line 182, in format
formatted = percent % value
TypeError: format requires a mapping

--
components: Library (Lib)
messages: 100709
nosy: mtschopp
severity: normal
status: open
title: locale.format_string fails on mapping keys
type: behavior
versions: Python 2.6

___
Python tracker 

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



[issue8095] test_urllib2 crashes on OS X 10.3 attempting to retrieve network proxy configuration

2010-03-09 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

I don't have a 10.3 system to test on, and definitely don't want to spent 
effort on enabling compiles on 10.3

The patch below would probably fix the crash when running a binary created on 
10.4 or later on osx 10.3:

Index: ../Mac/Modules/_scproxy.c
===
--- ../Mac/Modules/_scproxy.c   (revision 78807)
+++ ../Mac/Modules/_scproxy.c   (working copy)
@@ -64,13 +64,18 @@
result = PyDict_New();
if (result == NULL) goto error;
 
-   aNum = CFDictionaryGetValue(proxyDict, 
+   if (kSCPropNetProxiesExcludeSimpleHostnames != NULL) {
+   aNum = CFDictionaryGetValue(proxyDict, 
kSCPropNetProxiesExcludeSimpleHostnames);
-   if (aNum == NULL) {
-   v = PyBool_FromLong(0);
-   } else {
-   v = PyBool_FromLong(cfnum_to_int32(aNum));
+   if (aNum == NULL) {
+   v = PyBool_FromLong(1);
+   } else {
+   v = PyBool_FromLong(cfnum_to_int32(aNum));
+   }
+   }  else {
+   v = PyBool_FromLong(1);
}
+
if (v == NULL) goto error;
 
r = PyDict_SetItemString(result, "exclude_simple", v);


The patch hasn't been compiled yet, but the idea should be clear: test if 
kSCPropNetProxiesExcludeSimpleHostnames has a valid value before using it, 
default to 'True'.

(This also changes the default on 10.4/10.5, IMHO defaulting to true would be 
better: I haven't seen an enviroment yet where local systems should be accessed 
through a proxy).

BTW. Removing 3.1 and 3.2 because _scproxy isn't in those releases yet (mostly 
because porting requires signifant changes to the C code and I haven't had time 
to do that yet)

--
versions:  -Python 3.1, Python 3.2

___
Python tracker 

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



[issue8097] bug in modulefinder: import_hook() got an unexpected keyword argument 'level'

2010-03-09 Thread Andreas Pfeiffer

New submission from Andreas Pfeiffer :

Hi,

  the attached file (moduleFinderBug.py) crashes in python 2.6 on
linux (RedHat EL 5) and Mac OS X (10.6) with the traceback below.

A possible fix for this would be in modulefinder.py:
323c323
< self.import_hook(name, caller, level=level)
---
> self.import_hook(name, caller=caller, level=level)

Please let me know if you need any further information.

Thanks,
   cheers, andreas



$> python moduleFinderBug.py
Traceback (most recent call last):
  File "work/cms/moduleFinderBug.py", line 17, in 
modulefinder.run_script(filename)
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/modulefinder.py",
 line 114, in run_script
self.load_module('__main__', fp, pathname, stuff)
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/modulefinder.py",
 line 305, in load_module
self.scan_code(co, m)
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/modulefinder.py",
 line 414, in scan_code
self._safe_import_hook(name, m, fromlist, level=level)
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/modulefinder.py",
 line 323, in _safe_import_hook
self.import_hook(name, caller, level=level)
TypeError: import_hook() got an unexpected keyword argument 'level'

--
components: Extension Modules
files: moduleFinderBug.py
messages: 100711
nosy: andreas
severity: normal
status: open
title: bug in modulefinder: import_hook() got an unexpected keyword argument 
'level'
type: crash
versions: Python 2.6
Added file: http://bugs.python.org/file16509/moduleFinderBug.py

___
Python tracker 

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



[issue8091] TypeError at the end of 'make test'

2010-03-09 Thread Florent Xicluna

Changes by Florent Xicluna :


--
status: open -> closed

___
Python tracker 

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



[issue8094] Multiprocessing infinite loop

2010-03-09 Thread Benjamin VENELLE

Benjamin VENELLE  added the comment:

Sorry I've not made clear my working platform.

Yes, I'm running Python 3.1.1 32 bit on a Windows 7 x64.

--

___
Python tracker 

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



[issue8083] urllib proxy interface is too limited

2010-03-09 Thread Dominique Leuenberger

Dominique Leuenberger  added the comment:

I like the idea of having the proxy handler expanded. In fact I suggest to base 
the idea on libproxy ( http://code.google.com/p/libproxy ) which is available 
on Linux / openSolaris / Windows and Mac (currently).

Libproxy queries the correct settings to be used from KDE and gnome, depending 
on the currently running session. A fallback is of course env.

the API of libproxy is very simple and python bindings are available.

--
nosy: +Dominique.Leuenberger

___
Python tracker 

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



[issue8098] PyImport_ImportModuleNoBlock() may solve problems but causes others.

2010-03-09 Thread Graham Dumpleton

New submission from Graham Dumpleton :

Back in time, the function PyImport_ImportModuleNoBlock() was introduced and 
used in modules such as the time module to supposedly avoid deadlocks when 
using threads. It may well have solved that problem, but only served to cause 
other problems.

To illustrate the problem consider the test code:


import imp
import thread
import time

def run1():
   print 'acquire'
   imp.acquire_lock()
   time.sleep(5)
   imp.release_lock()
   print 'release'

thread.start_new_thread(run1, ())

time.sleep(2)

print 'strptime'
time.strptime("", "")
print 'exit'


The output of running this is


grumpy:~ grahamd$ python noblock.py 
acquire
strptime
Traceback (most recent call last):
  File "noblock.py", line 17, in 
time.strptime("", "")
ImportError: Failed to import _strptime because the import lockis held by 
another thread.


It is bit silly that code executing in one thread could fail because at the 
time that it tries to call time.strptime() a different thread has the global 
import lock.

This problem may not arise in applications which preload all modules, but it 
will where importing of modules is deferred until later within execution of a 
thread and where there may be concurrent threads running doing work that 
requires modules imported by that new C function.

Based on old discussion at:

http://groups.google.com/group/comp.lang.python/browse_frm/thread/dad73ac47b81a744

my expectation is that this issue will be rejected as not being a problem with 
any remedy being pushed to the application developer. Personally I don't agree 
with that and believe that the real solution is to come up with an alternate 
fix for the original deadlock that doesn't introduce this new detrimental 
behaviour. This may entail structural changes to modules such as the time 
module to avoid issue.

Unfortunately since the PyImport_ImportModuleNoBlock() function has been 
introduced, it is starting to be sprinkled like fairy dust across modules in 
the standard library and in third party modules. This is only going to set up 
future problems in multithreaded applications, especially where third party 
module developers don't appreciate what problems they are potentially 
introducing by using this function.

Anyway, not optimistic from what I have seen that this will be changed, so view 
this as a protest against this behaviour. :-)

FWIW, issue in mod_wsgi issue tracker about this is:

http://code.google.com/p/modwsgi/issues/detail?id=177

I have known about this issue since early last year though.

--
components: Interpreter Core
messages: 100713
nosy: grahamd
severity: normal
status: open
title: PyImport_ImportModuleNoBlock() may solve problems but causes others.
type: behavior
versions: Python 2.6, Python 2.7, 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-09 Thread Asheesh Laroia

Asheesh Laroia  added the comment:

Er, ignore my comment then!

If this is reviewed, can it get committed?

--

___
Python tracker 

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



[issue7755] copyright clarification for audiotest.au

2010-03-09 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Hi Martin,

Conventional wisdom on #python-dev is that you have a Solaris machine that you 
could test this on.  Can you do that?  I'd like to get this patch into 2.6.6 if 
it works.

--
assignee:  -> loewis
keywords: +needs review
nosy: +loewis
priority: normal -> deferred blocker
stage:  -> test needed

___
Python tracker 

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



[issue6656] locale.format_string fails on escaped percentage

2010-03-09 Thread R. David Murray

R. David Murray  added the comment:

I meant issue 8096.

--
nosy: +mtschopp

___
Python tracker 

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



[issue6656] locale.format_string fails on escaped percentage

2010-03-09 Thread R. David Murray

Changes by R. David Murray :


--

___
Python tracker 

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



[issue8056] Piped parent's multiprocessing.Process children cannot write to stdout

2010-03-09 Thread Vilnis Termanis

Vilnis Termanis  added the comment:

I tried to reproduce / narrow-down the cause of this with a debug build in a VM 
but couldn't reproduce the behaviour (neither with debug nor with standard 
2.6.4 binary). I have to conclude that there is something perculiar with my 
native Windows installation (since in both VM and natively Python is using 
exactly the same DLLs and ).

Apologies for wasting your time.

--
status: open -> closed

___
Python tracker 

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



[issue6656] locale.format_string fails on escaped percentage

2010-03-09 Thread R. David Murray

R. David Murray  added the comment:

Eric, the patch for this issue contains a fix for issue 8094.  The only reason 
I haven't applied it is the fear of breaking existing correct behavior because 
there aren't enough tests.  Maybe you can see an easy way to reuse the % test 
suite to check local.format_string?  (I didn't look at that option very hard.)  
Or maybe we just apply it anyway...

--

___
Python tracker 

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



[issue8094] Multiprocessing infinite loop

2010-03-09 Thread R. David Murray

R. David Murray  added the comment:

Are you running this on windows?

--
nosy: +r.david.murray

___
Python tracker 

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



[issue7755] copyright clarification for audiotest.au

2010-03-09 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Or maybe this one :)

--
Added file: http://bugs.python.org/file16510/guido.au

___
Python tracker 

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



[issue8096] locale.format_string fails on mapping keys

2010-03-09 Thread R. David Murray

R. David Murray  added the comment:

See issue 6656.  This bug isn't a quite a duplicate of that bug, but I did 
discover (and fix) the bug this one reports in the process of creating a patch 
for that one, so I'm closing this one as a duplicate anyway.

--
nosy: +r.david.murray
resolution:  -> duplicate
stage: needs patch -> committed/rejected
status: open -> closed
superseder:  -> locale.format_string fails on escaped percentage

___
Python tracker 

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



[issue6656] locale.format_string fails on escaped percentage

2010-03-09 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +eric.smith

___
Python tracker 

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



[issue8036] Interpreter crashes on invalid arg to spawnl on Windows

2010-03-09 Thread Jean-Paul Calderone

Jean-Paul Calderone  added the comment:

Why is the Microsoft CRT argument error handler no longer disabled?

--
nosy: +exarkun

___
Python tracker 

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



[issue8097] bug in modulefinder: import_hook() got an unexpected keyword argument 'level'

2010-03-09 Thread R. David Murray

R. David Murray  added the comment:

Unless I'm missing something, this appears to be a bug in your code.  You 
redefine import_hook in your subclass, but you don't give it a level parameter.

--
components: +Library (Lib) -Extension Modules
nosy: +r.david.murray
priority:  -> normal
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed
type: crash -> behavior

___
Python tracker 

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



[issue6656] locale.format_string fails on escaped percentage

2010-03-09 Thread R. David Murray

Changes by R. David Murray :


--

___
Python tracker 

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



[issue6656] locale.format_string fails on escaped percentage

2010-03-09 Thread R. David Murray

R. David Murray  added the comment:

Eric, the patch for this issue contains a fix for issue 8096.  The only reason 
I haven't applied it is the fear of breaking existing correct behavior because 
there aren't enough tests.  Maybe you can see an easy way to reuse the % test 
suite to check local.format_string?  (I didn't look at that option very hard.)  
Or maybe we just apply it anyway...

--

___
Python tracker 

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



[issue5099] subprocess.POpen.__del__() AttributeError (os module == None!)

2010-03-09 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox
versions: +Python 3.2 -Python 3.0

___
Python tracker 

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



[issue8089] 2.6/3.1 32-bit/64-bit universal builds always run in 64-bit on 10.6

2010-03-09 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Thanks for the fix guys.  I believe this means it's no longer a blocker for 
2.6.5rc2, right?

--
priority: release blocker -> high
versions:  -Python 2.6

___
Python tracker 

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



[issue8094] Multiprocessing infinite loop

2010-03-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

The restriction that imposes the "__name__= '__main__'" idiom also applies when 
multiprocessing is not used in the main module.

Actually the main module is always reloaded in the subprocess.  The docs should 
be more explicit about it.

--
assignee:  -> jnoller
nosy: +amaury.forgeotdarc, jnoller

___
Python tracker 

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



[issue8036] Interpreter crashes on invalid arg to spawnl on Windows

2010-03-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

2.6 and 3.0.1 used to disable the Microsoft CRT argument error handler: they 
return EINVAL, but newer versions don't, and should check their arguments 
before calling _spawnv.

FWIW, the checks are::
pathname != NULL
*pathname != '\0'
argv != NULL
*argv != NULL
**argv != '\0'
The first and third checks are guaranteed by the implementation, but the other 
three should be done in posix_spawnv().
And the other calls to the various nt.spawn* functions probably suffer the same 
problem.

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue8036] Interpreter crashes on invalid arg to spawnl on Windows

2010-03-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Because this is a global setting for the whole process. This was discussed with 
issue4804.

--

___
Python tracker 

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



[issue8092] utf8, backslashreplace and surrogates

2010-03-09 Thread Walter Dörwald

Walter Dörwald  added the comment:

After the patch the comment:

/* Implementation limitations: only support error handler that return
bytes, and only support up to four replacement bytes. */

no longer applies.

Also I would like to see a version of this patch where the length limitation 
for the replacement returned from the error handler is removed (ideally for 
both the str and bytes case).

--
nosy: +doerwalter

___
Python tracker 

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



[issue8089] 2.6/3.1 32-bit/64-bit universal builds always run in 64-bit on 10.6

2010-03-09 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

I've commited a fix for 2.6 in r78813.

I will port that fix to 3.1 later today, but don't have time to test right now.

My fix is simular to the patch by Ned.

--

___
Python tracker 

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



[issue8096] locale.format_string fails on mapping keys

2010-03-09 Thread Eric Smith

Eric Smith  added the comment:

There's definitely some weirdness going on with handling mapping keys. I'll 
look at it.

--
assignee:  -> eric.smith
keywords: +easy
nosy: +eric.smith
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



[issue8091] TypeError at the end of 'make test'

2010-03-09 Thread Florent Xicluna

Changes by Florent Xicluna :


--
resolution:  -> duplicate
status: pending -> open

___
Python tracker 

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



[issue8091] TypeError at the end of 'make test'

2010-03-09 Thread Florent Xicluna

Changes by Florent Xicluna :


--
stage:  -> committed/rejected
status: open -> pending
superseder:  -> subprocess.POpen.__del__() AttributeError (os module == None!)
type:  -> behavior

___
Python tracker 

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



[issue8094] Multiprocessing infinite loop

2010-03-09 Thread R. David Murray

Changes by R. David Murray :


--
components: +Documentation -Library (Lib)
priority:  -> normal
stage:  -> needs patch
type: crash -> behavior
versions: +Python 2.6, Python 2.7, Python 3.2

___
Python tracker 

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



[issue8099] IDLE(Python GUI) Doesn't open

2010-03-09 Thread Estroms

New submission from Estroms :

I downloaded Python 3.1 yesterday. I can open the Python command line, but when 
i press IDLE(Python GUI)shortcut no window or program opens.

i typed to command promt C:\Python31\lib\idlelib\idle.py and got an error 
message. It's too long to write to here, but in the end of it, it said that 
"This probably means that Tcl wasn't installed properly". What should I do?

--
components: IDLE
messages: 100734
nosy: Estroms
severity: normal
status: open
title: IDLE(Python GUI) Doesn't open
type: crash
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



[issue8090] PEP 4 should say something about the standard library

2010-03-09 Thread Brian Curtin

Changes by Brian Curtin :


--
priority:  -> low
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

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



[issue8093] IDLE processes don't close

2010-03-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I reproduced this with 3.1.1 on xp. It took a while to get the shell menu to 
restart as the calculation process is hogging the cpu 99%.
KeyboardInterrupt (^C) would not stop the runaway process. There may have been 
other issues about this.

Two processes is normal - one for the shell and one for calculations. The 
'normal' behavior of Restart Shell (^F6) is to start a third process. Watching 
in task manager, the abandoned calculation process dies in 3-4 seconds. A stuck 
process does not end on its own though. Bad bug.

--
nosy: +tjreedy

___
Python tracker 

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



[issue8100] `configure` incorrectly handles empty OPT variable

2010-03-09 Thread Arfrever Frehtes Taifersar Arahesis

New submission from Arfrever Frehtes Taifersar Arahesis 
:

The comment in configure.in says that some changes aren't applied to OPT 
variable when OPT variable has been set by the user, but they are applied when 
empty OPT has been explicitly set. The attached patch fixes this problem.

--
components: Build
files: python-OPT.patch
keywords: patch
messages: 100736
nosy: Arfrever
severity: normal
status: open
title: `configure` incorrectly handles empty OPT variable
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file16511/python-OPT.patch

___
Python tracker 

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



[issue6943] setup.py fails to find headers of system libffi

2010-03-09 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis  added the comment:

I noticed suboptimal output of `configure`:
checking for --with-libs... no
checking for --with-system-expat... yes
checking for --with-system-ffi... checking for 
x86_64-pc-linux-gnu-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
yes
checking for --with-dbmliborder... gdbm

The attached patch fixes this problem.

--
Added file: http://bugs.python.org/file16512/python-pkg-config_detection.patch

___
Python tracker 

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



[issue8089] 2.6/3.1 32-bit/64-bit universal builds always run in 64-bit on 10.6

2010-03-09 Thread Ned Deily

Ned Deily  added the comment:

Almost!  There's a small but significant typo that needs to be fixed in 
the change (r78813) that was committed for 2.6:

- UNIVERSAL_ARCH64_FLAGS="-arch x86_64 -arch x86_64"
+ UNIVERSAL_ARCH64_FLAGS="-arch x86_64 -arch ppc64"

--

___
Python tracker 

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



[issue8101] w32-shared-ptr.c assertion on Windows 7 with 2.6.4

2010-03-09 Thread Ned Batchelder

New submission from Ned Batchelder :

2.6.4 had been working fine for me.  Today, though, it will not stay up.  I run 
the Django development server on Windows 7, and 2.6.4 is repeatedly crashing on 
me:

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Validating models...
Assertion failed: w32_sharedptr->size == sizeof(W32_EH_SHARED), file 
../../gcc-3.4.5/gcc/config/i386/w32-shared-ptr.c, line 247

I have no idea what's changed between yesterday and today.

--
components: None
messages: 100739
nosy: nedbat
severity: normal
status: open
title: w32-shared-ptr.c assertion on Windows 7 with 2.6.4
type: crash
versions: Python 2.6

___
Python tracker 

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



[issue8089] 2.6/3.1 32-bit/64-bit universal builds always run in 64-bit on 10.6

2010-03-09 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
priority: high -> release blocker

___
Python tracker 

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



[issue7772] test_py3kwarn fails when running the whole test suite

2010-03-09 Thread Florent Xicluna

Florent Xicluna  added the comment:

Fixed with r78815.
Issue #7092 should silence py3k warnings (soon).
Next step is to activate "-3" on some buildbot.

--
assignee:  -> flox
dependencies:  -Test suite emits many DeprecationWarnings when -3 is enabled
priority:  -> normal
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed
versions:  -Python 2.6

___
Python tracker 

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



[issue8099] IDLE(Python GUI) Doesn't open

2010-03-09 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> What should I do?

Unset the the TCL_LIBRARY and TK_LIBRARY environment variables, and
report whether it helped.

--
nosy: +loewis

___
Python tracker 

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



[issue8101] w32-shared-ptr.c assertion on Windows 7 with 2.6.4

2010-03-09 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Where did you get your copy of Python from?

--
nosy: +loewis

___
Python tracker 

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



[issue8102] test_distutils fails on 2.6.5rc1: "No module named setuptools_build_ext"

2010-03-09 Thread Ned Deily

New submission from Ned Deily :

Current 2.6.5rc1+ building on OS X:

==
ERROR: test_setuptools_compat (distutils.tests.test_build_ext.BuildExtTestCase)
--
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/tests/test_build_ext.py",
 line 350, in test_setuptools_compat
from setuptools_build_ext import build_ext as setuptools_build_ext
ImportError: No module named setuptools_build_ext

--

--
assignee: tarek
components: Distutils
messages: 100743
nosy: barry, ned.deily, tarek
severity: normal
status: open
title: test_distutils fails on 2.6.5rc1: "No module named setuptools_build_ext"
versions: Python 2.6

___
Python tracker 

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



[issue8102] test_distutils fails on 2.6.5rc1: "No module named setuptools_build_ext"

2010-03-09 Thread Ned Deily

Ned Deily  added the comment:

(I should add that this appears to be simply a missing test file.  There is no 
indication that distutils itself has a problem.)

--

___
Python tracker 

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



[issue8101] w32-shared-ptr.c assertion on Windows 7 with 2.6.4

2010-03-09 Thread Ned Batchelder

Ned Batchelder  added the comment:

I got it from python.org, the .msi Windows installer:

03/02/10 05:27:37p  14,890,496 \kit\python-2.6.4.msi

--

___
Python tracker 

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



[issue8100] `configure` incorrectly handles empty OPT variable

2010-03-09 Thread Brett Cannon

Changes by Brett Cannon :


--
priority:  -> low
stage:  -> patch review
type:  -> behavior

___
Python tracker 

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



[issue8102] test_distutils fails on 2.6.5rc1: "No module named setuptools_build_ext"

2010-03-09 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

This file was added in r75256. Are you sure you miss that test file ?

--
priority:  -> high

___
Python tracker 

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



[issue8101] w32-shared-ptr.c assertion on Windows 7 with 2.6.4

2010-03-09 Thread Ned Batchelder

Ned Batchelder  added the comment:

I tried rebooting my PC, but the problem persists.

--

___
Python tracker 

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



[issue8101] w32-shared-ptr.c assertion on Windows 7 with 2.6.4

2010-03-09 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

That's very strange. I'm fairly certain there is no GCC code whatsoever in my 
Python msi distribution. So you must be picking up some other code. Are you 
sure you are not running a Cygwin copy of Python or some such?

--

___
Python tracker 

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



[issue8103] threading.start() : unable to restart thread

2010-03-09 Thread Benjamin VENELLE

New submission from Benjamin VENELLE :

Hi,

I've found a bug in threading module. "self._started" event is never cleared 
when thread terminates. So, at line 452, in start() function, the test "if 
self._started.is_set():" prevents any restart.

PS: I saw this bug in Python 3.1.1 32 bit on a Windows 7 platform.

--
components: Library (Lib)
messages: 100749
nosy: Kain94
severity: normal
status: open
title: threading.start() : unable to restart thread
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



[issue7037] test_asynchat fails on os x 10.6

2010-03-09 Thread Ned Deily

Ned Deily  added the comment:

Still failing as of 2.6.5rc1.

--
nosy: +barry

___
Python tracker 

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



[issue7040] test_smtplib fails on os x 10.6

2010-03-09 Thread Ned Deily

Ned Deily  added the comment:

Still failing as of 2.6.5rc1.

--
nosy: +barry

___
Python tracker 

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



[issue8101] w32-shared-ptr.c assertion on Windows 7 with 2.6.4

2010-03-09 Thread Dave Malcolm

Dave Malcolm  added the comment:

Perhaps this is an issue in a 3rd-party extension module?  (Given that you're 
running Django, do you have a 3rd-party database connection module?; the last 
message in the log is "Validating models", does that require Django to go to 
the db to get the schema?)

Caveat: I'm not familiar with the Windows msi build of Python, so I could be 
way off here.

--
nosy: +dmalcolm

___
Python tracker 

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



[issue8101] w32-shared-ptr.c assertion on Windows 7 with 2.6.4

2010-03-09 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Dave: it's indeed entirely possible that this is caused by an extension module.

--

___
Python tracker 

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



[issue8102] test_distutils fails on 2.6.5rc1: "No module named setuptools_build_ext"

2010-03-09 Thread Ned Deily

Ned Deily  added the comment:

The file is the source tree but it doesn't seem to get installed in the 
framework which is where the tests are being run from:

/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/tests$
 ls -l setuptools*
-rw-rw-r--  1 root  admin  1592 Mar  9 11:27 setuptools_extension.py
-rw-rw-r--  1 root  admin  2385 Mar  9 11:39 setuptools_extension.pyc
-rw-rw-r--  1 root  admin  2385 Mar  9 11:39 setuptools_extension.pyo

--

___
Python tracker 

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



[issue8101] w32-shared-ptr.c assertion on Windows 7 with 2.6.4

2010-03-09 Thread Ned Batchelder

Ned Batchelder  added the comment:

Yup, you're both right!

I had a C extension (for coverage.py) built for 2.5 in the 2.6 path.  Sorry for 
the false alarm.

--
status: open -> closed

___
Python tracker 

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



[issue8103] threading.start() : unable to restart thread

2010-03-09 Thread R. David Murray

Changes by R. David Murray :


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



[issue8101] w32-shared-ptr.c assertion on Windows 7 with 2.6.4

2010-03-09 Thread R. David Murray

Changes by R. David Murray :


--
priority:  -> normal
resolution:  -> invalid
stage:  -> committed/rejected

___
Python tracker 

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



[issue8103] threading.start() : unable to restart thread

2010-03-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

By design, a thread object can be started only once:
http://docs.python.org/library/threading.html#threading.Thread.start

You should create another threading.Thread object.

--
nosy: +amaury.forgeotdarc
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue6953] readline documenation needs work

2010-03-09 Thread stefanholek

stefanholek  added the comment:

To be zero-based, get_history_item would need to look like:

diff --git a/rl/readline.c b/rl/readline.c
index 33e9905..800bc00 100644
--- a/rl/readline.c
+++ b/rl/readline.c
@@ -559,7 +559,7 @@ get_history_item(PyObject *self, PyObject *args)
 
if (!PyArg_ParseTuple(args, "i:index", &idx))
return NULL;
-   if ((hist_ent = history_get(idx)))
+   if ((hist_ent = history_get(history_base + idx)))
return PyString_FromString(hist_ent->line);
else {
Py_RETURN_NONE;

--

___
Python tracker 

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



[issue8089] 2.6/3.1 32-bit/64-bit universal builds always run in 64-bit on 10.6

2010-03-09 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

Ned: I fixed the typo in r78816

--

___
Python tracker 

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



[issue6953] readline documenation needs work

2010-03-09 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On Tue, Mar 9, 2010 at 4:24 PM, stefanholek  wrote:
..
> To be zero-based, get_history_item would need to look like:
..
> +       if ((hist_ent = history_get(history_base + idx)))

Did you test this with libedit?

--

___
Python tracker 

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



[issue8100] `configure` incorrectly handles empty OPT variable

2010-03-09 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Fixed in r78817.

--
assignee:  -> benjamin.peterson
nosy: +benjamin.peterson

___
Python tracker 

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



[issue8100] `configure` incorrectly handles empty OPT variable

2010-03-09 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
versions:  -Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue6943] setup.py fails to find headers of system libffi

2010-03-09 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Applied in r78819.

--

___
Python tracker 

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



[issue8100] `configure` incorrectly handles empty OPT variable

2010-03-09 Thread Benjamin Peterson

Changes by Benjamin Peterson :


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

___
Python tracker 

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



[issue6953] readline documenation needs work

2010-03-09 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

Changing get_history_item to be 0-based would be a backward incompatible change.

The point of my report is that the documentation of the readline documentation 
should mention how the APIs actually behave, you currently have to hunt down 
that information in the documentation from libreadline.

Stefan's message does point to a potentional issue though: history_base is  not 
exposed to python code, and hence Python code cannot use the correct offset.  I 
don't understand the documentation for history_get in that same document 
though, it says "get the item at `offset`, starting from `history_base`". I 
don't understand if that means that `offset` must be at least `history_base` or 
something else (and won't read the readline sources to find out).

--

___
Python tracker 

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



[issue8095] test_urllib2 crashes on OS X 10.3 attempting to retrieve network proxy configuration

2010-03-09 Thread Ned Deily

Ned Deily  added the comment:

OK, I tried the patch.  Reversing the default sense causes the proxy tests in 
test_urllib2 to fail on 10.6 et al.  So I changed the sense of the tests in the 
patch to match previous behavior; the modified patch is attached.  
Unfortunately, it didn't help on 10.3; test_urllib2 still gets a bus error:

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:  KERN_PROTECTION_FAILURE (0x0002) at 0x

Thread 0 Crashed:
0   _scproxy.so 0x003b57ac get_proxy_settings + 0x6c
1   org.python.python   0x00498dfc PyEval_EvalFrameEx + 0x535c
...

--
Added file: http://bugs.python.org/file16513/issue-scconfig-10_3-trunk-26.txt

___
Python tracker 

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



[issue8065] Memory leak in readline.get_current_history_length

2010-03-09 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

I my experience, reporting bugs in open source components of OSX to 
bugreport.apple.com is a waste of time.   Such reports are largely ignored  and 
they are not visible to upstream developers.

I believe the upstream for libedit is NetBSD, 
http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit, but I cannot find their 
bug tracker.

--

___
Python tracker 

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



[issue8089] 2.6/3.1 32-bit/64-bit universal builds always run in 64-bit on 10.6

2010-03-09 Thread Ned Deily

Ned Deily  added the comment:

Looks good for 2.6.5 (with 10.6 'intel' build).

--

___
Python tracker 

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



[issue8065] Memory leak in readline.get_current_history_length

2010-03-09 Thread Ronald Oussoren

Changes by Ronald Oussoren :


Removed file: http://bugs.python.org/file16480/smime.p7s

___
Python tracker 

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



[issue8065] Memory leak in readline.get_current_history_length

2010-03-09 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

Without filing a bug Apple won't know that something is wrong and they will 
definitly not fix the issue. If you file an issue and post the radar number 
I'll ping the Python maintainer inside Apple.  There's little change that this 
will be fixed, but you never know.

--

___
Python tracker 

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



[issue6953] readline documenation needs work

2010-03-09 Thread stefanholek

stefanholek  added the comment:

I have read the readline source code, and it does mean just that. :-) 

Anyway, this does not really apply to the stdlib because unless someone 
implements 'stifle_history' and friends 'history_base' is going to be 1 at all 
times.

--

___
Python tracker 

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



[issue8065] Memory leak in readline.get_current_history_length

2010-03-09 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

I submitted two bug reports:

7734961
libedit history_truncate_file () fails to preserve magic line
Mac OS X
Other Bug
09-Mar-2010 05:48 PM
Open

7734839
libedit read_history() does not update history_length
Mac OS X
Other Bug
09-Mar-2010 05:39 PM
Open

--

___
Python tracker 

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



[issue7300] Unicode arguments in str.format()

2010-03-09 Thread STINNER Victor

STINNER Victor  added the comment:

PyString_Format() uses a "goto unicode;" if a '%c' or '%s' argument is unicode. 
The unicode label converts the partial formatted result (byte string) to 
unicode, and use PyUnicode_Format() to finish to formatting.

I don't think that you can apply the same algorithm here (converts the partial 
result to unicode) because it requires to rewrite the format string: arguments 
can be used twice or more, and used in any order.

Example: "{0} {1}".format("bytes", u"unicode") => switch to unicode occurs at 
result="bytes ", format=" {1}", arguments=(u"unicode"). Converts "bytes " to 
unicode is easy, but the format have to be rewritten in " {0}" or something 
else.

Call trace of str.format(): do_string_format() -> build_string() -> 
output_markup() -> render_field(). The argument type is proceed in 
render_field().

--

___
Python tracker 

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



[issue7300] Unicode arguments in str.format()

2010-03-09 Thread STINNER Victor

STINNER Victor  added the comment:

*Draft* patch fixing the issue: render_field() raises an error if the argument 
is an unicode argument, string_format() catchs this error and converts self to 
unicode and call unicode.format(*args, **kw).

Pseudo-code:

 try:
# self.format() raises an error if any argument is 
# an unicode string)
return self.format(*args,**kw)
 except UnicodeError:
unicode = self.decode(default_encoding)
return unicode.format(*args, **kw)

The patch changes the result type of '{}'.format(u'ascii'): it was str and it 
becomes unicode. The new behaviour is consistent with "%s" % u"ascii" => 
u"ascii" (unicode).

I'm not sure that catching *any* unicode error is a good idea. I think that it 
would be better to use a new exception type dedicated to this issue, but it 
looks complex to define a new exception. I will may do it for the next patch 
version ;-)

--
keywords: +patch
Added file: http://bugs.python.org/file16514/issue7300-trunk.patch

___
Python tracker 

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



[issue7300] Unicode arguments in str.format()

2010-03-09 Thread STINNER Victor

STINNER Victor  added the comment:

My patch converts the format string to unicode using the default encoding. It's 
inconsistent with str%args: str%args converts str to unicode using the ASCII 
charset (if a least one argument is an unicode string), not the default 
encoding.

>>> "\xff%s" % u'\xe9'
...
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal 
not in range(128)

--

___
Python tracker 

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



[issue7267] format method: c presentation type broken

2010-03-09 Thread STINNER Victor

STINNER Victor  added the comment:

u'{0:c}'.format(256) formatter in implemented in Objects/stringlib/formatter.h 
and this C template is instanciated in... Python/formatter_string.c (and not 
Python/formatter_unicode.c). Extract of formatter_unicode.c comment:

/* don't define FORMAT_LONG, FORMAT_FLOAT, and FORMAT_COMPLEX, since
   we can live with only the string versions of those.  The builtin
   format() will convert them to unicode. */

format_int_or_long_internal() is instanciated (only once) with 
STRINGLIB_CHAR=char and so "numeric_char = (STRINGLIB_CHAR)x;" becomes 
"numeric_char = (char)x;" whereas x is a long in [0; 0x10] (or [0; 0x] 
depending on Python unicode build option).

I think that 'c' format type should have its own function because 
format_int_or_long_internal() gets locale info, compute the number of digits, 
and other things not related to just creating one character from its code 
(chr(code) / unichr(code)). But it's just a remark, it doesn't fix this issue.

To fix this issue, I think that the FORMAT_LONG & cie templates should be 
instanciated twice (str & unicode).

--

___
Python tracker 

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



[issue8104] socket.recv_into doesn't support a memoryview as an argument

2010-03-09 Thread Matt Gattis

New submission from Matt Gattis :

>>> view = memoryview(bytearray(bufsize))
>>> while len(view):
...view = view[sock.recv_into(view,1024):]
...
Traceback (most recent call last):
  File "", line 2, in 
TypeError: recv_into() argument 1 must be pinned buffer, not memoryview

--
components: IO
messages: 100773
nosy: Matt.Gattis
severity: normal
status: open
title: socket.recv_into doesn't support a memoryview as an argument
versions: Python 2.7

___
Python tracker 

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



[issue8105] mmap crash on Windows with out of range file descriptor

2010-03-09 Thread Brian Curtin

New submission from Brian Curtin :

Creating an mmap object can crash the interpreter on Windows if a file 
descriptor is passed in which is outside of the range for _get_osfhandle. I 
noticed the crash possibility while reviewing the Modules/mmapmodule.c code for 
work on another issue related to the consistency of the exceptions which mmap 
raises.

This can be tested by creating a mmap object with the file descriptor for a 
socket. This is not a valid way to create an mmap, but it represents a valid 
file descriptor which is out of range. For example, I created a socket with a 
file descriptor of 124, and _get_osfhandle expects the descriptor to be between 
0 and 23.

Patch against trunk, with a test.

Note that this does not seem to affect 2.6 (not sure why, yet).

--
components: Library (Lib), Windows
files: mmap_crash.diff
keywords: patch
messages: 100774
nosy: brian.curtin
priority: normal
severity: normal
stage: patch review
status: open
title: mmap crash on Windows with out of range file descriptor
type: crash
versions: Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file16515/mmap_crash.diff

___
Python tracker 

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



[issue8105] mmap crash on Windows with out of range file descriptor

2010-03-09 Thread Brian Curtin

Changes by Brian Curtin :


Removed file: http://bugs.python.org/file16515/mmap_crash.diff

___
Python tracker 

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



[issue8105] mmap crash on Windows with out of range file descriptor

2010-03-09 Thread Brian Curtin

Changes by Brian Curtin :


Added file: http://bugs.python.org/file16516/mmap_crash.diff

___
Python tracker 

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



[issue8105] mmap crash on Windows with out of range file descriptor

2010-03-09 Thread Brian Curtin

Brian Curtin  added the comment:

I should add that I tried the same thing on linux and no crash occured, it 
properly raised an exception.

--

___
Python tracker 

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



[issue4473] POP3 missing support for starttls

2010-03-09 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

Ping...

Any hope for 2.7/3.2?

--

___
Python tracker 

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



[issue8106] SSL session management

2010-03-09 Thread Jesús Cea Avión

New submission from Jesús Cea Avión :

Current SSL module doesn't manage SSL sessions, so any connection must do the 
full SSL handshake.

SSL/TLS support session restarting, when an old SSL context is used in a new 
connection, so you don't need to do the full SSL handshake.

This is a huge performance improvement.

I think SSL module should keep a small pool of sessions in core, to reuse. 
Better yet:

a) In SSL sockets, a method should be added to get the SSL context.

b) When creating a SSL socket, in client mode, a new optional parameter should 
be accepted, for a SSL context.

c) When creating a SSL socket, in server mode, we have two options: a) provide 
a dictionary or similar, with different contexts for possible clients 
connections or, better b) provide a callback the SSL module will call when 
getting an incoming connection, with a session ID as a parameter. The callback 
can provide a session SSL state or "None". This second approach allow for 
session management, like expiration or persistence to disk.

(the second option is equivalent to the first if the dict-like object includes 
this logic inside)

What do you think?.

--
components: Extension Modules
messages: 100777
nosy: jcea
severity: normal
status: open
title: SSL session management
type: feature request
versions: Python 2.7, Python 3.2

___
Python tracker 

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



[issue8106] SSL session management

2010-03-09 Thread Brian Curtin

Changes by Brian Curtin :


--
nosy: +janssen
priority:  -> normal

___
Python tracker 

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



[issue2001] Pydoc interactive browsing enhancement

2010-03-09 Thread Ron Adam

Changes by Ron Adam :


Removed file: http://bugs.python.org/file16411/pydoc_gui.diff

___
Python tracker 

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



[issue2001] Pydoc interactive browsing enhancement

2010-03-09 Thread Ron Adam

Ron Adam  added the comment:

Missed a buffer write in the gettopic() method. Fixed.
Plus some minor doc string changes.

Can someone change the stage to "patch review".  I can't do that myself.

Or is there something else I need to do first?

--
Added file: http://bugs.python.org/file16517/pydoc_gui.diff

___
Python tracker 

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