-
-
Notifications
You must be signed in to change notification settings - Fork 715
Change pep command to use .txt
by default
#378
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
Conversation
to fix the write history of the file
Couldn't we first try to fetch it by the current logic: if pep_number > 542:
pep_url = f"{self.base_github_pep_url}{pep_number:04}.rst"
else:
pep_url = f"{self.base_github_pep_url}{pep_number:04}.txt" and fall back to the other filetype if one returns 404? |
You could, but... I personally don't see a reason to do so: |
Yeah, it's weird that we're trying it in the wrong order currently. Sounds like the right approach is:
this would lead to far fewer requests, but it would take twice as long to resolve the |
.txt
by default
@larswijn Would you like to revisit this if you get some time. |
Switch around trying order (txt first, then rst)
Updated, should be finished now. |
The pep command would assume either .txt or .rst, which was not always correct. It now always tries both, and should still error the same way when the pip was not found. This is the 2nd time this pull request has been opened because the write history of the previous one had been destroyed.
Closes: #367