Skip to content

Use requests for TinyTeX HTTPS downloads - #51

Open
sakshamgoyal-01 wants to merge 3 commits into
JessicaTegner:masterfrom
sakshamgoyal-01:use-requests-for-https
Open

sakshamgoyal-01 wants to merge 3 commits into
JessicaTegner:masterfrom
sakshamgoyal-01:use-requests-for-https

Conversation

@sakshamgoyal-01

Copy link
Copy Markdown

Closes #50

Summary

urllib.request.urlopen fails TLS verification on uv/standalone CPython (typical in Docker) because that interpreter does not use certifi. Downloads then raise SSLCertVerificationError: unable to get local issuer certificate.

This switches GitHub fetches in download_tinytex() to requests, which verifies with certifi.

Changes

  • Add requests>=2.32.0 as a runtime dependency.
  • Replace urlopen with requests.get (streamed for the asset download).
  • Tests for the HTTP helper and 404 → RuntimeError behavior.
  • Add myself to README contributors.

Tests

uv run pytest -vv tests/test_tinytex_download.py -k "not successful_download"

urllib against uv/standalone CPython fails TLS verification because it does not use certifi. requests does, so GitHub downloads work in those environments.
Pin requests to certifi's CA bundle and reject untrusted server certificates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use requests for TinyTeX GitHub downloads (TLS on uv/standalone CPython)

1 participant