Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue32885

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Tools/scripts/pathfix.py leaves bunch of ~ suffixed files around with no opt-out
Type:behaviorStage:resolved
Components:Demos and ToolsVersions:Python 3.8, Python 3.7, Python 3.6, Python 2.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: christian.heimes, hroncok, iritkatriel
Priority:normalKeywords:patch

Created on2018-02-20 11:06 byhroncok, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 5772mergedhroncok,2018-02-20 11:13
PR 6103mergedmiss-islington,2018-03-13 09:58
PR 6104mergedmiss-islington,2018-03-13 09:58
Messages (7)
msg312411 -(view)Author: Miro Hrončok (hroncok)*Date: 2018-02-20 11:06
We (Fedora's Python SIG) would like to promote usage ofTools/scripts/pathfix.py (we've even moved it to $PATH) in Fedora RPM build (a.k.a spec files) instead of various error prone finds + greps + seds.However when running pathfix.py, it creates backup files (with ~ suffix). This is mostly unfortunate in RPM build environment, because one needs to clean those up, otherwise one gets warnings and errors like this:error: Installed (but unpackaged) file(s) found:   /usr/bin/spam~Or the file with ~ might even get installed if a more relaxed patter is used in a %files section that lists what is part of the RPM package.    %{_bindir}/spam-*We even have shebangs checks/mangling in place and the ~ suffixed file still has the wrong shebang, resulting in warnings like this:*** WARNING: mangling shebang in /usr/bin/spam~ from #!/usr/bin/python -Es to #!/usr/bin/python2 -Es. This will become an ERROR, fix it manually!Steps to Reproduce:1. $ echo '#!python' > omg2. $Tools/scripts/pathfix.py -i "/usr/bin/python3" -p omg  # possibly with extra flag, see bellowomg: updating3. $ lsActual results: omg  omg~Expected results: omgSince the backup feature was here for ages, instead of changing the behavior, I suggest a flag is added that disables this. 2to3 has exactly the proposed flag as: "-n, --nobackups       Don't write backups for modified files".This doesn't necessarily need to go into all versions, but I've selected all that has this problem. Getting it to 3.6+ would be great, however if it goes to anything later, we'll backport it in the Fedora package.I have a patch ready, sill send PR.
msg312412 -(view)Author: Christian Heimes (christian.heimes)*(Python committer)Date: 2018-02-20 11:25
It's technically a new feature. But since it's just in Tools/, we could make an exception. I've removed the security branches from versions.
msg313736 -(view)Author: Christian Heimes (christian.heimes)*(Python committer)Date: 2018-03-13 09:56
New changeset5affd5c29eb1493cb31ef3cfdde15538ac134689 by Christian Heimes (Miro Hrončok) in branch 'master':bpo-32885:Tools/scripts/pathfix.py: Add -n option for no backup~ (#5772)https://github.com/python/cpython/commit/5affd5c29eb1493cb31ef3cfdde15538ac134689
msg313829 -(view)Author: Christian Heimes (christian.heimes)*(Python committer)Date: 2018-03-14 17:52
New changeseta954919788f2130076e4f9dd91e9eccf69540f7a by Christian Heimes (Miss Islington (bot)) in branch '3.6':[3.6]bpo-32885:Tools/scripts/pathfix.py: Add -n option for no backup~ (GH-5772) (#6104)https://github.com/python/cpython/commit/a954919788f2130076e4f9dd91e9eccf69540f7a
msg313830 -(view)Author: Christian Heimes (christian.heimes)*(Python committer)Date: 2018-03-14 17:52
New changeset6e65e4462692cbf4461c307a411af7cf40a1ca4a by Christian Heimes (Miss Islington (bot)) in branch '3.7':[3.7]bpo-32885:Tools/scripts/pathfix.py: Add -n option for no backup~ (GH-5772) (#6103)https://github.com/python/cpython/commit/6e65e4462692cbf4461c307a411af7cf40a1ca4a
msg378383 -(view)Author: Irit Katriel (iritkatriel)*(Python committer)Date: 2020-10-10 10:53
This seems complete, can it be closed?
msg378392 -(view)Author: Irit Katriel (iritkatriel)*(Python committer)Date: 2020-10-10 13:01
Please change status to closed as well. Thanks.
History
DateUserActionArgs
2022-04-11 14:58:58adminsetgithub: 77066
2020-10-10 13:38:01hroncoksetstatus: open -> closed
stage: patch review -> resolved
2020-10-10 13:01:43iritkatrielsetmessages: +msg378392
2020-10-10 12:57:40hroncoksetresolution: fixed
2020-10-10 10:53:14iritkatrielsetnosy: +iritkatriel
messages: +msg378383
2018-03-14 17:52:31christian.heimessetmessages: +msg313830
2018-03-14 17:52:25christian.heimessetmessages: +msg313829
2018-03-13 09:58:53miss-islingtonsetpull_requests: +pull_request5867
2018-03-13 09:58:03miss-islingtonsetpull_requests: +pull_request5866
2018-03-13 09:56:45christian.heimessetmessages: +msg313736
2018-02-20 11:25:39christian.heimessetnosy: +christian.heimes

messages: +msg312412
versions: - Python 3.4, Python 3.5
2018-02-20 11:13:28hroncoksetkeywords: +patch
stage: patch review
pull_requests: +pull_request5551
2018-02-20 11:09:42hroncoksettype: behavior
2018-02-20 11:09:24hroncoksetcomponents: + Demos and Tools
2018-02-20 11:06:48hroncokcreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp