raphaelm / python-fints

Pure-python FinTS (formerly known as HBCI) implementation
https://pypi.python.org/pypi/fints
GNU Lesser General Public License v3.0
328 stars 81 forks source link

Make python-fints compatible with Python 3.10 #134

Closed jamilraichouni closed 2 years ago

jamilraichouni commented 2 years ago

Describe the bug python-fints is not compatible with Python3.10

image

Bank I tested this with None, see above

Expected behavior python-fints is compatible with Python3.10

Code required to reproduce

import fints.client.FinTS3PinTanClient

Log output / error message

>>> import fints.client.FinTS3PinTanClient
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/jamilraichouni/.venvs/finances-44HoV-h9-py3.10/lib/python3.10/site-packages/fints/client.py", line 14, in <module>
    from .connection import FinTSHTTPSConnection
  File "/Users/jamilraichouni/.venvs/finances-44HoV-h9-py3.10/lib/python3.10/site-packages/fints/connection.py", line 9, in <module>
    from .message import FinTSInstituteMessage, FinTSMessage
  File "/Users/jamilraichouni/.venvs/finances-44HoV-h9-py3.10/lib/python3.10/site-packages/fints/message.py", line 3, in <module>
    from .formals import SegmentSequence
  File "/Users/jamilraichouni/.venvs/finances-44HoV-h9-py3.10/lib/python3.10/site-packages/fints/formals.py", line 3, in <module>
    from fints.fields import *
  File "/Users/jamilraichouni/.venvs/finances-44HoV-h9-py3.10/lib/python3.10/site-packages/fints/fields.py", line 6, in <module>
    from fints.types import Container, SegmentSequence, TypedField
  File "/Users/jamilraichouni/.venvs/finances-44HoV-h9-py3.10/lib/python3.10/site-packages/fints/types.py", line 1, in <module>
    from collections import Iterable, OrderedDict
ImportError: cannot import name 'Iterable' from 'collections' (/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/collections/__init__.py)

Additional context N/A

lukasjuhrich commented 2 years ago

This has already been adressed in #132 (901805f1c0a0a4785db0abba7ff770fb97e095a2), however, a new version has not been released yet. A workaround is replacing any fints~=[version] line in your requirements file with git+git://github.com/raphaelm/python-fints.git@846c25f5f6ae578cde5151fc30b5f7a3601a95ac#egg=fints

clstaudt commented 2 years ago

Although the workaround does its job, it would be great to have a new release including Python 3.10 support.

raphaelm commented 2 years ago

Sorry 'bout the delay, released 3.1.0 just now!