[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 la...@yahoo.fr 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,

[issue3132] implement PEP 3118 struct changes

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

[issue3132] implement PEP 3118 struct changes

2010-02-13 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Whoops. ctypes does have long double, of course. Apologies. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3132 ___

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

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

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

2010-02-13 Thread Santhosh Thottingal
Santhosh Thottingal santhosh.thottin...@gmail.com 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,

[issue5125] Strange locale problem with Python 3

2010-02-13 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org 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

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

2010-02-13 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org 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

[issue7920] urllib2.HTTPRedirectHandler incorrect redirect

2010-02-13 Thread Andres Riancho
Andres Riancho andresrian...@users.sourceforge.net 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

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

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

[issue3475] _elementtree.c import can fail silently

2010-02-13 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: -- dependencies: +Update ElementTree with upstream changes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3475 ___

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

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

[issue1538691] Patch cElementTree to export CurrentLineNumber

2010-02-13 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: -- dependencies: +Update ElementTree with upstream changes versions: +Python 3.2 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1538691

[issue3475] _elementtree.c import can fail silently

2010-02-13 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: -- nosy: +flox priority: - normal type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3475 ___

[issue1538691] Patch cElementTree to export CurrentLineNumber

2010-02-13 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1538691 ___ ___ Python-bugs-list mailing

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

2010-02-13 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1745 ___ ___ Python-bugs-list mailing list

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

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

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

2010-02-13 Thread Florent Xicluna
New submission from Florent Xicluna la...@yahoo.fr: This crash is sporadic on some buildbots where _curses is not built: test_capi XXX undetected error test test_capi crashed -- class 'ImportError': No module named datetime Note: the changeset r76810 did not fix the issue. It can be

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

2010-02-13 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: -- components: +Tests ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7924 ___ ___ Python-bugs-list

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

2010-02-13 Thread Beau
New submission from Beau beaumarti...@gmail.com: 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

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

2010-02-13 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr 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:

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

2010-02-13 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: To reproduce: add a typo on _curses on line 1666. Of what file? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7924 ___

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

2010-02-13 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr 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); } +

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

2010-02-13 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7924 ___ ___

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

2010-02-13 Thread Larry Hastings
Larry Hastings la...@hastings.org 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:

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

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

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

2010-02-13 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: -- priority: - normal stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7925 ___ ___

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

2010-02-13 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: -- stage: needs patch - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7925 ___ ___

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

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

[issue5125] Strange locale problem with Python 3

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

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

2010-02-13 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr 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 benja...@python.org: -- assignee: georg.brandl - vinay.sajip nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7923 ___

[issue7826] support caching for 2to3

2010-02-13 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: 2010/2/11 Brian Harring rep...@bugs.python.org: Brian Harring ferri...@gmail.com 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

[issue7921] Some sqlite3 Connection methods point to themselves

2010-02-13 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com 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

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

2010-02-13 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com 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

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

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

[issue6820] Redefinition of HAVE_STRFTIME can cause compiler errors.

2010-02-13 Thread Braden McDaniel
Braden McDaniel bra...@endoframe.com 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.,