You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=Nonecreated_at=<Date2017-05-21.08:15:42.296>labels= ['3.7', 'type-bug', 'library']
title='argparse: relative include of config files'updated_at=<Date2017-09-02.16:37:28.005>user='https://github.com/efficiosoft'
When one includes an argument file at the command line using argparse and that file contains another include statement, the inner include path is treated as relative to os.getcwd(), what is not the way people expect it to be, I guess.
This patch modifies argparse so that it treats paths of files to include as relative to the location of the file the include was made from.
I also pulled statements that I think should not be enclosed by the try/except out of it and changed the workflow so that the file descriptor of an include file is closed before another one is opened by the recursive call to _read_args_from_files again.. That way, the number of file descriptors open at a time is kept low.
changed the title [-]Relative include of config files[/-][+]argparse: relative include of config files[/+]on May 21, 2017
mlouielu commented on May 21, 2017
mlouielumannequin
Mannequin
More actions
Hi Robert, the submit flow has migrate to GitHub pull requests workflow, and it is strongly preferred to used GitHub PR workflow, do you mind to convert your patch to GitHub?
Activity
efficiosoft commentedon May 21, 2017
Hi,
When one includes an argument file at the command line using argparse and that file contains another include statement, the inner include path is treated as relative to os.getcwd(), what is not the way people expect it to be, I guess.
This patch modifies argparse so that it treats paths of files to include as relative to the location of the file the include was made from.
I also pulled statements that I think should not be enclosed by the try/except out of it and changed the workflow so that the file descriptor of an include file is closed before another one is opened by the recursive call to _read_args_from_files again.. That way, the number of file descriptors open at a time is kept low.
Best regards
Robert
[-]Relative include of config files[/-][+]argparse: relative include of config files[/+]mlouielu commentedon May 21, 2017
Hi Robert, the submit flow has migrate to GitHub pull requests workflow, and it is strongly preferred to used GitHub PR workflow, do you mind to convert your patch to GitHub?
efficiosoft commentedon May 21, 2017
I didn't notice that. But that's great news. I'll send a PR soon.
terryjreedy commentedon Feb 3, 2023
The issue and PR author is Robert Schindler. He was roschi on bpo and is called efficiosoft - mannequin above but is bob1de on github and the PR.