Fixes need so Karrio works with Python 3.11
nahall opened this issue · comments
Karrio doesn't currently run in Python 3.11.
At a minimum there is an issue with karrio/sdk/extensions/usps/karrio/providers/usps/units.py line 41 in class PackagingType(Flag)
"TypeError: unsupported operand type(s) for -: 'str' and 'int'"
It looks like the Flag class may need to be reworked to use StrEnum instead of Enum. Here is a page detailing the change python made in 3.11
Hi @nahall,
I did the necessary refactoring and upgraded to Python3.12 with tests for backward compatibility with Python3.11
Thanks