[issue3214] Suggest change to glossary explanation: "Duck Typing"

2008-07-01 Thread Antoine Pitrou

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

While we are at it, should we keep this one as is?

« Python3000
A mythical python release, not required to be backward compatible,
with telepathic interface. »

Not so mythical after all... missing the telepathic interface though.

--
nosy: +pitrou

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3214] Suggest change to glossary explanation: "Duck Typing"

2008-07-01 Thread Paddy McCarthy

Paddy McCarthy <[EMAIL PROTECTED]> added the comment:

Hi Georg,
A bit of relevant background about me: 
  I've been interested in Duck Typing _specifically_ for a couple of
years when I started watching edits to it on Wikipedia. I researched the
history of the use of the term and changed the attribution of first use
to Alex Martelli after digging in Google, and still trawl reading code
and articles on the subject. But I DONT think this makes me an expert -
Duck typing is a 'mould-able' term and the things we write about it help
to define it.

On your comment about hasattr:
  I think more and more that Duck-Typing is what allows us, (as in
Python), to substitute one class for another in a method previously
designed with only the other in mind - you know, as in the canonical
example of file-like objects such as StringIO substituting in methods
defined originally for files. In this case hasattr checks don't add
anything, and EAFP is all important.

I tried to get wider context on this by posting it originally to
comp.lang.python but no one was interested. I don't normally frequent
the developers forumbut maybe we should open the issue to that audience?

- Paddy.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2275] urllib2 header capitalization

2008-07-01 Thread Senthil

Senthil <[EMAIL PROTECTED]> added the comment:

Issue applicable to Py2.6 and Py3K. Previous patch attached was wrong.
Removed it.

--
versions: +Python 2.6, 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



[issue2275] urllib2 header capitalization

2008-07-01 Thread Senthil

Changes by Senthil <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file9907/issue2275.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3254] Suggestion: change default behavior of __ne__

2008-07-01 Thread cvp

Changes by cvp <[EMAIL PROTECTED]>:


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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3254] Suggestion: change default behavior of __ne__

2008-07-01 Thread cvp

Changes by cvp <[EMAIL PROTECTED]>:


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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3254] Suggestion: change default behavior of __ne__

2008-07-01 Thread cvp

cvp <[EMAIL PROTECTED]> added the comment:

1) I didn't say that the option to edit __ne__ should be removed, only that
it'd be both more consistent and convenient to change the meaning to
something relative by default.

2) So long as the old code defines __ne__, which I'm guessing is the code
that you're telling me will break, I still don't see how this will cause any
issues whatsoever. I mean, I guess it could mess up some people who were
using '!=' to be *intentionally* synonymous with 'is not', but that's
awfully contrived for a language that's supposed to be well-known for being
straight-forward and easily readable.

-Constantine

Added file: http://bugs.python.org/file10793/unnamed

___
Python tracker <[EMAIL PROTECTED]>

___1) I didn't say that the option to edit __ne__ should be removed, only that 
it'd be both more consistent and convenient to change the meaning to 
something relative by default.2) So long as the old code defines 
__ne__, which I'm guessing is the code that you're telling me will 
break, I still don't see how this will cause any issues whatsoever. I mean, 
I guess it could mess up some people who were using '!=' to be 
*intentionally* synonymous with 'is not', but that's awfully 
contrived for a language that's supposed to be well-known for being 
straight-forward and easily readable.
-Constantine
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3254] Suggestion: change default behavior of __ne__

2008-07-01 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

1) It's much more flexible.
2) It would break compatibility.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3254] Suggestion: change default behavior of __ne__

2008-07-01 Thread cvp

cvp <[EMAIL PROTECTED]> added the comment:

But why not? Laziness or something? Or "just cuz?"

-Constantine

On Tue, Jul 1, 2008 at 4:11 PM, Benjamin Peterson <[EMAIL PROTECTED]>
wrote:

>
> Benjamin Peterson <[EMAIL PROTECTED]> added the comment:
>
> Sorry, this is documented [1], and it unlikely to ever be changed.
>
> [1] http://docs.python.org/ref/customization.html
>
> --
> nosy: +benjamin.peterson
> resolution:  -> rejected
> status: open -> closed
>
> ___
> Python tracker <[EMAIL PROTECTED]>
> 
> ___
>

Added file: http://bugs.python.org/file10792/unnamed

___
Python tracker <[EMAIL PROTECTED]>

___But why not? Laziness or something? Or "just 
cuz?"-ConstantineOn Tue, Jul 1, 
2008 at 4:11 PM, Benjamin Peterson [EMAIL PROTECTED]> wrote:

Benjamin Peterson [EMAIL 
PROTECTED]> added the comment:

Sorry, this is documented [1], and it unlikely to ever be changed.

[1] http://docs.python.org/ref/customization.html"; 
target="_blank">http://docs.python.org/ref/customization.html

--
nosy: +benjamin.peterson
resolution:  -> rejected
status: open -> closed

___
Python tracker [EMAIL 
PROTECTED]>
http://bugs.python.org/issue3254>
___

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



[issue3254] Suggestion: change default behavior of __ne__

2008-07-01 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Sorry, this is documented [1], and it unlikely to ever be changed. 

[1] http://docs.python.org/ref/customization.html

--
nosy: +benjamin.peterson
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



[issue2885] Create the urllib package

2008-07-01 Thread Brett Cannon

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

And it looks like the 2.6 docs need to be updated as well.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3254] Suggestion: change default behavior of __ne__

2008-07-01 Thread cvp

New submission from cvp <[EMAIL PROTECTED]>:

After defining my own __eq__ method for a class that judged equality
based on a 'name' variable, imagine my surprise to see this:

In [20]: my_graph.edges[-1].end == my_graph.vertices[-1]
Out [20]: True

In [21]: my_graph.edges[-1].end != my_graph.vertices[-1]
Out [21]: True

...all because I forgot to modify __ne__ as well.

I think __ne__ should be changed to 'not __eq__' for the sake of
consistency.

--
messages: 69078
nosy: cvp
severity: normal
status: open
title: Suggestion: change default behavior of __ne__
type: behavior

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2351] Using __(get|set|del)slice__ needs a Py3K warning

2008-07-01 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


--
assignee: 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



[issue3251] references are case insensitive

2008-07-01 Thread Georg Brandl

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

Thanks, fixed in r64642.

--
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



[issue3242] Segfault in PyFile_SoftSpace/PyEval_EvalFrameEx with sys.stdout reassigned

2008-07-01 Thread Amaury Forgeot d'Arc

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

Corrected as r64633 (trunk) and r64639 (release25-maint). version 3.0 is
not affected, and there won't be any more 2.4 release.

Thanks for the report!

--
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



[issue1410739] Add notes to the manual about `is` and methods

2008-07-01 Thread Georg Brandl

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

Reworded a bit and applied as r64638.

--
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



[issue1523853] 2.4.2 file.read caches EOF state

2008-07-01 Thread Georg Brandl

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

Added note in r64635.

--
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



[issue3191] round docstring is inaccurate

2008-07-01 Thread Georg Brandl

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

Fixed in r64634.

--
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



[issue3112] implement PEP 3134 exception reporting

2008-07-01 Thread Antoine Pitrou

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

Potential reviewers, let's make life easier for you:
http://codereview.appspot.com/2448

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3240] IDLE environment corrupts string.letters

2008-07-01 Thread Martin v. Löwis

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

As Georg says: you shouldn't be mixing Unicode objects and string
objects. It's perfectly valid for string.letters to contain non-ASCII
bytes, and it's no surprise that this fails for you. string.letters
indeed *does* contain only letters.

In any case, testing for letter-ness by using "in string.letters" is not
a good idea, as it involves a linear search. I recommend to use

u"a".isalpha() 

instead

--
status: pending -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3214] Suggest change to glossary explanation: "Duck Typing"

2008-07-01 Thread Georg Brandl

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

Paddy: IMO hasattr() is the "if it quacks like a duck" part of
duck-typing. It e.g. allows testing "hasattr(x, 'write')" to see if it's
a writable file-like object, and doing something else otherwise.

Benjamin: ABCs are not duck-typing since they involve isinstance() anyway.

--
resolution:  -> works for me
status: open -> pending

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1682] Move Demo/classes/Rat.py to Lib/fractions.py and fix it up.

2008-07-01 Thread Mark Dickinson

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

Well, I can't find anything more to fuss about here. :-)

Reclosing.

--
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



[issue3203] sphinx - table of contents doesn't render correctly (html)

2008-07-01 Thread Georg Brandl

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

This is already on my to-do list. Thanks for raising it as an issue
though, I won't forget it so easily this way :)

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3216] Scarce msilib documentation

2008-07-01 Thread Georg Brandl

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

Fixed the Execute parameter in r64630. add_data was already fixed.

Assigning to Martin; if someone is to write usage info, it's got to be him.

--
assignee: georg.brandl -> loewis
nosy: +loewis
resolution:  -> fixed
title: errors in msilib documentation -> Scarce msilib documentation

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3240] IDLE environment corrupts string.letters

2008-07-01 Thread Georg Brandl

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

Well, that wouldn't be different if you had set the locale in your
prompt. In short, ``u'a' in string.letters`` can never work with any
string.letters except the default, English-only one, and therefore is wrong.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3217] make text is broken

2008-07-01 Thread Georg Brandl

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

Fixed with r64629.

--
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



[issue3220] Improve Bytes and Byte Array Methods doc

2008-07-01 Thread Georg Brandl

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

> Lib Ref/Built-in Types/Sequence Types/Bytes and Byte Array Methods
>  
> The following set/frozenset and dict sections repeat (and for dicts,
> expands upon) the constructor interface from the Built-in Functions
> section.  The sequence type sections do not.  There should as least be a
> reference back.  "For the constructor interface, see xxx"

Right -- I need to reorganize that section a bit more, and this is on
the list to do.

> Similarly there is no mention here of the difference between bytes and
> bytearray, as there is below for the difference between set and
> frozenset.  I think there should be here, in this section, even though
> there is back in Built-in Functions.

The difference is mentioned under the "sequence types" heading.

> (Sets/frozenset have the opposite problem in that Built-in Functions
> makes no mention that one is mutable and the other is not.  I also think
> just one word for each should be added there too.)
>  
> "The bytes and bytearray types have an additional class method:
> bytes.fromhex(string) " should be followed by
> "bytearray.fromhex(string)" and
> "This bytes class method returns a bytes object," changed to
> "These class methods return a bytes or bytearray object,"

Agreed.

> I don't think the line 'Example:' is needed.

Yep.

> A thread today on the Py3 lists again brought up the issue that just as
> bytes can be created by either a literal or class call, they could be
> represented on output by either, with possible confusion.
> Guido responded
> > Only if you didn't know that b'' is an alternative to bytes(). The b''
> > notation is so much more compact and so  much more helpful that I
> > really don't want to go back to it. We will somehow have to deal with
> > this through education and documentation.
>  
> I suggest adding at the end:
> "Just as a bytes objects can be constructed either with a literal or a
> class constructor call, they could be represented on output either by a
> literal or class constructor call.  The literal was chosen as being
> shorter, generally more useful, and consistent with how other classes
> are displayed.  Similarly, the display of bytearrays uses the
> corresponding bytes literal.  If you want to see the bytes of either
> class as integers, use tuple.
>  
> >>> a, b = b'abc', bytes((1,2,3))
> >>> a,b
> (b'abc', b'\x01\x02\x03')
> >>> tuple(a), tuple(b)
> ((97, 98, 99), (1, 2, 3))
> >>> c = bytearray(a)
> >>> c, tuple(c)
> (bytearray(b'abc'), (97, 98, 99))
> "

The same section that documents the bytes/bytearray difference also already
mentions this; I've amended it a bit to include the bit about
representation.

Committed changes as r64627.

--
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



[issue3240] IDLE environment corrupts string.letters

2008-07-01 Thread Roger Upole

Roger Upole <[EMAIL PROTECTED]> added the comment:

It introduces high characters that cause comparisons to fail under IDLE 
that succeed from the normal python prompt:

Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit 
(Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import string
>>> u'a' in string.letters
True


IDLE 1.2.2  
>>> import string
>>> u'a' in string.letters

Traceback (most recent call last):
  File "", line 1, in 
u'a' in string.letters
UnicodeDecodeError: 'ascii' codec can't decode byte 0x83 in position 
52: ordinal not in range(128)

Or am I misunderstanding how the locale works with string comparisons ?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3235] Improve subprocess module usage

2008-07-01 Thread Georg Brandl

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

Added a link to PEP 324 in r64625. The other issues were explained by
Martin; it will be easier to read the subprocess docs in 2.6 where
they're all on one page.

--
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



[issue2775] Implement PEP 3108

2008-07-01 Thread Georg Brandl

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

Fixed in r64624.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2683] subprocess.Popen.communicate takes bytes, not str

2008-07-01 Thread Georg Brandl

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

You're right, I fixed that too in r64621.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3174] 3.0b1 doesn't seem to install on macs

2008-07-01 Thread Benjamin Peterson

Changes by Benjamin Peterson <[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



[issue3219] repeated keyword arguments

2008-07-01 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Done for 2.6 in r64622. (Georg reviewed.)

--
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



[issue2683] subprocess.Popen.communicate takes bytes, not str

2008-07-01 Thread Rafael Zanella

Rafael Zanella <[EMAIL PROTECTED]> added the comment:

_communicate still encodes the string under the hood

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2683] subprocess.Popen.communicate takes bytes, not str

2008-07-01 Thread Georg Brandl

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

Fixed docs in r64619.

--
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



[issue3174] 3.0b1 doesn't seem to install on macs

2008-07-01 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Ok. I tried to get it working in r64618.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3218] 2to3 Fix_imports optimization

2008-07-01 Thread Nick Edds

Nick Edds <[EMAIL PROTECTED]> added the comment:

Here is a diff for the both the fix_imports changes which I corrected,
and the pytree changes. The pytree changes were a lot more significant
before the fix_imports change, but I think they are still a decent
improvement. I think I have now restored the functionality you wanted
without the members, although I'm not quite sure I made the patterns
exactly right. I tested the from a import b as c, as well as in text
foo.bar references, and they seemed to be corrected properly.

--
keywords: +patch
Added file: http://bugs.python.org/file10791/fix_imports.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3239] curses/textpad.py incorrectly and redundantly imports ascii

2008-07-01 Thread Georgij Kondratjev

Georgij Kondratjev <[EMAIL PROTECTED]> added the comment:

>>> import curses.ascii as curses_ascii

If you like curses_ascii you would probably like curses.ascii :) so here
is the patch. I tested it with module built-in testing facility (if
__name__ == '__main__') but didn't run other tests.

Patch with "patch -i curses-textpad-ascii.patch
src/python/Lib/curses/textpad.py"

--
keywords: +patch
Added file: http://bugs.python.org/file10790/curses-textpad-ascii.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3253] shutil.move bahave unexpected in fat32

2008-07-01 Thread grissiom

New submission from grissiom <[EMAIL PROTECTED]>:

Build the environment in a fat32 file system:
$echo test > test_move
$mkdir testmove

If I shutil.move('test_move', 'testmove'), it will raise: 
Traceback (most recent call last):
  File "testmove.py", line 5, in 
shutil.move('test_move', 'test_python')
  File "/usr/lib/python2.5/shutil.py", line 199, in move
copy2(src,dst)
  File "/usr/lib/python2.5/shutil.py", line 92, in copy2
copystat(src, dst)
  File "/usr/lib/python2.5/shutil.py", line 69, in copystat
os.chmod(dst, mode)
OSError: [Errno 1] Operation not permitted: 'test_python/test_move'

If I shutil.move('test_move', 'testmove/testmove'), it will succeed
quietly. This problem doesn't happen in an ext3 file system.

--
components: Library (Lib)
messages: 69053
nosy: grissiom
severity: normal
status: open
title: shutil.move bahave unexpected in fat32
type: behavior
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



[issue3252] str.tobytes() and bytes/bytearray.tostr()

2008-07-01 Thread Marc-Andre Lemburg

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

There's nothing new to .encode() and .decode(). They have existed since
Python 1.6.

--
nosy: +lemburg
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



[issue3218] 2to3 Fix_imports optimization

2008-07-01 Thread Collin Winter

Collin Winter <[EMAIL PROTECTED]> added the comment:

The change to pytree.py doesn't add much speed benefit over the
fix_imports.py change, and causes a test to fail.

The fix_imports.py change, on the other hand, takes the test suite run
time from 8m31s down to 1m45s -- this needs to go in!

That said, I don't think the change is correct: you remove the portion
of the pattern that matches "from foo import bar, baz, x, y as z", as
well as the portion that matches "foo.bar" in the body of the code,
where foo is a module to be renamed. These should be added back, but
with support for member matching removed.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3242] Segfault in PyFile_SoftSpace/PyEval_EvalFrameEx with sys.stdout reassigned

2008-07-01 Thread Brodie Rao

Brodie Rao <[EMAIL PROTECTED]> added the comment:

Thanks. The patch fixes the crash for me on Python 2.5.2 and 2.6b1 on OS X 
and Python 2.4.5 on Debian and Ubuntu.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3252] str.tobytes() and bytes/bytearray.tostr()

2008-07-01 Thread Amaury Forgeot d'Arc

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

> encoding and decoding is generally accepted terminology

Yes, but I personally always pause a couple of seconds each time I have
to write "encode" or "decode".
Following Mark's idea, I think I will mentally use "en-bytes" and
"de-bytes" as a mnemonic...

--
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



[issue3252] str.tobytes() and bytes/bytearray.tostr()

2008-07-01 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

-1
encoding and decoding is generally accepted terminology. Besides then we
would be binding ourselves to returning bytes or a str; that's not
necessarily guaranteed.

Anyway, I think this hardly has a chance in the place we are (between
betas).

--
nosy: +benjamin.peterson

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3000] 2to3 doesn't handle print(whatever); print nor string.* functions

2008-07-01 Thread Mark Summerfield

Changes by Mark Summerfield <[EMAIL PROTECTED]>:


--
type:  -> behavior

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3252] str.tobytes() and bytes/bytearray.tostr()

2008-07-01 Thread Mark Summerfield

New submission from Mark Summerfield <[EMAIL PROTECTED]>:

I know it is almost certainly too late, but I think a lot of people will
be confused by str.decode() and bytes.encode() (or was that the other
way around)?

Calling the methods str.tobytes() and bytes.tostr() (or nicer,
str.to_bytes() and bytes.to_str()) would be hard to confuse and IMO will
lead to fewer bug reports and complaints once Python 3.0 final comes out.

And there is a kind of precedent in that threading.isDaemon() became
threading.is_daemon() between 30a5 and 30b1.

--
components: Interpreter Core
messages: 69047
nosy: mark
severity: normal
status: open
title: str.tobytes() and bytes/bytearray.tostr()
type: feature request
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



[issue3249] bug adding datetime.timedelta to datetime.date

2008-07-01 Thread Benjamin Peterson

Changes by Benjamin Peterson <[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



[issue3249] bug adding datetime.timedelta to datetime.date

2008-07-01 Thread Tim Peters

Tim Peters <[EMAIL PROTECTED]> added the comment:

This isn't "a bug", since it's functioning as documented and designed.
Read note 1 in the "date Objects" section of the reference manual,
explaining the meaning of "date2 = date1 + timedelta":

"""
date2 is moved forward in time if timedelta.days > 0, or backward if
timedelta.days < 0. Afterward date2 - date1 == timedelta.days.
timedelta.seconds and timedelta.microseconds are ignored. OverflowError
is raised if date2.year would be smaller than MINYEAR or larger than
MAXYEAR.
"""
).

You could call this a feature request instead, but an incompatible
change to documented always-worked-this-way behavior is unlikely to be
accepted.

--
nosy: +tim_one

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3251] references are case insensitive

2008-07-01 Thread Wolfgang Langner

New submission from Wolfgang Langner <[EMAIL PROTECTED]>:

References can be added case sensitive as .. _myRef:
but only used case insensitive with :ref:`myref`
usage of :ref:`myRef` doesn't generate a working reference.

Make this behavior consistent please, always case insensitive or always
case sensitive.

--
assignee: georg.brandl
components: Documentation tools (Sphinx)
messages: 69045
nosy: georg.brandl, tds333
severity: normal
status: open
title: references are case insensitive

___
Python tracker <[EMAIL PROTECTED]>

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



[issue648658] xmlrpc can't do proxied HTTP

2008-07-01 Thread anatoly techtonik

anatoly techtonik <[EMAIL PROTECTED]> added the comment:

I will be second to emphasize the importance of using XML-RPC through a
proxy. bzr behind a proxy can't be used with launchpad because of this bug.

--
nosy: +techtonik

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1613573] xmlrpclib ServerProxy uses old httplib interface

2008-07-01 Thread anatoly techtonik

anatoly techtonik <[EMAIL PROTECTED]> added the comment:

* use newer 2.0 public interface of httplib for connection handling

Attached patch is for trunk/
Tested for Python 2.5
issue1767370 is a separate issue that can be fixed later

--
keywords: +patch
nosy: +techtonik
versions: +Python 2.6
Added file: 
http://bugs.python.org/file10789/issue1613573_xmlrpc_uses_deprecated_api.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3250] datetime.time does not support arithmetic

2008-07-01 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
type:  -> feature request
versions: +Python 2.7 -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



[issue3250] datetime.time does not support arithmetic

2008-07-01 Thread Chris Withers

New submission from Chris Withers <[EMAIL PROTECTED]>:

>>> from datetime import time
>>> time(9,0)-time(8,0)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: unsupported operand type(s) for -: 'datetime.time' and
'datetime.time'

I'd expect a datetime.timedelta(0,3600)

--
components: Library (Lib)
messages: 69042
nosy: cjw296
severity: normal
status: open
title: datetime.time does not support arithmetic
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



[issue3249] bug adding datetime.timedelta to datetime.date

2008-07-01 Thread Chris Withers

New submission from Chris Withers <[EMAIL PROTECTED]>:

The following demonstrates the problem:

>>> from datetime import datetime,timedelta
>>> datetime.now().date()+timedelta(hours=1)
datetime.date(2008, 7, 1)

I'd expect the above to either result in a TypeError or (preferably)
datetime.datetime(2008, 7, 1, 1, 0)

--
components: Library (Lib)
messages: 69041
nosy: cjw296
severity: normal
status: open
title: bug adding datetime.timedelta to datetime.date
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



[issue3242] Segfault in PyFile_SoftSpace/PyEval_EvalFrameEx with sys.stdout reassigned

2008-07-01 Thread Amaury Forgeot d'Arc

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

I reproduced the problem on windows, and it is indeed a problem with the
"print" statement, when the write() method reassigns sys.stdout: the
code calls PyFile_WriteString(), then PyFile_SoftSpace on the same
object, which has been freed in your case.
A pair of INCREF/DECREF did the trick. See attached patch.

--
keywords: +patch
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file10788/print.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3099] On windows, "import nul" always succeed

2008-07-01 Thread Hirokazu Yamamoto

Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment:

GetFileAttributes() succeeds for "nul", but GetFileAttributesEx() fails.
Maybe is it good idea to use GetFileAttributesEx()?

# test code

import ctypes
import ctypes.wintypes as type

dll = ctypes.windll.kernel32

print dll.GetFileAttributesA("nul") # 32

class WIN32_FILE_ATTRIBUTE_DATA(ctypes.Structure):
_fields_ = [("dwFileAttributes", type.DWORD),
("ftCreationTime", type.FILETIME),
("ftLastAccessTime", type.FILETIME),
("ftLastWriteTime", type.FILETIME),
("nFileSizeHigh", type.DWORD),
("nFileSizeLow", type.DWORD)]

GetFileExInfoStandard = 0

wfad = WIN32_FILE_ATTRIBUTE_DATA()

print dll.GetFileAttributesExA("nul", GetFileExInfoStandard,
ctypes.byref(wfad)) # 0

___
Python tracker <[EMAIL PROTECTED]>

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