Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.3
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: pre-commit/action@v3.0.0
13 changes: 2 additions & 11 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.10
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.12'
cache: 'poetry'
- name: Install dependencies
run: |
Expand All @@ -37,16 +37,7 @@ jobs:
uses: actions/checkout@v3
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
with:
fail-mode: true

- name: check flake
run: |
nix run
nix flake check -L

- name: check 23.05
run: |
nix run --override-input nixpkgs github:NixOS/nixpkgs/nixos-23.05 \
--override-input poetry2nix github:nix-community/poetry2nix/1.41.0
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repos:
- hooks:
- id: black
repo: https://github.com/psf/black
rev: 22.12.0
rev: 25.1.0
- hooks:
- id: mypy
additional_dependencies:
Expand Down
4 changes: 4 additions & 0 deletions changelog.d/20250429_152122_os_PL_133651_bump_python312.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. A new scriv changelog fragment.

- require python 3.12 (PL-133651)
- also update the locked nix input dependencies
35 changes: 18 additions & 17 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
inherit system;
config = {
permittedInsecurePackages = [
"python3.10-requests-2.28.2"
"python3.10-requests-2.29.0"
];
};
};
Expand Down
19 changes: 10 additions & 9 deletions lib.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
stdenv,
poetry2nix,
lzo,
python310,
# currently needs to be hardcoded here, as it is hardcoded in the pyproject.toml as well
python312,
mkShellNoCC,
poetry,
runCommand,
Expand Down Expand Up @@ -60,13 +61,13 @@ let
nh3 =
let
getCargoHash = version: {
"0.2.17" = "sha256-WomlVzKOUfcgAWGJInSvZn9hm+bFpgc4nJbRiyPCU64=";
"0.2.21" = "sha256-1Ytca/GiHidR8JOcz+DydN6N/iguLchbP8Wnrd/0NTk";
}.${version} or (
lib.warn "Unknown nh3 version: '${version}'. Please update getCargoHash." lib.fakeHash
);
in
super.nh3.overridePythonAttrs (old: {
cargoDeps = rustPlatform.fetchCargoTarball {
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (old) src;
name = "${old.pname}-${old.version}";
hash = getCargoHash old.version;
Expand All @@ -84,29 +85,29 @@ let
cryptography =
let
getCargoHash = version: {
"42.0.5" = "sha256-Pw3ftpcDMfZr/w6US5fnnyPVsFSB9+BuIKazDocYjTU=";
"44.0.2" = "sha256-HbUsV+ABE89UvhCRZYXr+Q/zRDKUy+HgCVdQFHqaP4o=";
}.${version} or (
lib.warn "Unknown cryptography version: '${version}'. Please update getCargoHash." lib.fakeHash
);
sha256 = getCargoHash super.cryptography.version;
hash = getCargoHash super.cryptography.version;
isWheel = lib.hasSuffix ".whl" super.cryptography.src;
in
super.cryptography.overridePythonAttrs (old:
lib.optionalAttrs (lib.versionAtLeast old.version "3.5" && !isWheel) {
cargoDeps =
rustPlatform.fetchCargoTarball {
rustPlatform.fetchCargoVendor {
inherit (old) src;
sourceRoot = "${old.pname}-${old.version}/${old.cargoRoot}";
name = "${old.pname}-${old.version}";
inherit sha256;
inherit hash;
};
}
);
})
];
poetryEnv = poetry2nix.mkPoetryEnv {
projectDir = ./.;
python = python310;
python = python312;
overrides = poetryOverrides;
editablePackageSources = {
backy = ./src;
Expand All @@ -115,7 +116,7 @@ let
poetryApplication = poetry2nix.mkPoetryApplication {
projectDir = ./.;
doCheck = true;
python = python310;
python = python312;
overrides = poetryOverrides;
};
in
Expand Down
Loading
Loading