[issue10768] Bug in scrolledtext

2010-12-25 Thread Pierre Quentel
Pierre Quentel added the comment: The function example(), line 44 of the module - Pierre 2010/12/24 R. David Murray > > R. David Murray added the comment: > > Where is this example? > > -- > assignee: -> d...@python > components: +Documentation > nosy: +d...@python, r.david.murray >

[issue10769] ast: provide more useful range information

2010-12-25 Thread Sven Brauch
Sven Brauch added the comment: Hi, I agree that the current behavior is not wrong or such. It's just entirely useless. For all the other types of subscripts, such as a[b][c][d] or a(b)(c)(d), the ranges of the actual subscript ASTs are also nulled, but there's an additional Name (or whatever

[issue5258] addpackage in site.py fails hard on badly formed .pth files

2010-12-25 Thread Georg Brandl
Georg Brandl added the comment: Your patch is indeed better than mine, but I think the try-except in addsitedir() is not needed anymore? -- ___ Python tracker ___ __

[issue10130] Create epub format docs and offer them on the download page

2010-12-25 Thread Sandro Tosi
New submission from Sandro Tosi : Hi, with the attached patch (quite easy honestly ;)) we can generate an EPUB. I don't have a real e-book reader to test it on, but I used calibre (and its viewer) and the file is usable, and the cross-reference links works just fine; there are some CSS effects

[issue10769] ast: provide more useful range information

2010-12-25 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2010/12/25 Sven Brauch : > > Sven Brauch added the comment: > > Hi, > > I agree that the current behavior is not wrong or such. It's just entirely > useless. > For all the other types of subscripts, such as a[b][c][d] or a(b)(c)(d), the > ranges of the act

[issue10769] ast: provide more useful range information

2010-12-25 Thread Sven Brauch
Sven Brauch added the comment: Well, weather it's supposed to or not, it *does* contain the line number information: For your example, the AST for "foo" tells you the offset for foo. If you want to know the offset (well, "offset") for blah, why not look at foo? Currently, the information is

[issue5258] addpackage in site.py fails hard on badly formed .pth files

2010-12-25 Thread R. David Murray
R. David Murray added the comment: Yes, I forgot to delete that bit when I realized it could all be done in one place. -- ___ Python tracker ___

[issue10769] ast: provide more useful range information

2010-12-25 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2010/12/25 Sven Brauch : > > Sven Brauch added the comment: > > Well, weather it's supposed to or not, it *does* contain the line number > information: > > For your example, the AST for "foo" tells you the offset for foo. If you want > to know the offset

[issue10769] ast: provide more useful range information

2010-12-25 Thread Sven Brauch
Sven Brauch added the comment: Then you'd get the point where foo starts instead of the location of the opening brace. Sounds good for me. Also, I already said that, with the change I proposed, I do not see any case where relevant information would be lost. Your argument that it would not be

[issue10757] zipfile.write, arcname should be bytestring

2010-12-25 Thread R. David Murray
R. David Murray added the comment: See also msg79724 of issue 4871. From looking at the code it appears that the filename must be a string, and if it contains only ASCII characters it is entered as ascii, while if it contains non-ascii it is encoded to utf-8 and the appropriate flag bits set

[issue10769] ast: provide more useful range information

2010-12-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: FWIW, I find the current behavior for attributes to be surprising, to the point where at first glance it almost looks like a bug. Which is to say, I would have expected 'col' to point to the first non-whitespace column after the '.'. If there are multiple att

[issue10756] Error in atexit._run_exitfuncs [...] Exception expected for value, str found

2010-12-25 Thread Andreas Stührk
Andreas Stührk added the comment: It's because `PyErr_Fetch()` which is used in `atexit_callfuncs()` can return an unnormalized exception (e.g. if the exception is set with `PyErr_SetString()`. "value" is then a string). A simple call to `PyErr_NormalizeException()` fixes this issue. Attache

[issue4391] use proper gettext plurals forms in argparse and optparse

2010-12-25 Thread Éric Araujo
Changes by Éric Araujo : Removed file: http://bugs.python.org/file20152/fix-optparse-ngettext.diff ___ Python tracker ___ ___ Python-bugs-list

[issue4391] use proper gettext plurals forms in argparse and optparse

2010-12-25 Thread Éric Araujo
Éric Araujo added the comment: Previous version was incomplete. -- nosy: +gward Added file: http://bugs.python.org/file20164/fix-optparse-ngettext.diff ___ Python tracker ___ ___

[issue10130] Create epub format docs and offer them on the download page

2010-12-25 Thread Georg Brandl
Georg Brandl added the comment: The next step is publishing these epubs and waiting for the resulting flood of bug reports :) -- ___ Python tracker ___

[issue9239] zipfile: truncating comment can corrupt the zipfile

2010-12-25 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: aimacintyre -> alanmcintyre nosy: +alanmcintyre -aimacintyre ___ Python tracker ___ ___ Python-b

[issue6011] python doesn't build if prefix contains non-ascii characters

2010-12-25 Thread STINNER Victor
STINNER Victor added the comment: Le vendredi 24 décembre 2010 à 14:46 +, Baptiste Carvello a écrit : > the patch solves the bug for me as well (using locale "C", the > filesystem encoding is utf-8). However, I do not understand why the > patch checks that the shebang line decodes with bot

[issue6011] python doesn't build if prefix contains non-ascii characters

2010-12-25 Thread STINNER Victor
STINNER Victor added the comment: Update copy_script patch: add comments to explain why the shebang have to be decodable from UTF-8 and from the script encoding. -- Added file: http://bugs.python.org/file20165/copy_script-2.patch ___ Python tracker

[issue6011] python doesn't build if prefix contains non-ascii characters

2010-12-25 Thread Éric Araujo
Éric Araujo added the comment: Baptiste: I meant that I couldn’t reproduce the bug, not that the patch had solved it. Victor: Your patch uses os.fsencode, so porting to distutils2 won’t be easy. Tarek and I have instated this policy http://wiki.python.org/moin/Distutils/FixingBugs to make s

[issue10763] subprocess.communicate() doesn't close pipes on Windows

2010-12-25 Thread STINNER Victor
STINNER Victor added the comment: Fixed by r87485 (Python 3.2). I don't want to fix it in 2.7 or 3.1, because maybe someone relies on this bug and it's a minor bug :-) Reopen the issue if you would like a backport. -- resolution: -> fixed status: open -> closed _

[issue6011] python doesn't build if prefix contains non-ascii characters

2010-12-25 Thread STINNER Victor
STINNER Victor added the comment: Le samedi 25 décembre 2010 à 22:35 +, Éric Araujo a écrit : > Victor: Your patch uses os.fsencode, so porting to distutils2 won’t be > easy. In Python 3.1, you can replace name=os.fsencode(name) by name=name.encode(sys.getfilesystemencoding(), 'surrogateesc

[issue6011] python doesn't build if prefix contains non-ascii characters

2010-12-25 Thread Éric Araujo
Éric Araujo added the comment: I suggest you wait for distutils2 to be 3.x-compatible and then adapt your patch to fix the bug when used with 3.2, keeping backward compat. -- ___ Python tracker ___

[issue10130] Create epub format docs and offer them on the download page

2010-12-25 Thread Sandro Tosi
Sandro Tosi added the comment: ah great, 'bugs-generator' is my middle name :) If I got it right, I've prepared another patch to add the archives generation in Doc/makefile (for dist target) and then add them to the download page. Just let me know if I missed something, I'm still learning --

[issue9893] Usefulness of the Misc/Vim/ files?

2010-12-25 Thread Éric Araujo
Éric Araujo added the comment: “It is maintained and updated by vimmers and we dont have to bother about it” is trumped by “I personally got tired of not having new keywords be recognized”. -- ___ Python tracker _

[issue10772] Several actions for argparse arguments missing from docs

2010-12-25 Thread ipatrol
New submission from ipatrol : I actually noticed this while trying to free the -h option for my program. The actions not mentioned are count, help, and parsers. Also for nargs, '...' and 'A...' are not documented either in the Sphinx docs or the leading docstring for the Action class. ---

[issue10415] readline.insert_text documentation incomplete

2010-12-25 Thread Éric Araujo
Éric Araujo added the comment: Hi Justin, thanks for the report and patch. Would you like to turn your suggestion into a patch? Guidelines are at http://www.python.org/dev/patches/ -- nosy: +eric.araujo versions: +Python 2.7, Python 3.2 ___ Python

[issue1705393] Select() failure (race condition)

2010-12-25 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: -BreamoreBoy stage: unit test needed -> needs patch ___ Python tracker ___ ___ Python-bugs-list m

[issue7436] Define 'object with assignable attributes'

2010-12-25 Thread Éric Araujo
Éric Araujo added the comment: We’d have to be careful to distinguish attributes defined to be not assignable and CPython implementation details. In the absence of a definition in the doc, there is a chicken-and-egg problem, so I think a patch would have to be discussed on python-dev to get

[issue7678] subprocess.Popen pipeline example code in the documentation is lacking

2010-12-25 Thread Éric Araujo
Éric Araujo added the comment: As a non-expert user of subprocess, calling close before communicate seems strange to me. Does the example code with a bug work if close is called after communicate? In the 3.2 docs, we could update the example to use a with statement, unless it is deemed a di

[issue8648] The UTF-7 codec functions are undocumented

2010-12-25 Thread Éric Araujo
Éric Araujo added the comment: FTR, typo fixed in r83977. -- nosy: +eric.araujo stage: needs patch -> committed/rejected ___ Python tracker ___ __

[issue9891] Minor doc typo at datamodel.rst: "list" -> "alist"

2010-12-25 Thread Éric Araujo
Éric Araujo added the comment: Fixed in r87486 (py3k), r87487 (3.1) and r87488 (2.7), thanks! -- nosy: +eric.araujo resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker

[issue9882] abspath from directory

2010-12-25 Thread ipatrol
ipatrol added the comment: Yes, but this seems to be rational particularly for emulating directory changes without actually doing so. Since relative paths can use .. it may not always be straightforward to do this. Applications include archivers, dependency checkers, patch tools, self-extract

[issue3216] Scarce msilib documentation

2010-12-25 Thread Éric Araujo
Éric Araujo added the comment: Nonexistent parameter removed from the doc in r87489 and following. -- nosy: +eric.araujo ___ Python tracker ___ __

[issue9196] Improve docs for string interpolation "%s" re Unicode strings

2010-12-25 Thread Éric Araujo
Éric Araujo added the comment: I’m not sure how much effort should be put into a patch here, considering that the horrible bytes/text confusion and implicit conversion should stop in Python 3, and %-formatting is mildly deprecated. Ezio, what do you think? Craig, could you attach your test_o

[issue9115] test_site: support for systems without unsetenv

2010-12-25 Thread Éric Araujo
Éric Araujo added the comment: Attached patch uses a copy of os.environ, like other tests already do. Can you test it? Also, is the lack of unsetenv a problem only for test_s_option? If not, we should fix the test infrastructure, not each test. -- nosy: +eric.araujo stage: -> patc