
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2018-02-20 11:06 byhroncok, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 5772 | merged | hroncok,2018-02-20 11:13 | |
| PR 6103 | merged | miss-islington,2018-03-13 09:58 | |
| PR 6104 | merged | miss-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)*![]() | 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)*![]() | 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)*![]() | 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)*![]() | 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)*![]() | Date: 2020-10-10 10:53 | |
This seems complete, can it be closed? | |||
| msg378392 -(view) | Author: Irit Katriel (iritkatriel)*![]() | Date: 2020-10-10 13:01 | |
Please change status to closed as well. Thanks. | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:58 | admin | set | github: 77066 |
| 2020-10-10 13:38:01 | hroncok | set | status: open -> closed stage: patch review -> resolved |
| 2020-10-10 13:01:43 | iritkatriel | set | messages: +msg378392 |
| 2020-10-10 12:57:40 | hroncok | set | resolution: fixed |
| 2020-10-10 10:53:14 | iritkatriel | set | nosy: +iritkatriel messages: +msg378383 |
| 2018-03-14 17:52:31 | christian.heimes | set | messages: +msg313830 |
| 2018-03-14 17:52:25 | christian.heimes | set | messages: +msg313829 |
| 2018-03-13 09:58:53 | miss-islington | set | pull_requests: +pull_request5867 |
| 2018-03-13 09:58:03 | miss-islington | set | pull_requests: +pull_request5866 |
| 2018-03-13 09:56:45 | christian.heimes | set | messages: +msg313736 |
| 2018-02-20 11:25:39 | christian.heimes | set | nosy: +christian.heimes messages: +msg312412 versions: - Python 3.4, Python 3.5 |
| 2018-02-20 11:13:28 | hroncok | set | keywords: +patch stage: patch review pull_requests: +pull_request5551 |
| 2018-02-20 11:09:42 | hroncok | set | type: behavior |
| 2018-02-20 11:09:24 | hroncok | set | components: + Demos and Tools |
| 2018-02-20 11:06:48 | hroncok | create | |