Use httpx for automatic SSL certificate handling - #10
Conversation
akx
left a comment
There was a problem hiding this comment.
Rather than add httpx as a dependency (not that it's very huge or anything), would it just be enough to add certifi as a dependency and os.environ.setdefault("SSL_CERT_FILE", certifi.where()) like in the workaround suggested in the issue?
|
I was wondering about that too. I'm honestly pretty confused about best practices with SSL certs. My reasoning was that we could either stick with a low-level implementation and hope to get it right, or we could go high-level so that we inherit a solution from people more expert than me. I went for the latter in this PR, but I think the former is perfectly valid in case you want to minimize dependencies and are sufficiently confident. Feel free to supersede this PR. Thanks for the fast response! |
This PR was created with assistance from Claude 4.5 opus-high in Cursor.
Fixes #9
Summary
Replace
urllib.requestwithhttpxto fix SSL certificate errors on NixOS.Changes
urllib.requestwithhttpxingithub_api.pyurllib.error.HTTPErrortohttpx.HTTPStatusErrorinaction_updater.pyhttpx>=0.27.0dependencyWhy httpx?
httpxautomatically handles SSL certificates:SSL_CERT_FILEif set and validcertifi's certificate bundle otherwiseThis makes
gha-toolswork out of the box on NixOS without manual workarounds.Testing