Skip to content
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

add 'User-Agent'-header to pooch.retrieve #9782

Merged
merged 5 commits into from
Nov 15, 2024

Conversation

kmuehlbauer
Copy link
Contributor

@kmuehlbauer kmuehlbauer commented Nov 15, 2024

Copy link
Collaborator

@mathause mathause left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can probably just leave away the version from the string... & is there a reason you don't pass the downloader directly?

xarray/tutorial.py Outdated Show resolved Hide resolved
xarray/tutorial.py Outdated Show resolved Hide resolved
@kmuehlbauer
Copy link
Contributor Author

& is there a reason you don't pass the downloader directly?

No, I was just somehow following the pooch tutorial 😁

@kmuehlbauer
Copy link
Contributor Author

Can probably just leave away the version from the string.

It might be useful to know the actual version for debugging, but I have no strong opinion.

@mathause
Copy link
Collaborator

Yes that's also good for me (just thought it's not worth debugging forever)

@kmuehlbauer
Copy link
Contributor Author

Yes that's also good for me (just thought it's not worth debugging forever)

I was more thinking about situations where users experience these issues again. It might be that one time User-Agent is not enough to add to the headers.

@kmuehlbauer
Copy link
Contributor Author

@mathause Thanks for the review. I think this is ready to go.

@kmuehlbauer kmuehlbauer marked this pull request as ready for review November 15, 2024 08:43
@kmuehlbauer kmuehlbauer added the plan to merge Final call for comments label Nov 15, 2024
@kmuehlbauer
Copy link
Contributor Author

Maybe I should add a whats-new-entry for more visibility.

Copy link
Collaborator

@mathause mathause left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fast PR!

@kmuehlbauer kmuehlbauer merged commit 864b35a into pydata:main Nov 15, 2024
29 checks passed
@kmuehlbauer kmuehlbauer deleted the fix-docs branch November 15, 2024 09:28
@keewis
Copy link
Collaborator

keewis commented Nov 15, 2024

for reference, python-requests (which pooch uses to do the download) adds a User-Agent of python-requests/<version>. My guess is that the combination of RTD servers + python-requests user agent was blocked, which is why changing to something else helps.

dcherian added a commit to dcherian/xarray that referenced this pull request Nov 16, 2024
* main:
  Add download stats badges (pydata#9786)
  Fix open_mfdataset for list of fsspec files (pydata#9785)
  add 'User-Agent'-header to pooch.retrieve (pydata#9782)
  Optimize `ffill`, `bfill` with dask when `limit` is specified (pydata#9771)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plan to merge Final call for comments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs builds are broken
3 participants