bpo-32885: Tools/scripts/pathfix.py: Add -n option for no backup~#5772
Merged
Conversation
6601b6f to
c04e80d
Compare
Creating backup files with ~ suffix can be undesirable in some environment, such as when building RPM packages. Instead of requiring the user to remove those files manually, option -n was added, that simply disables this feature. -n was selected because 2to3 has the same option with this behavior.
c04e80d to
6a2f23d
Compare
tiran
reviewed
Feb 20, 2018
| err('%s: warning: backup failed (%r)\n' % (filename, msg)) | ||
| else: | ||
| try: | ||
| os.remove(filename) |
Member
There was a problem hiding this comment.
OK, os.remove() is required for Windows.
Contributor
Author
There was a problem hiding this comment.
Exactly what i thought of when I read the docs for os.move that comes later. Should I explain this in comment?
tiran
approved these changes
Feb 20, 2018
Contributor
Author
|
@tiran thanks for swift approval. |
|
@tiran: Please replace |
Contributor
|
GH-6103 is a backport of this pull request to the 3.7 branch. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Mar 13, 2018
…thonGH-5772) Creating backup files with ~ suffix can be undesirable in some environment, such as when building RPM packages. Instead of requiring the user to remove those files manually, option -n was added, that simply disables this feature. -n was selected because 2to3 has the same option with this behavior. (cherry picked from commit 5affd5c) Co-authored-by: Miro Hrončok <miro@hroncok.cz>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Mar 13, 2018
…thonGH-5772) Creating backup files with ~ suffix can be undesirable in some environment, such as when building RPM packages. Instead of requiring the user to remove those files manually, option -n was added, that simply disables this feature. -n was selected because 2to3 has the same option with this behavior. (cherry picked from commit 5affd5c) Co-authored-by: Miro Hrončok <miro@hroncok.cz>
|
GH-6104 is a backport of this pull request to the 3.6 branch. |
tiran
pushed a commit
that referenced
this pull request
Mar 14, 2018
…p~ (GH-5772) (#6104) Creating backup files with ~ suffix can be undesirable in some environment, such as when building RPM packages. Instead of requiring the user to remove those files manually, option -n was added, that simply disables this feature. -n was selected because 2to3 has the same option with this behavior. (cherry picked from commit 5affd5c) Co-authored-by: Miro Hrončok <miro@hroncok.cz>
tiran
pushed a commit
that referenced
this pull request
Mar 14, 2018
…p~ (GH-5772) (#6103) Creating backup files with ~ suffix can be undesirable in some environment, such as when building RPM packages. Instead of requiring the user to remove those files manually, option -n was added, that simply disables this feature. -n was selected because 2to3 has the same option with this behavior. (cherry picked from commit 5affd5c) Co-authored-by: Miro Hrončok <miro@hroncok.cz>
jo2y
pushed a commit
to jo2y/cpython
that referenced
this pull request
Mar 23, 2018
…thon#5772) Creating backup files with ~ suffix can be undesirable in some environment, such as when building RPM packages. Instead of requiring the user to remove those files manually, option -n was added, that simply disables this feature. -n was selected because 2to3 has the same option with this behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Creating backup files with
~suffix can be undesirable in some environment, such as when building RPM packages. Instead of requiring the user to remove those files manually, option-nwas added, that simply disables this feature.-nwas selected because 2to3 has the same option with this behavior.https://bugs.python.org/issue32885