Skip to content

Conversation

@hroncok
Copy link
Contributor

@hroncok hroncok commented Feb 20, 2018

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.

https://bugs.python.org/issue32885

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.
err('%s: warning: backup failed (%r)\n' % (filename, msg))
else:
try:
os.remove(filename)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, os.remove() is required for Windows.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly what i thought of when I read the docs for os.move that comes later. Should I explain this in comment?

@hroncok
Copy link
Contributor Author

hroncok commented Feb 20, 2018

@tiran thanks for swift approval.

@tiran tiran merged commit 5affd5c into python:master Mar 13, 2018
@bedevere-bot
Copy link

@tiran: Please replace # with GH- in the commit message next time. Thanks!

@miss-islington
Copy link
Contributor

Thanks @hroncok for the PR, and @tiran for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7.
🐍🍒⛏🤖

@bedevere-bot
Copy link

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 <[email protected]>
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 <[email protected]>
@bedevere-bot
Copy link

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 <[email protected]>
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 <[email protected]>
@hroncok hroncok deleted the pathfix-nobackup branch March 14, 2018 20:53
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants