[issue1883] Adapt pydoc to new doc system

2008-04-25 Thread Humberto Diogenes

Humberto Diogenes [EMAIL PROTECTED] added the comment:

Amaury, seems that there's duplicated from render_doc inside pydoc.doc. I 
removed it and everything kept working, including the new basic tests.

Added file: http://bugs.python.org/file10103/py3k-pydoc.doc-cleanup.patch

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1883
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of the reference guide

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


--
title: Write user's version of - Write user's version of the reference guide

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of the reference guide

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file10091/unnamed

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of the reference guide

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file10092/unnamed

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of the reference guide

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file10094/unnamed

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of the reference guide

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file10095/unnamed

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of the reference guide

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file10090/unnamed

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of the reference guide

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file10098/unnamed

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of the reference guide

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file10100/unnamed

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of the reference guide

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file10093/unnamed

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of the reference guide

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file10101/unnamed

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of the reference guide

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file10097/unnamed

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1376292] Write user's version of the reference guide

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file10096/unnamed

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1376292
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2686] Any chance we could double the height of the 'Comment:' text area on tracker?

2008-04-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


--
resolution:  - invalid
status: open - closed

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2686
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2686] Any chance we could double the height of the 'Comment:' text area on tracker?

2008-04-25 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

Fixed in r62496. Amaury was right - please do use the meta-tracker in
the future for this.

But what should I do with your left arm now :-?

FWIW, Safari users don't need to rely on the HTML page providing them
with enough space - they can increase the input field size by dragging
the lower-right corner of the field.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2686
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2686] Any chance we could double the height of the 'Comment:' text area on tracker?

2008-04-25 Thread Martin v. Löwis

Changes by Martin v. Löwis [EMAIL PROTECTED]:


--
resolution: invalid - fixed

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2686
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2686] Any chance we could double the height of the 'Comment:' text area on tracker?

2008-04-25 Thread Trent Nelson

Trent Nelson [EMAIL PROTECTED] added the comment:

Perhaps you could sell my arm on eBay then forward me the proceeds such 
that I can buy a Mac and use Safari? ;-)

Will use meta tracker herein -- didn't even know that existed.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2686
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2682] cyclic reference in ctypes CFunctionType objects

2008-04-25 Thread Thomas Heller

Thomas Heller [EMAIL PROTECTED] added the comment:

 Can you please elaborate your (apparent) concerns about this patch? IOW,
 why did you not check it in?
 
 I have no concerns about the patch, and I am currently committing it.
 I'm uploading so that I can points others to it, and (hopefully) to test
 it before some alpha release.
 
 It is part of my workflow: I develop a patch, test it locally, upload it
 and eventually commit it sonner or later, sometimes changing things
 depending on feedback I get.

Martin, are there any problems with this approach?

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2682
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue433030] SRE: Atomic Grouping (?...) is not supported

2008-04-25 Thread Jeffrey C. Jacobs

Jeffrey C. Jacobs [EMAIL PROTECTED] added the comment:

Quick update (see thread 2636 for other updates to the Regex
functionality): I do have a design in my mind for how to accomplish both
Atomic Grouping and Possessive Qualifiers and it would work with either
the existing Engine design or the new design I have been playing with. 
It's just a matter of getting around to implementing it, testing it and
documenting it.

I currently am having problem with Bazaar / Launchpad which are beyond
the scope of this issue but are effecting my work.  Those issues can be
found on the Launchpad site if you look for Answers / Bugs originating
from timehorse.


Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue433030

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



[issue2684] Logging Module still failing for %(filename)s, __init__

2008-04-25 Thread Vinay Sajip

Vinay Sajip [EMAIL PROTECTED] added the comment:

Can you confirm whether this problem occurs even after deleting all .pyc
and .pyo files, including in the Python library folders and your
application folders? Also, which specific platform is this happening on?

On your installation, is the line number 1327 the last line in
logging/__init__.py?

--
assignee:  - vsajip
nosy: +vsajip

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2684
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2688] Error when nesting many while loops

2008-04-25 Thread Guilherme Polo

Guilherme Polo [EMAIL PROTECTED] added the comment:

Apparently this was fixed at rev 52504 python-trunk. 
Which python version did you use ?

--
nosy: +gpolo

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2688
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2688] Error when nesting many while loops

2008-04-25 Thread Robert Greimel

New submission from Robert Greimel [EMAIL PROTECTED]:

nesting 20 while loops works OK.
The 21st leads to the cryptic error message

python: Python/compile.c:295: PyAST_Compile: Assertion `co ||
PyErr_Occurred()' failed.
Abort

when trying to execute the script.

--
components: None
messages: 65778
nosy: rgreimel
severity: normal
status: open
title: Error when nesting many while loops
type: compile error
versions: Python 2.5

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2688
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2688] Error when nesting many while loops

2008-04-25 Thread Robert Greimel

Robert Greimel [EMAIL PROTECTED] added the comment:

Python 2.5 (r25:51908, Nov  6 2007, 15:55:44) 

from Fedora 7 (python-2.5-15.fc7)

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2688
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2573] Can't change the framework name on OS X builds

2008-04-25 Thread Ronald Oussoren

Ronald Oussoren [EMAIL PROTECTED] added the comment:

The new patch looks great. I'll apply it next week.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2573
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2622] Import errors in email.message.py

2008-04-25 Thread Mads Kiilerich

Mads Kiilerich [EMAIL PROTECTED] added the comment:

AFA I understand it the ImportError comes when running a py2exe/app'ed
package where iterators.py hasn't been included.

I was just about to file a report about (I think) the same issue, seen
on XP when py2exe'ing code using the email module.

Exactly the same problem with a good(?) explanation can be found on
http://mail.python.org/pipermail/spambayes/2007-December/021485.html

The problem comes because the real module names now are lowercase, and
email/__init__.py plays tricks with _LOWERNAMES in order to keep the old
uppercase names working. The problem is that the email lib itself uses
the old (deprecated?) non-existing name.

IMHO the solution is to use right-cased names. I have (only) tested it
by changing the single reference to email.Iterators. I think this is a
safe bugfix which should be included in 2.5 ASAP.

A workaround is to import email.iterators from some other code or to
tell py2exe/pyapp explicitly include the modules in the package.

--
nosy: +kiilerix

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2622
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2689] Fix indentation in range_item

2008-04-25 Thread Alexander Belopolsky

Changes by Alexander Belopolsky [EMAIL PROTECTED]:


--
components: Interpreter Core
files: range.diff
keywords: patch
nosy: belopolsky
severity: normal
status: open
title: Fix indentation in range_item
versions: Python 3.0
Added file: http://bugs.python.org/file10104/range.diff

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2689
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2008-04-25 Thread Paul Winkler

Paul Winkler [EMAIL PROTECTED] added the comment:

Here's an alternate patch that uses a bit of dependency injection to
avoid the need for monkeypatches in setup/teardown. This means some
trivial changes to Distribution.__init__().  I slightly prefer this
approach, but some might argue it's an example of test logic in
production.

I also added a line about the new option in Doc/install/index.rst.

Since I don't have checkin privileges, I will stop here. Can somebody
upstream (Martin?) please take one of these patches and apply it? Or
suggest further changes to either of these patches?  Or ... ?
Thanks.

Added file: http://bugs.python.org/file10105/python_distutils_1180_2.patch

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1180
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2622] Import errors in email.message.py

2008-04-25 Thread Mads Kiilerich

Mads Kiilerich [EMAIL PROTECTED] added the comment:

This patch seems to fix the issue for me.

The easiest way to verify might be to create another patch and compare
them...

--
keywords: +patch
Added file: http://bugs.python.org/file10106/emailcasings.patch

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2622
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2622] Import errors in email.message.py

2008-04-25 Thread Barry A. Warsaw

Barry A. Warsaw [EMAIL PROTECTED] added the comment:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Apr 25, 2008, at 10:44 AM, Mads Kiilerich wrote:


 Mads Kiilerich [EMAIL PROTECTED] added the comment:

 This patch seems to fix the issue for me.

 The easiest way to verify might be to create another patch and compare
 them...

The patch looks pretty good, +1.  The only part I'm not so sure about  
is the renaming in test_email.py since test_email_renamed.py is  
supposed to use the new names while test_email.py (in 2.5 at least) is  
supposed to test the backward compatible names.

- -Barry

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.8 (Darwin)

iQCVAwUBSBH5BnEjvBPtnXfVAQJJNAP/VEIyMvObRz9SH5EL4Tu4KuVay5C/vvxC
AvlfRrmCNJXXRdU2ZfmiSG357Zc3JfRLhxZBSVpuMQidictxUZttcnqoFlwS2Edu
VwXWtihGjMncn4qdR2IlwEUitG6eSJlrsbo+RtaDSFXlWNyzA83O3mBffeIn8vYn
FLILF8aVaQQ=
=nxt/
-END PGP SIGNATURE-

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2622
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2690] Precompute range length

2008-04-25 Thread Alexander Belopolsky

New submission from Alexander Belopolsky [EMAIL PROTECTED]:

Attached patch makes range objects precompute their length on creation.  
This speeds up indexing and len at the expense of a small increase in 
range object size.  The main benefit, however is that unsupported length  
sys.maxsize is detected early and confusing OverflowError from len(r) or 
r[i] is avoided.

See discussion starting at http://mail.python.org/pipermail/python-
3000/2008-April/013225.html .

--
components: Interpreter Core
files: range-length.diff
keywords: patch
messages: 65786
nosy: belopolsky
severity: normal
status: open
title: Precompute range length
type: performance
versions: Python 3.0
Added file: http://bugs.python.org/file10107/range-length.diff

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2690
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2655] Create ctypes instances from buffer interface

2008-04-25 Thread Thomas Heller

Thomas Heller [EMAIL PROTECTED] added the comment:

Implemented from_buffer() and from_buffer_copy() as rev 62497 to SVN trunk.

--
resolution:  - accepted
status: open - closed

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2655
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2655] Create ctypes instances from buffer interface

2008-04-25 Thread Thomas Heller

Changes by Thomas Heller [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file10057/from_buffer.patch

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2655
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2691] Document size_t related long object APIs

2008-04-25 Thread Alexander Belopolsky

New submission from Alexander Belopolsky [EMAIL PROTECTED]:

Attached patch adds documentation for the new in 2.5 APIs:

PyObject* PyLong_FromSsize_t(Py_ssize_t v)
PyObject* PyLong_FromSize_t(size_t v)

and

Py_ssize_t PyLong_AsSsize_t(PyObject *pylong)

--
assignee: georg.brandl
components: Documentation
messages: 65788
nosy: belopolsky, georg.brandl
severity: normal
status: open
title: Document size_t related long object APIs
versions: Python 2.5, Python 2.6, Python 3.0

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2691
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2691] Document size_t related long object APIs

2008-04-25 Thread Alexander Belopolsky

Changes by Alexander Belopolsky [EMAIL PROTECTED]:


__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2691
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2691] Document size_t related long object APIs

2008-04-25 Thread Alexander Belopolsky

Alexander Belopolsky [EMAIL PROTECTED] added the comment:

-

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2691
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2691] Document size_t related long object APIs

2008-04-25 Thread Alexander Belopolsky

Changes by Alexander Belopolsky [EMAIL PROTECTED]:


__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2691
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2691] Document size_t related long object APIs

2008-04-25 Thread Alexander Belopolsky

Alexander Belopolsky [EMAIL PROTECTED] added the comment:

Web submission did not work.  Trying sending the patch as an e-mail attachment.

--
keywords: +patch
Added file: http://bugs.python.org/file10108/doc-long.diff

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2691
__Index: Doc/c-api/long.rst
===
--- Doc/c-api/long.rst  (revision 62359)
+++ Doc/c-api/long.rst  (working copy)
@@ -48,7 +48,20 @@
Return a new :ctype:`PyLongObject` object from a C :ctype:`unsigned long`, 
or
*NULL* on failure.
 
+.. cfunction:: PyObject* PyLong_FromSsize_t(Py_ssize_t v)
 
+   Return a new :ctype:`PyLongObject` object from a C :ctype:`Py_ssize_t`, or
+   *NULL* on failure.
+
+   .. versionadded:: 2.5
+
+.. cfunction:: PyObject* PyLong_FromSize_t(size_t v)
+
+   Return a new :ctype:`PyLongObject` object from a C :ctype:`size_t`, or
+   *NULL* on failure.
+
+   .. versionadded:: 2.5
+
 .. cfunction:: PyObject* PyLong_FromLongLong(PY_LONG_LONG v)
 
Return a new :ctype:`PyLongObject` object from a C :ctype:`long long`, or 
*NULL*
@@ -109,9 +122,21 @@
   single: OverflowError (built-in exception)
 
Return a C :ctype:`long` representation of the contents of *pylong*.  If
-   *pylong* is greater than :const:`LONG_MAX`, an :exc:`OverflowError` is 
raised.
+   *pylong* is greater than :const:`LONG_MAX`, an :exc:`OverflowError` is 
raised
+   and ``-1`` will be returned. 
 
+.. cfunction:: Py_ssize_t PyLong_AsSsize_t(PyObject *pylong)
 
+   .. index::
+  single: PY_SSIZE_T_MAX
+  single: OverflowError (built-in exception)
+
+   Return a C :ctype:`Py_ssize_t` representation of the contents of *pylong*.  
If
+   *pylong* is greater than :const:`PY_SSIZE_T_MAX`, an :exc:`OverflowError` 
is raised
+   and ``-1`` will be returned.
+
+   .. versionadded:: 2.5
+
 .. cfunction:: unsigned long PyLong_AsUnsignedLong(PyObject *pylong)
 
.. index::
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1496032] test_float segfaults with SIGFPE on FreeBSD 6.0 / Alpha

2008-04-25 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

Okay---I've added -mieee to BASECFLAGS in r62499, when uname -m reports 
alpha* and when gcc is the compiler;  I've also added a configure message 
that simply reports the output of uname -m, to aid debugging in case 
anything funny happens.

With luck, this should fix the problems reported by Bob Ippolito, as well 
as the current test_math and test_cmath failures.

Bob, if you're still listening, are you in a position to check whether 
this change fixes the failures you reported?

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1496032
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2691] Document size_t related long object APIs

2008-04-25 Thread Alexander Belopolsky

Alexander Belopolsky [EMAIL PROTECTED] added the comment:

For some reason the tracker web interface fails to upload the patch.  
Trying again with this message, if it fails again, will resubmit by e-
mail.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2691
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2690] Precompute range length

2008-04-25 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

So with this patch, range(10**100) produces an OverflowError:  is that 
right?

I don't much like this aspect of the change:   there are uses for

for i in range(ridiculously_large_number):
   ...
   if condition_that_occurs_early_in_practice:
   break

--
nosy: +marketdickinson

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2690
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2635] textwrap: bug in 'fix_sentence_endings' option

2008-04-25 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

Fixed for Python 2.6 in r62500.  Thanks for the report!

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2635
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2635] textwrap: bug in 'fix_sentence_endings' option

2008-04-25 Thread Mark Dickinson

Changes by Mark Dickinson [EMAIL PROTECTED]:


--
resolution:  - fixed
status: open - closed

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2635
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2622] Import errors in email.message.py

2008-04-25 Thread Mads Kiilerich

Mads Kiilerich [EMAIL PROTECTED] added the comment:

OK. I had assumed that backward compatibility was tested in the _renamed
tests, so that these tests one day could be dropped together with
backward compatibility. I didn't notice that my search'n'replaces showed
me that I was wrong.

But a bugfix in a stable release really shouldn't change any tests
unless the tests are wrong. And I can't come up with a reasonable new
test. It could perhaps be tested that all modules could be py2exe'ed and
imported individually with automatic dependency resolving... But such a
test doesn't belong in the test suite.

I suggest that my patch is applied without the test cleanup.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2622
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2692] bytes object wrongly exposes writeable buffer interface

2008-04-25 Thread Thomas Heller

New submission from Thomas Heller [EMAIL PROTECTED]:

IIUC, the bytes object should be immutable (in contrast to bytearray). 
But PyObject_FromWriteBuffer() does not fail.

It seems that the attached patch fixes it; however there are lots of
failures in the testsuite with the patch - even 'memoryview(babcd)' fails.

Index: stringobject.c
===
--- stringobject.c  (revision 62498)
+++ stringobject.c  (working copy)
@@ -966,7 +966,7 @@
 string_buffer_getbuffer(PyStringObject *self, Py_buffer *view, int flags)
 {
return PyBuffer_FillInfo(view, (void *)self-ob_sval, Py_SIZE(self),
-0, flags);
+1, flags);
 }
 
 static PySequenceMethods string_as_sequence = {

--
components: Interpreter Core
messages: 65796
nosy: theller
severity: normal
status: open
title: bytes object wrongly exposes writeable buffer interface
versions: Python 3.0

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2692
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2687] SSL example script fails mysteriously on MacOS

2008-04-25 Thread Bill Janssen

Bill Janssen [EMAIL PROTECTED] added the comment:

No, the problem is with your ca_certs argument on the client side. 
You can't use a directory.  You must use a file containing a number of
concatenated certificates.  I'll beef up the documentation to make that
clearer.

--
resolution:  - wont fix
status: open - closed

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2687
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2690] Precompute range length

2008-04-25 Thread Alexander Belopolsky

Alexander Belopolsky [EMAIL PROTECTED] added the comment:

On Fri, Apr 25, 2008 at 12:55 PM, Mark Dickinson [EMAIL PROTECTED] wrote:
..
  I don't much like this aspect of the change:   there are uses for

  for i in range(ridiculously_large_number):

For this application, I would use for i in itertools.count():
instead.  The only caveat is that while count() lets you specify the
start, it does not provide for a step.   If that is a problem, I would
rather add step to count().

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2690
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2480] pickling of large recursive structures fails

2008-04-25 Thread Bob Kline

Bob Kline [EMAIL PROTECTED] added the comment:

I just ran into this behavior with an attempt to pickle a dom tree for
an XML document whose nesting level never got deeper than nine child
nodes, and indeed it crashed the interpreter.  Throwing an exception
would be preferable, of course, to silent blowing up Python, but even
the exception seems to fly in the face of the documentation for the
pickle module [1] which claims (summarizing) that serializing recursive
objects using marshal will fail but pickling recursive objects will not
fail.  I can provide a repro for the XML/DOM pickling case if you think
that would be helpful, but that seems redundant since essentially you've
already illustrated the problem with your own repro case.  Thanks for
your work on the solution.

[1] http://docs.python.org/lib/node314.html

--
nosy: +bkline
type:  - crash

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2480
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2622] Import errors in email.message.py

2008-04-25 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

 But such a test doesn't belong in the test suite.

py2exe uses the modulefinder module to find dependencies.

I tried this command::

./python -m modulefinder Lib\email\message.py

And among the output, there is::


? email.Generator imported from __main__, email.message
? email.Iterators imported from __main__, email.message


It surely can be turned into a unit test. For example::

import email.message
filename = email.message.__file__
if filename.endswith(.pyc):
filename = filename[:-1]

import modulefinder
mf=modulefinder.ModuleFinder()
mf.run_script(filename)
assert email.Generator not in mf.any_missing()

--
nosy: +amaury.forgeotdarc

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2622
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2682] cyclic reference in ctypes CFunctionType objects

2008-04-25 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

 Martin, are there any problems with this approach?

No, it's fine. I was just puzzled.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2682
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2657] Curses sometimes fails to initialize terminal

2008-04-25 Thread A.M. Kuchling

Changes by A.M. Kuchling [EMAIL PROTECTED]:


--
assignee:  - akuchling
nosy: +akuchling
title: curses - Curses sometimes fails to initialize terminal

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2657
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2690] Precompute range length

2008-04-25 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

I guess there needs to be a decision on whether to make range objects of 
length = PY_SSIZE_T_MAX illegal; perhaps more discussion on python-dev 
would be worthwhile?

I can see three options, besides leaving things as they are:

(1) make large ranges illegal, as with this patch
(2) make large ranges legal, but don't allow indexing with indices
larger than PY_SSIZE_T_MAX.
(3) allow large ranges *and* large indices.

Option 3 seems to me like the ideal from the users' point of view, but I'm 
not sure whether it's easy/possible to implement it given that sq_item 
receives a Py_ssize_t for the index.

Option 2 seems messy:  half of one thing and half of the other, but I 
think it would be easy to implement.  This is what I'd personally prefer 
if Option 3 isn't feasible.

If Option 1 is indeed the preferred option, then the patch looks good to 
me, and works for me on OS X 10.5.  (Minor nitpick: it introduces some 
extra tab characters.)

Whatever happens, we probably also need a documentation update explaining 
the limitations on range.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2690
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2690] Precompute range length

2008-04-25 Thread Alexander Belopolsky

Alexander Belopolsky [EMAIL PROTECTED] added the comment:

Option (3) would require changing both sq_item and sq_length signatures,
which is likely to have a large negative impact on performance.

Option (2) would either require a change for the sq_length signature, or
leave the problem of having valid range objects for which applying len()
would produce an OverflowError.

What are the use cases for ranges with length greater than maxsize? Note
that in 2.x all arguments to length are limited to 32 bit integers (even
on 64-bit platforms) and the main reason to support long start/stop/step
in 3.0  is because 2.x range() supports them.  On the other hand, since
2.x range() produces lists, it is limited in length to a fraction of
sys.maxsize.  Therefore none of the current uses of either range or
xrange require support of long length.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2690
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1158909] unpack error in getdefaultlocale() on certain locales

2008-04-25 Thread Wummel

Wummel [EMAIL PROTECTED] added the comment:

This bug is fixed. The fix has been checked in by Georg Brandl on
20.1.2006 here:
http://svn.python.org/view/python/trunk/Lib/locale.py?rev=42100r1=39572r2=42100

So this bug has been fixed in Python 2.5 all along. Why did I have this
error then? Perhaps I tested with 2.4 back then. Anyway, I think this
bug can be closed.

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1158909
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2451] No way to disable socket timeouts in httplib, etc.

2008-04-25 Thread John J Lee

John J Lee [EMAIL PROTECTED] added the comment:

Facundo, are you going to review this?

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2451
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2682] cyclic reference in ctypes CFunctionType objects

2008-04-25 Thread Thomas Heller

Thomas Heller [EMAIL PROTECTED] added the comment:

Also fixed in release25-maint, rev 62504.

--
resolution: accepted - fixed
status: open - closed

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2682
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2690] Precompute range length

2008-04-25 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

I am currently working on a patch that allows large ranges and large
indices. The trick is to define tp_as_mapping-mp_subscript.
Then range_item() is rarely used, only by functions calling directly the
PySequence_* functions, instead of the abstract PyObject_*.

There is still a limit with len(), which seems bound by the size_t limit.
Most of the tests in test_builtin were re-enabled.

I join the current version of the patch.
I'm still working on further simplifications, and maybe supporting
slices on ranges...

Note: I found more useful to store a range-end member, which is the
multiple of step just beyond the stop limit.

--
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file10109/anyrange.patch

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2690
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2684] Logging Module still failing for %(filename)s, __init__

2008-04-25 Thread Charles Merriam

Charles Merriam [EMAIL PROTECTED] added the comment:

In my installation, line 1327 is within the logging.debug()  function,
specifically at the
call to  apply(root.debug, (msg,)+args, kwargs)

[EMAIL PROTECTED]:~/py$ rm *.pyc
[EMAIL PROTECTED]:~/py$ python x.py
DEBUG:logging/__init__.py:1327:Hello
[EMAIL PROTECTED]:~/py$ uname -a
Linux chasm-laptop 2.6.22-14-generic #1 SMP Tue Feb 12 07:42:25 UTC
2008 i686 GNU/Linux
[EMAIL PROTECTED]:~/py$ python -V
Python 2.5.1

-and then-
[EMAIL PROTECTED]:/usr/lib/python2.5$ sudo rm -rf *.pyc *.pyo */*.pyc
*/*.pyo */*/*.pyc */*/*.pyo
[EMAIL PROTECTED]:/usr/lib/python2.5$ cd ~/py
[EMAIL PROTECTED]:~/py$ python x.py
DEBUG:x.py:7:Hello
[EMAIL PROTECTED]:~/py$

So it was somewhere in the library brunches.  The uname -a translates
to Kbuntu Gutsy.  Python, and extras like pylint, coverage, and
nose, were installed via Kbuntu's package manager.

-- Charles

On Fri, Apr 25, 2008 at 3:27 AM, Vinay Sajip [EMAIL PROTECTED] wrote:

  Vinay Sajip [EMAIL PROTECTED] added the comment:

  Can you confirm whether this problem occurs even after deleting all .pyc
  and .pyo files, including in the Python library folders and your
  application folders? Also, which specific platform is this happening on?

  On your installation, is the line number 1327 the last line in
  logging/__init__.py?

  --
  assignee:  - vsajip
  nosy: +vsajip



  __
  Tracker [EMAIL PROTECTED]
  http://bugs.python.org/issue2684
  __


__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2684
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2690] Precompute range length

2008-04-25 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

 What are the use cases for ranges with length greater than maxsize?

Yeah---I'm a bit short on use cases.  The one that originally bit me with 
Python 2.x was when I was doing a search for a quadratic non-residue 
modulo a largeish prime;

for i in range(1, p):
if (i_is_a_nonresidue_modulo_p):
break

Here p might be a 200-digit prime number, and the situation is that half 
the integers between 1 and p-1 are 'quadratic residues', while the other 
half are 'quadratic nonresidues';  in practice the residues and 
nonresidues are mixed up fairly well, so the first nonresidue shows up 
pretty quickly, but there's no known small upper bound on when the first 
nonresidue appears.

Of course, it's not hard to rewrite this with a while loop instead;  it 
would just be a bit annoying if that were necessary, when the code above 
is so clear and direct, and the one obvious way to do it (TM).

I'd also note that it's not completely out of the question that something 
like range(10**10) would be useful on a 32-bit machine:  a long-running 
process might easily go through 10**10 iterations of something.

I agree it's a bit strange to have a semi-functional range object, that 
you can iterate over but not take the length of.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2690
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2689] Fix indentation in range_item

2008-04-25 Thread Benjamin Peterson

New submission from Benjamin Peterson [EMAIL PROTECTED]:

I don't really see what's wrong with the indentation.

--
nosy: +benjamin.peterson

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2689
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1158909] unpack error in getdefaultlocale() on certain locales

2008-04-25 Thread Benjamin Peterson

Changes by Benjamin Peterson [EMAIL PROTECTED]:


--
resolution:  - fixed
status: open - closed

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1158909
_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2692] bytes object wrongly exposes writeable buffer interface

2008-04-25 Thread Benjamin Peterson

Changes by Benjamin Peterson [EMAIL PROTECTED]:


--
type:  - behavior

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2692
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2690] Precompute range length

2008-04-25 Thread Alexander Belopolsky

Alexander Belopolsky [EMAIL PROTECTED] added the comment:

On Fri, Apr 25, 2008 at 4:37 PM, Mark Dickinson [EMAIL PROTECTED] wrote:
..
  for i in range(1, p):
 if (i_is_a_nonresidue_modulo_p):
 break

  Here p might be a 200-digit prime number, and the situation is that half
  the integers between 1 and p-1 are 'quadratic residues', while the other
  half are 'quadratic nonresidues';  in practice the residues and
  nonresidues are mixed up fairly well, so the first nonresidue shows up
  pretty quickly, but there's no known small upper bound on when the first
  nonresidue appears.

Hmm, AFAIKT there is always at least one non-residue between 1 and p
and therefore you can just write

for i in itertools.count(1):
if (i_is_a_nonresidue_modulo_p):
 break

maybe with an additional check for p  1.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2690
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2689] Fix indentation in range_item

2008-04-25 Thread Alexander Belopolsky

Alexander Belopolsky [EMAIL PROTECTED] added the comment:

On Fri, Apr 25, 2008 at 4:37 PM, Benjamin Peterson
[EMAIL PROTECTED] wrote:

  I don't really see what's wrong with the indentation.

Sorry, I thought it would be obvious from the patch. As of revision
62505, Objects/rangeobject.c:216 has the following code:

216if (i  0 || i = len) {
217if (!PyErr_Occurred())
218PyErr_SetString(PyExc_IndexError,
219range object index out of range);
220return NULL;
221}

Note that the inner if has no { after the condition and therefore
terminates at line 219.  Thus the next line should be aligned with the
inner if and  the } at line 221 should be aligned with the outer if.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2689
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2689] Fix indentation in range_item

2008-04-25 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Ok. I see now. Fixed in r62506.

--
resolution:  - fixed
status: open - closed

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2689
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2691] Document size_t related long object APIs

2008-04-25 Thread Benjamin Peterson

Changes by Benjamin Peterson [EMAIL PROTECTED]:


--
type:  - feature request
versions:  -Python 2.5

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2691
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2603] Make range __eq__ work

2008-04-25 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

about range_eq7.patch:

- Did you change your mind about range equality?
  range(0,10,2) == range(0,9,2)
seems True now; it was not with range_eq6.patch

- The hash function will fail with big values (and wrongly returns a
value even when an exception is set). I suggest to call PyObject_Hash
instead of PyNumber_AsSsize_t.

- Now that you short-circuit the comparison, it is enough to have only
one boolean variable (is_equal), which may replace all uses of
start_same, stop_same and step_same.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2603
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2603] Make range __eq__ work

2008-04-25 Thread Alexander Belopolsky

Alexander Belopolsky [EMAIL PROTECTED] added the comment:

On Fri, Apr 25, 2008 at 5:31 PM, Benjamin Peterson
[EMAIL PROTECTED] wrote:
  Comments?

In the range_hash function, len, start, step locals should be declared
Py_ssize_t, not long. Also, you can use range_length() instead of
PyObject_Size() and you need to clear error if you get len == -1.

See issue2690. With your patch,

Traceback (most recent call last):
  File stdin, line 1, in module
OverflowError: Python int too large to convert to C ssize_t

but

True

You can avoid this problem by using range_length_obj instead of
PyObject_Size in range_richcompare.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2603
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2603] Make range __eq__ work

2008-04-25 Thread Alexander Belopolsky

Alexander Belopolsky [EMAIL PROTECTED] added the comment:

It looks like e-mail processor eats '' examples.  My examples were

 range(2**100) == range(2**100+1)
Traceback (most recent call last):
  File stdin, line 1, in module
OverflowError: Python int too large to convert to C ssize_t

and

 range(2**100) == range(2**100)
True

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2603
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2603] Make range __eq__ work

2008-04-25 Thread Alexander Belopolsky

Alexander Belopolsky [EMAIL PROTECTED] added the comment:

On Fri, Apr 25, 2008 at 5:57 PM, Amaury Forgeot d'Arc
[EMAIL PROTECTED] wrote:
..
  - Did you change your mind about range equality?
   range(0,10,2) == range(0,9,2)
  seems True now; it was not with range_eq6.patch


This makes me think: what would you say to an idea to normalize ranges
in constructor so that range(5,10,2) returns range(5,11,2).

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2603
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2677] Argument rules for callables do not apply when function implementation uses PyArg_ParseTuple

2008-04-25 Thread Terry J. Reedy

Terry J. Reedy [EMAIL PROTECTED] added the comment:

I consider the difference between builtin and def'ed functions to be
something of an implementation wart -- one that I would like to see
someday removed if sensibly possible.  How is a beginner to know that
the parameter names used in the docs and help() responses are not really
parameter names?

In the meanwhile, I think something like the following in the doc would
help: (Note: an implementation may provide builtin functions whose
positional parameters do not have names, even if they are 'named' for
the purpose of documentation, and which therefore cannot be supplied by
keyword.)

Also in the meanwhile, the OP can def-wrap builtins
import builtins
def abs(number): return builtins.abs(number)
# but some like int require more care with its no-default option

--
nosy: +tjreedy

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2677
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2603] Make range __eq__ work

2008-04-25 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Thanks for the help.

Yes, after thinking for a while, I decided that range equality should
represent the set of integers and not the values in the constructor.
Normalization would be a good idea, but I think that's another issue
I'll tackle after this.

Now you get an error for hashing a huge range.

Added file: http://bugs.python.org/file10110/range_eq8.patch

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2603
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2603] Make range __eq__ work

2008-04-25 Thread Guido van Rossum

Guido van Rossum [EMAIL PROTECTED] added the comment:

On Fri, Apr 25, 2008 at 3:36 PM, Benjamin Peterson
[EMAIL PROTECTED] wrote:

  Benjamin Peterson [EMAIL PROTECTED] added the comment:

  Thanks for the help.

  Yes, after thinking for a while, I decided that range equality should
  represent the set of integers and not the values in the constructor.
  Normalization would be a good idea, but I think that's another issue
  I'll tackle after this.

The two go hand-in-hand; you shouldn't have two range() objects that
compare equal and yet have different stop attribute values.

  Now you get an error for hashing a huge range.

  Added file: http://bugs.python.org/file10110/range_eq8.patch



  __
  Tracker [EMAIL PROTECTED]
  http://bugs.python.org/issue2603
  __


__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2603
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2603] Make range __eq__ work

2008-04-25 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

On Fri, Apr 25, 2008 at 5:38 PM, Guido van Rossum
[EMAIL PROTECTED] wrote:

  Guido van Rossum [EMAIL PROTECTED] added the comment:
  The two go hand-in-hand; you shouldn't have two range() objects that
  compare equal and yet have different stop attribute values.

If it makes any difference, the attributes aren't even available through Python.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2603
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2603] Make range __eq__ work

2008-04-25 Thread Guido van Rossum

Guido van Rossum [EMAIL PROTECTED] added the comment:

On Fri, Apr 25, 2008 at 3:41 PM, Benjamin Peterson
[EMAIL PROTECTED] wrote:
  If it makes any difference, the attributes aren't even available through 
 Python.

But they are deducible via the str() or repr(). And IMO they *should*
be available.

I think I'd be okay with normalization on creation, so that range(0,
5, 2) returns range(0, 6, 2). Hm, but isn't that odd? Why not the
other way around?

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2603
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2690] Precompute range length

2008-04-25 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

 Hmm, AFAIKT there is always at least one non-residue between 1 and p
 and therefore you can just write

 for i in itertools.count(1):
 if (i_is_a_nonresidue_modulo_p):
  break

 maybe with an additional check for p  1.

Sure.  It's just uglier that way. :-)  And I feel it would be mildly 
annoying not to be able to use the obvious tool for the job, for subtle 
reasons.  It's also a potential source of bugs: one might write such code 
using range and only discover later that it fails unexpectedly for large 
inputs.

These really aren't serious objections---just mild preferences.  I'll stop 
being disruptive now :)

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2690
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2603] Make range __eq__ work

2008-04-25 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Here's a normalizing patch. It breaks the repr tests because the numbers
change.

Added file: http://bugs.python.org/file10111/range_eq8_normalize.patch

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2603
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2603] Make range __eq__ work

2008-04-25 Thread Alexander Belopolsky

Alexander Belopolsky [EMAIL PROTECTED] added the comment:

On Fri, Apr 25, 2008 at 7:10 PM, Guido van Rossum
[EMAIL PROTECTED] wrote:
..
  I think I'd be okay with normalization on creation, so that range(0,
  5, 2) returns range(0, 6, 2). Hm, but isn't that odd? Why not the
  other way around?

I find it natural to have start + len*step  = stop invariant rather
than start +(len-1)*step + 1 = stop.  I may be influenced by C++ (STL)
tradition of giving preference to i != stop over i  stop
condition so that algorithms support iterators that are not ordered.
I also believe some algorithmic simplifications will be possible with
 start + len*step  = stop invariant.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2603
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2693] IDLE doesn't work with Tk 8.5

2008-04-25 Thread Greg Couch

New submission from Greg Couch [EMAIL PROTECTED]:

IDLE and Tk 8.5 don't well work together for both Python 2.5 and 2.6a
(SVN version).  The reasons are related but different.

In Python 2.5, you can't select any text in the IDLE window and whenever
a calltip is to appear, you get a backtrace ending with invalid literal
for int() with base 10: '(72,'.  That comes from an interaction between
WidgetRedirector's dispatch function and _tkinter.  The Text widget's
bbox method returns a tuple of ints, the dispatch function isn't
monitoring bbox, so it returns the tuple as is to _tkinter, where
PythonCmd converts the tuple to a Python string, not a Tcl list, so when
Tkinter sees the string, it can't convert to a tuple.

The Python 2.6a2 SVN version of _tkinter fixes that bug but exposes
others (Ikinter.py, tupleobject.c), so I've attached a simple patch for
Python 2.5.  The SVN version of idle appears to work, so this patch
should only be on the 2.5 branch.

--
components: IDLE, Tkinter
files: Python-2.5.2-idlelib.patch
keywords: patch
messages: 65828
nosy: gregc
severity: normal
status: open
title: IDLE  doesn't work with Tk 8.5
versions: Python 2.5
Added file: http://bugs.python.org/file10112/Python-2.5.2-idlelib.patch

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2693
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2603] Make range __eq__ work

2008-04-25 Thread Benjamin Peterson

Changes by Benjamin Peterson [EMAIL PROTECTED]:


Added file: http://bugs.python.org/file10113/range_eq8_normalize2.patch

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2603
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2693] IDLE doesn't work with Tk 8.5

2008-04-25 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

I'm skeptical about this patch; it may break other things. So Python 2.5
just doesn't support Tcl 8.5 - you need to stay with Tcl 8.4.

--
nosy: +loewis

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2693
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2603] Make range __eq__ work

2008-04-25 Thread Alexander Belopolsky

Alexander Belopolsky [EMAIL PROTECTED] added the comment:

With respect to range_eq8_normalize2.patch, it is unusual to have a 
function that consumes a reference to its argument.  I would combine 
normalize_stop with PyNumber_Index and make it similar to validate_step 
with respect to reference counting.

Note that if you choose stop = start + len*step normaization, you will 
not need to create 'one' in normalize_stop.

With your patch I see

 range(0,6,2)
range(0, 6, 2)
 range(0,5,2)
range(0, 5, 2)

I would expect one of these ranges normalized.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2603
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2603] Make range __eq__ work

2008-04-25 Thread Alexander Belopolsky

Alexander Belopolsky [EMAIL PROTECTED] added the comment:

... and your patch produces wrong results:

 list(range(5,0,-2)) # expected [5, 3, 1]
[5, 3]

See my patch in issue2690 for a way to compute length correctly in 
range_new.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2603
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2669] bsddb iterkeys sliently fails when database modified during iteration

2008-04-25 Thread Jesús Cea Avión

Changes by Jesús Cea Avión [EMAIL PROTECTED]:


--
nosy: +jcea

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2669
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2603] Make range __eq__ work

2008-04-25 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

I merged your range calculating code. After reading that bug report, I
think we need to start a discussion on python-dev about range size
constraints before moving forward any more. (We have people implementing
different things under different assumptions left and right.)

Added file: http://bugs.python.org/file10114/range_eq8_normalize3.patch

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2603
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2558] Document pickle protocol 3

2008-04-25 Thread Jesús Cea Avión

Changes by Jesús Cea Avión [EMAIL PROTECTED]:


--
nosy: +jcea

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2558
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2389] Array pickling exposes internal memory representation of elements

2008-04-25 Thread Jesús Cea Avión

Changes by Jesús Cea Avión [EMAIL PROTECTED]:


--
nosy: +jcea

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2389
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2694] msilib file names check too strict ?

2008-04-25 Thread Cournapeau David

New submission from Cournapeau David [EMAIL PROTECTED]:

Hi,

I wanted to build a msi using the build_msi distutils command for one of
my package, but at some point, it fails, at the function make_id, at
line 177 in mstlib/__init__.py, for a file named aixc++.py. The regex
indeed refuses any character which is not alphanumeric: is msi itself
really that strict, or could this check be relaxed ?

--
components: Windows
messages: 65834
nosy: cdavid
severity: normal
status: open
title: msilib file names check too strict ?
type: feature request
versions: Python 2.5

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2694
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com