treewide: use sqlalchemy_1_4 instead of individual overrides

As long as sqlalchemy 1.4 is still maintained we should rather maintain
one derivation well, instead of many overrides barely.
This commit is contained in:
Martin Weinelt 2024-01-03 03:04:24 +01:00
parent 1697051b33
commit ba3412d88a
No known key found for this signature in database
GPG key ID: 87C1E9888F856759
8 changed files with 11 additions and 101 deletions

View file

@ -29,18 +29,7 @@ let
scmsrht = self.callPackage ./scm.nix { };
# sourcehut is not (yet) compatible with SQLAlchemy 2.x
sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec {
version = "1.4.46";
src = fetchPypi {
pname = "SQLAlchemy";
inherit version;
hash = "sha256-aRO4JH2KKS74MVFipRkx4rQM6RaB8bbxj2lwRSAMSjA=";
};
nativeCheckInputs = with super; [ pytestCheckHook mock ];
disabledTestPaths = []
# Disable incompatible tests on Darwin.
++ lib.optionals stdenv.isDarwin [ "test/aaa_profiling" ];
});
sqlalchemy = super.sqlalchemy_1_4;
flask-sqlalchemy = super.flask-sqlalchemy.overridePythonAttrs (oldAttrs: rec {
version = "2.5.1";

View file

@ -1,6 +1,5 @@
{ lib
, python3
, fetchPypi
, buildNpmPackage
, fetchFromGitHub
, jq
@ -11,18 +10,7 @@ let
python = python3.override {
packageOverrides = self: super: {
# pyCA is incompatible with SQLAlchemy 2.0
sqlalchemy = super.sqlalchemy.overridePythonAttrs (old: rec {
version = "1.4.46";
src = fetchPypi {
pname = "SQLAlchemy";
inherit version;
hash = "sha256-aRO4JH2KKS74MVFipRkx4rQM6RaB8bbxj2lwRSAMSjA=";
};
disabledTestPaths = [
"test/aaa_profiling"
"test/ext/mypy"
];
});
sqlalchemy = super.sqlalchemy_1_4;
};
};

View file

@ -6,18 +6,7 @@
let
python = python3.override {
packageOverrides = self: super: {
sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec {
version = "1.4.50";
src = fetchPypi {
pname = "SQLAlchemy";
inherit version;
hash = "sha256-O5fd9Qn8IeELCUA7UhmwbFtViyf8JFMVAnT6TnBwfb8=";
};
disabledTestPaths = [
"test/aaa_profiling"
"test/ext/mypy"
];
});
sqlalchemy = super.sqlalchemy_1_4;
moto = super.moto.overridePythonAttrs (oldAttrs: rec {
# a lot of tests -> very slow, we already build them when building python packages
doCheck = false;

View file

@ -52,19 +52,7 @@ let
});
# apache-airflow doesn't work with sqlalchemy 2.x
# https://github.com/apache/airflow/issues/28723
sqlalchemy = pySuper.sqlalchemy.overridePythonAttrs (o: rec {
version = "1.4.48";
src = fetchFromGitHub {
owner = "sqlalchemy";
repo = "sqlalchemy";
rev = "refs/tags/rel_${lib.replaceStrings [ "." ] [ "_" ] version}";
hash = "sha256-qyD3uoxEnD2pdVvwpUlSqHB3drD4Zg/+ov4CzLFIlLs=";
};
disabledTestPaths = [
"test/aaa_profiling"
"test/ext/mypy"
];
});
sqlalchemy = pySuper.sqlalchemy_1_4;
apache-airflow = pySelf.callPackage ./python-package.nix { };
};

View file

@ -2,24 +2,12 @@
, fetchFromGitHub
, nixosTests
, python3
, fetchPypi
}:
let
python = python3.override {
packageOverrides = self: super: {
sqlalchemy = super.sqlalchemy.overridePythonAttrs (old: rec {
version = "1.4.46";
src = fetchPypi {
pname = "SQLAlchemy";
inherit version;
hash = "sha256-aRO4JH2KKS74MVFipRkx4rQM6RaB8bbxj2lwRSAMSjA=";
};
disabledTestPaths = [
"test/aaa_profiling"
"test/ext/mypy"
];
});
sqlalchemy = super.sqlalchemy_1_4;
};
};
in

View file

@ -8,19 +8,8 @@
let
python = python3.override {
packageOverrides = self: super: {
sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec {
version = "1.4.49";
src = fetchPypi {
pname = "SQLAlchemy";
inherit version;
hash = "sha256-Bv8ly64ww5bEt3N0ZPKn/Deme32kCZk7GCsCTOyArtk=";
};
# Remove "test/typing" that does not exist
disabledTestPaths = [
"test/aaa_profiling"
"test/ext/mypy"
];
});
sqlalchemy = super.sqlalchemy_1_4;
flask-sqlalchemy = super.flask-sqlalchemy.overridePythonAttrs (oldAttrs: rec {
version = "3.0.5";

View file

@ -1,7 +1,6 @@
{ lib
, stdenv
, python39
, fetchPypi
, fetchFromGitHub
, fetchpatch
, withXmpp ? !stdenv.isDarwin
@ -18,18 +17,9 @@ let
ntfy-webpush = self.callPackage ./webpush.nix { };
# databases, on which slack-sdk depends, is incompatible with SQLAlchemy 2.0
sqlalchemy = super.sqlalchemy.overridePythonAttrs rec {
version = "1.4.46";
src = fetchPypi {
pname = "SQLAlchemy";
inherit version;
hash = "sha256-aRO4JH2KKS74MVFipRkx4rQM6RaB8bbxj2lwRSAMSjA=";
};
disabledTestPaths = [
"test/aaa_profiling"
"test/ext/mypy"
];
};
sqlalchemy = super.sqlalchemy_1_4;
django = super.django_3;
};
};
in python.pkgs.buildPythonApplication rec {

View file

@ -6,18 +6,7 @@
let
python = python3.override {
packageOverrides = self: super: {
sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec {
version = "1.4.46";
src = fetchPypi {
pname = "SQLAlchemy";
inherit version;
hash = "sha256-aRO4JH2KKS74MVFipRkx4rQM6RaB8bbxj2lwRSAMSjA=";
};
disabledTestPaths = [
"test/aaa_profiling"
"test/ext/mypy"
];
});
sqlalchemy = super.sqlalchemy_1_4;
};
};
in