-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
pythonPackages.requests: patch in CA bundles #123318
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense to me
cc @FRidh
fe15572
to
52f6e53
Compare
Result of 206 packages marked as broken and skipped:
9548 packages skipped due to time constraints:
14 packages built successfully:
1 suggestion:
Result of 144 packages marked as broken and skipped:
9781 packages skipped due to time constraints:
16 packages built successfully:
1 suggestion:
|
EDIT: fixed. |
52f6e53
to
a572459
Compare
Hmm, I don't think the distinction is super necessary. As it likely points to something valid if present. But I could also be wrong about this. |
a572459
to
a08ce2d
Compare
a08ce2d
to
1354923
Compare
@FRidh Could you please take a look? Thanks. |
1354923
to
c83f6ed
Compare
cc @mweinelt |
...elopment/python-modules/requests/0001-Prefer-NixOS-Nix-default-CA-bundles-over-certifi.patch
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, just two recommendations to give it the finishing touch.
c83f6ed
to
f80dea9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
...elopment/python-modules/requests/0001-Prefer-NixOS-Nix-default-CA-bundles-over-certifi.patch
Outdated
Show resolved
Hide resolved
The requests library defaults to using the certificates from the certifi library when not otherwise specified. If I understand the discussion at NixOS#8247 correctly, we should instead patch it so that it follows the following priority order: 1. the path pointed to by the environment variable $NIX_SSL_CERT_FILE 2. /etc/ssl/certs/ca-certificates.crt 3. whatever it was doing before (in this case, using certifi) This commit implements that.
f80dea9
to
23ef99f
Compare
Merged into my local working tree for python-unstable. Thank you. |
Should I have opened this pull request against a different target branch so that it could be merged rather than closed? |
No, the python-unstable branch is something we create when we need it, because it triggers build jobs over on hydra quite regularly. I could also have brought up the branch first and then have you rebase on top of it, but it was easier for me to just pick it. |
I see. I'd rather have rebased because otherwise I don't think viewing the final commit on github will point back to the PR anymore. I often find it useful, when looking at the history of the nixpkgs repository, to look up a commit in the github interface, find the link to the PR that introduced the commit, and then read the discussion on the PR. Just my two cents. Thanks for picking the commit. |
Agreed, thanks for the feedback. |
This is an attempt to do what #94024 was trying to do, but at a deeper level in the code. In fact the file I edit here has a docstring in it saying the following:
So I guess this is the "right" way to do this (?).
Motivation for this change
The requests library defaults to using the certificates from the
certifi library when not otherwise specified. If I understand the
discussion at #8247 correctly, we should instead patch it so that it
follows the following priority order:
the path pointed to by the environment variable $NIX_SSL_CERT_FILE
/etc/ssl/certs/ca-certificates.crt
whatever it was doing before (in this case, using certifi)
This commit implements that.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)