[issue4543] container constructors destroy argument

2008-12-05 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

In Py3.0, the filter() builtin returns a consumable iterator, not a list.
It's a feature, not a bug ;-)
For the behavior you want, write:
   y = list(filter(odd, x))
Or better yet, use a list comprehension:
   y = [e for e in x if odd(e)]
See the Whatsnew section of the docs for further explanation.

--
nosy: +rhettinger
resolution:  -> invalid
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4441] Improve os open flag options doc

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Fixed in r67556.  If a Windows guy can give me more specific directions
where to find the equivalent options, I'll put it in.

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4442] document immutable type subclassing via __new__

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

It's not documented for any immutable type. This should be fixed.

--
title: datetime not subclassable in the usual way -> document immutable type 
subclassing via __new__

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4534] problem with str.join - should work with list input, error says requires 'str' object

2008-12-05 Thread Amaury Forgeot d'Arc

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

"str" is not your string, it's not a string; "str" is a class name, a
standard type.

"str.join" is a unbound method. You can call it directly if you pass an
actual string object in front of the other arguments.
But the normal way to call methods is to use them on objects:

someString = ""
someList = ['f', 'r', 'e', 'd', ' ', 'i', 's']
someString.join(someList)

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4533] 3.0 file.read dreadfully slow

2008-12-05 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

The updated patch has been committed to 3.0 and 3.1. I'm going to
backport the patch to 2.x later.

--
resolution:  -> accepted
stage: patch review -> commit review
versions: +Python 2.6, Python 2.7 -Python 3.0, Python 3.1

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4468] Restore chapter enumeration in Python docs

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

This is tracked in Sphinx' tracker at
http://www.bitbucket.org/birkenfeld/sphinx/issue/10/html-section-numbering.

--
resolution:  -> duplicate
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4537] webbrowser.UnixBrowser should use builtins.open

2008-12-05 Thread Amaury Forgeot d'Arc

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

sorry**10... probably a wrong copy operation because the Linux machine
where I tested did not have my svn ssh keys.
Someone already corrected this on py3k (r67544, thanks to Fred!), I'll
take care of merging it to the 3.0 branch.

--
status: closed -> open

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4441] Improve os open flag options doc

2008-12-05 Thread Amaury Forgeot d'Arc

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

http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx is the
documentation for the open() function of the Microsoft C Runtime, but I
don't know how permanent this link will be.

--
nosy: +amaury.forgeotdarc

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4541] Add str method for removing leading or trailing substrings

2008-12-05 Thread David W. Lambert

David W. Lambert <[EMAIL PROTECTED]> added the comment:

Opinion---"Batteries included" doesn't mean "a bewildering variety of 
functions".  Nor does it mean "my programming language has a checklist  
of features" such as I recall the spreadsheet and word processor wars of 
the (19)80's.  Python should indeed make it easy to express your 
algorithms.  It does this through readable syntax, by providing 
container objects of all sorts, with malleable classes.  It gives access 
to operating system and hardware.  Python stays current with softwares 
of the day.  But Python should remain small It's okay to write some 
code.

Must regular expression syntax keep pace with that of perl?  Probably, 
only because the expressions are directly cut and pasteable.  Otherwise, 
the re language has for me exceeded in complexity that which can be had 
more simply with a divide and conquer approach.

Is there a good reason to have the math module duplicate the 
functionality described in math.h?  No.  One needn't know the c language 
exists to program python.  (Historically it was a great and obvious 
first access to math functions in python.  We're years beyond that.  
Hence---generalize hypot.  It's brain dead trapped in 2D!)

Don't accept the challenge for a python vs. (for instance) ruby feature 
checklist.  Python should stick to the sensible.

--
nosy: +LambertDW

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4544] textwrap: __all__ atribute missing 'dedent' functino

2008-12-05 Thread Casey McGinty

New submission from Casey McGinty <[EMAIL PROTECTED]>:

>From textwrap.py: 46863 2006-06-11 19:42:51Z tim.peters

The __all__ define in this module is missing the helper function 'dedent'. 

This causes pydoc to not the list the function correctly.

Secondly, it also prevents 'dedent' from being imported when using 'from
textwrap import *'  (Yes, yes, I know this should never be done. Hence
why it is probably never noticed by anyone.)

--
components: Extension Modules
messages: 76986
nosy: wolfdown
severity: normal
status: open
title: textwrap: __all__ atribute missing 'dedent' functino
type: feature request
versions: Python 2.5

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4544] textwrap: __all__ atribute missing 'dedent' function

2008-12-05 Thread Casey McGinty

Changes by Casey McGinty <[EMAIL PROTECTED]>:


--
title: textwrap: __all__ atribute missing 'dedent' functino -> textwrap: 
__all__ atribute missing 'dedent' function

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4541] Add str method for removing leading or trailing substrings

2008-12-05 Thread Zach Hirsch

Zach Hirsch <[EMAIL PROTECTED]> added the comment:

Sounds good to me, except for one thing: define "sensible".

To me, lstrips seems sensible, since it's a recurring pattern that I've
used in multiple locations. But perhaps my sense of sensibility is warped :)

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3873] Unpickling is really slow

2008-12-05 Thread Hagen Fürstenau

Hagen Fürstenau <[EMAIL PROTECTED]> added the comment:

I think a read buffer is not possible without being able to unread bytes
from the stream. pickle shoudn't consume bytes after the end of a
pickled object!

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4458] getopt.gnu_getopt() loses dash argument

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Fixed in r67572. I won't backport this.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4441] Improve os open flag options doc

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Added link in r67574.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1675334] Draft implementation for PEP 364

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Ping!

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1777458] glob doesn't return unicode with unicode parameter

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

I see the same as Antoine, this is fixed in 2.6.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1762972] 'exec' does not accept what 'open' returns

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

All open items in this issue seem to be addressed

--
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1143] Update to latest ElementTree in Python 2.7

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

I guess this is now an item for Python 2.7.

--
nosy: +georg.brandl
title: Update to latest ElementTree in Python 2.6 -> Update to latest 
ElementTree in Python 2.7
versions: +Python 2.7 -Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1643369] pdb find_function does not find Class methods.

2008-12-05 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


--
resolution:  -> invalid
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1215] Python hang when catching a segfault

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

The docs already say 
"Because the C signal handler always returns, it makes little sense to
catch synchronous errors like :const:`SIGFPE` or :const:`SIGSEGV`."

Should this still be reworded or promoted to a warning?

--
nosy: +georg.brandl

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1223] httplib does not handle ssl end of file properly

2008-12-05 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


--
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1366] popen spawned process may not write to stdout under windows

2008-12-05 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


--
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4540] typo in a module describes utf-8 as uft-8

2008-12-05 Thread Marc-Andre Lemburg

Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment:

Amaury, I don't see where imp.find_module() tries to do a compile()
(which would trigger the SyntaxError). Is that really the full traceback ?

Regarding the strategy of pydoc to try to list all modules: I don't
think that's such a good idea. It's likely to take a long time to
compile such a list on a moderately used Python system and can have lots
of unwanted side effects via import hooks.

Instead, pydoc should just say that a module was not specified and be
done with it.

--
nosy: +lemburg

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2311] Update the ACKS file

2008-12-05 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4541] Add str method for removing leading or trailing substrings

2008-12-05 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

I agree with Lambert.

Am rejecting this one on the basis that it adds too little value, is too
easily accomplished with pure python, and that it makes the list of
string methods unnecessarily more complex and harder to learn.

--
nosy: +rhettinger
resolution:  -> rejected
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2393] Backport buffer interface in Python 3.0 to Python 2.6

2008-12-05 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2447] Python 2.6 refleak test issues

2008-12-05 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


--
resolution:  -> duplicate
status: open -> closed
superseder:  -> regrtest.py -R not working

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3256] Multiprocessing docs are not 3.0-ready

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

The docstrings are now fixed too.

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4540] typo in a module describes utf-8 as uft-8

2008-12-05 Thread Amaury Forgeot d'Arc

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

Yes, it is the full traceback.

The modules are not compiled nor imported. 
But to load the source code, importer.find_module() needs to open the
file in text mode, so it calls PyTokenizer_FindEncoding() (this is the
second failure, with test.badsyntax_pep3120.py), then the encoding is
used to decode text (this is the first failure, with test.bad_coding.py)

> Instead, pydoc should just say that a module was not specified 
> and be done with it.
I'm not sure to understand.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4540] typo in a module describes utf-8 as uft-8

2008-12-05 Thread Marc-Andre Lemburg

Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment:

On 2008-12-05 11:24, Amaury Forgeot d'Arc wrote:
> Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:
> 
> Yes, it is the full traceback.
> 
> The modules are not compiled nor imported. 
> But to load the source code, importer.find_module() needs to open the
> file in text mode, so it calls PyTokenizer_FindEncoding() (this is the
> second failure, with test.badsyntax_pep3120.py), then the encoding is
> used to decode text (this is the first failure, with test.bad_coding.py)

I see.

>> Instead, pydoc should just say that a module was not specified 
>> and be done with it.
>
> I'm not sure to understand.

Sorry, I didn't see the attached PNG screenshot until now. Forget that
comment.

What I don't understand is that this works:

help> modules

Please wait a moment while I gather a list of all available modules...
...

while this doesn't:

help> modules web

Here is a list of matching modules.  Enter any module name to get more help.

Traceback (most recent call last):
...

Shouldn't the first method also cause a traceback ?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4540] typo in a module describes utf-8 as uft-8

2008-12-05 Thread Amaury Forgeot d'Arc

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

Explanation is simple: 
help("modules") just lists all files but do not open them. 
help("modules web") has to search text inside.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4540] typo in a module describes utf-8 as uft-8

2008-12-05 Thread Marc-Andre Lemburg

Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment:

On 2008-12-05 11:49, Amaury Forgeot d'Arc wrote:
> Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:
> 
> Explanation is simple: 
> help("modules") just lists all files but do not open them. 
> help("modules web") has to search text inside.

Ok, thanks.

What if we skip any errors that occur during this scan ? After all,
it's just a help function, not a vital system operation.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4506] 3.0 make test failures on Solaris 10

2008-12-05 Thread Mark Dickinson

Mark Dickinson <[EMAIL PROTECTED]> added the comment:

> I'm failry sure I can find a SPARC here to run it on as well.  They
> are rather few and far between though.

I don't think that's necessary.  Thanks for disabusing me of my 'Solaris
implies SPARC' mindset, though!

There are two more pieces of information that *would* be useful:

1. What happens if you build with the '-ffloat-store' option to gcc?
If my diagnosis is correct I'd expect the cmath tests to pass with this
flag.  (I'm not 100% sure how to make sure the '-ffloat-store' option
gets passed through into the Module builds, though
"BASECFLAGS='-ffloat-store' ./configure" seems to work for me.)

2. It looks as though the configure script isn't finding 'isinf' on
Solaris 10.  Any ideas why?  Is there some replacement for isinf that's
spelt differently?  I suspect that if we were using the system lib's
test for infinity instead of the Py_IS_INFINITY workaround then this
problem wouldn't have come up.

Mark

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4544] textwrap: __all__ atribute missing 'dedent' function

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Fixed in r67575, will be ported to all branches.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4536] SystemError if invalid arguments passed to range() and step=-1

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Why is the overflow handling changed at all?

--
nosy: +georg.brandl

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4545] doctest seems to always fail on numpy.array2string

2008-12-05 Thread ekorn

New submission from ekorn <[EMAIL PROTECTED]>:

I don't understand this doctest error, resulting from
python test_doctest.py

Failed example:
numpy.array2string(numpy.arange(2))
Expected:
[0 1]
Got:
'[0 1]'

The specified output was copied-and-pasted directly from running the 
example. Whitespace seems identical and #doctest: +NORMALIZE_WHITESPACE 
does not help.

--
components: Tests
files: test_doctest.py
messages: 77006
nosy: ekorn
severity: normal
status: open
title: doctest seems to always fail on numpy.array2string
type: behavior
versions: Python 2.5
Added file: http://bugs.python.org/file12237/test_doctest.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3722] print followed by exception eats print with doctest

2008-12-05 Thread Charles-Axel Dein

Charles-Axel Dein <[EMAIL PROTECTED]> added the comment:

This is a bug. This is not a good behavior.

If I would like to temporarily print a variable to see its content, in 
order to debug my code, doctest will eat its output. Thus I will be make 
to use pdb or to use logging, or to get rid of doctest. This will be far 
more complicated.

See attached file.

--
nosy: +charlax
type: feature request -> behavior
Added file: http://bugs.python.org/file12238/proof_of_concept_doctest.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4529] parser module failure on valid try/except/finally blocks

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Fixed in r67576, will be ported to all branches.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4540] typo in a module describes utf-8 as uft-8

2008-12-05 Thread Amaury Forgeot d'Arc

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

Attached patch ignores any Exception during module import.
Note that KeyboardInterrupt is not caught: it is not an Exception.

I could provide a similar patch for 2.7, if there is some interest; but
no crash was reported.

--
keywords: +needs review, patch
stage:  -> patch review
Added file: http://bugs.python.org/file12239/help_badencoding.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3978] ZipFileExt.read() can be incredibly slow; patch included

2008-12-05 Thread James Athey

Changes by James Athey <[EMAIL PROTECTED]>:


--
title: ZipFileExt.read() can be incredibly slow -> ZipFileExt.read() can be 
incredibly slow; patch included

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4546] Small thingy in "What's New in Python 3.0"

2008-12-05 Thread Paul Melis

New submission from Paul Melis <[EMAIL PROTECTED]>:

The second to last item under "Removed Syntax" (about relative imports)
shows ReST markup in the HTML file, probably not the way it should read:

The only acceptable syntax for relative imports is from .``[*module*]
:keyword:`import` *name*; :keyword:`import` forms not starting with ``.
are always interpreted as absolute imports.

--
assignee: georg.brandl
components: Documentation
messages: 77010
nosy: georg.brandl, paulmelis
severity: normal
status: open
title: Small thingy in "What's New in Python 3.0"
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4536] SystemError if invalid arguments passed to range() and step=-1

2008-12-05 Thread Amaury Forgeot d'Arc

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

It's right that the overflow handling path is never never taken:

If "step = PyNumber_Index(step)" succeeds, 'step' is (a subclass of) an
int, and PyNumber_AsSsize_t cannot fail, not even on low memory
conditions, and large figures are clipped.

But if it were to fail (in some future implementation), the present code
would clear an eventual exception.
Maybe this part could be applied only to 3.1.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1675334] Draft implementation for PEP 364

2008-12-05 Thread Barry A. Warsaw

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

Withdrawn

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4547] Long jumps with frame_setlineno

2008-12-05 Thread fboule

New submission from fboule <[EMAIL PROTECTED]>:

This concerns a known bug in the frame_setlineno() function for Python
2.5.x and 2.6.x (maybe in earlier/later version too). It is not possible
to use this function when the address or line offset in lnotab are
greater than 127. The problem comes from the lnotab variable which is
typed char*, i.e. "signed char*" implicitly. Any value above 127 becomes
a negative number.

The fix is very simple (applied on the Python 2.6.1 version of the
source code):

--- frameobject.c   Thu Oct 02 19:39:50 2008
+++ frameobject_fixed.c Fri Dec 05 11:27:42 2008
@@ -119,8 +119,8 @@
line = f->f_code->co_firstlineno;
new_lasti = -1;
for (offset = 0; offset < lnotab_len; offset += 2) {
-   addr += lnotab[offset];
-   line += lnotab[offset+1];
+   addr += ((unsigned char*)lnotab)[offset];
+   line += ((unsigned char*)lnotab)[offset+1];
if (line >= new_lineno) {
new_lasti = addr;
new_lineno = line;

--
components: Interpreter Core
messages: 77013
nosy: fboule
severity: normal
status: open
title: Long jumps with frame_setlineno
type: crash
versions: Python 2.5, Python 2.5.3, Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4485] fast swap of "default" Windows python versions

2008-12-05 Thread Mark Tolonen

Mark Tolonen <[EMAIL PROTECTED]> added the comment:

An extension to this idea:  Support parsing #! lines in Windows and 
select the version of Python used.  python.exe could examine:

#!/usr/bin/python30

pattern match "python##", look in the registry to see if that version 
of python is installed, and launch that python.exe instead.

--
nosy: +metolone

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4545] doctest seems to always fail on numpy.array2string

2008-12-05 Thread Amaury Forgeot d'Arc

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

Doctest output scrupulously follows the output of an interactive session
of python.

On my machine:

Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.array2string(numpy.arange(2))
'[0 1]'
>>>

The the interactive session does not simply print objects, it calls
repr() on them, so that you can make the distinction between the number
0 and the string "0".

You should add quotes to your doctest string, or use print:

>>> import numpy
>>> print numpy.array2string(numpy.arange(2))
[0 1]

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4017] Tkinter cannot find Tcl/Tk on Mac OS X

2008-12-05 Thread Muhammad Alkarouri

Muhammad Alkarouri <[EMAIL PROTECTED]> added the comment:

Now that Python 2.6.1 is out, can we expect a new OS X installer built
correctly? I think this is pretty important..

--
nosy: +malkarouri

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4547] Long jumps with frame_setlineno

2008-12-05 Thread Amaury Forgeot d'Arc

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

Attached patch is similar (it declares the variable as "unsigned char*")
and adds a test.

--
keywords: +needs review, patch
nosy: +amaury.forgeotdarc
stage:  -> patch review
Added file: http://bugs.python.org/file12240/frame_setlineno.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1814] Victor Stinner's GMP patch for longs

2008-12-05 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

After many benchmarks, I realized that it's not a good idea to use GMP 
for the int (and long) integers because most integers are very small: 
less or equals than 32 bits (or 64 bits on a 64 bits CPU). GMP 
overhead is too big. See other propositions to optimize Python 
integers.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4233] open(0, closefd=False) prints 3 warnings

2008-12-05 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

2.6.1 is released. Should this issue be apply to 2.6.x or not?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4546] Small thingy in "What's New in Python 3.0"

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

This is already fixed in SVN and will be upated with the next rebuild of
the docs.

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4517] improve __getattribute__ documentation

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Isn't what you refer to covered by this paragraph and the following
example: "In addition to bypassing any instance attributes in the
interest of correctness, implicit special method lookup may also bypass
the __getattribute__() method even of the object’s metaclass:"?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4547] Long jumps with frame_setlineno

2008-12-05 Thread fboule

fboule <[EMAIL PROTECTED]> added the comment:

Is it intended to be applied on Python 2.5.x and/or Python 2.6.x (and
when)? The current Python 2.6.1 release does not have the fix.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1814] Victor Stinner's GMP patch for longs

2008-12-05 Thread STINNER Victor

Changes by STINNER Victor <[EMAIL PROTECTED]>:


--
resolution:  -> rejected
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4536] SystemError if invalid arguments passed to range() and step=-1

2008-12-05 Thread Laszlo

Laszlo <[EMAIL PROTECTED]> added the comment:

It is changed from PyErr_Clear() to Py_CLEAR(step) because in case
someone else makes the same mistake of not checking for an error before
calling validate_step() we do not want to hide the error.

It is true that if used properly this part will not get executed, but if
there is another similar programming error like the patch fixes in
range_new() it will at least let the programmer see the right traceback
in the terminal.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4547] Long jumps with frame_setlineno

2008-12-05 Thread Amaury Forgeot d'Arc

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

Yes, target is 2.6.2 and up, 3.0.1 and up.

--
versions: +Python 3.0 -Python 2.5, Python 2.5.3

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4336] Fix performance issues in xmlrpclib

2008-12-05 Thread Kristján Valur Jónsson

Kristján Valur Jónsson <[EMAIL PROTECTED]> added the comment:

I think it would have been better to have endheaders() (and then perhaps 
_send_output())  deal with the non-string (i.e. filebuffer) case, so 
that endheaders(body) is semantically equivalent to endheaders(); 
send(body).   The version you checked in makes it necessary that the 
user of HTTPConnection.endheaders() is aware of the distinction.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4505] ob_size not removed from docs

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Thanks, fixed in r67578.

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4504] Doc/includes out of date

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Thanks, fixed in r67578.

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4548] OptionParser : Weird comportement in args processing

2008-12-05 Thread Olivier Hervieu

New submission from Olivier Hervieu <[EMAIL PROTECTED]>:

Hi guys.. i found something strange on the behavior of OptionParser

If I have this sample code : 

import sys
from optparse import OptionParser

if __name__ == '__main__':
parser = OptionParser()
parser.add_option("-p", "--p", help="The P of python", default=None)
parser.add_option("-y", "--y", help="The Y of python", default=None)

(options,args) = parser.parse_args(sys.argv)
print options

and i execute :

myFile.py -p -y

the options.p will be -y and options.y will be None

worst.. if my user say :

myFile.py -p -y 'thon'

options.p will be -y and options.y will be None...

In all case I think that, if i do 

myFile.py -p -y 

options -p and options -y must be None

and if i want to put -y in options.p i say something like 

myFile.py -p "-y" so i can do after myFile.py -p "-y" -y "thon".

--
components: Extension Modules
messages: 77028
nosy: ohervieu
severity: normal
status: open
title: OptionParser : Weird comportement in args processing
type: behavior
versions: Python 2.5, Python 2.5.3

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4517] improve __getattribute__ documentation

2008-12-05 Thread David W. Lambert

David W. Lambert <[EMAIL PROTECTED]> added the comment:

Yes to msg77021.  However!

I'll pin the difficulty specifically to the word "may".  This cost me a
lot of time.


1) Please change the phrasing you quoted to

"... implicit special method lookup bypasses the __getattribute__()
method even of the object’s metaclass:"


2) Please insert into the glossary a definition of "implicit special
method lookup" that addresses the grammar or syntax that causes it
considering monad and dyad use.


Thank you.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4517] improve __getattribute__ documentation

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

I've changed "may bypass" to "generally bypasses". It doesn't happen for
all methods, but that's an implementation detail.

I've also added a glossary entry "special method" in r67579.

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4511] Decorators should have an index entry

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

In the 2.6 and 3.0 docs, decorators do have an index entry, see
http://docs.python.org/genindex-D.html.

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4478] shutil.copyfile documentation

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Fixed in r67580.

If we want to start using things like :raises:, it will have to be in
some coordinated fashion so that it doesn't occur in isolated places.

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4548] OptionParser : Weird comportement in args processing

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

This is not a bug.  By default, options in optparse take an argument --
therefore, the -y is taken as the argument to the -p option.

Use e.g. add_option(..., action='store_true') to specify an option that
doesn't take an argument.

--
nosy: +georg.brandl
resolution:  -> invalid
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3171] operator.*slice() should be deprecated in 2.6

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Documented as deprecated in r67581.

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4506] 3.0 make test failures on Solaris 10

2008-12-05 Thread Skip Montanaro

Skip Montanaro <[EMAIL PROTECTED]> added the comment:

Mark> 1. What happens if you build with the '-ffloat-store' option to
Mark>gcc?

Doesn't quite work:

% ./python
Python 3.0 (r30:67503, Dec  5 2008, 09:48:42)
[GCC 4.2.2] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import cmath
>>> cmath.exp(complex(710.0, 1.5))
Segmentation Fault (core dumped)

:-/

Mark> 2. It looks as though the configure script isn't finding 'isinf'
Mark>on Solaris 10.  Any ideas why?  Is there some replacement for
Mark>isinf that's spelt differently?  I suspect that if we were
Mark>using the system lib's test for infinity instead of the
Mark>Py_IS_INFINITY workaround then this problem wouldn't have come
Mark>up.

Thanks for the tip.  The configure script doesn't #include  so
isinf() is not mapped to __builtin_isinf().  Consequently the conftest link
fails:

configure:21401: checking for isinf
configure:21457: gcc -o conftest -g -O2   conftest.c -lresolv -lsocket -lnsl
-lrt -ldl  -lm >&5
conftest.c:252: warning: conflicting types for built-in function 'isinf'
Undefinedfirst referenced
 symbol in file
isinf   /var/tmp//ccmTAet6.o
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status

I found this code in /usr/include/iso/math_c99.h, included by :

#undef  isinf
#define isinf(x)__builtin_isinf(x)

Skip

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4549] A defect in - (Python3.0)

2008-12-05 Thread ZX

New submission from ZX <[EMAIL PROTECTED]>:

"If a name is declared global, then all references and assignments go
directly to the middle scope containing the module’s global names.
Otherwise, all variables found outside of the innermost scope are
read-only (an attempt to write to such a variable will simply create a
new local variable in the innermost scope, leaving the identically named
outer variable unchanged)." ___excerpt from --

The above description is correct in Python 2.X.
Since 3.X introduced the "nonlocal" keyword, I think the above
description is obsolete, need to be upgraded.

--
assignee: georg.brandl
components: Documentation
messages: 77036
nosy: PyTiger, georg.brandl
severity: normal
status: open
title: A defect in - 
(Python3.0)
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3243] Support iterable bodies in httplib

2008-12-05 Thread Chris AtLee

Chris AtLee <[EMAIL PROTECTED]> added the comment:

The attached patch implements this for python 2.7.  It also adds support
for iterable bodies in urllib2, where it is more generally useful. 
urllib2 enforces the presence of a Content-Length header in the request
if the body is an iterable, whereas httplib does not.

The patch also includes updates to docs and tests (which all pass as of
r67584 on my macbook)

--
keywords: +patch
Added file: http://bugs.python.org/file12241/python-3243.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4535] Build / Test Py3K failed on Ubuntu 8.10

2008-12-05 Thread Kandalintsev Alexandre

Kandalintsev Alexandre <[EMAIL PROTECTED]> added the comment:

My results on ubuntu 8.10 x86(with debug features enabled) on Python 
3.1a0 (py3k:67586, Dec  5 2008, 19:39:50):

298 tests OK.
23 tests skipped:
test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp
test_codecmaps_kr test_codecmaps_tw test_curses test_dbm_gnu
test_dbm_ndbm test_kqueue test_nis test_normalization
test_ossaudiodev test_pep277 test_socketserver test_startfile
test_tcl test_timeout test_urllib2net test_urllibnet test_winreg
test_winsound test_xmlrpc_net test_zipfile64
3 skips unexpected on linux2:
test_tcl test_dbm_ndbm test_dbm_gnu
[870063 refs]

May be problems fixed in current trunk(http://svn.python.org/projects/
python/branches/py3k)?

--
nosy: +exe

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4511] Decorators should have an index entry

2008-12-05 Thread K. C. Wong

K. C. Wong <[EMAIL PROTECTED]> added the comment:

My mistake for including 2.6. While having a link to an entry in the 
Glossary is a huge improvement, it comes about as a result of the index 
now covering all components of the Python documentation. I feel at the 
least, there should be a link within the glossary entry back to the 
appropriate sections in the Language Reference.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4550] Deprecated python 2.x syntax in "HOWTO Use Python in the web"

2008-12-05 Thread Jerry Chen

New submission from Jerry Chen <[EMAIL PROTECTED]>:

For people who are following HOWTO guides verbatim, there are two types
of Python 2.x'isms in "HOWTO Use Python in the web"
(http://www.python.org/doc/3.0/howto/webservers.html):

1. ``print`` statements instead of functions.
2. Use of beloved but deprecated ``%`` format operator.

Please see attached patch for the ReST source found at
http://www.python.org/doc/3.0/_sources/howto/webservers.txt.

Note: ``2to3`` was not actually used, as the filename may suggest.

--
assignee: georg.brandl
components: Documentation
files: webservers-2to3.patch
keywords: patch
messages: 77040
nosy: georg.brandl, jcsalterego
severity: normal
status: open
title: Deprecated python 2.x syntax in "HOWTO Use Python in the web"
versions: Python 3.0
Added file: http://bugs.python.org/file12242/webservers-2to3.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4497] Compiler warnings in longobject.c

2008-12-05 Thread Mark Dickinson

Mark Dickinson <[EMAIL PROTECTED]> added the comment:

Fixed in r67588 (py3k), r65789 (release30-maint).
None of the fixes apply to 2.x.

--
resolution:  -> fixed
status: open -> closed
versions:  -Python 2.6, Python 2.7

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4497] Compiler warnings in longobject.c

2008-12-05 Thread Mark Dickinson

Mark Dickinson <[EMAIL PROTECTED]> added the comment:

> r65789
That should be r67589.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4507] 3.0 test failure on Mac OS X 10.5.5

2008-12-05 Thread Mark Dickinson

Mark Dickinson <[EMAIL PROTECTED]> added the comment:

Closing as duplicate.

--
resolution:  -> duplicate
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue965036] Fix for #777597 - socketmodule.c connection handling incorec

2008-12-05 Thread Amaury Forgeot d'Arc

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

A similar patch was applied 4 years ago, in r36739.

--
nosy: +amaury.forgeotdarc
resolution:  -> out of date
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1215] Python hang when catching a segfault

2008-12-05 Thread Adam Olsen

Adam Olsen <[EMAIL PROTECTED]> added the comment:

I'm in favour of just the doc change now.  It's less work and we don't
really need to disable that usage.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue928332] Python interpreter stalled on _PyPclose.WaitForSingleObject

2008-12-05 Thread Amaury Forgeot d'Arc

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

os.popen is now deprecated; the subprocess module does all this much better.

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue826897] Proto 2 pickle vs dict subclass

2008-12-05 Thread Terry J. Reedy

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

James Stroud ran into this same issue with 2.5.  Here is his 'ugly fix'
for working with protocol 2 only.

class DictPlus(dict):
  def __init__(self, *args, **kwargs):
self.extra_thing = ExtraThingClass()
dict.__init__(self, *args, **kwargs)
  def __setitem__(self, k, v):
try:
  do_something_with(self.extra_thing, k, v)
except AttributeError:
  self.extra_thing = ExtraThingClass()
  do_something_with(self.extra_thing, k, v)
dict.__setitem__(self, k, v)
  def __setstate__(self, adict):
pass

Can this be closed as "won't fix", since there seems nothing to fix?
This issue of working with all protocols would seem dead by now, and for
protocol 2, it is a 'gotcha' that can be avoided with knowledge.

--
nosy: +tjreedy
versions: +Python 2.4, Python 2.5

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4511] Decorators should have an index entry

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

OK, I've added a back-link in r67591.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4550] Deprecated python 2.x syntax in "HOWTO Use Python in the web"

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Thanks, fixed in r67593.

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4549] A defect in - (Python3.0)

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Thanks for reporting, there was already a comment in the source about
this :)

Fixed in r67594.

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4457] __import__ documentation obsolete

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Attached is a proposed rewrite of the __import__ documentation.

--
keywords: +patch
Added file: http://bugs.python.org/file12243/import-docs.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4457] __import__ documentation obsolete

2008-12-05 Thread Mart Sõmermaa

Mart Sõmermaa <[EMAIL PROTECTED]> added the comment:

Brett, don't you think the 

>>> import sys
>>> __import__('x.y.z')
>>> mod = sys.modules['x.y.z']

idiom should be recommended instead of/additionally to the lengthy
getattr() one?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1030250] distutils' dry-run wants to create some real build dirs

2008-12-05 Thread Amaury Forgeot d'Arc

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

The third parameter to mkpath() is 'verbose', not 'dry_run'!
Correction is trivial:

Index: Lib/distutils/ccompiler.py
===
--- Lib/distutils/ccompiler.py  (revision 67068)
+++ Lib/distutils/ccompiler.py  (working copy)
@@ -1041,7 +1041,7 @@
 return move_file (src, dst, dry_run=self.dry_run)

 def mkpath (self, name, mode=0777):
-mkpath (name, mode, self.dry_run)
+mkpath (name, mode, dry_run=self.dry_run)


 # class CCompiler

--
assignee:  -> amaury.forgeotdarc
keywords: +patch
nosy: +amaury.forgeotdarc
stage:  -> patch review
versions: +Python 2.6, Python 3.0 -Python 2.3

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4509] possible memoryview bug

2008-12-05 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

Please see patch at http://codereview.appspot.com/10049

--
keywords: +needs review, patch
stage: needs patch -> patch review

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4481] Windows installer crash

2008-12-05 Thread Terry J. Reedy

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

Yes, just as one uses the x86 installer for 32-bit amd chips, like mine ;-)

--
nosy: +tjreedy
resolution:  -> invalid
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4457] __import__ documentation obsolete

2008-12-05 Thread Brett Cannon

Brett Cannon <[EMAIL PROTECTED]> added the comment:

Yes, the simple __import__/sys.modules idiom should be the suggested
idiom until a proper function is provided in the standard library.

--
nosy: +brett.cannon

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4510] ValueError for list.remove() not very helpful

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Suggested patch attached, handles remove() and index().

--
keywords: +patch
nosy: +georg.brandl
stage: needs patch -> patch review
Added file: http://bugs.python.org/file12244/list-excs.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4244] ihooks incompatible with absolute_import feature

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

ihooks is undocumented and deprecated, so I doubt anything will be done
about that.

--
nosy: +georg.brandl
resolution:  -> wont fix
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4485] fast swap of "default" Windows python versions

2008-12-05 Thread Glenn Linderman

Glenn Linderman <[EMAIL PROTECTED]> added the comment:

Since Python hasn't done that until now, it won't help much with the
transition from 2to3.  The earliest versions that could add that would
be 3.1 and 2.7, it would seem, as it is a new fetaure.  Perhaps it would
be worth doing, in planning for Python 4...


Perl has done that for many versions.  The idea is useful for running
scripts that were designed and tested with a given version of Perl, on
that same version, to avoid the need to retest working, production,
code. Even when compatibility is supposed to be retained, and every
effort is made to do so in a maintenance release, sometimes little
things sneak in, that no one ever thought to test, and didn't to have
broken... so continuing to use the version with which a production
script was last extensively tested with, is "extra safe".

The technique you suggest isn't very good for testing a particular
script with various versions of python because you'd have to edit the
script to select the version.  It is good for being "extra safe" and
ensuring that a script continues to run with a particular version of the
interpreter.

I see this issue addressing the ability, in a testing environment, to
swap what version of implicit python is invoked for scripts invoked from
either the command line or from batch files, without the need to edit
the script or the batch file.  From the command line, it is relatively
easy just to invoke the right python via "c:\pythonNN\python script",
although that gets old if you are testing a large number of scripts.  So
I see it as primarily a convenience item for a testing environment.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4461] parameters of PyLong_FromString() are not checked for NULL

2008-12-05 Thread Mark Dickinson

Mark Dickinson <[EMAIL PROTECTED]> added the comment:

All tests pass with this patch.

Committed to trunk, r67590.  Will merge to 2.7, 3.0 and 3.1.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4461] parameters of PyLong_FromString() are not checked for NULL

2008-12-05 Thread Mark Dickinson

Changes by Mark Dickinson <[EMAIL PROTECTED]>:


--
versions:  -Python 2.6, Python 2.7

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4551] The python 2.6.1 source distribution is missing Doc/tools/sphinxext

2008-12-05 Thread Andreas Kupries

New submission from Andreas Kupries <[EMAIL PROTECTED]>:

The directory Doc/tools/sphinxext is missing in the Python 2.6.1 source
distribution. This breaks building the html help.

The directory is present in the Python 2.6 source distribution.

--
components: Installation
messages: 77061
nosy: andreask
severity: normal
status: open
title: The python 2.6.1 source distribution is missing Doc/tools/sphinxext
versions: Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4551] The python 2.6.1 source distribution is missing Doc/tools/sphinxext

2008-12-05 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

This was caused by a bug in the release script. Fixed in r67599.

Thanks for the report!

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4522] Module wsgiref is not python3000 ready (unicode issues)

2008-12-05 Thread Felix Benner

Felix Benner <[EMAIL PROTECTED]> added the comment:

The test uses StringIO. I don't understand the test enough to change
that. If I understand the WSGI spec correctly then it would be the test
that's wrong.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue826897] Proto 2 pickle vs dict subclass

2008-12-05 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1030250] distutils' dry-run wants to create some real build dirs

2008-12-05 Thread Marc-Andre Lemburg

Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment:

Looks good.

--
nosy: +lemburg
stage: patch review -> commit review

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4540] typo in a module describes utf-8 as uft-8

2008-12-05 Thread Marc-Andre Lemburg

Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment:

On 2008-12-05 13:28, Amaury Forgeot d'Arc wrote:
> Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:
> 
> Attached patch ignores any Exception during module import.
> Note that KeyboardInterrupt is not caught: it is not an Exception.

Is there a reason why "formatter" is imported inside the method
rather than at module scope ?

Other than that the patch looks good.

> I could provide a similar patch for 2.7, if there is some interest; but
> no crash was reported.

Python 2.6 and 2.7 have the same problem:

help> modules web

Here is a list of matching modules.  Enter any module name to get more help.

...
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/python-2.6-ucs2/lib/python2.6/site.py", line 429, in __call__
return pydoc.help(*args, **kwds)
  File "/usr/local/python-2.6-ucs2/lib/python2.6/pydoc.py", line 1687, in 
__call__
self.interact()
  File "/usr/local/python-2.6-ucs2/lib/python2.6/pydoc.py", line 1705, in 
interact
self.help(request)
  File "/usr/local/python-2.6-ucs2/lib/python2.6/pydoc.py", line 1723, in help
self.listmodules(split(request)[1])
  File "/usr/local/python-2.6-ucs2/lib/python2.6/pydoc.py", line 1812, in
listmodules
apropos(key)
  File "/usr/local/python-2.6-ucs2/lib/python2.6/pydoc.py", line 1912, in 
apropos
ModuleScanner().run(callback, key)
  File "/usr/local/python-2.6-ucs2/lib/python2.6/pydoc.py", line 1877, in run
for importer, modname, ispkg in pkgutil.walk_packages(onerror=onerror):
  File "/usr/local/python-2.6-ucs2/lib/python2.6/pkgutil.py", line 110, in
walk_packages
__import__(name)
  File "/home/lemburg/lib/DNS/__init__.py", line 13, in 
import Type,Opcode,Status,Class
  File "/home/lemburg/lib/DNS/Type.py", line 67
SyntaxError: Non-ASCII character '\xf6' in file /home/lemburg/lib/DNS/Type.py on
line 67, but no encoding declared; see http://www.python.org/peps/pep-0263.html
for details

(pydoc will look in all modules on sys.path, so chances are high
that users will run into similar problems)

___
Python tracker <[EMAIL PROTECTED]>

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



  1   2   >