[issue9598] untabify.py fails on files that contain non-ascii characters

2010-09-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: >From IRC: Me: UTF-8 was not strictly valid in ANSI C comments, so it is a bug in untabify to assume UTF-8 in C files. Merwok: Works for me. I am lowering the priority because it looks like untabify does not fail on the current code base. I'll follow

[issue9769] PyUnicode_FromFormatV() doesn't handle non-ascii text correctly

2010-09-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: > > PyUnicode_FromFormat("%s", text) expects a utf-8 buffer. > Really? The *format* looks more like latin-1, right. But the payload of a "%s" item is decoded as utf-8. > I don't think that a C file calls PyErr_Format() or > PyUnicode_FromFormat(V)() wit

[issue9793] Typo fix in What's New for 3.2: dynmaic -> dynamic

2010-09-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: The sort of editing should be done *much* later. I expect to be updating the file every few days and occasionally running the out through a spelling and grammar checker. Right now, it's a work in progress that doesn't benefit from micro-edits. -- no

[issue9793] Typo fix in What's New for 3.2: dynmaic -> dynamic

2010-09-07 Thread Éric Araujo
Éric Araujo added the comment: Sorry about that. I wanted to give a quick response to Dag, so I grepped for other instances of the same typo and committed; it was hasty. -- ___ Python tracker _

[issue9598] untabify.py fails on files that contain non-ascii characters

2010-09-07 Thread Éric Araujo
Éric Araujo added the comment: Why would it be the job of untabify to report invalid non-ASCII characters in C files? -- ___ Python tracker ___ _

[issue9199] distutils upload command crashes when displaying server response

2010-09-07 Thread Éric Araujo
Éric Araujo added the comment: Fixed in py3k, 3.1, 2.7 (r84611 through r84616) and distutils2 (ea174f2c7d8e). Thanks for the report. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker

[issue9598] untabify.py fails on files that contain non-ascii characters

2010-09-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Sep 7, 2010 at 8:08 PM, Éric Araujo wrote: .. > Why would it be the job of untabify to report invalid non-ASCII characters in > C files? > Since untabify works by loading C code as text, it has to assume some encoding. Failing with uncaught dec

[issue9598] untabify.py fails on files that contain non-ascii characters

2010-09-07 Thread Éric Araujo
Éric Araujo added the comment: My real question was: Shouldn’t this be a VCS hook instead of untabify’s job? (or in addition to untabify if you insist) -- ___ Python tracker ___

[issue9424] Disable unittest.TestCase.assertEquals and assert_ during a regrtest run

2010-09-07 Thread Éric Araujo
Éric Araujo added the comment: See also #5846 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue9796] Add summary tables for unittest API

2010-09-07 Thread Éric Araujo
New submission from Éric Araujo : Suggestion from Raymond: Add a table summarizing all assert* methods of TestCase. I will make a patch in some days or weeks. I think I’ll also add one table for the most useful objects from a user viewpoint (Loader, TestCase, main). See the docs of itertools a

[issue9608] Re-phrase best way of using exceptions in doanddont.rst

2010-09-07 Thread Éric Araujo
Éric Araujo added the comment: Your rewrite makes the text much clearer in my opinion. Here are some nits for you to grind, cheers :) 1) I’d say “using a bare ``except:``” and maybe add an index entry for “bare except” referring to that section, to make indexing and maybe googling find this.

[issue4947] sys.stdout fails to use default encoding as advertised

2010-09-07 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +lemburg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue9788] atexit and execution order

2010-09-07 Thread Éric Araujo
Changes by Éric Araujo : -- assignee: -> eric.araujo components: +Documentation -Library (Lib) resolution: -> accepted stage: -> needs patch versions: +Python 2.7, Python 3.1 ___ Python tracker __

[issue9762] build failures

2010-09-07 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: What platform/OS is this happening on? I've tested the PEP 3149 patch on various Ubuntu, OS X, and Debian systems and never needed this. Not saying it's a bad patch, I just think there's something else environmental going on that I never saw for some reaso

[issue9786] Native TLS support for pthreads

2010-09-07 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: The code may need a little bit of extra work: The pthreads machine that I have to work with is a PS3 :). And, despite the documentation not saying, I suspect that pthread_getspecific() actually does mess with "errno", making it necessary to preserve "

[issue9598] untabify.py fails on files that contain non-ascii characters

2010-09-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Sep 7, 2010 at 8:31 PM, Éric Araujo wrote: .. > My real question was: Shouldn’t this be a VCS hook instead of untabify’s job? > (or in addition to untabify if you insist) > Yes, VCS hook makes sense (and may almost eliminate the need to handle

[issue9598] untabify.py fails on files that contain non-ascii characters

2010-09-07 Thread Éric Araujo
Éric Araujo added the comment: I agree with your reply (that’s what I meant with “works for me”, the question about untabify vs. hooks only occurred to me after our IRC exchange). -- ___ Python tracker ___

[issue9608] Re-phrase best way of using exceptions in doanddont.rst

2010-09-07 Thread R. David Murray
R. David Murray added the comment: (1) and (2) are good ideas. For (3), would it be clear enough if it read "``except:`` catches *all* exceptions, [...] and GeneratorExit (which is not an error and should not normally be caught by user code)." --

[issue7402] reduce() is an anti-example in "Idioms and Anti-Idioms"

2010-09-07 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue7402] Imrpove reduce example in doanddont.rst

2010-09-07 Thread Éric Araujo
Éric Araujo added the comment: I agree with Raymond that the example should be kept. We could add a comment explaining the difference with sum: reduce + operator.add works with all types. (sum would be marked up so that a link gets generated.) Is there a subsection about functional programmin

[issue7402] Improve reduce example in doanddont.rst

2010-09-07 Thread Éric Araujo
Changes by Éric Araujo : -- title: Imrpove reduce example in doanddont.rst -> Improve reduce example in doanddont.rst ___ Python tracker ___ _

[issue9608] Re-phrase best way of using exceptions in doanddont.rst

2010-09-07 Thread Éric Araujo
Éric Araujo added the comment: It would. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue4359] at runtime, distutils uses buildtime files

2010-09-07 Thread Éric Araujo
Éric Araujo added the comment: I think the future sysconfig module (http://bitbucket.org/tarek/distutils2/src/tip/docs/design/wiki.rst) addresses part of the issue: It will use a configparser file to store installation directories. There is nothing about other build-time variables, though; th

[issue6087] distutils.sysconfig.get_python_lib gives surprising result when used with a Python build

2010-09-07 Thread Éric Araujo
Éric Araujo added the comment: What ./configure line did you use? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue6114] distutils build_ext path comparison only based on strings

2010-09-07 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the report and patch. I just tested that When the executable itself is symlinked (not installed, just linked from an existing installation), sys.exec_prefix and sys.executable are different. This means that a unit test (to prevent regressions) will be

[issue6114] distutils build_ext path comparison only based on strings

2010-09-07 Thread Éric Araujo
Éric Araujo added the comment: symlinks are not supported at all on Windows before 3.2, so we’re good, except for cygwin. -- ___ Python tracker ___ _

[issue8420] Objects/setobject.c contains unsafe code

2010-09-07 Thread Éric Araujo
Changes by Éric Araujo : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue9261] include higher (../../) dirs fails

2010-09-07 Thread Éric Araujo
Changes by Éric Araujo : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue4459] bdist_rpm should enable --fix-python by default

2010-09-07 Thread Éric Araujo
Changes by Éric Araujo : -- resolution: -> rejected stage: -> committed/rejected status: pending -> closed ___ Python tracker ___ ___

[issue9796] Add summary tables for unittest API

2010-09-07 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue9752] MSVC Compiler warning in Python\import.c

2010-09-07 Thread Jon Anglin
Jon Anglin added the comment: Windows provides two versions of mkdir in direct.h: int mkdir(const char* dirname) int _mkdir(const char* dirname) The latter is the preferred function because it is conformant to the ISO C++ standard. As you can see, neither function has a mode parameter

[issue9752] MSVC Compiler warning in Python\import.c

2010-09-07 Thread Brian Curtin
Brian Curtin added the comment: What about using CreateDirectory? -- components: +Build nosy: +brian.curtin ___ Python tracker ___ ___

[issue9787] Release the TLS lock during allocations

2010-09-07 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: You're right. Added a new version of the patch. -- Added file: http://bugs.python.org/file18793/tlspatch.patch ___ Python tracker ___ __

[issue9786] Native TLS support for pthreads

2010-09-07 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: "errno" is preserved by PyEval_RestoreThread(), so this isn't the issue. What you are probably seeing is latent race conditions in the test suite, made apparent by a non-locking TLS implementation. The test suite isn't free from those, see for example

[issue9752] MSVC Compiler warning in Python\import.c

2010-09-07 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: As far as I can tell, _mkdir(name) is equivalent to CreateDirectoryA(name, NULL), except one uses errno and the other uses GetLastErrno. It is definitely possible that there's something I don't know, though, and the documentation doesn't explicitly state t

[issue9786] Native TLS support for pthreads

2010-09-07 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Hm, both the test you mention are using the (non-recursive) lock to synchronize threads. I can't see anything wrong there. Could you please try to replace the cod in pthread_getspecific() with this: int err = errno void *result = pthread_getspecific(

<    1   2