[issue11485] Default SDK value on MacOSX needs changing

2011-03-14 Thread Santoso Wijaya

Santoso Wijaya santoso.wij...@gmail.com added the comment:

 Running configure on a MacOSX system will set
 MACOSX_DEPLOYMENT_TARGET to 10.4, which is probably not optimal
 for anyone on a recentish system.

What's more, when I first tried to compile Python on Mac OS X, and I have 
MacPorts' version of Python as the default interpreter in the terminal, I get 
the following errors when trying to do bare `./configure; make`:

bash-3.2$ make 
./Parser/asdl_c.py -h ./Include ./Parser/Python.asdl
Traceback (most recent call last):
  File 
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py,
 line 553, in module
main()
  File 
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py,
 line 535, in main
known_paths = addusersitepackages(known_paths)
  File 
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py,
 line 268, in addusersitepackages
user_site = getusersitepackages()
  File 
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py,
 line 243, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
  File 
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py,
 line 233, in getuserbase
USER_BASE = get_config_var('userbase')
  File 
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py,
 line 535, in get_config_var
return get_config_vars().get(name)
  File 
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py,
 line 434, in get_config_vars
_init_posix(_CONFIG_VARS)
  File 
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py,
 line 313, in _init_posix
raise IOError(msg)
IOError: $MACOSX_DEPLOYMENT_TARGET mismatch: now 10.4 but 10.6 during 
configure
make: *** [Include/Python-ast.h] Error 1


I worked around this by adding MACOSX_DEPLOYMENT_TARGET=10.6 to the configure 
script, but I have to remember to do that every time I configured a fresh clone 
of the source.

--
nosy: +santa4nt

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



[issue11369] Add caching for the isEnabledFor() computation

2011-03-14 Thread William Hart

William Hart whart...@gmail.com added the comment:

Vinay:

No, I haven't tried this in multi-threaded applications.  You're correct
that this would require locks around the global data.

--Bill

On Thu, Mar 10, 2011 at 3:16 AM, Vinay Sajip rep...@bugs.python.org wrote:


 Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:

 Bill,

 I was looking at this patch again, and I'm not sure about thread safety.
 The correctness of the caching depends on manager.status, which is state
 which is potentially shared across threads. There are no interlocks around
 it, so with the patch as it stands, ISTM it's possible in a multi-threaded
 application to get stale information. Has your patch been used in
 multi-threaded applications?

 --

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue11369
 ___


--
Added file: http://bugs.python.org/file21107/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11369
___Vinay:brbrNo, I haven#39;t tried this in multi-threaded applications.  
You#39;re correct that this would require locks around the global 
data.brbr--Billbrbrdiv class=gmail_quoteOn Thu, Mar 10, 2011 at 
3:16 AM, Vinay Sajip span dir=ltrlt;a 
href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/span 
wrote:br
blockquote class=gmail_quote style=margin: 0pt 0pt 0pt 0.8ex; border-left: 
1px solid rgb(204, 204, 204); padding-left: 1ex;div class=imbr
Vinay Sajip lt;a 
href=mailto:vinay_sa...@yahoo.co.uk;vinay_sa...@yahoo.co.uk/agt; added the 
comment:br
br
/divBill,br
br
I was looking at this patch again, and I#39;m not sure about thread safety. 
The correctness of the caching depends on manager.status, which is state which 
is potentially shared across threads. There are no interlocks around it, so 
with the patch as it stands, ISTM it#39;s possible in a multi-threaded 
application to get stale information. Has your patch been used in 
multi-threaded applications?br

divdiv/divdiv class=h5br
--br
br
___br
Python tracker lt;a 
href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;br
lt;a href=http://bugs.python.org/issue11369; 
target=_blankhttp://bugs.python.org/issue11369/agt;br
___br
/div/div/blockquote/divbr
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11491] dbm.open(..., flag=n) raises dbm.error if file exists and is rejected by whichdb

2011-03-14 Thread Denver Coneybeare

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

dbm.open() with flag=n raises dbm.error if the given file exists but whichdb 
doesn't recognize it.  In the documentation for dbm.open() the n flag is 
documented to Always create a new, empty database, open for reading and 
writing.  To me, this implies that if the file exists it will unconditionally 
be overwritten with a newly-created database, irrespective of its contents.

The code below illustrates a scenario (and indeed the scenario that I ran into) 
where dbm.open(..., flag=n) will throw dbm.error when it should just blow 
away the existing file and create a new, empty database:

import dbm
open(test.db, w).close() # create empty file
dbm.open(test.db, flag=n)

The cause of the exception is that within dbm.open() there is a call to whichdb 
to determine the file type.  The fix would be to skip this whichdb check if the 
n flag is specified.

I don't think that this change will cause backward compatibility issues, since 
I find it hard to believe that existing applications would rely on this 
exception being raised in this scenario.  However, to *guarantee* no 
compatibility break an alternate fix could leave the current behavior of the 
n flag and introduce a new flag, perhaps o for overwrite, with this 
unconditional overwrite behavior.

A proposed patch is attached: dbm_open_n_flag_error_invalid_file_fix_v1.patch

--
components: Library (Lib)
files: dbm_open_n_flag_error_invalid_file_fix_v1.patch
keywords: patch
messages: 130791
nosy: denversc
priority: normal
severity: normal
status: open
title: dbm.open(..., flag=n) raises dbm.error if file exists and is rejected 
by whichdb
type: behavior
versions: Python 3.3
Added file: 
http://bugs.python.org/file21108/dbm_open_n_flag_error_invalid_file_fix_v1.patch

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



[issue11487] build_installer.py should avoid relying on a young Python

2011-03-14 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

Note, there is a fix for the $MACOSX_DEPLOYMENT_TARGET mismatch Ronald 
mentions in Issue9516 and is only a problem if, during the build, /usr/bin/env 
python is a Python 2.7 that was built with a different deployment target.  
Python 2.6 and earlier are not susceptible to this problem.  (3.2 is also 
susceptible but is unlikely to be the target of /usr/bin/env python).  Of 
course, fixing future releases of Python2.7 does not help current builds.

--

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



[issue11492] email.header.Header doesn't fold headers

2011-03-14 Thread Scott Kitterman

New submission from Scott Kitterman skl...@kitterman.com:

Header folding is very different (non-existent as far as I've found so far) in 
Python3.  Here's a short example:

#!/usr/bin/python
# -*- coding: ISO-8859-1

from email.header import Header

hdrin = 'Received: from mailout00.controlledmail.com 
(mailout00.controlledmail.com [72.81.252.19]) by mailwash7.pair.com (Postfix) 
with ESMTP id 16BB5BAD5 for b...@kitterman.com; Sun, 13 Mar 2011 23:46:05 
-0400 (EDT)'

print(Header(hdrin))

With python2.6 the output is:


Received: from mailout00.controlledmail.com (mailout00.controlledmail.com
 [72.81.252.19]) by mailwash7.pair.com (Postfix) with ESMTP id 16BB5BAD5 for
 b...@kitterman.com; Sun, 13 Mar 2011 23:46:05 -0400 (EDT)

With python3.1 or 3.2 the output is one line:

Received: from mailout00.controlledmail.com (mailout00.controlledmail.com 
[72.81.252.19]) by mailwash7.pair.com (Postfix) with ESMTP id 16BB5BAD5 for 
b...@kitterman.com; Sun, 13 Mar 2011 23:46:05 -0400 (EDT)

This makes it very difficult to write header processing code that works for 
both Python2 and Python3 even if one can fold headers at all in Python3.

--
components: None
messages: 130793
nosy: kitterma
priority: normal
severity: normal
status: open
title: email.header.Header doesn't fold headers

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



[issue11467] urlparse.urlsplit() regression for paths consisting of digits

2011-03-14 Thread Santoso Wijaya

Santoso Wijaya santoso.wij...@gmail.com added the comment:

I'm attaching a patch with a fix and a unittest using the email example. I put 
this in a new test_RFC2368 (the mailto URL scheme) method. Seems like there is 
no unittest for parsing mailto scheme to begin with.

--
Added file: http://bugs.python.org/file21110/urlparse.patch

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



[issue11467] urlparse.urlsplit() regression for paths consisting of digits

2011-03-14 Thread Santoso Wijaya

Changes by Santoso Wijaya santoso.wij...@gmail.com:


Removed file: http://bugs.python.org/file21110/urlparse.patch

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



[issue11467] urlparse.urlsplit() regression for paths consisting of digits

2011-03-14 Thread Santoso Wijaya

Santoso Wijaya santoso.wij...@gmail.com added the comment:

Oops, wrong revision base.

--
Added file: http://bugs.python.org/file2/urlparse.patch

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



[issue11467] urlparse.urlsplit() regression for paths consisting of digits

2011-03-14 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

Santoso, Quick review comments:

1. The patch looks good.
2. I would use a temporary 'throw-away' variable instead of _, but don't bother 
to change it, before committing I shall take care.
3. Important - Did you find any regression with the earlier builds, also could 
you run the full test suite to ensure that all tests pass?

--

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



[issue10885] multiprocessing docs

2011-03-14 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 5dabfc3e4dd5 by Ross Lagerwall in branch '3.1':
Issue #10885: Fix multiprocessing docs typo
http://hg.python.org/cpython/rev/5dabfc3e4dd5

New changeset b2ebe9f5faca by Ross Lagerwall in branch '2.7':
Issue #10885: Fix multiprocessing docs typo
http://hg.python.org/cpython/rev/b2ebe9f5faca

--
nosy: +python-dev

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



[issue10885] multiprocessing docs

2011-03-14 Thread Ross Lagerwall

Changes by Ross Lagerwall rosslagerw...@gmail.com:


--
assignee: docs@python - rosslagerwall
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
versions: +Python 3.3

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



[issue11467] urlparse.urlsplit() regression for paths consisting of digits

2011-03-14 Thread Santoso Wijaya

Santoso Wijaya santoso.wij...@gmail.com added the comment:

Senthil,

Thanks for the review! I was initially thinking of `port = ...` but opted for 
_, arbitrarily, instead.

regrtest on Darwin-10.6.0-i386-64bit ran fine.

--

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



[issue11494] Confusing error message from warnings.warn

2011-03-14 Thread Gerrit Holl

New submission from Gerrit Holl topjakl...@gmail.com:

When accidentally passing a string to warnings.warn where one should pass a 
Warning-class, the error message is rather confusing:

 $ ./python 
 Python 2.7.1+ (release27-maint:88766, Mar  8 2011, 16:51:59) 
 [GCC 4.4.5] on linux2
 Type help, copyright, credits or license for more information.
  import warnings
  warnings.warn(aaa, bbb)
 Traceback (most recent call last):
   File stdin, line 1, in module
 TypeError: issubclass() arg 1 must be a class

It would be better for the error message to say TypeError: warnings must be 
classes inherited from ... or something like that.

--
components: Interpreter Core, Library (Lib)
messages: 130800
nosy: Gerrit.Holl
priority: normal
severity: normal
status: open
title: Confusing error message from warnings.warn
type: behavior
versions: Python 2.7

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



[issue2142] difflib.unified_diff(...) produces invalid patches

2011-03-14 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I’m not sure whether the compatibility policy would prevent that.  Aren’t there 
some cases with iterators (not strings) that work fine today without the 
change?  If so, it should be possible to get the same behavior.

--

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



[issue8516] Speed difference between Python 2.5 and 2.6 during filling bsddb database.

2011-03-14 Thread Jesús Cea Avión

Jesús Cea Avión j...@jcea.es added the comment:

Python 2.7 is out for a year now, and BSDDB is not present in Python 3.

I mark this as closed/out of date.

Any bug in pybsddb must be reported to the external package at 
http://www.jcea.es/programacion/pybsddb.htm

--
assignee: jcea - jafo
nosy: +jafo
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8516
___
___
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

2011-03-14 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


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

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



[issue4142] smtplib doesn't clear helo/ehlo flags on quit

2011-03-14 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
versions: +Python 3.3 -Python 2.6, Python 3.1, Python 3.2

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



[issue11477] Bug in code dispatching based on internal slots

2011-03-14 Thread Carl Friedrich Bolz

Changes by Carl Friedrich Bolz cfb...@gmx.de:


--
nosy: +cfbolz

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



[issue11488] Add writelines test coverage in tempfile

2011-03-14 Thread Brian Curtin

Brian Curtin br...@python.org added the comment:

Agreed, looks fine.

--

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



[issue11495] Remove OSF support completelly

2011-03-14 Thread Jesús Cea Avión

New submission from Jesús Cea Avión j...@jcea.es:

OSF was deprecated in Python 3.2, following the PEP11.

Now we must delete the support completelly for python 3.3.

--
assignee: jcea
messages: 130804
nosy: jcea
priority: normal
severity: normal
stage: needs patch
status: open
title: Remove OSF support completelly
versions: Python 3.3

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



[issue11485] Default SDK value on MacOSX needs changing

2011-03-14 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

See Issue11487 for more discussion on the SDK issue.

As a workaround do touch  Include/Python-ast.* to ensure that the build won't 
try to rebuild the header files (those files are up-to-date, but the timestamps 
in a fresh checkout are the same as those of the source file and that causes a 
rebuild)

--

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



[issue11495] Remove OSF support completelly

2011-03-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Well, all of the following systems/configurations should have their support 
removed in 3.3:

Name: Systems using Mach C Threads
Name: SunOS lightweight processes (LWP)
Name: Systems using --with-pth (GNU pth threads)
Name: Systems using Irix threads
Name: OSF* systems (issue 8606)

--
keywords: +easy
nosy: +pitrou

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



[issue11487] build_installer.py should avoid relying on a young Python

2011-03-14 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

Issue11485 contains a comment of someone that ran into the same issue is me.

--

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



[issue1099] Mac compile fails with pydebug and framework enabled

2011-03-14 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

I've added a new patch which only updates makefile.pre.in.

--
Added file: http://bugs.python.org/file21112/issue1099-v2.patch

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



[issue11452] test_inspect, test_trace not symlink install clean

2011-03-14 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:

It happened again.

13:27 ~/src/cpython $ ./python.exe -E -Wd -m test -r -w
== CPython 3.3a0 (default:a49bda5ff3d5, Mar 14 2011, 13:24:44) [GCC 4.2.1 
(Apple Inc. build 5664)]
==   Darwin-10.6.0-i386-64bit little-endian
[...]
326 tests OK.
1 test altered the execution environment:
test_site
23 tests skipped:
[...]
Those skips are all expected on darwin.
[1167563 refs]


13:33 ~/usr/opt $ python3 -E -Wd -m test -r -w
== CPython 3.3a0 (default:a49bda5ff3d5, Mar 14 2011, 13:24:44) [GCC 4.2.1 
(Apple Inc. build 5664)]
==   Darwin-10.6.0-i386-64bit little-endian
[...]
325 tests OK.
2 tests failed:
test_inspect test_trace
23 tests skipped:
[...]
Those skips are all expected on darwin.
Re-running failed tests in verbose mode
[...]
Diff is 2168 characters long. Set self.maxDiff to None to see it.
[1170964 refs]

The very same messages as in msg130452!
I'll try to write a patch which uses realpath() this evening
or so, and if this works i'll upload it.
Someone should take care about that, then, i think ...

B-) -- now this:

14:06 ~/usr/opt $ python3 -E -Wd -m test -r -w test_inspect test_trace
Using random seed 9018489
[1/2] test_inspect
[2/2] test_trace
All 2 tests OK.
[113082 refs]

--
resolution: invalid - 
status: closed - open
title: Test suite not symlink-install clean - test_inspect, test_trace not 
symlink install clean

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11452
___
___
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

2011-03-14 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

Tarek: could you comment on this patch, in particular: is it OK to commit this 
to 2.7, 3.2 and head?

(I haven't checked yet if the patch still applies cleanly, will do that later 
today)

--

___
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



[issue5863] bz2.BZ2File should accept other file-like objects. (issue4274045)

2011-03-14 Thread Michiel de Hoon

Michiel de Hoon mdeh...@users.sourceforge.net added the comment:

Would it be possible to add an open() function to the bz2 module? Currently 
gzip has such a function, but bz2 does not:

 import gzip
 gzip.open
function open at 0x781f0
 import bz2
 bz2.open
Traceback (most recent call last):
  File stdin, line 1, in ?
AttributeError: 'module' object has no attribute 'open'


--
nosy: +mdehoon

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



[issue11165] Document PyEval_Call* functions

2011-03-14 Thread Robbie Clemons

Changes by Robbie Clemons robclem...@gmail.com:


--
nosy: +robquad

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



[issue11477] Bug in code dispatching based on internal slots

2011-03-14 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Armin, I'm not sure returning NotImplemented from __iadd__ is a good idea in 
this case. It means += on a mutable object may silently fail to mutate 
in-place - enabling that seems rather questionable.

--
nosy: +ncoghlan

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



[issue1099] Mac compile fails with pydebug and framework enabled

2011-03-14 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

The patch has a spurious backslash at the end of the $(CC) command, but should 
otherwise be OK.

I'm currently running the testsuite in will later today push the fix to the 
repository.

--

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



[issue11477] Bug in code dispatching based on internal slots

2011-03-14 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
assignee:  - ncoghlan

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



[issue11488] Add writelines test coverage in tempfile

2011-03-14 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset f816841bab03 by R David Murray in branch '3.1':
#11488: Add tests for writelines method of SpooledTemporaryFile.
http://hg.python.org/cpython/rev/f816841bab03

New changeset da37cc4bd088 by R David Murray in branch '3.2':
Merge #11488 patch from 3.1.
http://hg.python.org/cpython/rev/da37cc4bd088

New changeset 7942f613ea5c by R David Murray in branch 'default':
Merge #11488 patch from 3.2.
http://hg.python.org/cpython/rev/7942f613ea5c

New changeset 7aee0fe6ae5d by R David Murray in branch '2.7':
Port #11488 patch from 3.1 (changeset f816841bab03)
http://hg.python.org/cpython/rev/7aee0fe6ae5d

--
nosy: +python-dev

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



[issue11466] getpass.getpass doesn't close tty file

2011-03-14 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:

Hello, Éric and Gregory, this patch also addresses the problem 
that 'one newline too much' may be written in case of errors. 
The problem is already present in the unpatched code, 
and i admit that 11466.3.patch doesn't fix it.

All of this is written under the assumption that i may touch only 
unix_getpass(), not the rest of this file; it would be easier if 
_raw_input() would take a terminal_setup=False argument and 
encapsulate echoing of a final newline ...

About security: i think that you, Éric, have referred to this 
when you've said your patch is not uncontroversial. 
There is http://mail.python.org/pipermail/python-dev/2003-December/040579.html, 
and, after looking into OpenBSD:lib/libc/gen/readpassphrase.c, 
i must admit that it would possibly be much better to use a native 
getpass(3) implementation if one is available.

(OpenBSD's getpass() *does not* set ISIG, it just takes care about 
signals and re-kill(2)s them as necessary; it restarts the entire 
getpass() cycle if it's TSTP/TTIN/TTOU and re-kill(2) returns.  
But this belongs to #11236, i guess.)

The mail on #dev is more than seven years old, however, and still 
this getpass.getpass() uses it's naive (compared to OpenBSD, say) 
approach.  And that does not get worse with my patch in the end.

I also want to note that getpass.getpass() may throw IOError 
undocumented, with and without 11466.4.patch applied; 
it does so cleanly upon a49bda5ff3d5. 
And finally i am thankful for all the feedback i can get.

--
Added file: http://bugs.python.org/file21113/11466.4.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11466
___diff --git a/Lib/getpass.py b/Lib/getpass.py
--- a/Lib/getpass.py
+++ b/Lib/getpass.py
@@ -38,27 +38,28 @@
 
 Always restores terminal settings before returning.
 
-fd = None
 tty = None
-try:
-# Always try reading and writing directly on the tty first.
-fd = os.open('/dev/tty', os.O_RDWR|os.O_NOCTTY)
-tty = os.fdopen(fd, 'w+', 1)
-input = tty
-if not stream:
-stream = tty
-except EnvironmentError as e:
-# If that fails, see if stdin can be controlled.
+exinst = None
+passwd = None
+# Something to break off if an error happens
+while 1:
 try:
-fd = sys.stdin.fileno()
-except (AttributeError, ValueError):
-passwd = fallback_getpass(prompt, stream)
-input = sys.stdin
-if not stream:
-stream = sys.stderr
+# Always try reading and writing directly on the tty first.
+fd = os.open('/dev/tty', os.O_RDWR|os.O_NOCTTY)
+input = tty = os.fdopen(fd, 'w+', 1)
+if not stream:
+stream = tty
+except EnvironmentError:
+# If that fails, see if stdin can be controlled,
+# otherwise use generic fallback implementation
+try:
+fd = sys.stdin.fileno()
+except:
+break
+if not stream:
+stream = sys.stderr
+input = sys.stdin
 
-if fd is not None:
-passwd = None
 try:
 old = termios.tcgetattr(fd) # a copy to save
 new = old[:]
@@ -69,20 +70,28 @@
 try:
 termios.tcsetattr(fd, tcsetattr_flags, new)
 passwd = _raw_input(prompt, stream, input=input)
+except Exception as e:
+exinst = e
 finally:
+stream.write('\n')
 termios.tcsetattr(fd, tcsetattr_flags, old)
-stream.flush()  # issue7208
-except termios.error as e:
+stream.flush() # issue7208 (7246)
+except Exception as e:
 if passwd is not None:
 # _raw_input succeeded.  The final tcsetattr failed.  Reraise
 # instead of leaving the terminal in an unknown state.
-raise
-# We can't control the tty or stdin.  Give up and use normal IO.
-# fallback_getpass() raises an appropriate warning.
-del input, tty  # clean up unused file objects before blocking
-passwd = fallback_getpass(prompt, stream)
+exinst = e # e == termios.error
+break
 
-stream.write('\n')
+if not exinst and passwd is None:
+# We can't control the tty or stdin. Give up and use normal IO.
+# fallback_getpass() raises an appropriate warning.
+passwd = fallback_getpass(prompt, stream)
+
+if tty:
+tty.close()
+if exinst:
+raise exinst
 return passwd
 
 
___
Python-bugs-list mailing list
Unsubscribe: 

[issue11496] test_readline fails when readline was installed after running configure (and was not re-run)

2011-03-14 Thread Natalia B. Bidart

New submission from Natalia B. Bidart nataliabid...@gmail.com:

If libreadline-dev was installed after configure was run, and the latter is not 
re-run, test_readline fails with:

[1/1] test_readline
test test_readline failed -- Traceback (most recent call last):
  File /home/nessita/pycon/sprint/cpython/Lib/test/test_readline.py, line 16, 
in testHistoryUpdates
readline.clear_history()
AttributeError: 'module' object has no attribute 'clear_history'

1 test failed:
test_readline

--
components: Tests
messages: 130817
nosy: nessita
priority: normal
severity: normal
status: open
title: test_readline fails when readline was installed after running configure 
(and was not re-run)
type: crash
versions: Python 3.3

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



[issue11496] test_readline fails when readline was installed after running configure (and was not re-run)

2011-03-14 Thread Natalia B. Bidart

Natalia B. Bidart nataliabid...@gmail.com added the comment:

I'm working on a patch.

--

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



[issue11497] Devguide: re-run configure in Unix setup step after installing deps

2011-03-14 Thread Matias Bordese

New submission from Matias Bordese mbord...@gmail.com:

When setting up dev environment in Unix and there are missing dependencies 
after running make, you may need to re-run configure before a new make (relates 
to #11496).

--
assignee: docs@python
components: Documentation
messages: 130820
nosy: docs@python, matiasb
priority: normal
severity: normal
status: open
title: Devguide: re-run configure in Unix setup step after installing deps
type: resource usage

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



[issue2650] re.escape should not escape underscore

2011-03-14 Thread SilentGhost

SilentGhost ghost@gmail.com added the comment:

I think these are two different questions:
 1. What to escape
 2. What to do about poor performance of the re.escape when re.sub is used

In my opinion, there isn't any justifiable reason to escape non-meta 
characters: it doesn't affect matching; escaped strings are typically just 
re-used in regex.

I would favour simpler and cleaner code with re.sub. I don't think that 
re.quote could be a performance bottleneck in any application. I did some 
profiling with python3.2 and it seems that the reason for this poor performance 
is many abstraction layers when using re.sub. However, we need to bear in mind 
that we're only talking about 40 usec difference for a 100-char string 
(string.printable): I'd think that strings being escaped are typically shorter.

As a compromise, I tested this code:

_mp = {ord(i): '\\' + i for i in '][.^$*+?{}\\|()'}

def escape(pattern):
if isinstance(pattern, str):
return pattern.translate(_mp)
return sub(br'([][.^$*+?{}\\|()])', br'\\\1', pattern)

which is fast (faster than existing code) for str and slow for bytes patterns.
I don't particularly like it, because of the difference between str and bytes 
handling, but I do think that it will be much easier to fix once/when/if re 
module is improved.

--
keywords:  -patch

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



[issue11497] Devguide: re-run configure in Unix setup step after installing deps

2011-03-14 Thread Matias Bordese

Matias Bordese mbord...@gmail.com added the comment:

Adding patch.

--
keywords: +patch
Added file: http://bugs.python.org/file21114/issue11497.patch

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



[issue11496] test_readline fails when readline was installed after running configure (and was not re-run)

2011-03-14 Thread Natalia B. Bidart

Natalia B. Bidart nataliabid...@gmail.com added the comment:

Trivial patch to skip the test if module 'readline' doesn't have the 
'clear_history' attr.

--
keywords: +patch
Added file: http://bugs.python.org/file21115/pycon-issue11496.patch

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



[issue5863] bz2.BZ2File should accept other file-like objects. (issue4274045)

2011-03-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Would it be possible to add an open() function to the bz2 module?
 Currently gzip has such a function, but bz2 does not:

Well, it could be a topic for a separate issue.

--

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



[issue11497] Devguide: re-run configure in Unix setup step after installing deps

2011-03-14 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

Fixed in [9bacb56f08e7]

--
nosy: +brett.cannon
resolution:  - fixed
status: open - closed

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



[issue11496] test_readline fails when readline was installed after running configure (and was not re-run)

2011-03-14 Thread R. David Murray

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

Hmm.  It seems to me that in this case the test *should* fail, since it 
indicates a broken Python installation.  How about instead catching the error 
in the test and calling self.fail with the error and an additional message 
about making sure configure has been run?

--
nosy: +r.david.murray

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



[issue11491] dbm.open(..., flag=n) raises dbm.error if file exists and is rejected by whichdb

2011-03-14 Thread Denver Coneybeare

Changes by Denver Coneybeare denver.coneybe...@gmail.com:


--
nosy: +brian.curtin
versions: +Python 2.7, Python 3.1, Python 3.2

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



[issue11496] test_readline fails when readline was installed after running configure (and was not re-run)

2011-03-14 Thread R. David Murray

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

MvL explained that there is a configure tests that makes the existence of this 
routine optional.  So the skip is appropriate, but the message should read 
something like the clear history tests cannot be run because the clear_history 
method is not available.

Martin also points out that this method has been available for a long time, so 
it may perhaps be appropriate to remove the configure test and turn this back 
in to a failure.  But that would be a separate issue if someone cares to pursue 
it.

--

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



[issue5863] bz2.BZ2File should accept other file-like objects. (issue4274045)

2011-03-14 Thread Nadeem Vawda

Nadeem Vawda nadeem.va...@gmail.com added the comment:

 Would it be possible to add an open() function to the bz2 module?

Yes, it would be quite trivial, though I don't think it would be worthwhile -
all it would do is provide a direct alias for the BZ2File constructor. But as
Antoine said, that is a topic for a separate issue.

@Antoine:

Regarding the use of PY_SSIZE_T_CLEAN, I assume that Py_ssize_t is to be
preferred over plain ssize_t. Is this correct?

Also, I was wondering whether I need to add some sort of license boilerplate to
the beginning of bz2.py? With _bz2module.c, I presume I should retain the
copyright information from the old bz2module.c. Would something like this be ok?

   /* _bz2 - Low-level Python interface to libbzip2.
*
* Copyright (c) 2011  Nadeem Vawda nadeem.va...@gmail.com
*
* Based on bz2module.c:
*
* Copyright (c) 2002  Gustavo Niemeyer nieme...@conectiva.com
* Copyright (c) 2002  Python Software Foundation; All Rights Reserved
*/

(Browsing through the source files in Lib/ and Modules/, there doesn't seem to
be a clear convention for this sort of thing...)

--

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



[issue6911] Document changes in asynchat

2011-03-14 Thread Jeff Ramnani

Jeff Ramnani j...@jefframnani.com added the comment:

This patch could no longer be applied cleanly on the 2.7 branch.

I have updated the patch so it applies cleanly to commit 22f991bb9b0b on the 
2.7 branch.

--
nosy: +jramnani
Added file: http://bugs.python.org/file21116/asynchat-docs.patch

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



[issue1440472] email.Generator is not idempotent

2011-03-14 Thread R. David Murray

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

Here is a patch that adds a footnote explaining the issue.

--
keywords: +patch
Added file: http://bugs.python.org/file21117/gen_not_quite_idem.patch

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



[issue11498] test_zipfile.test_unicode_filenames should be skipped of no zlib

2011-03-14 Thread Natalia B. Bidart

New submission from Natalia B. Bidart nataliabid...@gmail.com:

When running the test suite, if zlib is not available, we get this failure:

[1/1] test_zipfile
test test_zipfile failed -- Traceback (most recent call last):
  File /home/nessita/pycon/sprint/cpython/Lib/test/test_zipfile.py, line 498, 
in test_unicode_filenames
zipfp.open(name).close()
  File /home/nessita/pycon/sprint/cpython/Lib/zipfile.py, line 978, in open
close_fileobj=not self._filePassed)
  File /home/nessita/pycon/sprint/cpython/Lib/zipfile.py, line 487, in 
__init__
self._decompressor = zlib.decompressobj(-15)
AttributeError: 'NoneType' object has no attribute 'decompressobj'
1 test failed:
test_zipfile

--
components: Tests
messages: 130831
nosy: nessita
priority: normal
severity: normal
status: open
title: test_zipfile.test_unicode_filenames should be skipped of no zlib
type: crash
versions: Python 3.3

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



[issue11498] test_zipfile.test_unicode_filenames should be skipped of no zlib

2011-03-14 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
assignee:  - ezio.melotti
nosy: +ezio.melotti

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



[issue11498] test_zipfile.test_unicode_filenames should be skipped of no zlib

2011-03-14 Thread Natalia B. Bidart

Natalia B. Bidart nataliabid...@gmail.com added the comment:

Trivial patch to skip the aforementioned test.

--
keywords: +patch
Added file: http://bugs.python.org/file21118/pycon-issue11498.patch

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



[issue11496] test_readline fails when readline was installed after running configure (and was not re-run)

2011-03-14 Thread Natalia B. Bidart

Natalia B. Bidart nataliabid...@gmail.com added the comment:

Attaching patch with improved skip message as per David's comment.

--
Added file: http://bugs.python.org/file21119/pycon-issue11496.patch

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



[issue11495] Remove OSF support completelly

2011-03-14 Thread Jesús Cea Avión

Jesús Cea Avión j...@jcea.es added the comment:

Uhm... cleaning this code I have a lot of references in ctypes libraries, 
especifically in the FFI section.

I have the feeling that we are importing this code from upstream, so I better 
don't touch this ctypes/FFI.

Am I right?.

--

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



[issue11495] Remove OSF support completelly

2011-03-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Uhm... cleaning this code I have a lot of references in ctypes
 libraries, especifically in the FFI section.
 
 I have the feeling that we are importing this code from upstream, so I
 better don't touch this ctypes/FFI.

ctypes can be touched, but libffi shouldn't indeed.
(well... I believe our current copy of libffi may have changes applied,
but I don't know how/where they are maintained)

--

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



[issue11498] test_zipfile.test_unicode_filenames should be skipped of no zlib

2011-03-14 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 89af3880ca57 by Eric V. Smith in branch 'default':
Skip test if zlib not present. Closes #11498. Patch by Natalia B. Bidart.
http://hg.python.org/cpython/rev/89af3880ca57

--
nosy: +python-dev
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue5863] bz2.BZ2File should accept other file-like objects. (issue4274045)

2011-03-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Regarding the use of PY_SSIZE_T_CLEAN, I assume that Py_ssize_t is to be
 preferred over plain ssize_t. Is this correct?

Yes, ssize_t doesn't exist everywhere AFAIK.
(size_t does, or at least we assume it does)

 Also, I was wondering whether I need to add some sort of license boilerplate 
 to
 the beginning of bz2.py? With _bz2module.c, I presume I should retain the
 copyright information from the old bz2module.c. Would something like this be 
 ok?

Well, I would personally advocate not re-adding a license boilerplate,
since it doesn't serve a purpose (nearly all of Python is freely usable
under the PSF License, and the authors are documented by version
control).
You could ask on python-dev to get other opinions, though.

--

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



[issue7689] Pickling of classes with a metaclass and copy_reg

2011-03-14 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +ncoghlan

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



[issue11499] reassignment to bool is left in the file

2011-03-14 Thread Jason R. Coombs

New submission from Jason R. Coombs jar...@jaraco.com:

Consider the Python file

#!python
True = 1
False = 0

The 2to3 script returns an empty diff for this file.

These lines (especially when the values are canonical), are clearly for 
backward compatibility to early Python 2.x editions (2.2.1 and earlier).

These statements cause an error in Python 3. It would be nice if 2to3 could 
either remove these lines or log a warning.

--
components: 2to3 (2.x to 3.0 conversion tool)
messages: 130838
nosy: jaraco
priority: normal
severity: normal
status: open
title: reassignment to bool is left in the file
type: behavior

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



[issue11165] Document PyEval_Call* functions

2011-03-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

IMO, it would probably have been better if these APIs had been private from the 
start. Is there any use case for calling them from 3rd-party code?

--
nosy: +pitrou

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



[issue11499] 2to3: reassignment to bool is left in the file

2011-03-14 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +benjamin.peterson
title: reassignment to bool is left in the file - 2to3: reassignment to bool 
is left in the file

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



[issue10775] assertRaises as a context manager should accept a 'msg' keyword argument.

2011-03-14 Thread Robbie Clemons

Robbie Clemons robclem...@gmail.com added the comment:

Changing callableObj to callable_obj in assertRaises will break for anyone 
that's upgrading to 3.3.  I left a comment on the review.

--
nosy: +robquad

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



[issue11500] Fixes failing urllib2 proxy tests on OSX

2011-03-14 Thread Scott Wilson

New submission from Scott Wilson scott.wil...@gmail.com:

Fixes a bug in the os x proxy bypass code for fully qualified IP addresses in 
the proxy exception list. 

Tests that fail on os x without this patch:

test_urllib2.HandlerTests.test_proxy_https
test_urllib2.HandlerTests.test_proxy_https_proxy_authorization

Will create a separate issue to improve test coverage in this area.

--
assignee: ronaldoussoren
components: Macintosh
files: proxy_bypass_osx.diff
keywords: patch
messages: 130841
nosy: ronaldoussoren, rswilson
priority: normal
severity: normal
status: open
title: Fixes failing urllib2 proxy tests on OSX
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file21120/proxy_bypass_osx.diff

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



[issue6584] gzip module has no custom exception

2011-03-14 Thread Filip Gruszczyński

Filip Gruszczyński grusz...@gmail.com added the comment:

Bump! How about commiting this patch? Or maybe there is something missing? I'll 
be happy to fix it.

--

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



[issue1099] Mac compile fails with pydebug and framework enabled

2011-03-14 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 7af5a9298251 by Ronald Oussoren in branch '3.1':
Fixes #1099: Mac compile fails with pydebug and framework enabled
http://hg.python.org/cpython/rev/7af5a9298251

New changeset e8679f07badd by Ronald Oussoren in branch '3.2':
Issue #1099: Fix the build on MacOSX when building a framework with pydebug 
using GCC 4.0.
http://hg.python.org/cpython/rev/e8679f07badd

New changeset 4c651c1abd28 by Ronald Oussoren in branch 'default':
Issue #1099: Fix the build on MacOSX when building a framework with pydebug
http://hg.python.org/cpython/rev/4c651c1abd28

New changeset bcca0a6ebbd2 by Ronald Oussoren in branch '2.7':
Issue #1099: Fix the build on MacOSX when building a framework with pydebug 
using GCC 4.0.
http://hg.python.org/cpython/rev/bcca0a6ebbd2

--
nosy: +python-dev

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



[issue6584] gzip module has no custom exception

2011-03-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Since the patch makes BadGzipFile a subclass of IOError, it doesn't look 
unreasonable.
Some nits:
- a gzipped file is not an archive
- the unit tests should use either the with statement, or try/finally blocks 
to properly close the file even when the test fails
- you should probably explicitly test that BadGzipFile is a subclass of IOError

--
nosy: +pitrou

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



[issue5673] Add timeout option to subprocess.Popen

2011-03-14 Thread Reid Kleckner

Reid Kleckner r...@mit.edu added the comment:

I updated and committed the patch to the cpython hg repo in revision 
[c4a0fa6e687c].

--

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



[issue1099] Mac compile fails with pydebug and framework enabled

2011-03-14 Thread Ronald Oussoren

Changes by Ronald Oussoren ronaldousso...@mac.com:


--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue11489] json.dumps not parsable by json.loads (on Linux only)

2011-03-14 Thread Alexander Belopolsky

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

 It appears this is an invalid unicode character.
 Shouldn't this be caught by decode(utf8)

It should and it is in Python 3.x:

 b'\xed\xa8\x80'.decode(utf8)
Traceback (most recent call last):
  File stdin, line 1, in module
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1: invalid 
continuation byte

Python 2.7 behavior seems to be a bug.

 '\xed\xa8\x80'.decode(utf8)
u'\uda00'

Note also the following difference:

In 3.x:

 b'\xed\xa8\x80'.decode(utf8, 'replace')
'��'

In 2.7:

 '\xed\xa8\x80'.decode(utf8, 'replace')
u'\uda00'

I am not sure this should be fixed in 2.x. Lone surrogates seem to round-trip 
just fine in 2.x and there likely to be existing code that relies on this.

  Shouldn't anything generated by json.dumps be parsed by json.loads?

This on the other hand should probably be fixed by either rejecting lone 
surrogates in json.dumps or accepting them in json.loads or both.  The last 
alternative would be consistent with the common wisdom of being conservative in 
what you produce but liberal in what you accept.

--
nosy: +belopolsky, haypo
versions: +Python 2.7

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



[issue11501] distutils.archive_util should handle absence of zlib module

2011-03-14 Thread Natalia B. Bidart

New submission from Natalia B. Bidart nataliabid...@gmail.com:

When creating a zipfile, the code:

zip = zipfile.ZipFile(zip_filename, w,
  compression=zipfile.ZIP_DEFLATED)

does not handle the potential RuntimeError casued by:

If ZIP_DEFLATED is specified but the zlib module is not available, 
RuntimeError is also raised.

--
assignee: tarek
components: Distutils2
messages: 130847
nosy: alexis, eric.araujo, nessita, tarek
priority: normal
severity: normal
status: open
title: distutils.archive_util should handle absence of zlib module
type: crash
versions: Python 3.3

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



[issue11501] distutils.archive_util should handle absence of zlib module

2011-03-14 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

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



[issue5673] Add timeout option to subprocess.Popen

2011-03-14 Thread Sridhar Ratnakumar

Sridhar Ratnakumar sridh...@activestate.com added the comment:

On 2011-03-14, at 9:18 AM, Reid Kleckner wrote:

 I updated and committed the patch to the cpython hg repo in revision 
 [c4a0fa6e687c].

Does this go to the main branch (py3.3) only? It is not clear from just looking 
at http://hg.python.org/cpython/rev/c4a0fa6e687c/

--
Added file: http://bugs.python.org/file21121/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5673
___htmlhead/headbody style=word-wrap: break-word; -webkit-nbsp-mode: 
space; -webkit-line-break: after-white-space; brdivdivOn 2011-03-14, at 
9:18 AM, Reid Kleckner wrote:/divbr 
class=Apple-interchange-newlineblockquote type=citespan 
class=Apple-style-span style=border-collapse: separate; font-family: 
Helvetica; font-style: normal; font-variant: normal; font-weight: normal; 
letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; 
text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; 
-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; 
-webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; 
-webkit-text-stroke-width: 0px; font-size: medium; I updated and committed 
the patch to the cpython hg repo in revision 
[c4a0fa6e687c]./span/blockquote/divbrdivDoes this go to the main 
branch (py3.3) only? It is not clear from just looking atnbsp;a 
href=http://hg.python.o
 
rg/cpython/rev/c4a0fa6e687c/http://hg.python.org/cpython/rev/c4a0fa6e687c//anbsp;/div/body/html___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11502] assignment of winreg module to another name causes NameError

2011-03-14 Thread Jason R. Coombs

New submission from Jason R. Coombs jar...@jaraco.com:

Consider the Python file:

import _winreg
_winreg.foo
x = _winreg

Currently, 2to3 converts this to:

import winreg
winreg.foo
x = _winreg

The result will elicit a NameError on line 3 (if line 2 is valid). Is it 
possible to support this case?

--
components: 2to3 (2.x to 3.0 conversion tool)
messages: 130849
nosy: jaraco
priority: normal
severity: normal
status: open
title: assignment of winreg module to another name causes NameError

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



[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-03-14 Thread R. David Murray

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

The tests for this function are...not sufficient.  I don't think I'm 
comfortable committing a patch without improving the tests.  Ideally there 
would also be a test that the locale does not affect the result, which would 
need to be skipped if the chosen test locale was not available on the machine 
running the tests.

--

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



[issue5673] Add timeout option to subprocess.Popen

2011-03-14 Thread Reid Kleckner

Reid Kleckner r...@mit.edu added the comment:

On Mon, Mar 14, 2011 at 12:31 PM, Sridhar Ratnakumar
rep...@bugs.python.org wrote:

 Sridhar Ratnakumar sridh...@activestate.com added the comment:

 On 2011-03-14, at 9:18 AM, Reid Kleckner wrote:

 I updated and committed the patch to the cpython hg repo in revision 
 [c4a0fa6e687c].

 Does this go to the main branch (py3.3) only? It is not clear from just 
 looking at http://hg.python.org/cpython/rev/c4a0fa6e687c/

Yes, it's a new feature, so I don't think it's appropriate to backport.

Actually, I just noticed I forgot the update the doc patches.  They
should all say added in 3.3, not 3.2.

Reid

--

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



[issue11495] Remove OSF support completelly

2011-03-14 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 15b090c9442a by Jesus Cea in branch 'default':
Issue #11495: OSF support is eliminated. It was deprecated in Python 3.2
http://hg.python.org/cpython/rev/15b090c9442a

--
nosy: +python-dev

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



[issue11500] Fixes failing urllib2 proxy tests on OSX

2011-03-14 Thread Scott Wilson

Changes by Scott Wilson scott.wil...@gmail.com:


--
nosy: +orsenthil -ronaldoussoren
type:  - behavior

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



[issue11495] Remove OSF support completelly

2011-03-14 Thread Jesús Cea Avión

Jesús Cea Avión j...@jcea.es added the comment:

Committed as r15b090c9442a.

The other deprecated supports should be covered in other issues. I will check 
myself them in a while.

--
resolution:  - accepted
status: open - closed

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



[issue5673] Add timeout option to subprocess.Popen

2011-03-14 Thread Reid Kleckner

Changes by Reid Kleckner r...@mit.edu:


--
status: open - closed

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



[issue11480] Cannot copy a class with a metaclass other than type

2011-03-14 Thread Daniel Stutzbach

Changes by Daniel Stutzbach stutzb...@google.com:


--
keywords: +needs review
nosy: +alexandre.vassalotti, stutzbach
stage:  - patch review

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



[issue11499] 2to3: reassignment to bool is left in the file

2011-03-14 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

That seems awfully obscure.

--

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



[issue11499] 2to3: reassignment to bool is left in the file

2011-03-14 Thread Jason R. Coombs

Jason R. Coombs jar...@jaraco.com added the comment:

Agreed.

I encountered it in https://github.com/dottedmag/path.py, which has since been 
patched by removing the compatibility clauses, but that means that Python 
2.2.1 and earlier are no longer supported by the project.

If it's not worth the trouble of adding, just close with won't fix. I only 
suggest it because I encountered it and others might as well.

--

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



[issue11503] Expand test coverage in posixpath

2011-03-14 Thread Evan Dandrea

New submission from Evan Dandrea e...@ubuntu.com:

I've expanded the coverage of the posixpath test.  The following scenarios have 
been added:
 - lexists with a non-existent file.
 - ismount with binary data.
 - ismount with a directory that is not a mountpoint.
 - ismount with a non-existent file.
 - ismount with a symlink.
 - expanduser with $HOME unset.
 - realpath with a relative path.
 - sameopenfile with a basic test.

I have tested it on Ubuntu natty (20110311) and Mac OSX 10.6.6.

--
components: Tests
files: test_posixpath.patch
keywords: patch
messages: 130856
nosy: ev
priority: normal
severity: normal
status: open
title: Expand test coverage in posixpath
type: behavior
Added file: http://bugs.python.org/file21122/test_posixpath.patch

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



[issue11498] test_zipfile.test_unicode_filenames should be skipped of no zlib

2011-03-14 Thread Ezio Melotti

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

I fixed it in 3.2 too in d2689ed3dc83.
Thanks for the patch!

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

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



[issue11498] test_zipfile.test_unicode_filenames should be skipped of no zlib

2011-03-14 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
type: crash - behavior

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



[issue11499] 2to3: reassignment to bool is left in the file

2011-03-14 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

Okay. This is certainly the first request I've seen, so I'm going to close.

--
resolution:  - rejected
status: open - closed

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



[issue11503] Expand test coverage in posixpath

2011-03-14 Thread Evan Dandrea

Changes by Evan Dandrea e...@ubuntu.com:


--
nosy: +michael.foord

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



[issue11504] test_subprocess failure

2011-03-14 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

http://www.python.org/dev/buildbot/all/builders/x86%20debian%20parallel%203.x/builds/1678/steps/test/logs/stdio



==
FAIL: test_check_output_timeout (test.test_subprocess.ProcessTestCase)
--
Traceback (most recent call last):
  File 
/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/test/test_subprocess.py, 
line 133, in test_check_output_timeout
self.assertEqual(c.exception.output, b'BDFL')
AssertionError: b'' != b'BDFL'

==
FAIL: test_check_output_timeout 
(test.test_subprocess.ProcessTestCasePOSIXPurePython)
--
Traceback (most recent call last):
  File 
/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/test/test_subprocess.py, 
line 133, in test_check_output_timeout
self.assertEqual(c.exception.output, b'BDFL')
AssertionError: b'' != b'BDFL'

==
FAIL: test_check_output_timeout (test.test_subprocess.ContextManagerTests)
--
Traceback (most recent call last):
  File 
/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/test/test_subprocess.py, 
line 133, in test_check_output_timeout
self.assertEqual(c.exception.output, b'BDFL')
AssertionError: b'' != b'BDFL'

--
assignee: rnk
components: Library (Lib), Tests
keywords: buildbot
messages: 130859
nosy: pitrou, rnk
priority: normal
severity: normal
stage: needs patch
status: open
title: test_subprocess failure
type: behavior
versions: Python 3.3

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



[issue11487] build_installer.py should avoid relying on a young Python

2011-03-14 Thread Santoso Wijaya

Changes by Santoso Wijaya santoso.wij...@gmail.com:


--
nosy: +santa4nt

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



[issue11504] test_subprocess failure

2011-03-14 Thread Reid Kleckner

Reid Kleckner r...@mit.edu added the comment:

I can't reproduce this.  I've tested on:
64-bit Linux (Debian lenny)
OS X 10.6
Windows Vista 32-bit

It seems reasonable to me that the interpreter should be able to
initialize and write to stdout in less than half a second, but it
seems to be failing consistently on that builder.  I'd really rather
not make the timeout longer, since it will increase testing time for
everyone.  Is there something about that builder that makes
initialization take longer?

--

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



[issue11504] test_subprocess failure

2011-03-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 It seems reasonable to me that the interpreter should be able to
 initialize and write to stdout in less than half a second

Well, we have some very slow buildbots and others which seem quite loaded too.
(this one should be very fast but perhaps there's some other stuff going on in 
the background)

In my experience such a low timeout value may be enough for light in-process 
stuff such as lock.acquire() or select(), but if you spawn a whole new process 
you should let the system breathe a bit more. I know this also unfortunately 
increases the test runtime, but try to bump it up to at least 1.5 seconds.

--

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



[issue11489] json.dumps not parsable by json.loads (on Linux only)

2011-03-14 Thread Brian Merrell

Brian Merrell br...@merrells.org added the comment:

I am not sure this should be fixed in 2.x. Lone surrogates seem to round-trip 
just fine in 2.x and there likely to be existing code that relies on this.

I generally agree but am then at a loss as to how to detect and deal with lone 
surrogates(eg ignore, replace, etc) in 2.x when interacting with 
services/libraries (such as Python's own json.loads) that take a stricter view.

  Shouldn't anything generated by json.dumps be parsed by json.loads?

This on the other hand should probably be fixed by either rejecting lone 
surrogates in json.dumps or accepting them in json.loads or both.  The last 
alternative would be consistent with the common wisdom of being conservative 
in what you produce but liberal in what you accept.

We seem to be in the worst of both worlds right now as I've generated and 
stored a lot of json that can not be read back in.  Could the JSON library 
simply leverage Python's Unicode interpreter instead of performing its own 
validation?  We could pass it ignore, replace, etc.  Regardless, I think we 
certainly need to remove the strict JSON loads() validation especially when it 
isn't enforced by dumps().

--

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



[issue11148] Crash and error message from Python VM

2011-03-14 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

I agree this is a duplicate of #6721. I'm therefore closing this issue.

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

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



[issue9670] Exceed Recursion Limit in Thread

2011-03-14 Thread Ronald Oussoren

Changes by Ronald Oussoren ronaldousso...@mac.com:


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

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



[issue10665] Expand unicodedata module documentation

2011-03-14 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

The PDF generator is PDFLaTeX, whose range of Unicode characters is very 
limited, so no, I can't fix it.

--

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



[issue11491] dbm.open(..., flag=n) raises dbm.error if file exists and is rejected by whichdb

2011-03-14 Thread Brian Curtin

Brian Curtin br...@python.org added the comment:

Attached is a slightly updated version of the patch. If the assertEqual for any 
reason were to fail, the file wouldn't be closed, leading to a ResourceWarning. 
That'll work on 3.2+, but if this is backported consideration will have to be 
made there (try/finally, probably).

Otherwise, in concept I think this patch is alright.

--
Added file: http://bugs.python.org/file21123/issue11491.diff

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



[issue11477] Bug in code dispatching based on internal slots

2011-03-14 Thread Terry J. Reedy

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

It seems to me that the underlying (design) flaw is having duplicate slots in 
the C type structure*.  I presume that having two different functions in 
num-add and seq-add (concat) (I know, not quite the proper names), etc, is an 
error. I also assume that changing the structure is out, whether frozen in the 
ABI or not, as disabling every extention type.

But could we change how the slots are handled? For instance, when class is 
created, if nun-add is absent and seq-add is present, copy seq-add to num-add 
and thereafter only use num-add and treat seq-add as a dummy left for back 
compatibility.  In other words, merge the duplicate slots in their effect, so 
there is a proper 1-1 relationship between syntax operators and methods, as 
there is for Python-coded classes.

*I am guessing that this was for convenience -- making a number? fill in num 
slots; making a sequence? fill in seq slots. Or perhaps Guido once had some 
idea of possibly separating the operators/functions at the Python level. Does 
not matter at present.

--

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



[issue11477] Bug in code dispatching based on internal slots

2011-03-14 Thread Terry J. Reedy

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

And if num-add is present and seq-add not, copy the other way, even if it were 
recommended to only use the former.

--

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



[issue11496] test_readline fails when readline was installed after running configure (and was not re-run)

2011-03-14 Thread R. David Murray

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


--
assignee:  - r.david.murray

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



[issue11504] test_subprocess failure

2011-03-14 Thread Reid Kleckner

Reid Kleckner r...@mit.edu added the comment:

I increased the timeout in [fd2b3eac6756] and the buildbot is passing now:
http://python.org/dev/buildbot/all/builders/x86%20debian%20parallel%203.x

--
status: open - closed

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



[issue11491] dbm.open(..., flag=n) raises dbm.error if file exists and is rejected by whichdb

2011-03-14 Thread Denver Coneybeare

Denver Coneybeare denver.coneybe...@gmail.com added the comment:

Looks good to me.  I thought the same thing about the file not being closed on 
error, but all of the other tests in the file also suffer from that problem, so 
I just followed the convention set out by the other tests.  Maybe if you 
eventually commit this change, you could improve this behavior in the other 
tests as well.

--

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



[issue11503] Expand test coverage in posixpath

2011-03-14 Thread Evan Dandrea

Evan Dandrea e...@ubuntu.com added the comment:

Fixed a typo in the previous patch.

--
Added file: http://bugs.python.org/file21124/test_posixpath.patch

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



  1   2   3   4   >