Closed jeroenmeulenaar closed 6 years ago
I now used pyenv to install 3.6.3 locally, and then this issue does not occur.
And already in python version 3.5.5 this passes, but I can't find anything in the 3.5.5 release notes that would explain this.
Oh boy, is this related to #72 ? I think we need to bump the minimum required python version. The structure the SDK has no can indeed cause for circular dependencies. In early development we also suffered from this. Instead of importing the class directly we import the module. This seems to work fine and the latest version of python3 which was 3.6 at that time. We didn't test on lower versions of python3 🤦♂️.
It's not directly related to #72, but they are both about issues running code on python version below python 3.6.
I found the change: it's in version 3.5.0. The release notes at https://docs.python.org/3.5/whatsnew/3.5.html write
Circular imports involving relative imports are now supported. (Contributed by Brett Cannon and Antoine Pitrou in bpo-17636.)
I guess this quite some work to fix (use only import foo
instead of using from foo import bar
). I'll just stick with pyenv; you can increase the minimum required python version to 3.5.
Steps to reproduce:
pip3 install bunq_sdk --upgrade
from simplejson import JSONDecodeError
test.py
which containsfrom bunq.sdk import context
What happens: