python3Packages.certifi: fix build on Python 3.10#447787
Merged
mweinelt merged 1 commit intoNixOS:python-updatesfrom Jan 21, 2026
Merged
python3Packages.certifi: fix build on Python 3.10#447787mweinelt merged 1 commit intoNixOS:python-updatesfrom
mweinelt merged 1 commit intoNixOS:python-updatesfrom
Conversation
The previous commit to the patch removed too much when adjusting to upstream deprecating 3.7
fredrik-bakke
pushed a commit
to UniMath/agda-unimath
that referenced
this pull request
Oct 14, 2025
We used to support Python 3.8 because of Ubuntu 20.04, which doesn't have LTS anymore. The successor, Ubuntu 22.04, comes with Python 3.10. By upgrading we get tooling improvements --- we can update `pre-commit-hooks` and `autopep8`, the latter of which was disabled IIRC because the version we could use was buggy --- and we can also use new Python features, such as pattern matching and type aliases. ~~There's no time pressure, so I'm keeping it as a draft for now, since one nested Python dependency has recently been broken for Python 3.10 in nixpkgs, but I submitted a PR (NixOS/nixpkgs#447787) to fix that, and temporarily replicated the fix here (with the disadvantage of it not being prebuilt, hence waiting for the PR to be merged).~~ I got rid of the broken dependency by removing a dependency on `requests`. We were only using it to perform a GET requests and looking at its `Link` header, which can be done quite easily with Python's built-in `urllib`. Note that I updated pre-commit/prettier, but it's not maintained anymore, because pre-commit apparently broke something, and IIUC there's now no officially supported way of running prettier in pre-commit 🤷. Fixes #939
fredrik-bakke
pushed a commit
to fredrik-bakke/agda-unimath
that referenced
this pull request
Oct 17, 2025
We used to support Python 3.8 because of Ubuntu 20.04, which doesn't have LTS anymore. The successor, Ubuntu 22.04, comes with Python 3.10. By upgrading we get tooling improvements --- we can update `pre-commit-hooks` and `autopep8`, the latter of which was disabled IIRC because the version we could use was buggy --- and we can also use new Python features, such as pattern matching and type aliases. ~~There's no time pressure, so I'm keeping it as a draft for now, since one nested Python dependency has recently been broken for Python 3.10 in nixpkgs, but I submitted a PR (NixOS/nixpkgs#447787) to fix that, and temporarily replicated the fix here (with the disadvantage of it not being prebuilt, hence waiting for the PR to be merged).~~ I got rid of the broken dependency by removing a dependency on `requests`. We were only using it to perform a GET requests and looking at its `Link` header, which can be done quite easily with Python's built-in `urllib`. Note that I updated pre-commit/prettier, but it's not maintained anymore, because pre-commit apparently broke something, and IIUC there's now no officially supported way of running prettier in pre-commit 🤷. Fixes UniMath#939
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The previous commit #420216 to the patch removed too much when adjusting to upstream deprecating 3.7; in particular it removed the patch to the
contentsfunction on Python <3.11. Nixpkgs givescertifiits owncacert, which isn't preprocessed to be ASCII, which upstream expects, so the patch previously changed the encoding toutf-8.Things done
The associated pytests run, and I checked that the package works as expected in the repo where it's a nested dependency (https://github.com/UniMath/agda-unimath)
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.