[issue41110] 2to3 reports some files as both not changing and having been modified

2021-10-20 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41110] 2to3 reports some files as both not changing and having been modified

2020-07-03 Thread SilentGhost


Change by SilentGhost :


--
nosy: +benjamin.peterson
type:  -> behavior
versions:  -Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41110] 2to3 reports some files as both not changing and having been modified

2020-07-03 Thread Ashley Whetter


Change by Ashley Whetter :


--
keywords: +patch
pull_requests: +20445
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/21296

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41110] 2to3 reports some files as both not changing and having been modified

2020-06-24 Thread Ashley Whetter


New submission from Ashley Whetter :

Many of the fixers cause the tool to report a file as both unchanged and 
modified.

For example when checking a file with the following contents:

```
s = "str"
```

using the following command: `python -m lib2to3 -f unicode unicode_test.py`
The following is output:

```
RefactoringTool: No changes to unicode_test.py
RefactoringTool: Files that need to be modified:
RefactoringTool: unicode_test.py
```

When a fixer returns a node, even if it is the original node without changes, 
it is considered as a change to the code 
(https://github.com/python/cpython/blob/cf18c9e9d4d44f6671a3fe6011bb53d8ee9bd92b/Lib/lib2to3/refactor.py#L446-L447)
 and the file is later added to the list of modified files. I have not yet 
identified which fixers have this issue.

The fix appears to be that fixers need to be aware of when they have not made a 
change and should `None` when that is the case.

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 372299
nosy: AWhetter
priority: normal
severity: normal
status: open
title: 2to3 reports some files as both not changing and having been modified
versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com