[issue2142] difflib.unified_diff(...) produces invalid patches

2021-02-18 Thread Dirkjan Ochtman
Change by Dirkjan Ochtman : -- nosy: -djc ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue2142] difflib.unified_diff(...) produces invalid patches

2021-02-18 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue2142] difflib.unified_diff(...) produces invalid patches

2021-01-01 Thread Paul "TBBle" Hampson
Paul "TBBle" Hampson added the comment: I just bounced off this issue and proposed a work-around for it in Black (https://github.com/psf/black/pull/1897). Since it wasn't mentioned here earlier, the `\` marker _is_ documented in the GNU Diffutils documentation, under "Incomplete Lines" (htt

[issue2142] difflib.unified_diff(...) produces invalid patches

2020-10-28 Thread Jakub Wilk
Change by Jakub Wilk : -- nosy: +jwilk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org

[issue2142] difflib.unified_diff(...) produces invalid patches

2018-10-23 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి
Change by Srinivas Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) : -- nosy: +thatiparthy ___ Python tracker ___ ___ Python-bugs-lis

[issue2142] difflib.unified_diff(...) produces invalid patches

2018-10-11 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue2142] difflib.unified_diff(...) produces invalid patches

2018-10-11 Thread Xiao Di Guan
Change by Xiao Di Guan : -- nosy: +puxlit ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue2142] difflib.unified_diff(...) produces invalid patches

2015-11-04 Thread Evgeny Kapun
Changes by Evgeny Kapun : -- nosy: +abacabadabacaba ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue2142] difflib.unified_diff(...) produces invalid patches

2015-02-24 Thread Mark Lawrence
Mark Lawrence added the comment: Can we have a review on the updated patch please. -- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 ___ Python tracker ___ _

[issue2142] difflib.unified_diff(...) produces invalid patches

2011-03-14 Thread Ray.Allen
Ray.Allen added the comment: Yes there may be. Here is the updated patch: Add a new keyword argument to context_diff() and unified_diff() named "warn_no_newline_at_end". If true, emit "\ No newline etc". It defaults to True, set it to false to get the old behavior. I'm not sure if this name

[issue2142] difflib.unified_diff(...) produces invalid patches

2011-03-14 Thread Éric Araujo
Éric Araujo added the comment: I’m not sure whether the compatibility policy would prevent that. Aren’t there some cases with iterators (not strings) that work fine today without the change? If so, it should be possible to get the same behavior. -- _

[issue2142] difflib.unified_diff(...) produces invalid patches

2011-03-12 Thread Ray.Allen
Ray.Allen added the comment: > I re-read the discussion on python-dev, where it was suggested to add a > keyword argument to get the old behavior. Have you considered it? IIUC, at the time of that discusstion, 3.2 is pre-beta so the suitable option is to add "\No newline etc" by default and

[issue2142] difflib.unified_diff(...) produces invalid patches

2011-03-12 Thread Éric Araujo
Éric Araujo added the comment: Patch does not look bad. I re-read the discussion on python-dev, where it was suggested to add a keyword argument to get the old behavior. Have you considered it? -- versions: +Python 3.3 -Python 3.2 ___ Python trac

[issue2142] difflib.unified_diff(...) produces invalid patches

2011-03-09 Thread Ray.Allen
Ray.Allen added the comment: Updated patch which can apply to current py3k cleanly and with changes follow eric's review comments. -- Added file: http://bugs.python.org/file21067/issue_2142.diff ___ Python tracker

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-12-02 Thread Éric Araujo
Éric Araujo added the comment: To sum up the current consensus as I understand it, the missing end of line is clearly a bug, but the addition of “\No newline at end of file” is controversial. In the current patch, both are changed, so backporting only the first fix to 3.1 and 2.7 will requir

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-10-07 Thread Trent Mick
Trent Mick added the comment: c.f. some discussion on python-dev here: http://mail.python.org/pipermail/python-dev/2010-October/104501.html -- ___ Python tracker ___

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-10-07 Thread Trent Mick
Changes by Trent Mick : -- assignee: -> trentm ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-07-19 Thread Ray.Allen
Ray.Allen added the comment: I feel adding a keyword argument to deal with such a case is not quiet worthy. I'd prefer not fix it for 2.x, and make its behavior consist with svn diff and other similar tools, as trentm said, "tools like "patch" will know how to use." -- __

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-07-19 Thread Ray.Allen
Ray.Allen added the comment: Firstly, since this is marked as feature request, I updated the patch against py3k, to fix the problems found by BreamoreBoy. -- Added file: http://bugs.python.org/file18081/issue_2142_py3k_updated.diff ___ Python tracke

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-07-19 Thread Mark Lawrence
Mark Lawrence added the comment: The two latest patch files were missing TestDifflib from run_unittest. Having shown that the tests failed if test_difflib only was patched, then patch difflib against the 3.1 maintainance and py3k branches, the former passed ok and the latter failed. Could s

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-05-14 Thread Mark Dickinson
Mark Dickinson added the comment: Marking as a feature request: I think this is somewhere on the line between bugfix and new feature, but either way 2.7 is too close to release to start messing with something that isn't really all that broken. For 2.7 (and 2.6, 3.1), there's also the option

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-05-14 Thread Mark Dickinson
Mark Dickinson added the comment: I think it's arguable whether this is a bug or not. There's no official specification for the unified diff format that I can find anywhere; the GNU description at http://www.gnu.org/software/hello/manual/diff/Detailed-Unified.html#Detailed-Unified doesn't

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-05-14 Thread Ray.Allen
Changes by Ray.Allen : Added file: http://bugs.python.org/file17333/issue_2142_py3k.diff ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-05-14 Thread Ray.Allen
Ray.Allen added the comment: This is really a bug, but why it's not fixed during such a long time? Since trentm's python_difflib_no_eol.patch patch failed against the current trunk, I modified it to work again, also a patch against py3k. -- nosy: +ysj.ray Added file: http://bugs.pytho

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-05-13 Thread Dan Buch
Changes by Dan Buch : -- nosy: +meatballhat ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-05-13 Thread Mark Dickinson
Mark Dickinson added the comment: Hmm. Not in my version of diff: it seems to use '\ No newline at end of file' for both unified and 'normal' diffs. $ diff --version diff (GNU diffutils) 2.8.1 Copyright (C) 2002 Free Software Foundation, Inc. ... $ diff 1.txt 2.txt 2c2 < two \ No newline at

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-05-13 Thread anatoly techtonik
anatoly techtonik added the comment: Trent, the "\ New line..." seems to be feature specific to unified format only. http://en.wikipedia.org/wiki/Diff#Unified_format -- ___ Python tracker _

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-05-13 Thread anatoly techtonik
anatoly techtonik added the comment: You mean that this patch sits in here for 2 years already? This suxx. And nobody added the tag 'easy', because people haven't explicitly requested tracker privileges? That suxx. And it won't be in 2.7 because of that.. I am disappointed. Why this issue i