From ba3412d88a7df9c19088040d82ceaf01d84ff1bb Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 3 Jan 2024 03:04:24 +0100 Subject: [PATCH] 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. --- .../version-management/sourcehut/default.nix | 13 +------------ pkgs/applications/video/pyca/default.nix | 14 +------------- .../continuous-integration/buildbot/default.nix | 13 +------------ pkgs/servers/apache-airflow/default.nix | 14 +------------- pkgs/servers/calibre-web/default.nix | 14 +------------- pkgs/servers/geospatial/fit-trackee/default.nix | 15 ++------------- pkgs/tools/misc/ntfy/default.nix | 16 +++------------- pkgs/tools/text/csvkit/default.nix | 13 +------------ 8 files changed, 11 insertions(+), 101 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/default.nix b/pkgs/applications/version-management/sourcehut/default.nix index 8682057b7838..b951a34e8916 100644 --- a/pkgs/applications/version-management/sourcehut/default.nix +++ b/pkgs/applications/version-management/sourcehut/default.nix @@ -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"; diff --git a/pkgs/applications/video/pyca/default.nix b/pkgs/applications/video/pyca/default.nix index 28d25844e033..73b6e606118a 100644 --- a/pkgs/applications/video/pyca/default.nix +++ b/pkgs/applications/video/pyca/default.nix @@ -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; }; }; diff --git a/pkgs/development/tools/continuous-integration/buildbot/default.nix b/pkgs/development/tools/continuous-integration/buildbot/default.nix index 7bc06163f236..019ba4579d4a 100644 --- a/pkgs/development/tools/continuous-integration/buildbot/default.nix +++ b/pkgs/development/tools/continuous-integration/buildbot/default.nix @@ -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; diff --git a/pkgs/servers/apache-airflow/default.nix b/pkgs/servers/apache-airflow/default.nix index 7495b2d8dfd4..223eabc595ca 100644 --- a/pkgs/servers/apache-airflow/default.nix +++ b/pkgs/servers/apache-airflow/default.nix @@ -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 { }; }; diff --git a/pkgs/servers/calibre-web/default.nix b/pkgs/servers/calibre-web/default.nix index eb5f9bae9297..0d0afd185f41 100644 --- a/pkgs/servers/calibre-web/default.nix +++ b/pkgs/servers/calibre-web/default.nix @@ -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 diff --git a/pkgs/servers/geospatial/fit-trackee/default.nix b/pkgs/servers/geospatial/fit-trackee/default.nix index 266747622db9..5a3673244e30 100644 --- a/pkgs/servers/geospatial/fit-trackee/default.nix +++ b/pkgs/servers/geospatial/fit-trackee/default.nix @@ -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"; diff --git a/pkgs/tools/misc/ntfy/default.nix b/pkgs/tools/misc/ntfy/default.nix index cb81d49e29d1..fc9fd078ab20 100644 --- a/pkgs/tools/misc/ntfy/default.nix +++ b/pkgs/tools/misc/ntfy/default.nix @@ -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 { diff --git a/pkgs/tools/text/csvkit/default.nix b/pkgs/tools/text/csvkit/default.nix index cfebb5674327..d559f1204915 100644 --- a/pkgs/tools/text/csvkit/default.nix +++ b/pkgs/tools/text/csvkit/default.nix @@ -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