-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-88146: Set default netrc file name correctly on Windows #25732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Fixes python#43980 in the Python issue tracker
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
I have now signed the CLA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jheiselman Please rename title PR to bpo-NNNN: Set default....
[0]
Also add NEWS.
Lib/netrc.py
Outdated
@@ -23,7 +23,10 @@ class netrc: | |||
def __init__(self, file=None): | |||
default_netrc = file is None | |||
if file is None: | |||
file = os.path.join(os.path.expanduser("~"), ".netrc") | |||
default_file_name = ".netrc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about inline the if clause
?
deafult_file_name = '.netrc' if os.name != 'nt' else '_netrc'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m good with that. I’m currently on vacation. Will be back in a week to update PR title and formatting.
This PR is stale because it has been open for 30 days with no activity. |
This update to the commit address the conversation started by @eamanu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but you should follow the devguide [0], you must update
the issue title to bpo-43980: Set default netrc file name correctly on Windows
Also please add NEWS file.
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
✅ Deploy Preview for python-cpython-preview canceled.
|
Change itself looks fine, but definitely needs a NEWS entry and updated What's New |
I will get to this tomorrow when I'm back at work. The bot explained how to do a NEWS entry, but @zooba mentioned an updated "What's New". Where are the instructions for providing that? |
Probably somewhere in the devguide, but basically we should have something listed in |
@jheiselman, can you retarget this for 3.13? |
issue43980: Set default netrc file name correctly on Windows