
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2019-05-27 13:09 bypkopkan, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 13591 | closed | pkopkan,2019-05-27 13:13 | |
| PR 15548 | merged | pkopkan,2019-08-27 12:51 | |
| PR 15705 | merged | vstinner,2019-09-05 15:43 | |
| PR 15717 | merged | pkopkan,2019-09-06 13:56 | |
| PR 16387 | merged | vstinner,2019-09-25 12:46 | |
| PR 16389 | merged | vstinner,2019-09-25 13:45 | |
| Messages (10) | |||
|---|---|---|---|
| msg343622 -(view) | Author: Patrik Kopkan (pkopkan)* | Date: 2019-05-27 13:09 | |
Hello,Pathfix is nice simple tool for changing shebang lines. However, it is lacking a way how to keep/add flags making this tool impractical sometimes. | |||
| msg343628 -(view) | Author: Patrik Kopkan (pkopkan)* | Date: 2019-05-27 14:10 | |
Example:pathfix.py -i /usr/bin/python ./directory --> would change the shebang ofevery script in this directory recursively to #! /usr/bin/python. That's handy but if you would have script like this: #! /usr/bin/env -flags andwanted to keep the flags.You would need to run again pathfix: pathfix.py -i '/usr/bin/python -flags' ./directory. That is not that bad for one script but with increasing number of scripts, differences of flags between the scripts it gets harder. | |||
| msg351202 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2019-09-05 14:55 | |
New changeset50254ac4c179cb412e90682098c97db786143929 by Victor Stinner (PatrikKopkan) in branch 'master':bpo-37064: Add option -k toTools/scripts/pathfix.py (GH-15548)https://github.com/python/cpython/commit/50254ac4c179cb412e90682098c97db786143929 | |||
| msg351206 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2019-09-05 15:37 | |
The newly added test fails if Python is installed:https://buildbot.python.org/all/#/builders/188/builds/927======================================================================FAIL: test_pathfix (test.test_tools.test_pathfix.TestPathfixFunctional)----------------------------------------------------------------------Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/lib/python3.9/test/test_tools/test_pathfix.py", line 36, in test_pathfix self.pathfix( File "/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/lib/python3.9/test/test_tools/test_pathfix.py", line 24, in pathfix self.assertEqual(proc.returncode, 0, proc)AssertionError: 2 != 0 : CompletedProcess(args=['/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/bin/python3.9', '/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/lib/Tools/scripts/pathfix.py', '-i', '/usr/bin/python3', '-n', '@test_1589863_tmp'], returncode=2, stdout=b'', stderr=b"/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/bin/python3.9: can't open file '/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/lib/Tools/scripts/pathfix.py': [Errno 2] No such file or directory\n")======================================================================FAIL: test_pathfix_keeping_flags (test.test_tools.test_pathfix.TestPathfixFunctional)----------------------------------------------------------------------Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/lib/python3.9/test/test_tools/test_pathfix.py", line 50, in test_pathfix_keeping_flags self.pathfix( File "/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/lib/python3.9/test/test_tools/test_pathfix.py", line 24, in pathfix self.assertEqual(proc.returncode, 0, proc)AssertionError: 2 != 0 : CompletedProcess(args=['/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/bin/python3.9', '/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/lib/Tools/scripts/pathfix.py', '-i', '/usr/bin/python3', '-k', '-n', '@test_1589863_tmp'], returncode=2, stdout=b'', stderr=b"/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/bin/python3.9: can't open file '/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/lib/Tools/scripts/pathfix.py': [Errno 2] No such file or directory\n") | |||
| msg351212 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2019-09-05 16:09 | |
New changeset3f43ceff186da09978d0aff257bb18b8ac7611f7 by Victor Stinner in branch 'master':bpo-37064: Skip test_tools.test_pathfix if installed (GH-15705)https://github.com/python/cpython/commit/3f43ceff186da09978d0aff257bb18b8ac7611f7 | |||
| msg353186 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2019-09-25 12:26 | |
New changeset1dc1acbd73f05f14c974b7ce1041787d7abef31e by Victor Stinner (PatrikKopkan) in branch 'master':bpo-37064: Add option -a to pathfix.py tool (GH-15717)https://github.com/python/cpython/commit/1dc1acbd73f05f14c974b7ce1041787d7abef31e | |||
| msg353190 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2019-09-25 12:48 | |
I wrotePR 16387 to backport pathfix changes from Python 3.8. The changes add tests which make me confident that it's safe to backport the changes. Currently, pathfix has no test at all in Python 3.8. | |||
| msg353193 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2019-09-25 13:22 | |
New changesetc71c54c62600fd721baed3c96709e3d6e9c33817 by Victor Stinner in branch '3.8':bpo-37064: Add -k and -a options to pathfix.py tool (GH-16387)https://github.com/python/cpython/commit/c71c54c62600fd721baed3c96709e3d6e9c33817 | |||
| msg353194 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2019-09-25 13:23 | |
Thanks Patrik Kopkan for your contributions! It's now part of 3.8 and master branches. Your work will be part of the incoming Python 3.8.0 final release. | |||
| msg353201 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2019-09-25 14:12 | |
New changeset2e566bf35e96f0d6ca6fe291f179e832d1c32186 by Victor Stinner in branch '3.8':bpo-37064: Skip test_tools.test_pathfix if installed (GH-15705) (GH-16389)https://github.com/python/cpython/commit/2e566bf35e96f0d6ca6fe291f179e832d1c32186 | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:15 | admin | set | github: 81245 |
| 2019-09-25 14:12:35 | vstinner | set | messages: +msg353201 |
| 2019-09-25 13:45:25 | vstinner | set | pull_requests: +pull_request15971 |
| 2019-09-25 13:23:39 | vstinner | set | status: open -> closed resolution: fixed messages: +msg353194 stage: patch review -> resolved |
| 2019-09-25 13:22:43 | vstinner | set | messages: +msg353193 |
| 2019-09-25 12:48:05 | vstinner | set | messages: +msg353190 |
| 2019-09-25 12:46:09 | vstinner | set | pull_requests: +pull_request15969 |
| 2019-09-25 12:26:43 | vstinner | set | messages: +msg353186 |
| 2019-09-06 13:56:00 | pkopkan | set | pull_requests: +pull_request15371 |
| 2019-09-05 16:09:49 | vstinner | set | messages: +msg351212 |
| 2019-09-05 15:43:38 | vstinner | set | pull_requests: +pull_request15359 |
| 2019-09-05 15:37:19 | vstinner | set | messages: +msg351206 |
| 2019-09-05 14:55:01 | vstinner | set | nosy: +vstinner messages: +msg351202 |
| 2019-08-27 12:51:09 | pkopkan | set | pull_requests: +pull_request15225 |
| 2019-05-27 14:10:31 | pkopkan | set | messages: +msg343628 |
| 2019-05-27 13:38:58 | SilentGhost | set | type: enhancement |
| 2019-05-27 13:16:06 | hroncok | set | nosy: +hroncok |
| 2019-05-27 13:15:32 | hroncok | set | components: + Demos and Tools versions: + Python 3.8, Python 3.9 |
| 2019-05-27 13:13:59 | pkopkan | set | keywords: +patch stage: patch review pull_requests: +pull_request13497 |
| 2019-05-27 13:09:47 | pkopkan | create | |