[issue3821] trace module bug when using --missing

2010-08-06 Thread Eli Bendersky

Eli Bendersky eli...@gmail.com added the comment:

TestCoverage.test_coverage_ignore fails when running in verbose mode (python 
regrtest.py -v test_trace, or directly python test_trace.py), because it 
attempts to compare stdout.getvalue() with the empty string, while verbose 
places output there.

I will fix it as part of my merge with the larger test_trace.py for issue 9315.

--
nosy: +eli.bendersky

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



[issue9315] The trace module lacks unit tests

2010-08-06 Thread Eli Bendersky

Eli Bendersky eli...@gmail.com added the comment:

The test class added into test_trace.py in issue 3821 fails in verbose mode 
(see my message http://bugs.python.org/msg113076). I'm merging that class into 
my larger test_trace.py and will fix this problem, unless you guys have other 
ideas.

--

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



[issue3854] Document sqlite3 vs. threads

2010-08-06 Thread Gerhard Häring

Gerhard Häring g...@ghaering.de added the comment:

Fixed in r83747.

--
resolution:  - fixed
status: open - closed

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



[issue9530] integer undefined behaviors

2010-08-06 Thread John Regehr

New submission from John Regehr reg...@cs.utah.edu:

I ran make test for today's Python3k snapshot under a tool which detects math 
operations that the C language considers to have undefined behavior.  This was 
on x86 Linux.  The list of undefined behaviors is attached.  Hopefully they are 
self-explanatory, but please let me know if more details are needed.

--
files: python-errors.txt
messages: 113079
nosy: regehr
priority: normal
severity: normal
status: open
title: integer undefined behaviors
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file18412/python-errors.txt

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



[issue9315] The trace module lacks unit tests

2010-08-06 Thread Eli Bendersky

Eli Bendersky eli...@gmail.com added the comment:

I'm attaching a new patch for unit-testing of trace.py. Changes:

1. Fixed the problems that caused failures when run through regrtest
2. Added the test class from issue 3821
3. Removed the fake module creation, replacing it with a directory named 
'tracedmodules' in Lib/test where a test module resides. If you can think of a 
better name, please let me know.

As far as I see, the tests now run correctly both stand-alone and as part of 
'python regrtest.py'. I have also fixed all whitespace issues. The patch was 
created vs. latest SVN checkout from the 2.7 maintenance branch.

--
Added file: http://bugs.python.org/file18413/issue9315.27-maint.5.patch

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



[issue9531] test_complex.py fails

2010-08-06 Thread Eli Bendersky

New submission from Eli Bendersky eli...@gmail.com:

eli...@eliben-desktop:~/python_src/svn-27-maint/Lib/test$ py27 regrtest.py 
test_complex.py 
test_complex
test test_complex failed -- Traceback (most recent call last):
  File /home/eliben/python_src/27-maint/Lib/test/test_complex.py, line 563, 
in test_format
self.assertEqual(format(z, '-'), str(z))
AssertionError: '(+3j)' != '3j'

1 test failed:
test_complex
[36603 refs]

--
messages: 113081
nosy: eli.bendersky
priority: normal
severity: normal
status: open
title: test_complex.py fails
versions: Python 2.7

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



[issue9531] test_complex.py fails

2010-08-06 Thread Eli Bendersky

Changes by Eli Bendersky eli...@gmail.com:


--
components: +Tests

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



[issue9531] test_complex.py fails

2010-08-06 Thread Eli Bendersky

Eli Bendersky eli...@gmail.com added the comment:

Sorry, I didn't build (make) the python executable before reporting. Everything 
works, so I'm closing the issue.

--
status: open - closed

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



[issue9264] trace.py documentation is incomplete

2010-08-06 Thread Eli Bendersky

Eli Bendersky eli...@gmail.com added the comment:

I think it makes sense to commit the same patch to 2.7, is this planned?

--

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



[issue9528] Add pure Python implementation of time module to CPython

2010-08-06 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

 I believe _time module should become the home of the gettimeofday() method 
 and pure python implementation of time.time() will be
 
 def time()
s, us = _time.gettimeofday()
return s + 1e-6 * us
 
 
 Similarly time.sleep() can be implemented in terms of lower level POSIX 
 nanosleep() method.
 
 Lower level localtime() function can provide access to tm_zone and tm_gmtoff 
 members of struct tm (where available) without concerns about backward 
 compatibility.

Just for understanding:

Why are you calling the ticket *Add* pure Python implementation of time
module to CPython when you appear to be after *replacing* the C
implementation of the time module with a Python version ?

The same argument as for the datetime module applies: you can *add*
a compatible Python version of the same module for other Python
implementations to use, but undoing the work that has been done
in order to provide a faster implementation of the Python version
is a no-go.

Both datetime and time module functionalities need to be as fast as
possible, since they are used a lot in Python code. That was the
main reason for having a C implementation of the datetime and time
modules.

Python C function calls are still a lot faster than Python function
calls. You can't just replace a C function call with a Python one
without taking this into account. For these modules, it's not just
the API compatibility that matters, performance is just as
relevant and I don't really see a point in making CPython slower
just to make maintenance of stdlib modules that are not needed by
CPython easier.

--

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



[issue9528] Add pure Python implementation of time module to CPython

2010-08-06 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

These changes are very aggressive and may be doing more harm than good.

--

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



[issue9532] pipe.read hang, when calling commands.getstatusoutput in multi-threading code of python 2.4

2010-08-06 Thread denny

New submission from denny markfile...@126.com:

Hi all

My environment is python 2.4.4 on linux. I am encountering hang of pipe.read() 
in commands.getstatusoutput for multi-threading code.

I have spawned several threads which will call commands.getstatusoutput to run 
cli. However, pipe.read may hang sometimes.
From lsof, we know some pipe handles are not closed in the parent process, 
after the child process is stopped.

;; -- Reproduce steps --
Below are reproduce steps.
# Create a python script of /tmp/hang.py, whose content is given below.
# Run service crond stop; python /tmp/hang.py several times.
# The script may probably hang. From lsof of main.py and crond service, we may 
find one pipe existing in both processes.
# If we stop crond to close the pipe, the hang of hang.py will be resolved.

;; -- Code of hang.py --
#!/usr/bin/python
import commands
import datetime
import time
import os
import thread
import threading

def thread_run1():

cmd = hostname
print begin to run command:%s % (cmd)
status, output = commands.getstatusoutput(cmd)
print pid:%d, name:%s, status:%d, output:%s % \
(os.getpid(), threading.currentThread().getName(), status, output)

cmd = ifconfig eth0
print begin to run command:%s % (cmd)
status, output = commands.getstatusoutput(cmd)
print pid:%d, name:%s, status:%d, output:%s % \
(os.getpid(), threading.currentThread().getName(), status, output)

cmd = ifconfig eth1
print begin to run command:%s % (cmd)
status, output = commands.getstatusoutput(cmd)
print pid:%d, name:%s, status:%d, output:%s % \
(os.getpid(), threading.currentThread().getName(), status, output)

# cmd = sh /tmp/subprocess.sh
cmd = echo here1; sleep 2; echo here2; sleep 5
print begin to run command:%s % (cmd)
status, output = commands.getstatusoutput(cmd)
print pid:%d, name:%s, status:%d, output:%s % \
(os.getpid(), threading.currentThread().getName(), status, output)

def thread_run2():

cmd = service crond start
print begin to run command:%s % (cmd)
status, output = commands.getstatusoutput(cmd)
print pid:%d, name:%s, status:%d, output:%s % \
(os.getpid(), threading.currentThread().getName(), status, output)

if __name__=='__main__':
print main function begins.
thread_list = []
for i in xrange(1, 10):
my_thread = threading.Thread(target = thread_run1)
thread_list.append(my_thread)

my_thread = threading.Thread(target = thread_run2)
thread_list.append(my_thread)

for t in thread_list:
t.start()

time.sleep(10)

for t in thread_list:
t.join()

print main function ends.

--
components: Library (Lib)
messages: 113086
nosy: denny
priority: normal
severity: normal
status: open
title: pipe.read hang, when calling commands.getstatusoutput in multi-threading 
code of python 2.4
type: behavior
versions: 3rd party

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



[issue8299] Improve GIL in 2.7

2010-08-06 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

Although I did finally manage to explain the point of this patch (after a long, 
long discussion), I think the issue is still too controversial.  We did, for 
example, see some strange behaviour in my last comment (Date: 2010-04-21 23:22) 
regarding affinity fixing of the process!

What I hope comes out of this is that I think I have put my point across that 
with multithreading, a lock is not a lock.  While a mutex may be indeed a 
mutex, its behaviour towards the threads that want to claim it can be different 
and can affect program behaviour and performance.

This also goes for emulated or constructed entities, built out of something 
more primitive such as condition variables.

Since 2.x is now frozen, and everyone seems happy (I think) with the more 
complicated 3.x method (although, being more complex, probably has more 
surprises in store), we should probably just let this fade away.

--

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



[issue9526] 2 GB limit in array module

2010-08-06 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Thanks for the report.  Also applies to 3.1 and 3.2 (and 2.6, but it's too late 
to fix things there).  I agree that those (int) casts look wrong---I suspect 
they're leftovers from the big int - Py_ssize_t switch that happened for 
Python 2.5.

I've removed the casts in svn revisions 83751 through 83754.  Unfortunately, 
right now I don't have access to a machine with enough memory to test that this 
fixes the problem.  Martin, would you be able to check this?  You'll need a 
Python svn checkout if you don't already have one;  instructions for getting it 
are at http://python.org/dev

--
assignee:  - mark.dickinson
nosy: +mark.dickinson
resolution:  - fixed
status: open - pending
versions: +Python 3.1, Python 3.2

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



[issue8411] Improve condition variable emulation on NT

2010-08-06 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

The latter.  But I'd really like Antoine to look this over.

--

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



[issue8757] Automatic set-to-frozenset conversions not thread-safe

2010-08-06 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

Can the attached script be converted in a unittest that tests that the fix is 
correct?

--
nosy: +ezio.melotti

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



[issue9530] integer undefined behaviors

2010-08-06 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

This is good stuff!  Thank you!  I'll look through these.

Is the tool you used publicly available?

--
assignee:  - mark.dickinson
nosy: +mark.dickinson

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



[issue8306] ctypes.create_string_buffer should only accept bytes

2010-08-06 Thread Ray.Allen

Ray.Allen ysj@gmail.com added the comment:

Why not close this issue? It seems that this has been fixed in current py3k 
branch.

--
nosy: +ysj.ray

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



[issue5936] Add MSI suport for uninstalling individual versions

2010-08-06 Thread Steven Bethard

Steven Bethard steven.beth...@gmail.com added the comment:

Unassigning, because it's likely I won't have time to work on this for a while. 
I still think it would be a nice feature. ;-)

--
assignee: bethard - 

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



[issue9533] metaclass can't derive from ABC

2010-08-06 Thread Roald de Vries

New submission from Roald de Vries pyt...@roalddevries.nl:

Exception raised::

  Traceback (most recent call last):
File bug.py, line 5, in module
  class derived(type, Sized):
File 
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/abc.py,
 line 85, in __new__
  for name in getattr(base, __abstractmethods__, set()):
  TypeError: Error when calling the metaclass bases
  'getset_descriptor' object is not iterable

--
files: bug.py
messages: 113094
nosy: roalddevries
priority: normal
severity: normal
status: open
title: metaclass can't derive from ABC
type: compile error
versions: Python 2.6
Added file: http://bugs.python.org/file18414/bug.py

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



[issue8757] Automatic set-to-frozenset conversions not thread-safe

2010-08-06 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

See r83757, r83756, and r83755.

The existing unittests prove the script does what it is supposed to do.  The 
new code is just a different approach to the same problem so that it is less 
likely to be user visible.

The attached set-race.py fragment is an incorrect test.  The docs state that 
the object should not be read by another thread.   So, this test would be 
validating a behavior that is not guaranteed either in this implementation or 
in others.

--
resolution:  - invalid
status: open - closed

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



[issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows

2010-08-06 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp:


--
dependencies: +Improve condition variable emulation on NT

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



[issue9534] OrderedDict.__del__ destructor throws AttributeError when process ends up with the exception trace

2010-08-06 Thread Valentine Gogichashvili

New submission from Valentine Gogichashvili val...@gmail.com:

When the process is dying with the exception trace dump, I am getting the 
following notification from the destructor of the OrderedDict class::

  Exception AttributeError: 'NoneType' object has no attribute 'print_exc' in 
bound method OrderedDict.__del__ of OrderedDict([('key', 'value')]) ignored

In the source of the OrderedDict the only operation that is not included in the 
try..catch is the dict.clear(self) actually. So I suppose that this problem is 
in dict.clear() implementation...

--
components: Library (Lib), Windows
messages: 113096
nosy: valgog
priority: normal
severity: normal
status: open
title: OrderedDict.__del__ destructor throws AttributeError when process ends 
up with the exception trace
type: behavior
versions: Python 2.7

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



[issue5027] xml namespace not understood by xml.sax.saxutils.XMLGenerator

2010-08-06 Thread Troy J. Farrell

Troy J. Farrell t...@entheossoft.com added the comment:

I figured it was probably too late, but one can always hope. :)

While you sort out who gets to review this, I'll see if I can't work out a 
patch for 2.7.  It also occurred to me last night that I should probably add a 
comment to it.  Look for new patches with a day.

--

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



[issue9530] integer undefined behaviors

2010-08-06 Thread Eric Smith

Changes by Eric Smith e...@trueblade.com:


--
nosy: +eric.smith

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



[issue9530] integer undefined behaviors

2010-08-06 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Here are some fixes for Objects/bytesobject.c and Objects/bytearrayobject.c.  
More to come.

--
keywords: +patch
versions: +Python 3.2 -Python 3.3
Added file: http://bugs.python.org/file18415/issue9530_1.patch

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



[issue9530] integer undefined behaviors

2010-08-06 Thread John Regehr

John Regehr reg...@cs.utah.edu added the comment:

Hi Mark-- Glad it's useful! We plan to release this tool but haven't done so 
yet, it still has rough edges.  It's LLVM-based and it seems likely they will 
take our patches.

--

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



[issue9527] Add aware local time support to datetime module

2010-08-06 Thread Guido van Rossum

Changes by Guido van Rossum gu...@python.org:


--
nosy:  -gvanrossum

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



[issue1647654] No obvious and correct way to get the time zone offset

2010-08-06 Thread Guido van Rossum

Changes by Guido van Rossum gu...@python.org:


--
nosy:  -gvanrossum

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



[issue8757] Automatic set-to-frozenset conversions not thread-safe

2010-08-06 Thread Daniel Stutzbach

Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:

It is easy in online communications to interpret a response as a disagreement.  
I apologize for falling into that trap.

I am +1 on removing implicit set-to-frozenset conversions, which would more 
effectively fix issue8752 for me (this is the only aspect of set behavior 
that I cannot emulate with a carefully designed collections.Set subclass).  
Also, I think forcing users to be explicit is more Pythonic.

In the meantime, a full copy is the solution I had in mind.  While it's less 
efficient, it's only slower by a constant factor.  The swap method still 
required O(n) steps to compute the hash.

--

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



[issue1372770] email.Header should preserve original FWS

2010-08-06 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Header parsing and formatting is one of the major changes in email6, and it 
should handle this much more sensibly.  email6 won't land until 3.3, though it 
will be available on pypy for testing before that.  If you want propose a patch 
for fixing this in the current email module I will consider it (but see below). 
 Absent that, I'm marking this for email6/3.3.

Note that in email6 the primary interface for creating headers will be a 
factory function, and in the current design it will reject header values that 
contain /n (and/or /r).  The parser will deal with unfolding values when 
parsing existing messages.

Also, while I agree with you about what the RFC *says*, what email programs 
actually *do* seems to be a bit different.  Email generators in general use a 
single leading tab as folding whitespace, but if you unfold the resulting 
value, it is clear that the tabs are noise, and should be replaced by single 
spaces on unfolding.  This becomes obvious when you consider things like an 
unstructured Subject header that has been wrapped.  It will be wrapped with 
tabs by any mailer I've so far encountered, but if you unwrap it, add a 'Re:', 
and rewrap it, preserving the tab is clearly the wrong thing to do.  This is in 
fact what email used to do, and this has annoyed many many people over the 
years (including me) because the header in the reply message has this tab stuck 
in the middle of the subject...

So currently my plan is to special case tabs on folding and unfolding.  When 
unfolding single leading tabs will become blanks, when folding a single tab 
will be used as folding white space, replacing single blanks at the point of 
folding.  I haven't tested this algorithm on any other mailers yet, because I 
haven't got enough of the code finished yet to generate parseable messages.  
(Maybe I'll do some by hand.)

This folding policy will be a controllable policy setting, so it will be 
possible to produce the strictly-RFC-conformant folding and unfolding on a 
per-message or even (when creating them) a per-header basis.

I welcome your thoughts on this subject (and if you are so moved your 
participation on the email-sig, which while it is pretty quiet right now will 
probably get less so soon when I post the next API iteration for email6).

--
versions: +Python 3.3 -Python 3.2

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



[issue3210] subprocess.Popen does not release process handles if process cannot be started

2010-08-06 Thread Tim Golden

Tim Golden m...@timgolden.me.uk added the comment:

Committed in r83759 r83760 r83761

--
resolution:  - fixed
status: open - closed

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



[issue9528] Add pure Python implementation of time module to CPython

2010-08-06 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

On Fri, Aug 6, 2010 at 3:44 AM, Marc-Andre Lemburg
rep...@bugs.python.org wrote:
..
 Why are you calling the ticket *Add* pure Python implementation of time
 module to CPython when you appear to be after *replacing* the C
 implementation of the time module with a Python version ?


I have deliberately made the title similar to issue 7989 so that it is
clear that the idea is the same: add python implementations of time
module functions which are overridden by existing C implementations in
CPython.  The only difference with datetime is that for Python
implementation to work, it needs access to some system facilities. The
datetime.py module needs access to some of these facilities as well,
but currently it works around this problem by importing them from time
module.

The current situation has several problems:

1. Datetime.py time source (time.time()) represents time as a floating
point number which leads to system dependent behavior and introduces
floating point operations where they are not needed.

2. Datetime.strftime function is restricted to years = 1900 even on
platforms where system strftime is perfectly good over full range of
datetime. This is done expressly because semantics of time.strftime
dictate such behavior.  See issue 1777412.

3. The datetime module could benefit from access to tm_zone and
tm_gmtoff components of the tm structure, but introducing those in the
output of time.localtime() would require either hidden member hackery
or loss of backwards compatibility.  See issues #1647654, #7662, and
#9527.

 The same argument as for the datetime module applies: you can *add*
 a compatible Python version of the same module for other Python
 implementations to use, but undoing the work that has been done
 in order to provide a faster implementation of the Python version
 is a no-go.


I completely agree.  Actually my outline in the first post is
incomplete.  What I would like to do is:

1. Rename timemodule.c to _timemodule.c
2. Convert non-module _time.c (home of code shared between time and
datetime C implementations) to a proper C extension.  See issue 9012,
msg109221 for description of the problem with the current strategy.
For luck of better name, I'll call the resulting module _basictime, so
 _time.c will get renamed to _basictimemodule.c.
3. Make _basictime module expose C and Python API to basic time
facilities: integer-valued time sources (gettimeofday, clock, etc.),
integer-based sleep method (say nanosleep), thin wrappers around
system strftime and strptime functions and tzset method.
4. No changes will be done to timemodule.c other than renaming. The
new time.py will import _basictime to implement it's methods in
python, but will end with from _time import *.  The _time module will
not depend on _basictime.
5. In the future, but not as a part of this proposal, datetime C and
python implementations can start using _basictime for low level access
rather than time.

 Both datetime and time module functionalities need to be as fast as
 possible, since they are used a lot in Python code. That was the
 main reason for having a C implementation of the datetime and time
 modules.


Absolutely.  In fact this proposal will open the door to implementing
*faster* C API to basic time facilities.  I do want _basictime to
properly expose its C API similarly to the way datetime module already
does.   The current situation is somewhat cheating: datetime module
advertises fast C API, but under the hood imports time module and
makes python calls to its methods.

BTW, this brings a point that I think I missed when I introduced
datetime.py.  Should PyDateTime_CAPSULE_NAME be changed from
datetime.datetime_CAPI to  _datetime.datetime_CAPI in order to
eliminate even small overhead that loading datetime rather than
_datetime carries?

 Python C function calls are still a lot faster than Python function
 calls. You can't just replace a C function call with a Python one
 without taking this into account. For these modules, it's not just
 the API compatibility that matters, performance is just as
 relevant and I don't really see a point in making CPython slower
 just to make maintenance of stdlib modules that are not needed by
 CPython easier.

Brett addressed this point responding to my own concerns in msg107295
and msg108047.  I will just repeat: this proposal will make no changes
to the functions that CPython users will import from time module.

--

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



[issue9535] Pending signals are inherited by child processes

2010-08-06 Thread Greg Brockman

New submission from Greg Brockman g...@mit.deu:

Upon os.fork(), pending signals are inherited by the child process.  This can 
be demonstrated by pressing C-c in the middle of the
following program:


import os, sys, time, threading
def do_fork():
while True:
if not os.fork():
print 'hello from child'
sys.exit(0)
time.sleep(0.5)
t = threading.Thread(target=do_fork)
t.start()
t.join()

Right after os.fork(), each child will raise a KeyboardInterrupt exception.

This behavior is different from the semantics of POSIX fork(), where child 
processes do not inherit their parents' pending signals.

Attached is a first stab at a patch to fix this issue.  Please let me know what 
you think!

--
components: Extension Modules
files: signals.patch
keywords: patch
messages: 113104
nosy: gdb
priority: normal
severity: normal
status: open
title: Pending signals are inherited by child processes
type: behavior
versions: Python 2.5, Python 2.6, Python 2.7
Added file: http://bugs.python.org/file18416/signals.patch

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



[issue9536] defaultdict doc makes incorrect reference to __missing__ method

2010-08-06 Thread John Posner

New submission from John Posner jjpos...@optimum.net:

The documentation for collections.defaultdict is confusing with respect to the 
__missing__ method. The fact is that a programmer using defaultdict does not 
need to know anything about __missing__.

The attached patch contains a rewrite of the entire section (but not the 
defaultdict Examples section, which is fine.

--
assignee: d...@python
components: Documentation
files: defaultdict.patch
keywords: patch
messages: 113105
nosy: d...@python, jjposner
priority: normal
severity: normal
status: open
title: defaultdict doc makes incorrect reference to __missing__ method
versions: Python 2.7
Added file: http://bugs.python.org/file18417/defaultdict.patch

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



[issue7443] test.support.unlink issue on Windows platform

2010-08-06 Thread Tim Golden

Changes by Tim Golden m...@timgolden.me.uk:


--
assignee:  - tim.golden

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



[issue4708] os.pipe should return inheritable descriptors (Windows)

2010-08-06 Thread Tim Golden

Changes by Tim Golden m...@timgolden.me.uk:


--
assignee:  - tim.golden
nosy: +tim.golden

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



[issue1714451] subprocess.py problems errors when calling cmd.exe

2010-08-06 Thread Tim Golden

Changes by Tim Golden m...@timgolden.me.uk:


--
assignee:  - tim.golden
nosy: +tim.golden

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



[issue1681974] mkdtemp fails on Windows if username has non-ASCII character

2010-08-06 Thread Tim Golden

Changes by Tim Golden m...@timgolden.me.uk:


--
nosy: +tim.golden

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



[issue1672853] Error reading files larger than 4GB

2010-08-06 Thread Tim Golden

Changes by Tim Golden m...@timgolden.me.uk:


--
assignee:  - tim.golden
nosy: +tim.golden

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



[issue1707753] get status output fix for Win32

2010-08-06 Thread Tim Golden

Changes by Tim Golden m...@timgolden.me.uk:


--
assignee:  - tim.golden
nosy: +tim.golden

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



[issue1142] code sample showing errors reading large files with py 2.5/3.0

2010-08-06 Thread Tim Golden

Changes by Tim Golden m...@timgolden.me.uk:


--
nosy: +tim.golden

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



[issue6609] zipfile: WindowsError [267] The directory name is invalid

2010-08-06 Thread Tim Golden

Changes by Tim Golden m...@timgolden.me.uk:


--
nosy: +tim.golden

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



[issue6839] zipfile can't extract file

2010-08-06 Thread Tim Golden

Changes by Tim Golden m...@timgolden.me.uk:


--
assignee:  - tim.golden
nosy: +tim.golden

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



[issue8006] os.popen in Python 3.1

2010-08-06 Thread Tim Golden

Changes by Tim Golden m...@timgolden.me.uk:


--
assignee:  - tim.golden
nosy: +tim.golden

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



[issue2304] subprocess under windows fails to quote properly when shell=True

2010-08-06 Thread Tim Golden

Changes by Tim Golden m...@timgolden.me.uk:


--
assignee:  - tim.golden
components: +Windows

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



[issue3210] subprocess.Popen does not release process handles if process cannot be started

2010-08-06 Thread Hirokazu Yamamoto

Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:

Sorry for posting to closed entry, but I think handle should be closed in 
Lib/subprocess.py not in PC/_subprocess.c. I noticed following code showed 
strange error.

import subprocess

for _ in xrange(2):
stdout = open(stdout.txt, w)
try:
p = subprocess.Popen([unknown], stdout=stdout)
except WindowsError:
pass

// error

close failed in file object destructor:
IOError: [Errno 9] Bad file descriptor

--

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



[issue9533] metaclass can't derive from ABC

2010-08-06 Thread Daniel Urban

Changes by Daniel Urban urban.dani...@gmail.com:


--
nosy: +durban
type: compile error - behavior

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



[issue3210] subprocess.Popen does not release process handles if process cannot be started

2010-08-06 Thread Tim Golden

Tim Golden m...@timgolden.me.uk added the comment:

Blast. Thanks; I'll have to rework those patches then.

--
status: closed - open

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



[issue9534] OrderedDict.__del__ destructor throws AttributeError when process ends up with the exception trace

2010-08-06 Thread Raymond Hettinger

Changes by Raymond Hettinger rhettin...@users.sourceforge.net:


--
assignee:  - rhettinger
nosy: +rhettinger

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



[issue9534] OrderedDict.__del__ destructor throws AttributeError when process ends up with the exception trace

2010-08-06 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

Do you have a short script that can reproduce the error message?

--

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



[issue9534] OrderedDict.__del__ destructor throws AttributeError when process ends up with the exception trace

2010-08-06 Thread Valentine Gogichashvili

Valentine Gogichashvili val...@gmail.com added the comment:

Unfortunately I do not have a short script. It is happening during the failure 
in quite a big script. I am afraid, it will too time consuming for me to write 
it... 

Actually by the content of the OrderdDict instance that is throwing this 
exception it seems like it is the one, that is used by ConfigParser internally.

--

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



[issue9264] trace.py documentation is incomplete

2010-08-06 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Fine with me.
Alexander, do you have the fixed up version you committed to 2.6, or should Eli 
revise the attachment here for 2.7?

--

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



[issue8299] Improve GIL in 2.7

2010-08-06 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

OK. I would probably be better to expend energy on the 3.x new GIL, should 
issues arise.

--
resolution:  - out of date
status: open - closed

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



[issue1142] code sample showing errors reading large files with py 2.5/3.0

2010-08-06 Thread Guido van Rossum

Changes by Guido van Rossum gu...@python.org:


--
nosy:  -gvanrossum

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



[issue7464] circular reference in HTTPResponse by urllib2

2010-08-06 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

in python/trunk/Lib/urllib2.py, line 1161

It doesn't appear to be an issue in py3k.

--

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



[issue7897] Support parametrized tests in unittest

2010-08-06 Thread nchauvat

nchauvat nicolas.chau...@logilab.fr added the comment:

In case it could be useful, here is how generative/parametrized tests are 
handled in logilab.common.testlib 
http://hg.logilab.org/logilab/common/file/a6b5fe18df99/testlib.py#l1137

--
nosy: +nchauvat

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



[issue1054] scriptsinstall target fails in alternate build dir

2010-08-06 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

Set to needs patch as I don't see why you need a unit test for this build 
issue, feel free to change it back if you see fit.

--
nosy: +BreamoreBoy
stage: unit test needed - needs patch
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6, Python 3.0

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



[issue9531] test_complex.py fails

2010-08-06 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
nosy: +mark.dickinson

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



[issue9315] The trace module lacks unit tests

2010-08-06 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Comments on issue9315.27-maint.5.patch:

1. I think you forgot to svn add Lib/test/__init__.py.
2. Instead of import tracedmodules.testmod, please use something like from 
test.tracedmodules import testmod.  There is no need to use implicit relative 
import and this is different from accepted practice.

3. 

def traced_func_importing(aa, bb):
from tracedmodules.testmod import func

Same comment as in #2 above.  No need for implicit relative import here.  Also 
I am not sure it is interesting to test tracing the import statement inside a 
function.  Tests for tracing calls to imported functions are good, but I am not 
sure import itself generates any interesting events.  Just give it a thought - 
I don't have an informed opinion.

4. Shouldn't all traced functions go to tracedmodules?

5. Please add comments to functions used for line tracing that changing 
relative or absolute (if matters) line numbers will break the tests.

6. Add comments to testmod.py.

7. You lost changes I made in issue9315.4-release27.patch. Specifically, using 
trailing underscores or double letters to resolve conflicts between variable 
names is not common style.  Trailing underscore convention is for resolving 
conflicts with python keywords.

8. Please rewrap text in README to fit in 80 columns.  In fact, this text 
belongs to __init__.py docstring and the comment about importance of function 
location should go next to each (currently one) function for which location is 
important.

9. fix_pyc_ext(filename) description is misleading.  It does not care about 
incoming filename extension and just whatever extension with '.py'.  This is 
probably good because it works with both '.pyc' and '.pyo', but the name and 
the docstring suggest otherwise. Note the similar logic in the trace module 
itself is implemented as follows:

if filename.endswith((.pyc, .pyo)):
filename = filename[:-1]   

I also feel that three functions to just compute ('test_trace.py', 
'test_trace') tuple is an overkill.  Please look in the inspect module for 
possible alternatives.  Also rather than recomputing these strings in each test 
case, I would just assign them to module global variables say THIS_FILE_NAME 
and THIS_MODULE_NAME. 

10. A nitpick.  I don't think I've ever seen test_main() function called 
Driver in the python test suite.  Please try to keep consistency in 
terminology and coding style between the test modules to the extent it is 
practical.

11.  Similar to #10.  I've changed 'ZZZ' to 'XXX' in 
issue9315.4-release27.patch, but you lost that change.  See msg112230 above.

--

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



[issue6811] add a filename argument to marshal.load*

2010-08-06 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

Just flagging this up in case it's dropped under the radar.

--
nosy: +BreamoreBoy

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



[issue7790] struct_time documentation entry should point to the table defining the tuple

2010-08-06 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
assignee: georg.brandl - d...@python
nosy: +d...@python

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



[issue1566260] Better order in file type descriptions

2010-08-06 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

As a Windows user I'm not convinced this is worth doing.

--
nosy: +BreamoreBoy

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



[issue9522] xml.etree.ElementTree forgets the encoding

2010-08-06 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

It behaves as documented. Moved to feature request.
http://docs.python.org/library/xml.etree.elementtree.html

--
components: +XML
type: behavior - feature request
versions: +Python 3.2, Python 3.3 -Python 3.1

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



[issue9522] xml.etree.ElementTree forgets the encoding

2010-08-06 Thread Florent Xicluna

Changes by Florent Xicluna florent.xicl...@gmail.com:


--
nosy: +scoder

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



[issue9264] trace.py documentation is incomplete

2010-08-06 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

The fixed up version is just r83549. It may merge cleanly with py3k - I believe 
doc changes are trivial if any between 2.6 and 3.x.

I would like this to go through another round of reviews without release 
calendar pressure.  I would like to see some guidelines for documenting command 
line options to stdlib modules.  In this particular patch, I don't like 
Meta-options sections.  No other module document has such section.  The 
--help and --version are not meta-options, they are common options. I would 
also like to see a mention that  one of --trace, --count, --report, 
--listfuncs, or --trackcalls must be specified.  (Even better would be to make 
one of these options the default behavior when no options are given.  Required 
option is an oxymoron.)

Terry,

This is in your hands now.  If you prefer to merge the change and postpone the 
improvements, it is fine with me.

--
nosy: +georg.brandl

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



[issue1566260] Better order in file type descriptions

2010-08-06 Thread Tim Golden

Tim Golden m...@timgolden.me.uk added the comment:

If individual users want to change these around, it's easy enough to do so 
post-hoc. Closing as won't fix.

--
nosy: +tim.golden
resolution:  - wont fix

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



[issue1566260] Better order in file type descriptions

2010-08-06 Thread Tim Golden

Changes by Tim Golden m...@timgolden.me.uk:


--
stage:  - committed/rejected
status: open - closed

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



[issue9529] Converge re.findall and re.finditer

2010-08-06 Thread Matthew Barnett

Matthew Barnett pyt...@mrabarnett.plus.com added the comment:

(1) would break existing code. It would also mean that you wouldn't have access 
to the start and end positions of the matches either.

(2) would also break existing code which is expecting a list. It's like the 
change that happened when some methods which return a list in Python 2 return a 
generator in Python 3. I think it's too late now because we're already at 
Python 3.1. If you want to reduce the memory footprint then you can still do:

items = (m.groups() for m in re.finditer(r'(\w+):(\w+)', text))
for key,value in items:
data[key] = value

--

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



[issue9373] pulldom has low code coverage

2010-08-06 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
stage:  - patch review
type:  - feature request

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



[issue7668] test_httpservers fails with non-ascii path

2010-08-06 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

This isn't a problem any more:  2.6 and 3.1 are now able to follow symbolic 
links.  Sorry for the noise!

--
status: open - closed

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



[issue9534] OrderedDict.__del__ destructor throws AttributeError when process ends up with the exception trace

2010-08-06 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

There's not enough information here for me to follow-up.

It's unlikely that dict.clear() would product the message you see and the 
existing code for OrderedDict.__del__ and OrderedDict.clear() look correct to 
me.  The bug may be in your own code.

--
priority: normal - low

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



[issue9537] argparse: use OrderedDict to store subparsers

2010-08-06 Thread Denver Coneybeare

New submission from Denver Coneybeare denver.coneybe...@gmail.com:

Currently, when a subparser is added to an argparse.ArgumentParser the list of 
subparsers are stored in the built-in dict type.  When these subparsers are 
listed when -h is given on the command line they are showed in the order 
returned from the dictionary's keys() method, which is undefined order.  
Instead of showing them in undefined order, it would be preferred to show them 
at least in the order in which they were added.  This can be done trivially be 
replacing the dict with a collections.OrderedDict.  A patch is attached.

--
components: Library (Lib)
files: argparse.patch
keywords: patch
messages: 113124
nosy: benjamin.peterson, denversc
priority: normal
severity: normal
status: open
title: argparse: use OrderedDict to store subparsers
type: behavior
versions: Python 2.7, Python 3.3
Added file: http://bugs.python.org/file18418/argparse.patch

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



[issue9511] CharacterEncoderError when reading from sys.stdin from piped input in cmd.exe

2010-08-06 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

This is because python doesn't know the encoding of stdin, and so uses ASCII (I 
assume that's what 'charmap' is on windows...on my unix box the error message 
mentions ascii, not charmap).  You can tell python to use an alternate encoding 
by default via the PYTHONIOENCODING environment variable:

rdmurray:py3kexport PYTHONIOENCODING='utf8'
rdmurray:py3kecho ü | ./python pycat.py
ü

Of course, you'll need to use the Widows way of setting environment variables.

I think some consideration is being given to making this simpler, but I 
couldn't find an issue number for it, so I'm adding haypo as nosy since I think 
he was involved in that discussion.  If my memory is right, and there's no 
existing issue, maybe we could adopt this one for it.

--
nosy: +haypo, r.david.murray
type:  - behavior

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



[issue9417] Declaring a class creates circular references

2010-08-06 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Andrea: for the purpose of this tracker, a 'bug' is a discrepancy between doc 
and behavior. The fact that (new-style) classes have circular references was 
known when they were introduced in 2.2. That fact is not a bug in the above 
sense. It is a design tradeoff that works OK for the typical case of classes 
remaining until the end of a program run. Changing the tradeoff embodied in 
type() is not likely to be accepted.

That said, an alternate no_cr (no circular reference) metaclass (perhaps a type 
subclass) that contructed cr-free classes, even at the cost of slower lookup, 
might be a good addition to the stdlib. Ray's ideas seems to me at least 
plausible. My first thought on location is in functools.

--
nosy: +terry.reedy

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



[issue9324] signal.signal(bogus_signal, handler) segfaults on Windows

2010-08-06 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

Fixed in r83763 (py3k), r83764 (release31-maint), and r83765 (release27-maint). 
Thanks for reporting this.

--
resolution:  - fixed
stage: patch review - committed/rejected
versions: +Python 3.1

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



[issue9515] vars() dictionary access to generate variables

2010-08-06 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

No, the docs are correct as they stand.  They say that without an argument it 
acts like locals(), and there is even a special note saying you shouldn't 
modify the returned dictionary because what happens when you do is undefined.  
It just so happens that when locals==globals, what you show works, but it is 
not guaranteed to work even in CPython, and is reasonably likely to not work in 
other Python interpreters.

--
nosy: +r.david.murray
resolution:  - invalid
stage:  - committed/rejected
status: open - closed
type:  - behavior

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



[issue2475] Popen.poll always returns None

2010-08-06 Thread David Andrzejewski

Changes by David Andrzejewski site+python@davidandrzejewski.com:


--
nosy: +dandrzejewski

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



[issue9418] Move _formatter_* methods from string type into _string module

2010-08-06 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

If I understand, the point is to better hide two functions that must be exposed 
for the benefit of .Formatter but which users really should not use. It would 
also slightly declutter dir(str) and help(str) which are already unusually 
'big'. Sounds reasonable.

--
nosy: +terry.reedy

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



[issue9424] deprecate unittest.TestCase.assertEquals

2010-08-06 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

What about the other duplicate pairs with a preferred choice?
Is there too much use of the deprecated choice?

--
nosy: +terry.reedy

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



[issue9516] sysconfig: $MACOSX_DEPLOYMENT_TARGET mismatch: now 10.3 but 10.5 during configure

2010-08-06 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +ronaldoussoren

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



[issue9418] Move _formatter_* methods from string type into _string module

2010-08-06 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

The idea seems fine to me.  Hiding the _string module in 
Objects/unicodeobject.c is a little odd, though:  why not a new 
Modules/_string.c file?

Is the _string module only used by the string module?

--
nosy: +mark.dickinson

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



[issue9537] argparse: use OrderedDict to store subparsers

2010-08-06 Thread Eric Smith

Changes by Eric Smith e...@trueblade.com:


--
nosy: +eric.smith

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



[issue5612] whitespace folding in the email package could be better ; -)

2010-08-06 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Yes, this is being kept in mind for email6, but nothing is likely to happen in 
the current package.  Since email6 won't make 3.2, I'm retargeting this bug for 
3.3.

--
stage:  - unit test needed
type:  - behavior
versions: +Python 3.3 -Python 2.7

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



[issue9417] Declaring a class creates circular references

2010-08-06 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

What about my suggestion of simply providing a convention on how to disable 
links manually, similar to how minidom.document does it with an unlink 
method?  If these cases are documented, then there shouldn't be any extra 
bother to do so.
We could provide an builtin unlink() function that calls any __unlink__ special 
method if present.

This sounds like a feature request, really, and one that is unlikely to get 
accepted since it sort of exposes an implementation detail of C python.  Oh 
well.

--

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



[issue9520] Add Patricia Trie high performance container

2010-08-06 Thread Daniel Urban

Changes by Daniel Urban urban.dani...@gmail.com:


--
nosy: +durban

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



[issue1443866] email 3.0+ stops parsing headers prematurely

2010-08-06 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

It's not clear to me that this is a valid bug.  It is true that the RFC says 
that a blank line preceeds the body.  However, the line in question is not a 
valid header line.  Mail parsers trying to implement the be liberal in what 
you accept portion of Postel's law should parse messages that where the blank 
line between the headers and body is missing.  With the input given, there are 
three valid Postel interpretations: the body starts at the From line, the 
From line is missing a folding indent and is part of the value of the 
preceding header, and the From line is garbage and should be discarded.

Since a leading From is a token that occurs validly with reasonable frequency 
in message bodies and is never valid in message headers, I think the current 
choice is a sane one.  A smarter heuristic might look at the subsequent line 
and note that they look like headers, but headers can occur in the body of 
messages, so that heuristic would probably be wrong more often than it was 
right.  Especially considering that putting headers in a message body is the 
time when you are most likely to see the leading 'From ' token, since it would 
be quoting the mbox 'From ' header.

So, I'm closing this bug as rejected.  (Rejected rather than invalid, since 
reasonable people can certainly disagree about the best heuristics for handling 
invalid data.)

--
resolution:  - rejected
stage: unit test needed - committed/rejected
status: open - closed

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



[issue6811] add a filename argument to marshal.load*

2010-08-06 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
versions: +Python 3.3 -Python 3.2

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



[issue9519] IDLE cannot do example 4.1 in tutorial (if statements)

2010-08-06 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

rtf2html can't make anything out of that file, so I'm guessing it is some sort 
of image wrapped up as an RTF?  If that's so can you just post a jpg?  Better 
would be to cut and paste the Idle session text as text.

--

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



[issue9519] IDLE cannot do example 4.1 in tutorial (if statements)

2010-08-06 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Replacing RTF file with a plain text version.

--
nosy: +mark.dickinson
Added file: http://bugs.python.org/file18419/ISSUE_9519.txt

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



[issue9519] IDLE cannot do example 4.1 in tutorial (if statements)

2010-08-06 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

It appears that IDLE maintains the current indentation level, while the 
interpreter always resets indentation to the start of the line.  I don't really 
see why this is a problem.  In IDLE, when you want to unindent a level, you 
need to hit your backspace key.

--

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



[issue9530] integer undefined behaviors

2010-08-06 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Fixed two more bytearray problems in r83768.

--

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



[issue9531] test_complex.py fails

2010-08-06 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
resolution:  - invalid
stage:  - committed/rejected

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



[issue9532] pipe.read hang, when calling commands.getstatusoutput in multi-threading code of python 2.4

2010-08-06 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

2.4 is no longer maintained by the CPython team.  Can you reproduce this in 2.7?

--
nosy: +r.david.murray

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



[issue9536] defaultdict doc makes incorrect reference to __missing__ method

2010-08-06 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

I believe the description of __missing__ is there for those who want to 
subclass defaultdict, but I'll let Raymond confirm.

--
nosy: +r.david.murray, rhettinger
resolution:  - invalid
stage:  - committed/rejected
status: open - pending
type:  - behavior

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



[issue4256] optparse/argparse: provide a simple way to get a programmatically useful list of options

2010-08-06 Thread Hans Ulrich Niedermann

Changes by Hans Ulrich Niedermann h...@n-dimensional.de:


--
nosy: +ndim

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



[issue9537] argparse: use OrderedDict to store subparsers

2010-08-06 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +bethard

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



[issue9519] IDLE cannot do example 4.1 in tutorial (if statements)

2010-08-06 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Yes, Mark is correct.  IDLE does auto-indentation, and you have to backspace to 
go up to the previous indentation level.

--
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

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



[issue9534] OrderedDict.__del__ destructor throws AttributeError when process ends up with the exception trace

2010-08-06 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

None of the other python-dev IRC folks were able to deduce the issue from the 
provided information.  Closing as invalid.  Feel free to reopen if more 
actionable information becomes available.

--
resolution:  - invalid
status: open - closed

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



[issue9418] Move _formatter_* methods from string type into _string module

2010-08-06 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Mark Dickinson wrote:
  
  Mark Dickinson dicki...@gmail.com added the comment:
  
  The idea seems fine to me.  Hiding the _string module in 
  Objects/unicodeobject.c is a little odd, though:  why not a new 
  Modules/_string.c file?
Agreed. Please create a new module C file for this.

--
nosy: +lemburg

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



  1   2   >