[issue7663] UTF-16 build incorrectly translates cases for non-BMP code points

2010-01-09 Thread Adam Olsen
Adam Olsen added the comment: See also issue5127. -- nosy: +Rhamphoryncus ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue7663] UTF-16 build incorrectly translates cases for non-BMP code points

2010-01-09 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : This issue may extend beyond just unicode.upper() and unicode.lower(), but it's very clear with these two methods, at least. For example, consider DESERET SMALL LETTER EW. On a UTF-16 build, calling upper on a string containing this doesn't change it

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

2010-01-09 Thread Brett Cannon
Brett Cannon added the comment: The documentation is still accurate. The translation is literal so there no shift except where the unpacking exception occurs. On Sat, Jan 9, 2010 at 20:13, Éric Araujo wrote: > > Éric Araujo added the comment: > > Hello > > I read the diff for revision 7731

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

2010-01-09 Thread Éric Araujo
Éric Araujo added the comment: Hello I read the diff for revision 77310 and noticed that arguments with parens (I mean things like ``def spam((x, y))``, forgot the name) were replaced by grab-all arguments that are unpacked later (``def spam(x_y)``). I was wondering whether the documentation fo

[issue7458] crash in str.rfind() with an invalid start value

2010-01-09 Thread STINNER Victor
STINNER Victor added the comment: > Ok, I've committed the tests after the patch for issue7462 removed the > offending code. Thanks! r77241 and r77247 in trunk -- ___ Python tracker __

[issue7455] cPickle: stack underflow in load_pop()

2010-01-09 Thread STINNER Victor
STINNER Victor added the comment: > Committed in all four branches. trunk: r77352 -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue7319] Silence DeprecationWarning by default

2010-01-09 Thread Brett Cannon
Brett Cannon added the comment: Committed in r77402. I am going to wait to see if any doc changes occur before I commit in py3k. For historical reasons, here is the thread that hashed out the reasonsing: http://mail.python.org/pipermail/stdlib-sig/2009-November/000789.html And thanks to ever

[issue5372] Distutils inappropriately reuses .o files between extension modules

2010-01-09 Thread Skip Montanaro
Skip Montanaro added the comment: LGTM. Nothing is quite as satisfying as simply deleting a bunch of logic/lines. -- nosy: +skip.montanaro ___ Python tracker ___ ___

[issue5671] Speed up pickling of lists in cPickle

2010-01-09 Thread Skip Montanaro
Skip Montanaro added the comment: Still applies cleanly (with a little fuzz) to the trunk after applying the issue 5683 patch. Tests all still pass (including xpickle w/ 2.4, 2.5, 2.6 available). -- nosy: +skip.montanaro ___ Python tracker

[issue4757] reject unicode in zlib

2010-01-09 Thread STINNER Victor
STINNER Victor added the comment: > The patch was committed to py3k and 3.1. Thank you! r76836 and r76838 -- ___ Python tracker ___ _

[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen
Richard Hansen added the comment: Attaching a patch that eliminates duplicate code: * Merge unicodeescape_string(), PyUnicode_EncodeRawUnicodeEscape(), and modified_EncodeRawUnicodeEscape() into one function called _PyUnicode_EncodeCustomUnicodeEscape(). This patch is meant to be applied af

[issue7507] pipes.quote does not correctly escape !

2010-01-09 Thread R. David Murray
R. David Murray added the comment: The patch looks good to me, except that one test fails. You seem to have inadvertently deleted the '=' from the safe chars list in the test. We should also add a test for the '' case. And presumably the docs requested in the other ticket... -- pri

[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen
Richard Hansen added the comment: Attaching a patch for another issue discovered while looking at the code: * The Unicode escape encoders now check to make sure that the provided size is nonnegative. * C API documentation updated to make it clear that size must be nonnegative. This patch i

[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen
Richard Hansen added the comment: Attaching a patch for an issue discovered while looking at the code: * The UTF-16 decode logic in the Unicode escape encoders no longer reads past the end of the provided Py_UNICODE buffer if the last character's value is between 0xD800 and 0xDC00. This pat

[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen
Richard Hansen added the comment: Attaching a minimal patch: * unicode_escape now backslash-escapes single and double quotes * raw_unicode_escape now unicode-escapes single and double quotes * raw_unicode_escape now unicode-escapes backslashes * removes pickle's escaping workarounds so t

[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen
Richard Hansen added the comment: Attaching updated unit tests. The tests now check to make sure that single and double quotes are escaped. -- Added file: http://bugs.python.org/file15809/unicode_escape_tests.patch ___ Python tracker

[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen
Changes by Richard Hansen : Removed file: http://bugs.python.org/file15775/raw_unicode_escape_tests.patch ___ Python tracker ___ ___ Python-bug

[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen
Changes by Richard Hansen : Removed file: http://bugs.python.org/file15774/unicode_escape_tests.patch ___ Python tracker ___ ___ Python-bugs-li

[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen
Changes by Richard Hansen : Removed file: http://bugs.python.org/file15771/unicode_escape_reorg.patch ___ Python tracker ___ ___ Python-bugs-li

[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen
Changes by Richard Hansen : Removed file: http://bugs.python.org/file15729/unicode_escape_single_and_double_quotes.patch ___ Python tracker ___ __

[issue5683] Speed up cPickle's pickling generally

2010-01-09 Thread Skip Montanaro
Skip Montanaro added the comment: Updated the patch against the latest version of cPickle.c (r77393). All tests pass on my Mac. -- nosy: +skip.montanaro Added file: http://bugs.python.org/file15808/cPickle.-r77393.patch ___ Python tracker

[issue7643] What is an ASCII linebreak?

2010-01-09 Thread Florent Xicluna
Florent Xicluna added the comment: Here is draft of the patch to do what is proposed by Marc André on msg97440 (add VT and FF). Additionnally I upgraded the UCD 5.1 -> 5.2. The implementation uses field 16 as defined in "py3k" implementation of "makeunicodedata.py". It should minimize differe

[issue3311] block operation on closed socket/pipe for multiprocessing

2010-01-09 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue3311] block operation on closed socket/pipe for multiprocessing

2010-01-09 Thread STINNER Victor
STINNER Victor added the comment: This issue was fixed by r68768 for issue #3321. -- status: open -> closed ___ Python tracker ___ ___

[issue7643] What is an ASCII linebreak?

2010-01-09 Thread Florent Xicluna
Changes by Florent Xicluna : -- keywords: +patch Added file: http://bugs.python.org/file15806/issue7643_remove_deprecation.diff ___ Python tracker ___

[issue3599] test_pydoc after test_urllib2 causes exception in Popen.__del__

2010-01-09 Thread Florent Xicluna
Florent Xicluna added the comment: Since nobody (and no bot) reported this error in twelve months, we may close it. -- resolution: -> works for me status: open -> pending ___ Python tracker ___

[issue7544] Fatal error on thread creation in low memory condition

2010-01-09 Thread STINNER Victor
STINNER Victor added the comment: Here I come with a patch! nirai idea was the good one: prealloc PyThreadState before creating the thread. Raise a MemoryError if the allocation fail, instead of raising a *fatal* Python error. Patch is quite simple and allow better error handling. --

[issue7607] stringlib fastsearch could be improved on 64-bit builds

2010-01-09 Thread Florent Xicluna
Florent Xicluna added the comment: Proposed in the patch for issue #7622. -- stage: needs patch -> superseder: -> [patch] improve unicode methods: split() rsplit() and replace() ___ Python tracker ___

[issue2335] Backport set literals

2010-01-09 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: It been a long week, but this patch is now committed as r77400. -- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue4366] cannot find -lpythonX.X when buinding Python on FreeBSD

2010-01-09 Thread Nick Bastin
Nick Bastin added the comment: NetBSD is netbsd* and DragonFly is dragonfly* (currently dragonfly2, although I suspect in this way dragonfly1 was identical, if it ever existed). -- ___ Python tracker _

[issue7532] Extended slicing with classic class behaves strangely

2010-01-09 Thread Florent Xicluna
Changes by Florent Xicluna : Added file: http://bugs.python.org/file15804/issue7532_wontfix_tests_py3k.diff ___ Python tracker ___ ___ Python-b

[issue7532] Extended slicing with classic class behaves strangely

2010-01-09 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file15801/issue7532_wontfix_tests_py3k.diff ___ Python tracker ___ ___ Python

[issue7507] pipes.quote does not correctly escape !

2010-01-09 Thread Georg Brandl
Georg Brandl added the comment: Really adding the patch now. -- keywords: +patch Added file: http://bugs.python.org/file15803/pipes.diff ___ Python tracker ___ __

[issue7532] Extended slicing with classic class behaves strangely

2010-01-09 Thread Florent Xicluna
Changes by Florent Xicluna : Added file: http://bugs.python.org/file15802/issue7532_bytearray.diff ___ Python tracker ___ ___ Python-bugs-list

[issue7532] Extended slicing with classic class behaves strangely

2010-01-09 Thread Florent Xicluna
Florent Xicluna added the comment: Here it is, with some cleaning and simple Bytes/Bytearray tests. And Bytearray tests backported to 2.7. -- Added file: http://bugs.python.org/file15801/issue7532_wontfix_tests_py3k.diff ___ Python tracker

[issue6688] Optimize PyBytes_FromObject.

2010-01-09 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Committed in r77398. -- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue3783] dbm.sqlite proof of concept

2010-01-09 Thread Runar Tenfjord
Runar Tenfjord added the comment: Multi threading: According to http://www.sqlite.org/cvstrac/wiki?p=MultiThreading we need to keep a connection for each thread to support multi threaded access to the database. I came across this when deploying an application in a multi threaded environment.

[issue7662] time.utcoffset()

2010-01-09 Thread Brian Curtin
Brian Curtin added the comment: I think this would be nice, but see msg97471 from your diff.py ISO timestamp issue. time.daylight should probably be time.localtime().tm_isdst. -- nosy: +brian.curtin type: -> feature request versions: -Python 3.1 _

[issue7582] [patch] diff.py to use iso timestamp

2010-01-09 Thread Brian Curtin
Brian Curtin added the comment: Using time.daylight is incorrect. time.daylight specifies the number of hours that the daylight offset is, not a flag to specify whether or not daylight savings time is in effect. Steven's suggestion of using time.localtime().tm_isdst seems to be the better ro

[issue4331] Can't use _functools.partial() created function as method

2010-01-09 Thread Christophe Simonis
Christophe Simonis added the comment: I followed the advice of Raymond and implement a descriptor on partial. -- keywords: +patch Added file: http://bugs.python.org/file15800/issue4331.patch ___ Python tracker

[issue1023290] Conversion of longs to bytes and vice-versa.

2010-01-09 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Committed in r77394. Thank you for the good reviews! -- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed ___ Python tracker __

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

2010-01-09 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- priority: deferred blocker -> release blocker ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue4294] Macros for PyLong: sign, number of digits, fits in an int

2010-01-09 Thread Mark Dickinson
Changes by Mark Dickinson : -- status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue3366] Add gamma function, error functions and other C99 math.h functions to math module

2010-01-09 Thread Mark Dickinson
Changes by Mark Dickinson : -- status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue7478] _sqlite3 doesn't catch PyDict_SetItem error

2010-01-09 Thread STINNER Victor
STINNER Victor added the comment: So, would this fix be part of python 2.7? -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue7532] Extended slicing with classic class behaves strangely

2010-01-09 Thread Mark Dickinson
Mark Dickinson added the comment: Tests applied to trunk in r77391. Are you interested in producing a py3k version of the patch? -- ___ Python tracker ___ _

[issue4366] cannot find -lpythonX.X when buinding Python on FreeBSD

2010-01-09 Thread Martin v . Löwis
Martin v. Löwis added the comment: configure.in has the same action for NetBSD*|FreeBSD*|DragonFly*, so I think distutils should parallel that. Not sure what sys.platform would be on the other BSDs, though. -- ___ Python tracker

[issue4366] cannot find -lpythonX.X when buinding Python on FreeBSD

2010-01-09 Thread Nick Bastin
Nick Bastin added the comment: A more appropriate patch should be (for 2.7 trunk - I'm grabbing a checkout of 3.2 trunk now): Index: build_ext.py === --- build_ext.py(revision 77388) +++ build_ext.py(working copy)

[issue6681] email.parser clips trailing \n of multipart/mixed part if part ends in \r\n

2010-01-09 Thread R. David Murray
R. David Murray added the comment: This turns out to be a duplicate of issue 5610, which has a better solution. -- resolution: -> duplicate stage: patch review -> committed/rejected status: open -> closed superseder: -> email feedparser.py CRLFLF bug: $ vs \Z

[issue7662] time.utcoffset()

2010-01-09 Thread anatoly techtonik
Changes by anatoly techtonik : -- title: time.utcoffset(dst=true) -> time.utcoffset() ___ Python tracker ___ ___ Python-bugs-list maili

[issue6523] smtplib exception smtp.connect TypeError encode_plain

2010-01-09 Thread R. David Murray
Changes by R. David Murray : -- priority: -> normal resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> smtplib is broken in Python3 ___ Python tracker ___

[issue7662] time.utcoffset(dst=true)

2010-01-09 Thread anatoly techtonik
New submission from anatoly techtonik : The proposal to add the function that will allow to get current UTC offset. Do we need a PEP for this one? def time.utcoffset(): """Return current UTC offset in seconds""" return -(time.altzone if time.daylight else time.timezone) -- componen

[issue7559] TestLoader.loadTestsFromName swallows import errors

2010-01-09 Thread Michael Foord
Changes by Michael Foord : -- assignee: -> michael.foord ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue7559] TestLoader.loadTestsFromName swallows import errors

2010-01-09 Thread Michael Foord
Michael Foord added the comment: I'm unhappy with a straight change in behaviour because it will break code that is currently catching AttributeError. A slightly less invasive change would be to raise an AttributeError if the module doesn't exist, otherwise letting the original error propagat

[issue6327] [mimetext] long lines get cut with exclamation mark and newline

2010-01-09 Thread R. David Murray
R. David Murray added the comment: Since there's no response I'm closing this as 'works for me'. -- nosy: +r.david.murray priority: -> normal resolution: -> works for me stage: -> committed/rejected ___ Python tracker

[issue7582] [patch] diff.py to use iso timestamp

2010-01-09 Thread anatoly techtonik
anatoly techtonik added the comment: New version detects DST using time.daylight flag. utcoffset = -(time.altzone if time.daylight else time.timezone) // 60 -- Added file: http://bugs.python.org/file15798/diff.py_iso_timestamps_true_with_dst.diff _

[issue7632] dtoa.c: oversize b in quorem

2010-01-09 Thread Mark Dickinson
Mark Dickinson added the comment: Here's the (rather crude) testing program that turned up these errors. -- Added file: http://bugs.python.org/file15797/test_dtoa.py ___ Python tracker _

[issue7632] dtoa.c: oversize b in quorem

2010-01-09 Thread Mark Dickinson
Mark Dickinson added the comment: Second patch, adding a fix for the rounding bug to the first patch. -- Added file: http://bugs.python.org/file15796/issue7632_v2.patch ___ Python tracker __

[issue7559] TestLoader.loadTestsFromName swallows import errors

2010-01-09 Thread Michael Foord
Michael Foord added the comment: Wouldn't this be a backwards incompatible change of tested behaviour though? -- ___ Python tracker ___ __

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

2010-01-09 Thread Benjamin Peterson
Benjamin Peterson added the comment: This can wait. -- priority: release blocker -> deferred blocker ___ Python tracker ___ ___ Python

[issue7498] test_multiprocessing test_rapid_restart fails if port 9999 already in use

2010-01-09 Thread R. David Murray
Changes by R. David Murray : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

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

2010-01-09 Thread Walter Dörwald
Walter Dörwald added the comment: IMHO this is the wrong approach. As Martin v. Löwis suggested here http://mail.python.org/pipermail/python-dev/2010-January/094841.html the best solution would be a new codec (which he named sniff), that autodetects the encoding on reading. This doesn't requ

[issue7507] pipes.quote does not correctly escape !

2010-01-09 Thread Georg Brandl
Georg Brandl added the comment: I'm attaching a patch that changes quote() logic. It also fixes #7476, the empty argument case. Strings with unsafe characters are now always quoted with single quotes. Single quotes themselves are replaced by a single quote in double quotes, so that te$t

[issue7647] Add statvfs flags to the posix module

2010-01-09 Thread Georg Brandl
Georg Brandl added the comment: Okay. Would it then make sense to migrate those constants in the stat module to posix, and deprecate the former? -- ___ Python tracker ___ _

[issue7647] Add statvfs flags to the posix module

2010-01-09 Thread Martin v . Löwis
Martin v. Löwis added the comment: I think having a stat module is a mistake in the first place. It's primary purpose (giving symbolic names to fields in a stat result) is out-of-date, now that we have named tuples. It's secondary purpose (collecting symbolic constants and macros around them)

[issue7498] test_multiprocessing test_rapid_restart fails if port 9999 already in use

2010-01-09 Thread Georg Brandl
Georg Brandl added the comment: Can this be closed? -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue7441] Py3.1: Fatal Python Error: Py_Initialize...unknown encoding: chcp 65001.

2010-01-09 Thread Georg Brandl
Changes by Georg Brandl : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue7422] Document inspect.get(full)argspec limitation to Python function

2010-01-09 Thread Georg Brandl
Georg Brandl added the comment: Thanks, added "Python" in r77382, r77383. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue7647] Add statvfs flags to the posix module

2010-01-09 Thread Georg Brandl
Georg Brandl added the comment: IMO these symbols should go to the "stat" module, not the "posix" module. However, that module is Python, so the values would need to be hardcoded. Do you know whether they are constant on all relevant systems? -- assignee: -> loewis nosy: +georg.bra