diff --git a/nixos/modules/services/networking/magic-wormhole-mailbox-server.nix b/nixos/modules/services/networking/magic-wormhole-mailbox-server.nix index 5b700269037c..f2bb40bae31e 100644 --- a/nixos/modules/services/networking/magic-wormhole-mailbox-server.nix +++ b/nixos/modules/services/networking/magic-wormhole-mailbox-server.nix @@ -9,7 +9,7 @@ let cfg = config.services.magic-wormhole-mailbox-server; # keep semicolon in dataDir for backward compatibility dataDir = "/var/lib/magic-wormhole-mailbox-server;"; - python = pkgs.python311.withPackages ( + python = pkgs.python3.withPackages ( py: with py; [ magic-wormhole-mailbox-server twisted diff --git a/pkgs/development/python-modules/magic-wormhole-mailbox-server/default.nix b/pkgs/development/python-modules/magic-wormhole-mailbox-server/default.nix index d98cfa259579..8ee9ab16ef3d 100644 --- a/pkgs/development/python-modules/magic-wormhole-mailbox-server/default.nix +++ b/pkgs/development/python-modules/magic-wormhole-mailbox-server/default.nix @@ -3,46 +3,31 @@ stdenv, buildPythonPackage, fetchPypi, - fetchpatch, setuptools, - six, attrs, twisted, autobahn, treq, - mock, nixosTests, - pythonOlder, - pythonAtLeast, pytestCheckHook, }: buildPythonPackage rec { pname = "magic-wormhole-mailbox-server"; - version = "0.4.1"; + version = "0.5.1"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-GvEFkpCcqvUZwA5wbqyELF53+NQ1YhX+nGHHsiWKiPs="; + hash = "sha256-oAegNnIpMgRldoHb9QIEXW1YF8V/mq4vIibm6hoAjKE="; }; - patches = [ - (fetchpatch { - # Remove the 'U' open mode removed, https://github.com/magic-wormhole/magic-wormhole-mailbox-server/pull/34 - name = "fix-for-python-3.11.patch"; - url = "https://github.com/magic-wormhole/magic-wormhole-mailbox-server/commit/4b358859ba80de37c3dc0a5f67ec36909fd48234.patch"; - hash = "sha256-RzZ5kD+xhmFYusVzAbGE+CODXtJVR1zN2rZ+VGApXiQ="; - }) - ]; - build-system = [ setuptools ]; dependencies = [ attrs autobahn setuptools # pkg_resources is referenced at runtime - six twisted ] ++ autobahn.optional-dependencies.twisted ++ twisted.optional-dependencies.tls; @@ -51,7 +36,6 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook treq - mock ]; disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ @@ -69,7 +53,5 @@ buildPythonPackage rec { changelog = "https://github.com/magic-wormhole/magic-wormhole-mailbox-server/blob/${version}/NEWS.md"; license = lib.licenses.mit; maintainers = [ lib.maintainers.mjoerg ]; - # Python 3.12 support: https://github.com/magic-wormhole/magic-wormhole-mailbox-server/issues/41 - broken = pythonOlder "3.7" || pythonAtLeast "3.12"; }; } diff --git a/pkgs/development/python-modules/magic-wormhole/default.nix b/pkgs/development/python-modules/magic-wormhole/default.nix index 87404ab5b21e..f85cfd295954 100644 --- a/pkgs/development/python-modules/magic-wormhole/default.nix +++ b/pkgs/development/python-modules/magic-wormhole/default.nix @@ -28,7 +28,6 @@ # tests nettools, unixtools, - mock, magic-wormhole-transit-relay, magic-wormhole-mailbox-server, pytestCheckHook, @@ -81,16 +80,9 @@ buildPythonPackage rec { }; nativeCheckInputs = - # For Python 3.12, remove magic-wormhole-mailbox-server and magic-wormhole-transit-relay from test dependencies, - # which are not yet supported with this version. - lib.optionals - (!magic-wormhole-mailbox-server.meta.broken && !magic-wormhole-transit-relay.meta.broken) - [ - magic-wormhole-mailbox-server - magic-wormhole-transit-relay - ] - ++ [ - mock + [ + magic-wormhole-mailbox-server + magic-wormhole-transit-relay pytestCheckHook ] ++ optional-dependencies.dilation @@ -98,20 +90,6 @@ buildPythonPackage rec { __darwinAllowLocalNetworking = true; - disabledTestPaths = - # For Python 3.12, remove the tests depending on magic-wormhole-mailbox-server and magic-wormhole-transit-relay, - # which are not yet supported with this version. - lib.optionals - (magic-wormhole-mailbox-server.meta.broken || magic-wormhole-transit-relay.meta.broken) - [ - "src/wormhole/test/dilate/test_full.py" - "src/wormhole/test/test_args.py" - "src/wormhole/test/test_cli.py" - "src/wormhole/test/test_transit.py" - "src/wormhole/test/test_wormhole.py" - "src/wormhole/test/test_xfer_util.py" - ]; - postInstall = '' install -Dm644 docs/wormhole.1 $out/share/man/man1/wormhole.1 '';