From 6dc836fd40e981e2461fc75028b8def4013fd112 Mon Sep 17 00:00:00 2001 From: "Markus S. Wamser" Date: Wed, 26 Oct 2022 22:14:09 +0200 Subject: [PATCH] python3Packages.boto: fix compatibility with Python 3.10 --- pkgs/development/python-modules/boto/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/boto/default.nix b/pkgs/development/python-modules/boto/default.nix index 586f023f8009..3dbe709cb796 100644 --- a/pkgs/development/python-modules/boto/default.nix +++ b/pkgs/development/python-modules/boto/default.nix @@ -12,7 +12,6 @@ buildPythonPackage rec { pname = "boto"; version = "2.49.0"; - disabled = pythonAtLeast "3.10"; # cannot import name 'Mapping' from 'collections' src = fetchPypi { inherit pname version; @@ -25,6 +24,11 @@ buildPythonPackage rec { ./bug-953970_python3.8-compat.patch ]; + postPatch = '' + substituteInPlace boto/dynamodb/types.py --replace 'from collections import Mapping' 'from collections.abc import Mapping' + substituteInPlace boto/mws/connection.py --replace 'import collections' 'import collections.abc as collections' + ''; + checkPhase = '' ${python.interpreter} tests/test.py default '';