[issue7319] Silence DeprecationWarning by default

2010-01-06 Thread Brett Cannon
Brett Cannon added the comment: Latest patch adds fixes to test_exceptions test_ascii_formatd to pass. -- Added file: http://bugs.python.org/file15770/silence_deprecations.diff ___ Python tracker __

[issue7319] Silence DeprecationWarning by default

2010-01-06 Thread Brett Cannon
Changes by Brett Cannon : Removed file: http://bugs.python.org/file15758/silence_deprecations.diff ___ Python tracker ___ ___ Python-bugs-list

[issue1034] [patch] Add 2to3 support for displaying warnings as Python comments

2010-01-06 Thread Brian Curtin
Changes by Brian Curtin : -- stage: -> test needed versions: +Python 2.7, Python 3.2 -Python 3.0 ___ Python tracker ___ ___ Python-bug

[issue7644] bug in nntplib.body() method with possible fix

2010-01-06 Thread Michael Mullins
Michael Mullins added the comment: "('crash' is for the interpreter crashing)" Sorry. "Unless someone feels like creating an nntp test framework..." This sounds like it is beyond me. But given the evidence, specifically the previous line: "file.write(line + b'\n')" ...the module

[issue1034] [patch] Add 2to3 support for displaying warnings as Python comments

2010-01-06 Thread Brian Curtin
Brian Curtin added the comment: I think this would be a good addition so I took Adrian's patch and brought it up to date. I'll need to expand the testing, but I think Benjamin's 1 and 3 are covered. -- nosy: +brian.curtin Added file: http://bugs.python.org/file15769/issue1034.diff __

[issue7651] Python3: guess text file charset using the BOM

2010-01-06 Thread STINNER Victor
New submission from STINNER Victor : If the file starts with a BOM, open(filename) should be able to guess the charset. It would be helpful for many high level modules: - #7519: ConfigParser - #7185: csv - and any module using open() to read a text file Actually, the user have to choose bet

[issue7649] "u'%c' % char" broken for chars in range '\x80'-'\xFF'

2010-01-06 Thread Eric Smith
Changes by Eric Smith : -- keywords: +easy priority: high -> normal stage: test needed -> patch review ___ Python tracker ___ ___ Pytho

[issue7649] "u'%c' % char" broken for chars in range '\x80'-'\xFF'

2010-01-06 Thread Eric Smith
Eric Smith added the comment: Shouldn't it work the same as it does for integers? >>> u'%c' % 0x7f u'\x7f' >>> u'%c' % '\x7f' u'\x7f' >>> u'%c' % 0x80 u'\x80' >>> u'%c' % '\x80' u'\uff80' That would imply to me it shouldn't be an error, it should just return u'\x80'. -- _

[issue7649] "u'%c' % char" broken for chars in range '\x80'-'\xFF'

2010-01-06 Thread STINNER Victor
STINNER Victor added the comment: The problem is specific to Python 2.x. With Python3, "%c" expects one unicode character (eg. "a"). My patch fixes the char => Py_UNICODE conversion, but raising an error is maybe better to be consistent with u"%s" % "\x80" (and prepare the migration the Pyth

[issue7649] "u'%c' % char" broken for chars in range '\x80'-'\xFF'

2010-01-06 Thread STINNER Victor
STINNER Victor added the comment: The problem is the cast char => Py_UNICODE in formatchar() function. char may be unsigned, but most of the time it's signed. signed => unsigned cast extend the sign. Example: (unsigned short)(signed char)0x80 gives 0xFF80. Attached patch fixes the issue and i

[issue7650] test_uuid is invalid

2010-01-06 Thread Austin English
New submission from Austin English : >From http://bugs.winehq.org/show_bug.cgi?id=21276 "I believe this is a bug in the python test code, not in Wine. Wine's UuidCreate function follows RFC 4122, section 4.4. That is, it generates a Uuid from a pseudorandom number generator, not from a MAC ad

[issue7649] "u'%c' % char" broken for chars in range '\x80'-'\xFF'

2010-01-06 Thread Eric Smith
Changes by Eric Smith : -- nosy: +doerwalter ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue7649] "u'%c' % char" broken for chars in range '\x80'-'\xFF'

2010-01-06 Thread Eric Smith
Eric Smith added the comment: This looks like a signed vs. unsigned char problem. What platform are you on? -- ___ Python tracker ___

[issue7649] "u'%c' % char" broken for chars in range '\x80'-'\xFF'

2010-01-06 Thread Eric Smith
Changes by Eric Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue7519] ConfigParser can't read files with BOM markers

2010-01-06 Thread STINNER Victor
STINNER Victor added the comment: Use utf_8_sig charset and open your file using io.open() or codecs.open() to get unicode sections, options and values. Example: - from ConfigParser import ConfigParser import io # create an utf-8 .ini file with a BOM marker

[issue7649] "u'%c' % char" broken for chars in range '\x80'-'\xFF'

2010-01-06 Thread Ezio Melotti
New submission from Ezio Melotti : On Py2.x u'%c' % char returns the wrong result if char is in range '\x80'-'\xFF': >>> u'%c' % '\x7f' u'\x7f' # correct >>> u'%c' % '\x80' u'\uff80' # broken >>> u'%c' % '\xFF' u'\u' # broken This is what happens whit %s and 0x80: >>> u'%s' % '\x80' Trac

[issue7643] What is an ASCII linebreak?

2010-01-06 Thread Michael Foord
Michael Foord added the comment: '\x85' when decoded using latin-1 is just transcoded to u'\x85' which is treated as the NEL (a C1 control code equivalent to end of line). This changes iteration over the file when you decode and actually broke our csv parsing code when we got some latin-1 enc

[issue7648] test_urllib2 fails on Windows if not run from C:

2010-01-06 Thread R. David Murray
Changes by R. David Murray : -- components: +Tests keywords: +easy nosy: +orsenthil priority: -> low type: -> behavior ___ Python tracker ___ ___

[issue7648] test_urllib2 fails on Windows if not run from C:

2010-01-06 Thread Austin English
New submission from Austin English : Passes fine if run from C:, but when run from any other drive, fails: test_trivial (__main__.TrivialTests) ... ERROR == ERROR: test_trivial (__main__.TrivialTests) --

[issue3660] reference leaks in test_distutils

2010-01-06 Thread Ezio Melotti
Ezio Melotti added the comment: This issue has been fixed. -- nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker __

[issue7319] Silence DeprecationWarning by default

2010-01-06 Thread Brian Curtin
Brian Curtin added the comment: The wording of the documentation flows and is arranged better than before. However, there is a test failure: test_exceptions.testDeprecatedMessageAttribute depends on the deprecation warning always occuring. @unittest.skipIf(DeprecationWarning in [filter[2] fo

[issue6939] shadows around the io truncate() semantics

2010-01-06 Thread Pascal Chambon
Pascal Chambon added the comment: And here is the python trunk patch, covering _Pyio and _io modules (+ corresponding tests). -- Added file: http://bugs.python.org/file15766/python27_full_truncate_bugfix.patch ___ Python tracker

[issue6939] shadows around the io truncate() semantics

2010-01-06 Thread Pascal Chambon
Pascal Chambon added the comment: Here is the new patch for py2.6, fixing (hopefully) all the truncate() methods. Note that the python _BytesIO implementation isn't covered by the test suite, as it's shadowed by the C implementation ; but imo we shouldn't care : I've manually tested it once, a

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-06 Thread Florent Xicluna
Florent Xicluna added the comment: +1 to remove this boring cPickle message. cStringIO do not print such messages. -- ___ Python tracker ___

[issue6939] shadows around the io truncate() semantics

2010-01-06 Thread Pascal Chambon
Pascal Chambon added the comment: Whoups - I forgot to bugfix as well the _bytesio classes... let's just forget about the previous patch. -- ___ Python tracker ___ _

[issue7645] test_distutils fails on Windows XP

2010-01-06 Thread R. David Murray
Changes by R. David Murray : -- assignee: -> tarek components: +Distutils priority: -> normal ___ Python tracker ___ ___ Python-bugs-

[issue7645] test_distutils fails on Windows XP

2010-01-06 Thread R. David Murray
Changes by R. David Murray : -- nosy: +tarek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-06 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > I think this warning is both annoying (cPickle is a legitimate module to use > in 2.x, since pickle is much slower) and useless (2to3 should be able to do > the module rename -- Benjamin, does it?). Therefore I suggest to remove this > warning. You ma

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > All these modules yield: > "DeprecationWarning: the cPickle module has been removed in Python 3.0" I think this warning is both annoying (cPickle is a legitimate module to use in 2.x, since pickle is much slower) and useless (2to3 should be able to do the m

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-06 Thread Florent Xicluna
Florent Xicluna added the comment: Still some "-3" warnings to silence: ./python -3m "collections" >/dev/null ./python -3c "import Cookie" ./python -3c "import idlelib.rpc" ./python -3c "import logging.handlers" ./python -3c "import multiprocessing" ./python -3c "import shelve" ./python -3c "im

[issue7647] Add statvfs flags to the posix module

2010-01-06 Thread Dave Malcolm
Changes by Dave Malcolm : -- nosy: +dmalcolm ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue7647] Add statvfs flags to the posix module

2010-01-06 Thread Adam Jackson
Changes by Adam Jackson : -- type: -> feature request ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue7647] Add statvfs flags to the posix module

2010-01-06 Thread Adam Jackson
New submission from Adam Jackson : Though the statvfs call exists in the posix module, the posix-defined values for the f_flag field are not. This makes it hard to know whether a filesystem is readonly without also knowing the value for ST_READONLY on the machine you're running on. Attached

[issue6939] shadows around the io truncate() semantics

2010-01-06 Thread Pascal Chambon
Pascal Chambon added the comment: Hi Here is a patch for the python2.6 _fileio.c module, as well as the corresponding testcase. I'll check the _pyio and C _io trunk modules asap. -- keywords: +patch Added file: http://bugs.python.org/file15763/python26_io_truncate_bugfix.patch __

[issue6511] zipfile: Invalid argument when opening zero-sized files

2010-01-06 Thread R. David Murray
R. David Murray added the comment: I've backported this to 2.6 in r77334 and to 3.1 in r77335. -- nosy: +r.david.murray priority: -> normal stage: -> committed/rejected ___ Python tracker

[issue7646] test_telnetlib fails in Windows XP

2010-01-06 Thread Austin English
Changes by Austin English : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue7646] test_telnetlib fails in Windows XP

2010-01-06 Thread Austin English
New submission from Austin English : socket.error: [Errno 10053] An established connection was aborted by the software in your host machine Full output is attached. -- components: Windows files: telnetlib.txt messages: 97319 nosy: austin987 severity: normal status: open title: test_tel

[issue7645] test_distutils fails on Windows XP

2010-01-06 Thread Austin English
New submission from Austin English : IOError: [Errno 2] No such file or directory: 'C:\\Python31\\lib\\distutils\\tests\\Setup.sample' Full output is attached. -- components: Windows files: distutils.txt messages: 97318 nosy: austin987 severity: normal status: open title: test_distutil

[issue7633] decimal.py: type conversion in context methods

2010-01-06 Thread Juan José Conti
Juan José Conti added the comment: New patch. Fix Context.method that were returning NotImplemented. Decimal.__methods__ don't use raiseit=True in _convert_other so I check in Context.method and raise TypeError if necessary. Added tests for Context.divmod missed in first patch. -- Ad

[issue5950] zimport doesn't work with zipfile containing comments

2010-01-06 Thread Georg Brandl
Georg Brandl added the comment: Yes, comments are not supported right now. Documented this in r77333, and turning this issue into a feature request for adding that support. -- nosy: +georg.brandl type: -> feature request ___ Python tracker

[issue5991] Add non-command help topics to help completion of cmd.Cmd

2010-01-06 Thread Georg Brandl
Georg Brandl added the comment: Thanks for the patch; applied and fixed up a bit in r77332. -- nosy: +georg.brandl resolution: -> accepted status: open -> closed ___ Python tracker

[issue5954] PyFrame_GetLineNumber

2010-01-06 Thread Georg Brandl
Georg Brandl added the comment: This was merged in r74132. -- nosy: +georg.brandl status: open -> closed ___ Python tracker ___ ___ Py

[issue5959] PyCode_NewEmpty

2010-01-06 Thread Georg Brandl
Georg Brandl added the comment: PyCode_NewEmpty has been merged in r74132. -- nosy: +georg.brandl status: open -> closed ___ Python tracker ___ __

[issue6067] make error

2010-01-06 Thread Georg Brandl
Georg Brandl added the comment: Closing due to lack of response. -- nosy: +georg.brandl resolution: -> works for me status: open -> closed ___ Python tracker ___ ___

[issue6299] pyexpat build failure on Solaris 10 for 2.6.1/2.6.2

2010-01-06 Thread Tim Mooney
Tim Mooney added the comment: This still happens in 2.6.3 and 2.6.4 so I spent some time looking at it. It's happening because of a combination of issues, but ultimately it's because python's build isn't making certain that it's including its private copy of expat.h and expat_external.h. Bas

[issue7601] Installation - 2 tests failed: test_cmd_line test_xmlrpc

2010-01-06 Thread Ezio Melotti
Ezio Melotti added the comment: Thanks to you for the report :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue7601] Installation - 2 tests failed: test_cmd_line test_xmlrpc

2010-01-06 Thread Jozef Gáborík
Jozef Gáborík added the comment: Thank you! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue7633] decimal.py: type conversion in context methods

2010-01-06 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the missing divmod docstring, too: I've applied this separately, partly because it needs to go into 2.6 and 3.1 as well as 2.7 and 3.2, and partly as an excuse to check that the new py3k-cdecimal branch is set up correctly. See revisions r77324 t

[issue5368] curses patch add color_set and wcolor_set , and addchstr family of functions

2010-01-06 Thread A.M. Kuchling
Changes by A.M. Kuchling : -- assignee: georg.brandl -> akuchling ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7627] mailbox.MH.remove() lock handling is broken

2010-01-06 Thread A.M. Kuchling
Changes by A.M. Kuchling : -- assignee: -> akuchling nosy: +akuchling ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue7640] buffered io seek() buggy

2010-01-06 Thread Pascal Chambon
Pascal Chambon added the comment: Well, here is a patch for the seek() methods of io module, in python2.6 maintenance branch. Finally, I've only backported some assertions and the offset stuffs - I'm not comfortable enough about recent io refactorings to do more (it changed pretty quickly whi

[issue7644] bug in nntplib.body() method with possible fix

2010-01-06 Thread R. David Murray
R. David Murray added the comment: ('crash' is for the interpreter crashing) Unfortunately there currently are no unit tests for nntplib. Unless someone feels like creating an nntp test framework we may have to commit this fix without a test. -- keywords: +easy nosy: +r.david.murray

[issue7640] buffered io seek() buggy

2010-01-06 Thread Pascal Chambon
Pascal Chambon added the comment: Hum, with a selective merge (tortoiseSVN makes it easy), backporting _pyio should be doable in a decent time. Triaging pertinent tests should be more brain damaging :p I'm looking at this. -- ___ Python tracker

[issue7633] decimal.py: type conversion in context methods

2010-01-06 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the patch! Rather than using the Decimal constructor, I think you should convert use _convert_other(..., raiseit=True): the Decimal constructor converts strings and tuples, as well as ints and longs, while _convert_other only converts ints and lo

[issue7640] buffered io seek() buggy

2010-01-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > So concerning python2.6, isn't that just possible to backport _pyio > (and its test suite) to it (renamed as io.py) ? I would not be against it, but someone has to provide a patch. The current _pyio.py might rely on other new behaviour of 2.7, so perhaps it w

[issue7640] buffered io seek() buggy

2010-01-06 Thread Pascal Chambon
Pascal Chambon added the comment: My bad, I had looked at _buffered_raw_seek, not buffered_seek >_< Indeed, the code is OK in both trunk _io an _pyio modules. And the SEEK_CUR flag (value : 1) seems more than sufficiently tested in test_io actually, for example in the function write_ops() : htt

[issue7644] bug in nntplib.body() method with possible fix

2010-01-06 Thread Michael Mullins
Changes by Michael Mullins : -- components: +Library (Lib) type: -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue7644] bug in nntplib.body() method with possible fix

2010-01-06 Thread Michael Mullins
New submission from Michael Mullins : When using NNTP.body(id,file) I get the following repeatable error: Traceback (most recent call last): File "", line 1, in File "nntplib.py", line 436, in body return self.artcmd('BODY {0}'.format(id), file) File "nntplib.py", line 410, in artcmd

[issue7643] What is an ASCII linebreak?

2010-01-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Florent Xicluna wrote: > > New submission from Florent Xicluna : > > Bytes objects and Unicode objects do not agree on ASCII linebreaks. > > ## Python 2 > > for s in '\x0a\x0d\x1c\x1d\x1e': > print u'a{}b'.format(s).splitlines(1), 'a{}b'.format(s).spli

[issue7643] What is an ASCII linebreak?

2010-01-06 Thread Florent Xicluna
New submission from Florent Xicluna : Bytes objects and Unicode objects do not agree on ASCII linebreaks. ## Python 2 for s in '\x0a\x0d\x1c\x1d\x1e': print u'a{}b'.format(s).splitlines(1), 'a{}b'.format(s).splitlines(1) # [u'a\n', u'b'] ['a\n', 'b'] # [u'a\r', u'b'] ['a\r', 'b'] # [u'a\x1c'