Repository navigation
Change pep command to use .txt by default - #378
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