Skip to content

Commit

Permalink
python312Packages.django-q2: init at 1.7.4; mailmanPackages.hyperkit…
Browse files Browse the repository at this point in the history
…ty: 1.3.9 -> 1.3.12; mailmanPackages: use python 3.12; python3Packages.django-q: drop (#363754)
  • Loading branch information
SuperSandro2000 authored Dec 16, 2024
2 parents 8f6601b + b93e42b commit 1c8a5ba
Show file tree
Hide file tree
Showing 8 changed files with 114 additions and 136 deletions.
93 changes: 0 additions & 93 deletions pkgs/development/python-modules/django-q/default.nix

This file was deleted.

24 changes: 0 additions & 24 deletions pkgs/development/python-modules/django-q/pep-621.patch

This file was deleted.

99 changes: 99 additions & 0 deletions pkgs/development/python-modules/django-q2/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{
lib,
arrow,
blessed,
bson,
buildPythonPackage,
croniter,
django,
django-picklefield,
django-redis,
fetchFromGitHub,
hiredis,
pkgs,
poetry-core,
pytest-django,
pytestCheckHook,
}:

buildPythonPackage rec {
pname = "django-q2";
version = "1.7.4";
pyproject = true;

src = fetchFromGitHub {
owner = "django-q2";
repo = "django-q2";
rev = "refs/tags/v${version}";
hash = "sha256-mp/IZkfT64xW42B1TEO6lSHxvLQbeH4td8vqZH7wUxM=";
};

postPatch = ''
substituteInPlace django_q/tests/settings.py \
--replace-fail "HiredisParser" "_HiredisParser"
'';

build-system = [
poetry-core
];

dependencies = [
arrow
bson # required for mongodb but undocumented
django
django-picklefield
];

nativeCheckInputs = [
blessed
croniter
django-redis
# pyredis refuses to load with hiredis<3.0.0
(hiredis.overrideAttrs (
new: old: {
version = "3.1.0";
src = old.src.override {
rev = "refs/tags/v${new.version}";
hash = "sha256-ID5OJdARd2N2GYEpcYOpxenpZlhWnWr5fAClAgqEgGg=";
};
}
))
pytest-django
pytestCheckHook
];

pythonImportsCheck = [ "django_q" ];

preCheck = ''
${pkgs.redis}/bin/redis-server &
REDIS_PID=$!
'';

postCheck = ''
kill $REDIS_PID
'';

env = {
MONGO_HOST = "127.0.0.1";
REDIS_HOST = "127.0.0.1";
};

disabledTests = [
# requires a running mongodb
"test_mongo"
];

disabledTestPaths = [
"django_q/tests/test_commands.py"
];

pytestFlagsArray = [ "-vv" ];

meta = with lib; {
description = "Multiprocessing distributed task queue for Django based on Django-Q";
homepage = "https://github.com/django-q2/django-q2";
changelog = "https://github.com/django-q2/django-q2/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}
12 changes: 6 additions & 6 deletions pkgs/servers/mail/mailman/hyperkitty.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@
with python3.pkgs;

buildPythonPackage rec {
pname = "HyperKitty";
version = "1.3.9";
pname = "hyperkitty";
version = "1.3.12";
pyproject = true;

disabled = pythonOlder "3.10";

src = fetchurl {
url = "https://gitlab.com/mailman/hyperkitty/-/releases/${version}/downloads/hyperkitty-${version}.tar.gz";
hash = "sha256-BfhCh4zZcfwoIfubW/+MUWXwh1yFOH/jpRdQdsj6lME=";
hash = "sha256-3rWCk37FvJ6pwdXYa/t2pNpCm2Dh/qb9aWTnxmfPFh0=";
};

nativeBuildInputs = [
build-system = [
pdm-backend
];

propagatedBuildInputs = [
dependencies = [
django
django-gravatar2
django-haystack
django-mailman3
django-q
django-q2
django-compressor
django-extensions
djangorestframework
Expand Down
13 changes: 6 additions & 7 deletions pkgs/servers/mail/mailman/python.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ lib.fix (self: python3.override {
[2] f931bc81d63f5cfda55ac73d754c87b3fd63b291
*/

# django-q tests fail with redis 5.0.0.
# https://gitlab.com/mailman/hyperkitty/-/issues/493
redis = super.redis.overridePythonAttrs ({ pname, ... }: rec {
version = "4.6.0";
src = fetchPypi {
inherit pname version;
hash = "sha256-WF3FFrnrBCphnvCjnD19Vf6BvbTfCaUsnN3g0Hvxqn0=";
# the redis python library only supports hiredis 3+ from version 5.1.0 onwards
hiredis = super.hiredis.overrideAttrs (new: { src, ... }: {
version = "3.1.0";
src = src.override {
rev = "refs/tags/v${new.version}";
hash = "sha256-ID5OJdARd2N2GYEpcYOpxenpZlhWnWr5fAClAgqEgGg=";
};
});
})
Expand Down
6 changes: 1 addition & 5 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11665,11 +11665,7 @@ with pkgs;
nodejs = nodejs_18;
};

mailmanPackages = callPackage ../servers/mail/mailman {
# Hyperkitty test fails with 3.12:
# https://gitlab.com/mailman/hyperkitty/-/issues/514
python3 = python311;
};
mailmanPackages = callPackage ../servers/mail/mailman { };
inherit (mailmanPackages) mailman mailman-hyperkitty;
mailman-web = mailmanPackages.web;

Expand Down
1 change: 1 addition & 0 deletions pkgs/top-level/python-aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ mapAliases ({
django-mysql = throw "django-mysql has been removed, since it was an unused leaf package"; # added 2024-07-02
django_nose = django-nose; # added 2023-07-25
django-nose = throw "django-nose has been removed since it has not been maintained and there are no dependent packages"; # added 2024-05-21
django-q = throw "django-q has been removed because it is unmaintained and was unused"; # added 2024-12-13
django_reversion = django-reversion; # added 2022-06-18
django_polymorphic = django-polymorphic; # added 2022-05-24
django_redis = django-redis; # added 2021-10-11
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3575,7 +3575,7 @@ self: super: with self; {

django-pwa = callPackage ../development/python-modules/django-pwa { };

django-q = callPackage ../development/python-modules/django-q { };
django-q2 = callPackage ../development/python-modules/django-q2 { };

django-scheduler = callPackage ../development/python-modules/django-scheduler { };

Expand Down

0 comments on commit 1c8a5ba

Please sign in to comment.