[issue7647] Add statvfs flags to the posix module

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

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

2010-01-09 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, added Python in r77382, r77383. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7422 ___

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

2010-01-09 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7441 ___ ___ Python-bugs-list

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

2010-01-09 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Can this be closed? -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7498 ___

[issue7647] Add statvfs flags to the posix module

2010-01-09 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de 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

[issue7647] Add statvfs flags to the posix module

2010-01-09 Thread Georg Brandl
Georg Brandl ge...@python.org 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 rep...@bugs.python.org http://bugs.python.org/issue7647

[issue7507] pipes.quote does not correctly escape !

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

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

2010-01-09 Thread Walter Dörwald
Walter Dörwald wal...@livinglogic.de 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

[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 rdmur...@bitdance.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7498 ___ ___

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

2010-01-09 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: This can wait. -- priority: release blocker - deferred blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7092 ___

[issue7559] TestLoader.loadTestsFromName swallows import errors

2010-01-09 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Wouldn't this be a backwards incompatible change of tested behaviour though? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7559

[issue7632] dtoa.c: oversize b in quorem

2010-01-09 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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 rep...@bugs.python.org

[issue7632] dtoa.c: oversize b in quorem

2010-01-09 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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 rep...@bugs.python.org

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

2010-01-09 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com 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

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

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

[issue7559] TestLoader.loadTestsFromName swallows import errors

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

[issue7559] TestLoader.loadTestsFromName swallows import errors

2010-01-09 Thread Michael Foord
Changes by Michael Foord mich...@voidspace.org.uk: -- assignee: - michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7559 ___ ___

[issue7662] time.utcoffset(dst=true)

2010-01-09 Thread anatoly techtonik
New submission from anatoly techtonik techto...@gmail.com: 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)

[issue6523] smtplib exception smtp.connect TypeError encode_plain

2010-01-09 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- priority: - normal resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - smtplib is broken in Python3 ___ Python tracker rep...@bugs.python.org

[issue7662] time.utcoffset()

2010-01-09 Thread anatoly techtonik
Changes by anatoly techtonik techto...@gmail.com: -- title: time.utcoffset(dst=true) - time.utcoffset() ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7662 ___

[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 rdmur...@bitdance.com 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

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

2010-01-09 Thread Nick Bastin
Nick Bastin nick.bas...@gmail.com 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

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

2010-01-09 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de 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

[issue7532] Extended slicing with classic class behaves strangely

2010-01-09 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Tests applied to trunk in r77391. Are you interested in producing a py3k version of the patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7532

[issue7478] _sqlite3 doesn't catch PyDict_SetItem error

2010-01-09 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: So, would this fix be part of python 2.7? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7478 ___

[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 dicki...@gmail.com: -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3366 ___ ___

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

2010-01-09 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4294 ___ ___

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

2010-01-09 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- priority: deferred blocker - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7092 ___

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

2010-01-09 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Committed in r77394. Thank you for the good reviews! -- resolution: - accepted stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

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

2010-01-09 Thread Christophe Simonis
Christophe Simonis simonis.christo...@gmail.com 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

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

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

[issue7662] time.utcoffset()

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

[issue3783] dbm.sqlite proof of concept

2010-01-09 Thread Runar Tenfjord
Runar Tenfjord runar.tenfj...@gmail.com 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

[issue6688] Optimize PyBytes_FromObject.

2010-01-09 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Committed in r77398. -- resolution: - accepted stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6688

[issue7532] Extended slicing with classic class behaves strangely

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

[issue7532] Extended slicing with classic class behaves strangely

2010-01-09 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: Added file: http://bugs.python.org/file15802/issue7532_bytearray.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7532 ___

[issue7507] pipes.quote does not correctly escape !

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

[issue7532] Extended slicing with classic class behaves strangely

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

[issue7532] Extended slicing with classic class behaves strangely

2010-01-09 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: Added file: http://bugs.python.org/file15804/issue7532_wontfix_tests_py3k.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7532 ___

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

2010-01-09 Thread Nick Bastin
Nick Bastin nick.bas...@gmail.com 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 rep...@bugs.python.org

[issue2335] Backport set literals

2010-01-09 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

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

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

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

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

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

2010-01-09 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr 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 rep...@bugs.python.org

[issue7643] What is an ASCII linebreak?

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

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

2010-01-09 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: This issue was fixed by r68768 for issue #3321. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3311 ___

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

2010-01-09 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- resolution: - fixed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3311 ___ ___

[issue7643] What is an ASCII linebreak?

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

[issue5683] Speed up cPickle's pickling generally

2010-01-09 Thread Skip Montanaro
Skip Montanaro s...@pobox.com 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

[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen
Changes by Richard Hansen rhan...@bbn.com: Removed file: http://bugs.python.org/file15729/unicode_escape_single_and_double_quotes.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7615 ___

[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen
Changes by Richard Hansen rhan...@bbn.com: Removed file: http://bugs.python.org/file15771/unicode_escape_reorg.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7615 ___

[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen
Changes by Richard Hansen rhan...@bbn.com: Removed file: http://bugs.python.org/file15774/unicode_escape_tests.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7615 ___

[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen
Changes by Richard Hansen rhan...@bbn.com: Removed file: http://bugs.python.org/file15775/raw_unicode_escape_tests.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7615 ___

[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen
Richard Hansen rhan...@bbn.com 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

[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen
Richard Hansen rhan...@bbn.com 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

[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen
Richard Hansen rhan...@bbn.com 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

[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen
Richard Hansen rhan...@bbn.com 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

[issue7507] pipes.quote does not correctly escape !

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

[issue7615] unicode_escape codec does not escape quotes

2010-01-09 Thread Richard Hansen
Richard Hansen rhan...@bbn.com 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

[issue4757] reject unicode in zlib

2010-01-09 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The patch was committed to py3k and 3.1. Thank you! r76836 and r76838 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4757

[issue5671] Speed up pickling of lists in cPickle

2010-01-09 Thread Skip Montanaro
Skip Montanaro s...@pobox.com 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

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

2010-01-09 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: LGTM. Nothing is quite as satisfying as simply deleting a bunch of logic/lines. -- nosy: +skip.montanaro ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5372

[issue7319] Silence DeprecationWarning by default

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

[issue7455] cPickle: stack underflow in load_pop()

2010-01-09 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Committed in all four branches. trunk: r77352 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7455 ___

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

2010-01-09 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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 rep...@bugs.python.org

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

2010-01-09 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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

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

2010-01-09 Thread Brett Cannon
Brett Cannon br...@python.org 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 rep...@bugs.python.org wrote: Éric Araujo mer...@netwok.org added the

[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 exar...@divmod.com: 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