Message399244
I implemented the logic and adjusted the existing tests to have a fixed program name. I also fixed the build error by changing how zip files are detected. Based on you comment Nick you however even had a different idea. Currently I check if __spec__.__loader__ is a zip loader but if I understood correct you suggest the check if __spec__.__location__ is a proper subdir of sys.argv[0]?
https://github.com/septatrix/cpython/compare/main...septatrix:enhance/argparse-prog-name.
When I have some more time I will check whether mocking works and otherwise checkout test.support.script_helper or making the function accept spec/argv0 |
|
Date |
User |
Action |
Args |
2021-08-08 22:41:00 | Nils Kattenbeck | set | recipients:
+ Nils Kattenbeck, tebeka, ncoghlan, peter.otten, bethard, jwilk, paul.j3, zertrin, samuelmarks |
2021-08-08 22:41:00 | Nils Kattenbeck | set | messageid: <1628462460.6.0.00495562011724.issue22240@roundup.psfhosted.org> |
2021-08-08 22:41:00 | Nils Kattenbeck | link | issue22240 messages |
2021-08-08 22:41:00 | Nils Kattenbeck | create | |
|