Skip to content

ENH: backport scipy changes to openblas download script#16213

Merged
charris merged 2 commits intonumpy:masterfrom
mattip:openblas-hash
May 12, 2020
Merged

ENH: backport scipy changes to openblas download script#16213
charris merged 2 commits intonumpy:masterfrom
mattip:openblas-hash

Conversation

@mattip
Copy link
Copy Markdown
Member

@mattip mattip commented May 12, 2020

xref scipy/scipy#12094

  • Add hashes for openblas downloads (using python3 tools/openblas_support.py --test to print out the current hases)
  • Use a User-Agent instead of requiring urllib3
  • Fix PyPy installs to still install gfortran for f2py tests

@charris
Copy link
Copy Markdown
Member

charris commented May 12, 2020

How does the User-Agent work?

I'm a bit concerned of the maintenance requirements here. Does the affect the wheel builds?

@mattip
Copy link
Copy Markdown
Member Author

mattip commented May 12, 2020

I agree, this add a burden we did not have previously

How does the User-Agent work?

I copied the code from scipy. Anaconda.org tries to minimally prevent mass scraping of its site by robots. The older urllib library downloads the artifact and identifies as one of the blocked "robots". Adding a User-Agent means urllib pretends to be a web browser instead. This behaviour is built into urllib3 and wget.

I'm a bit concerned of the maintenance requirements here. Does the affect the wheel builds?

No, the wheel builds use this file to download openblas. The cost will come when we update openblas: we will have to regenerate the hashes. Ideally we would output the hashes as part of the MacPython/openblas-libs build processes

@charris charris merged commit 5d68350 into numpy:master May 12, 2020
@charris
Copy link
Copy Markdown
Member

charris commented May 12, 2020

Thanks Matti. I confess that I didn't see a problem with urllib3, it seems widely used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants