[issue10639] reindent.py should not convert newlines

2011-08-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset dc96af0e7f60 by Jason R. Coombs in branch 'default': Corrected attribute docstring per pep-257 (reference #10639) http://hg.python.org/cpython/rev/dc96af0e7f60 -- ___ Python tracker

[issue10639] reindent.py should not convert newlines

2011-08-02 Thread R. David Murray
R. David Murray added the comment: Well, this is actually blessed by http://www.python.org/dev/peps/pep-0257/, but if that convention were actually followed the docstring would go *after* the assignment. But I agree that it is rarely used, and as far as I know is not used in the stdlib at al

[issue10639] reindent.py should not convert newlines

2011-08-02 Thread Scott Dial
Scott Dial added the comment: I haven't seen anyone use a side-effect-less statement (a string) as a comment before, but I doubt that is an approved style for the CPython codebase. Please change the string preceeding the spec_line definition into a proper comment. -- nosy: +scott.dial

[issue10639] reindent.py should not convert newlines

2011-07-30 Thread Éric Araujo
Changes by Éric Araujo : Removed file: http://bugs.python.org/file22798/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue10639] reindent.py should not convert newlines

2011-07-29 Thread Eli Bendersky
Eli Bendersky added the comment: "make patchcheck" is working again. Thanks -- Added file: http://bugs.python.org/file22798/unnamed ___ Python tracker ___ Jason R. Coombs

[issue10639] reindent.py should not convert newlines

2011-07-29 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- stage: needs patch -> commit review status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue10639] reindent.py should not convert newlines

2011-07-29 Thread Jason R. Coombs
Jason R. Coombs added the comment: I hadn't realized that the other global variables were defined at the module level or I would have implemented this originally. Please let me know if this patch doesn't correct the issue. -- ___ Python tracker

[issue10639] reindent.py should not convert newlines

2011-07-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2547f7965733 by Jason R. Coombs in branch 'default': Issue #10639: spec_newline wasn't defined globally unless main() was called; now spec_newline is set at module import/execution http://hg.python.org/cpython/rev/2547f7965733 --

[issue10639] reindent.py should not convert newlines

2011-07-29 Thread Eli Bendersky
Eli Bendersky added the comment: Jason, one way or another, a prompt fix for trunk is required, since `make patchcheck` is an important step for committing patches. -- ___ Python tracker _

[issue10639] reindent.py should not convert newlines

2011-07-29 Thread Jason R. Coombs
Jason R. Coombs added the comment: The 'spec_newline' in particular is only in the trunk (not in the backports), as it's part of the new --newline option. -- ___ Python tracker ___

[issue10639] reindent.py should not convert newlines

2011-07-29 Thread Éric Araujo
Éric Araujo added the comment: I agree that using globals instead function arguments sucks, but let’s fix this bug without rewriting the whole file (unless this affects only the code new in 3.3). -- ___ Python tracker

[issue10639] reindent.py should not convert newlines

2011-07-28 Thread Eli Bendersky
Eli Bendersky added the comment: This is a good example of why passing parameters into functions by means of globals sucks. In reindent.py, main() sets the spec_newline global which check() uses, but this was forgotten in patchcheck.py which also uses reindent.check() IMHO reindent.py should

[issue10639] reindent.py should not convert newlines

2011-07-28 Thread Eli Bendersky
Changes by Eli Bendersky : -- priority: normal -> high stage: committed/rejected -> needs patch ___ Python tracker ___ ___ Python-bugs

[issue10639] reindent.py should not convert newlines

2011-07-28 Thread Eli Bendersky
Eli Bendersky added the comment: It appears this breaks "make patchcheck" in trunk: ./python ./Tools/scripts/patchcheck.py Getting the list of files that have been added/changed ... 5 files Fixing whitespace ... Traceback (most recent call last): File "./Tools/scripts/patchcheck.py", line 147

[issue10639] reindent.py should not convert newlines

2011-07-28 Thread Éric Araujo
Changes by Éric Araujo : -- stage: commit review -> committed/rejected ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue10639] reindent.py should not convert newlines

2011-07-27 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue10639] reindent.py should not convert newlines

2011-07-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset f9cf55bbe9b9 by Jason R. Coombs in branch '2.7': Fixes #10639: reindent.py should not convert newlines http://hg.python.org/cpython/rev/f9cf55bbe9b9 -- ___ Python tracker

[issue10639] reindent.py should not convert newlines

2011-07-27 Thread Jason R. Coombs
Jason R. Coombs added the comment: > Instead of writing a new class, what about using io.open instead of the > builtin? Then you’ll be able to use the same patch than 3.2. Ooh. Excellent suggestion. -- ___ Python tracker

[issue10639] reindent.py should not convert newlines

2011-07-27 Thread Éric Araujo
Éric Araujo added the comment: > The patch is a little more intrusive than the Python 3 patch because > Python 2.7 doesn't allow specifying the newline to use when writing a > file (afaict) Instead of writing a new class, what about using io.open instead of the builtin? Then you’ll be able to

[issue10639] reindent.py should not convert newlines

2011-07-26 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue10639] reindent.py should not convert newlines

2011-07-26 Thread Jason R. Coombs
Jason R. Coombs added the comment: What do you think about this: https://bitbucket.org/jaraco/cpython-issue10639/changeset/ea63310dddce The patch is a little more intrusive than the Python 3 patch because Python 2.7 doesn't allow specifying the newline to use when writing a file (afaict), but

[issue10639] reindent.py should not convert newlines

2011-07-26 Thread Éric Araujo
Éric Araujo added the comment: > I've stripped the undesirable revisions and updated the bitbucket repo > so it now contains three changesets for Python 3.2 and 3.3 and > suggested. hg diff combined with hg import can help you flatten a series of changeset into one. > I don't believe running

[issue10639] reindent.py should not convert newlines

2011-07-26 Thread Jason R. Coombs
Jason R. Coombs added the comment: I've stripped the undesirable revisions and updated the bitbucket repo so it now contains three changesets for Python 3.2 and 3.3 and suggested. I don't believe running the test suite is relevant, as I grepped the test suite for reindent, and there's no refe

[issue10639] reindent.py should not convert newlines

2011-07-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 070dc6e359fb by Jason R. Coombs in branch '3.2': Fixes #10639: reindent.py should not convert newlines http://hg.python.org/cpython/rev/070dc6e359fb New changeset 826a0208d143 by Jason R. Coombs in branch 'default': Merge with 3.2 Issue #10639: rei

[issue10639] reindent.py should not convert newlines

2011-07-26 Thread Éric Araujo
Changes by Éric Araujo : -- assignee: eric.araujo -> jason.coombs stage: patch review -> commit review ___ Python tracker ___ ___ Pyth

[issue10639] reindent.py should not convert newlines

2011-07-26 Thread Éric Araujo
Éric Araujo added the comment: Okay, I hadn’t seen you in http://docs.python.org/devguide/developers and I don’t recall the URI of the generated file with all names. I’ve asked that your Roundup profile be updated so that you get the Python icon and the possibility to be assigned bugs. If y

[issue10639] reindent.py should not convert newlines

2011-07-26 Thread Jason R. Coombs
Jason R. Coombs added the comment: > I assume you’re not talking about hg.python.org/cpython? My name appears as jason.coombs. But your note does remind me that I need to review the devguide, since it's been a while since I've pushed something. I may also look into linking/merging my two acco

[issue10639] reindent.py should not convert newlines

2011-07-26 Thread Éric Araujo
Éric Araujo added the comment: > If this changeset is acceptable, I will push the revisions to the > master repo. > I'll rebase and push the current patch as-is, What repo are you talking about, BTW? The developers list in the devguide does not contain your name, so I assume you’re not talki

[issue10639] reindent.py should not convert newlines

2011-07-26 Thread Jason R. Coombs
Jason R. Coombs added the comment: No problem. I'll rebase and push the current patch as-is, and then backport to 3.2 and 2.7 without the option (just raising the error when mixed newlines are encountered). -- ___ Python tracker

[issue10639] reindent.py should not convert newlines

2011-07-26 Thread Ezio Melotti
Changes by Ezio Melotti : Added file: http://bugs.python.org/file22766/900df5732f93.diff ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue10639] reindent.py should not convert newlines

2011-07-26 Thread Ezio Melotti
Changes by Ezio Melotti : Removed file: http://bugs.python.org/file22765/900df5732f93.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue10639] reindent.py should not convert newlines

2011-07-26 Thread Éric Araujo
Éric Araujo added the comment: Thanks for your work. The generated patch is for some reason unreadable, so I looked at the changeset on Bitbucket. It looks good, except that a new option would have to be 3.3-only, whereas the bug could be fixed in 2.7 and 3.2 too. If it’s too bothersome fo