Issue37810
Created on 2019-08-10 18:59 by Anthony Sottile, last changed 2019-08-21 20:26 by tim.peters. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 15201 | merged | Anthony Sottile, 2019-08-10 19:36 | |
| PR 15365 | merged | miss-islington, 2019-08-21 19:02 | |
| Messages (3) | |||
|---|---|---|---|
| msg349353 - (view) | Author: Anthony Sottile (Anthony Sottile) * | Date: 2019-08-10 18:59 | |
Here's an example
from difflib import ndiff
def main():
x = '\tx\t=\ty\n\t \t \t^'
y = '\tx\t=\ty\n\t \t \t^\n'
print('\n'.join(
line.rstrip('\n') for line in
ndiff(x.splitlines(True), y.splitlines(True)))
)
if __name__ == '__main__':
exit(main())
Current output:
$ python3.8 t.py
x = y
- ^
+ ^
? +
Expected output:
$ ./python t.py
x = y
- ^
+ ^
? +
Found this while implementing a similar thing for flake8 here: https://gitlab.com/pycqa/flake8/merge_requests/339 and while debugging with pytest
|
|||
| msg349354 - (view) | Author: Raymond Hettinger (rhettinger) * | Date: 2019-08-10 19:49 | |
This seems like a reasonable suggestion to me. Am not sure whether it should be backported. Tim, what do you think? |
|||
| msg349391 - (view) | Author: Anthony Sottile (Anthony Sottile) * | Date: 2019-08-11 14:11 | |
That's actually a good point, I don't think this should land in python3.7 since it changes outuput -- I'm removing that from the versions (though the bug does affect every version I have access to) |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2019-08-21 20:26:10 | tim.peters | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2019-08-21 19:02:54 | miss-islington | set | pull_requests: + pull_request15075 |
| 2019-08-11 14:11:54 | Anthony Sottile | set | messages:
+ msg349391 versions: - Python 3.7 |
| 2019-08-10 19:49:27 | rhettinger | set | nosy:
+ rhettinger, tim.peters messages: + msg349354 assignee: tim.peters |
| 2019-08-10 19:36:09 | Anthony Sottile | set | keywords:
+ patch stage: patch review pull_requests: + pull_request14930 |
| 2019-08-10 18:59:04 | Anthony Sottile | create | |