[issue7643] What is an ASCII linebreak?

2010-01-06 Thread Florent Xicluna
New submission from Florent Xicluna la...@yahoo.fr: 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',

[issue7643] What is an ASCII linebreak?

2010-01-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Florent Xicluna wrote: New submission from Florent Xicluna la...@yahoo.fr: 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),

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

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

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

2010-01-06 Thread Michael Mullins
Changes by Michael Mullins pabloonbr...@gmail.com: -- components: +Library (Lib) type: - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7644 ___

[issue7640] buffered io seek() buggy

2010-01-06 Thread Pascal Chambon
Pascal Chambon chambon.pas...@gmail.com 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

[issue7640] buffered io seek() buggy

2010-01-06 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

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

2010-01-06 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

[issue7640] buffered io seek() buggy

2010-01-06 Thread Pascal Chambon
Pascal Chambon chambon.pas...@gmail.com 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. --

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

2010-01-06 Thread R. David Murray
R. David Murray rdmur...@bitdance.com 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

[issue7640] buffered io seek() buggy

2010-01-06 Thread Pascal Chambon
Pascal Chambon chambon.pas...@gmail.com 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

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

2010-01-06 Thread A.M. Kuchling
Changes by A.M. Kuchling li...@amk.ca: -- assignee: - akuchling nosy: +akuchling ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7627 ___ ___

[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 li...@amk.ca: -- assignee: georg.brandl - akuchling ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5368 ___ ___

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

2010-01-06 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

[issue7601] Installation - 2 tests failed: test_cmd_line test_xmlrpc

2010-01-06 Thread Jozef Gáborík
Jozef Gáborík jozef.gabo...@gmail.com added the comment: Thank you! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7601 ___ ___ Python-bugs-list

[issue7601] Installation - 2 tests failed: test_cmd_line test_xmlrpc

2010-01-06 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Thanks to you for the report :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7601 ___

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

2010-01-06 Thread Tim Mooney
Tim Mooney enchan...@users.sourceforge.net 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

[issue6067] make error

2010-01-06 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Closing due to lack of response. -- nosy: +georg.brandl resolution: - works for me status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6067

[issue5959] PyCode_NewEmpty

2010-01-06 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: PyCode_NewEmpty has been merged in r74132. -- nosy: +georg.brandl status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5959

[issue5954] PyFrame_GetLineNumber

2010-01-06 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: This was merged in r74132. -- nosy: +georg.brandl status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5954 ___

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

2010-01-06 Thread Georg Brandl
Georg Brandl ge...@python.org 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 rep...@bugs.python.org

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

2010-01-06 Thread Georg Brandl
Georg Brandl ge...@python.org 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

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

2010-01-06 Thread Juan José Conti
Juan José Conti jjco...@gmail.com 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

[issue7645] test_distutils fails on Windows XP

2010-01-06 Thread Austin English
New submission from Austin English austinenglish+pyt...@gmail.com: 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

[issue7646] test_telnetlib fails in Windows XP

2010-01-06 Thread Austin English
New submission from Austin English austinenglish+pyt...@gmail.com: 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:

[issue7646] test_telnetlib fails in Windows XP

2010-01-06 Thread Austin English
Changes by Austin English austinenglish+pyt...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7646 ___ ___

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

2010-01-06 Thread R. David Murray
R. David Murray rdmur...@bitdance.com 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 rep...@bugs.python.org

[issue6939] shadows around the io truncate() semantics

2010-01-06 Thread Pascal Chambon
Pascal Chambon chambon.pas...@gmail.com 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:

[issue7647] Add statvfs flags to the posix module

2010-01-06 Thread Adam Jackson
New submission from Adam Jackson a...@redhat.com: 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

[issue7647] Add statvfs flags to the posix module

2010-01-06 Thread Adam Jackson
Changes by Adam Jackson a...@redhat.com: -- type: - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7647 ___ ___ Python-bugs-list

[issue7647] Add statvfs flags to the posix module

2010-01-06 Thread Dave Malcolm
Changes by Dave Malcolm dmalc...@redhat.com: -- nosy: +dmalcolm ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7647 ___ ___ Python-bugs-list

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

2010-01-06 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr 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

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

2010-01-06 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

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

2010-01-06 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com 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

[issue7645] test_distutils fails on Windows XP

2010-01-06 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7645 ___ ___ Python-bugs-list

[issue7645] test_distutils fails on Windows XP

2010-01-06 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- assignee: - tarek components: +Distutils priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7645 ___

[issue6939] shadows around the io truncate() semantics

2010-01-06 Thread Pascal Chambon
Pascal Chambon chambon.pas...@gmail.com added the comment: Whoups - I forgot to bugfix as well the _bytesio classes... let's just forget about the previous patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6939

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

2010-01-06 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr added the comment: +1 to remove this boring cPickle message. cStringIO do not print such messages. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7092 ___

[issue6939] shadows around the io truncate() semantics

2010-01-06 Thread Pascal Chambon
Pascal Chambon chambon.pas...@gmail.com 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

[issue6939] shadows around the io truncate() semantics

2010-01-06 Thread Pascal Chambon
Pascal Chambon chambon.pas...@gmail.com 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

[issue7319] Silence DeprecationWarning by default

2010-01-06 Thread Brian Curtin
Brian Curtin cur...@acm.org 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

[issue3660] reference leaks in test_distutils

2010-01-06 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: This issue has been fixed. -- nosy: +ezio.melotti resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

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

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

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

2010-01-06 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- components: +Tests keywords: +easy nosy: +orsenthil priority: - low type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7648

[issue7643] What is an ASCII linebreak?

2010-01-06 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk 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

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

2010-01-06 Thread Ezio Melotti
New submission from Ezio Melotti ezio.melo...@gmail.com: 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' %

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

2010-01-06 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

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

2010-01-06 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7649 ___ ___ Python-bugs-list mailing

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

2010-01-06 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: This looks like a signed vs. unsigned char problem. What platform are you on? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7649 ___

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

2010-01-06 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +doerwalter ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7649 ___ ___ Python-bugs-list mailing

[issue7650] test_uuid is invalid

2010-01-06 Thread Austin English
New submission from Austin English austinenglish+pyt...@gmail.com: 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

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

2010-01-06 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

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

2010-01-06 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

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

2010-01-06 Thread Eric Smith
Eric Smith e...@trueblade.com 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 Eric Smith
Changes by Eric Smith e...@trueblade.com: -- keywords: +easy priority: high - normal stage: test needed - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7649 ___

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

2010-01-06 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: 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

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

2010-01-06 Thread Brian Curtin
Brian Curtin cur...@acm.org 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:

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

2010-01-06 Thread Michael Mullins
Michael Mullins pabloonbr...@gmail.com 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 +

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

2010-01-06 Thread Brian Curtin
Changes by Brian Curtin cur...@acm.org: -- stage: - test needed versions: +Python 2.7, Python 3.2 -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1034 ___

[issue7319] Silence DeprecationWarning by default

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

[issue7319] Silence DeprecationWarning by default

2010-01-06 Thread Brett Cannon
Brett Cannon br...@python.org 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 rep...@bugs.python.org