replaced mapping import to collections.abc (Python 3.10+)
removed "open U mode" (Python 3.11+)
Now should run with more recent versions of Python (tested locally on Python 3.11.3), hopefully should still run on older Python versions (untested, sorry).
Two small corrections to remove deprecated parts:
Now should run with more recent versions of Python (tested locally on Python 3.11.3), hopefully should still run on older Python versions (untested, sorry).