[issue7712] Add a context manager to change cwd in test.test_support and run the test suite in a temp dir.

2010-02-13 Thread Florent Xicluna
Florent Xicluna added the comment: "Complex is better than complicated... Special cases aren't special enough to break the rules." The module "regrtest" is complex enough. We don't need to keep useless hacks inside. It would be more interesting to replace the hack with some words, or an asse

[issue3132] implement PEP 3118 struct changes

2010-02-13 Thread Mark Dickinson
Mark Dickinson added the comment: Some of the proposed struct module additions look far from straightforward; I find that section of the PEP significantly lacking in details and motivation. "Unpacking a long-double will return a decimal object or a ctypes long-double." Returning a Decimal ob

[issue3132] implement PEP 3118 struct changes

2010-02-13 Thread Mark Dickinson
Mark Dickinson added the comment: Whoops. ctypes does have long double, of course. Apologies. -- ___ Python tracker ___ ___ Python-b

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

2010-02-13 Thread Mark Dickinson
Mark Dickinson added the comment: A couple of questions for the backport: (1) should the 'signed' parameter remain keyword-only in 2.7? I'd say yes, to avoid issues when forward-porting code from 2.7 to 3.2. On the other hand, 2.7 doesn't support keyword-only arguments at the Python level,

[issue6895] locale._parse_localename fails when localename does not contain encoding information

2010-02-13 Thread Santhosh Thottingal
Santhosh Thottingal added the comment: I see that the ml_IN added to locale.alias of X.org. lemburg, Do you think that my patch is still required as a fallback solution in case xx_YY mapping not found in locale.alias? If you can confirm that it is not required, we can close this bug. ---

[issue5125] Strange locale problem with Python 3

2010-02-13 Thread Stefan Krah
Stefan Krah added the comment: As an aside, I would not use atof(). Better use something like: char *end; f = strtod(input, &end); if (*end != '\0') { PyErr_Format(PyExc_ValueError, "Could not convert: %s", end); return NULL; } I've two questions: 1) Does the problem still appear in

[issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE

2010-02-13 Thread Stefan Krah
Stefan Krah added the comment: I have a patch that fixes this specific issue. Probably there are similar issues in other places, e.g. when LC_TIME and LC_CTYPE differ. I suspect that this is related: http://bugs.python.org/issue5905 -- keywords: +patch Added file: http://bugs.python.o

[issue7920] urllib2.HTTPRedirectHandler incorrect redirect

2010-02-13 Thread Andres Riancho
Andres Riancho added the comment: The problem is still there in 2.7: >>> urlparts = urlparse.urlparse('C:\\boot.ini') >>> urlparts ('c', '', '\\boot.ini', '', '', '') >>> if not urlparts.path: ... urlparts = list(urlparts) ... urlparts[2] = "/" ... >>> urlparts ('c', '', '\\boot.ini',

[issue7923] StreamHandler and FileHandler located in logging, not in logging.handlers

2010-02-13 Thread Kirill
New submission from Kirill : Index: library/logging.rst === --- library/logging.rst (revision 78171) +++ library/logging.rst (working copy) @@ -1659,7 +1659,7 @@ StreamHandler ^ -.. module:: logging.handlers +.. curren

[issue3475] _elementtree.c import can fail silently

2010-02-13 Thread Florent Xicluna
Changes by Florent Xicluna : -- dependencies: +Update ElementTree with upstream changes ___ Python tracker ___ ___ Python-bugs-list mai

[issue1745] Backport of PEP 3102 "keyword-only arguments" to 2.6

2010-02-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Mark Dickinson added the comment: > (1) should the 'signed' parameter remain keyword-only in 2.7? We should keep it as a keyword-only argument. Also, issue #1745 might bring keyword-only arguments to 2.7. > (2) When specifying the byteorder, is there a

[issue1538691] Patch cElementTree to export CurrentLineNumber

2010-02-13 Thread Florent Xicluna
Changes by Florent Xicluna : -- dependencies: +Update ElementTree with upstream changes versions: +Python 3.2 -Python 3.1 ___ Python tracker ___ ___

[issue3475] _elementtree.c import can fail silently

2010-02-13 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +flox priority: -> normal type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing

[issue1538691] Patch cElementTree to export CurrentLineNumber

2010-02-13 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +flox ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue1745] Backport of PEP 3102 "keyword-only arguments" to 2.6

2010-02-13 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mail

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

2010-02-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Mark Dickinson added the comment: > (1) should the 'signed' parameter remain keyword-only in 2.7? We should keep it as a keyword-only argument. Also, issue #1745 might bring keyword-only arguments to 2.7. > (2) When specifying the byteorder, is there a

[issue7924] test_capi crashes with misleading datetime ImportError when _curses is not built

2010-02-13 Thread Florent Xicluna
New submission from Florent Xicluna : This crash is sporadic on some buildbots where _curses is not built: test_capi XXX undetected error test test_capi crashed -- : No module named datetime Note: the changeset r76810 did not fix the issue. It can be reverted. The problem occurs during t

[issue7924] test_capi crashes with misleading datetime ImportError when _curses is not built

2010-02-13 Thread Florent Xicluna
Changes by Florent Xicluna : -- components: +Tests ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue7925] minidom: "TypeError: writexml() takes at most 5 positional arguments (6 given)"

2010-02-13 Thread Beau
New submission from Beau : When calling toprettyxml() from minidom.py, I get a TypeError stating that writexml() takes at most five positional arguments, but six are being passed. -- components: Library (Lib) messages: 99323 nosy: beaumartinez severity: normal status: open title: minido

[issue7924] test_capi crashes with misleading datetime ImportError when _curses is not built

2010-02-13 Thread Florent Xicluna
Florent Xicluna added the comment: The behaviour is weird. Use attached patch to reproduce this behaviour. ~ $ ./python -m test.regrtest -uall test_curses test_datetime test_curses test_curses skipped -- No module named _NO_curses test_datetime 1 test OK. 1 test skipped: test_curses Those

[issue7924] test_capi crashes with misleading datetime ImportError when _curses is not built

2010-02-13 Thread Larry Hastings
Larry Hastings added the comment: "To reproduce: add a typo on "_curses" on line 1666." Of what file? -- ___ Python tracker ___ ___ P

[issue7924] test_capi crashes with misleading datetime ImportError when _curses is not built

2010-02-13 Thread Florent Xicluna
Florent Xicluna added the comment: The simple fix: --- Modules/_testcapimodule.c (revision 78171) +++ Modules/_testcapimodule.c (working copy) @@ -1763,6 +1763,8 @@ Py_DECREF(object); Py_DECREF(module); } + else +

[issue7924] test_capi crashes with misleading datetime ImportError when _curses is not built

2010-02-13 Thread Florent Xicluna
Changes by Florent Xicluna : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue7924] test_capi crashes with misleading datetime ImportError when _curses is not built

2010-02-13 Thread Larry Hastings
Larry Hastings added the comment: Patch to make testcapsule clear import errors when testing. Sorry about the whitespace changes, but I outdented a bunch of code--I think it's clearer this way. -- Added file: http://bugs.python.org/file16223/lch.patch.trunk.py3k.r78149 _

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

2010-02-13 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Alexandre! Agreed on both points. I don't really want to allow u'big' and u'little', but I think that's just my laziness talking. (Apart from that, I have a working patch.) There's some precedent for not allowing the unicode versions: >>> float.__

[issue7925] minidom: "TypeError: writexml() takes at most 5 positional arguments (6 given)"

2010-02-13 Thread Florent Xicluna
Changes by Florent Xicluna : -- priority: -> normal stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue7925] minidom: "TypeError: writexml() takes at most 5 positional arguments (6 given)"

2010-02-13 Thread Florent Xicluna
Changes by Florent Xicluna : -- stage: needs patch -> test needed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7924] test_capi crashes with misleading datetime ImportError when _curses is not built

2010-02-13 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks both of you for (finally) tracking this down! I've applied flox's quick fix in r78172, and reverted the old attempted fix in r78173. Both merged to py3k in r78174. -- resolution: -> fixed stage: patch review -> committed/rejected status: open

[issue5125] Strange locale problem with Python 3

2010-02-13 Thread Mark Dickinson
Mark Dickinson added the comment: Actually, for Python 3.x, rather than using strtod directly it would be better to use the PyOS_string_to_double C-API function. That function is entirely locale-agnostic: it should behave identically to the float constructor. Python 3.0 is no longer support

[issue7925] minidom: "TypeError: writexml() takes at most 5 positional arguments (6 given)"

2010-02-13 Thread Florent Xicluna
Florent Xicluna added the comment: Please provide some test data, and describe which behavior you expect. -- components: +XML -Library (Lib) nosy: +flox resolution: -> works for me status: open -> pending ___ Python tracker

[issue7923] StreamHandler and FileHandler located in logging, not in logging.handlers

2010-02-13 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- assignee: georg.brandl -> vinay.sajip nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list

[issue7826] support caching for 2to3

2010-02-13 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2010/2/11 Brian Harring : > > Brian Harring added the comment: > > @benjamin: > > Tests can be written; the reason this patch doesn't bundle tests up front is > that I wasn't going to burn the time till I knew they were needed since I > expected the concep

[issue7921] Some sqlite3 Connection methods point to themselves

2010-02-13 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed in r78176 (trunk), r78177 (release26-maint), r78178 (py3k) and r78179 (release31-maint), thanks for the report and the patch! -- assignee: georg.brandl -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: patch review -> committed/rejec

[issue7888] turtle "settiltangle" should be marked deprecated, not "tiltangle"

2010-02-13 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed in r78180 (py3k) and r78181 (release31-maint), thanks for the report! -- assignee: georg.brandl -> ezio.melotti resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tra

[issue7926] Stray parentheses() in context manager "what's new" doc

2010-02-13 Thread Edward Welbourne
New submission from Edward Welbourne : http://docs.python.org/whatsnew/2.6.html#writing-context-managers penultimate item in "A high-level explanation": If BLOCK raises an exception, the __exit__(type, value, traceback)() is called has extra () after the argument list - this appears to say tha

[issue6820] Redefinition of HAVE_STRFTIME can cause compiler errors.

2010-02-13 Thread Braden McDaniel
Braden McDaniel added the comment: In general, this does *not* play well with libraries that define the same symbols. It is not correct to install the AC_CONFIG_HEADERS. Any macros in an installed configuration header need to be namespaced per-project; e.g., PYTHON_HAVE_STRFTIME. --