[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

[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

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

[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 stdin, line 1, in module TypeError: unsupported operand type(s) for -: 'datetime.time' and 'datetime.time' I'd expect a datetime.timedelta(0,3600)

[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] http://bugs.python.org/issue3250 ___

[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

[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] http://bugs.python.org/issue3249 ___

[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

[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] http://bugs.python.org/issue3000 ___ ___ Python-bugs-list mailing

[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

[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] http://bugs.python.org/issue3242

[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

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

[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 module shutil.move('test_move',

[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

[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

[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] http://bugs.python.org/issue3174 ___ ___

[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] http://bugs.python.org/issue2683 ___

[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] http://bugs.python.org/issue2683 ___

[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] http://bugs.python.org/issue3219

[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] http://bugs.python.org/issue3174 ___

[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] http://bugs.python.org/issue2683 ___ ___

[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

[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] http://bugs.python.org/issue3217 ___

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

[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] http://bugs.python.org/issue3203

[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] http://bugs.python.org/issue1682

[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] http://bugs.python.org/issue3191 ___

[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] http://bugs.python.org/issue1523853 ___

[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] http://bugs.python.org/issue1410739 ___

[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

[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] http://bugs.python.org/issue3251 ___

[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] http://bugs.python.org/issue2351 ___ ___ Python-bugs-list

[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 !=

[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] http://bugs.python.org/issue2885 ___

[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

[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

[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] http://bugs.python.org/issue3254 ___ ___

[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] http://bugs.python.org/issue3254 ___ ___

[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] http://bugs.python.org/issue2275 ___ ___

[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] http://bugs.python.org/issue2275

[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