about summary refs log tree commit diff
path: root/pkgs/development/python-modules/boto
diff options
context:
space:
mode:
authorMarkus S. Wamser <github-dev@mail2013.wamser.eu>2022-10-26 22:14:09 +0200
committerFrederik Rietdijk <freddyrietdijk@fridh.nl>2022-10-27 11:03:33 +0200
commit6dc836fd40e981e2461fc75028b8def4013fd112 (patch)
treee74fdc9ec2c0a2f3236ab0e25dc77c701c3dde24 /pkgs/development/python-modules/boto
parent1d329b17193a9d39ab8851b74ec8dce07d4a07d2 (diff)
python3Packages.boto: fix compatibility with Python 3.10
Diffstat (limited to 'pkgs/development/python-modules/boto')
-rw-r--r--pkgs/development/python-modules/boto/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/boto/default.nix b/pkgs/development/python-modules/boto/default.nix
index 586f023f8009a..3dbe709cb7966 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
   '';