python3Packages.boto: fix compatibility with Python 3.10

This commit is contained in:
Markus S. Wamser 2022-10-26 22:14:09 +02:00 committed by Frederik Rietdijk
parent 1d329b1719
commit 6dc836fd40

View File

@ -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
'';