Invalid syntax in decorators.py
PoCk3T opened this issue · 4 comments
Describe the bug
See 8b434ec#commitcomment-38003743
It seems like this commit is bringing a new file decorators.py which doesn't run on Python3.5 :
File "/root/venv/lib/python3.5/site-packages/jhtalib/decorators.py", line 20
print(f"Finished {func.name!r} in {run_time:.4f} secs")
^
SyntaxError: invalid syntax
To Reproduce
Steps to reproduce the behavior:
- Update jhTAlib to latest version
- With Python3.5 : import jhtalib as jhta
- Get the error
Expected behavior
No SyntaxError on import jhtalib as jhta
Additional context
Before upgrading jhTAlib, and without any change to my own code, all was working fine
I'm running Python 3.6.9 without any errors. Is it possible too upgrade Python to the latest version and run it again?
If not. Can you post your code what's generate this error?
I unfortunately can't upgrade to Python3.6.9 for compatibility purposes
I tried to create a minimal Docker environment where this issue would reproduce, based on the same Python 3.5.2 and all other libraries I use, I could reproduce the issue with a simple "import jhtalib as jhta", no other code needed
Steps to reproduce:
- Download Dockerfile here: https://justpaste.it/5s51d
- docker build -f Dockerfile -t jhtalibbugrepro --no-cache .
- docker run -it jhtalibbugrepro /bin/bash
- python
- import jhtalib as jhta
- ==> observe that it works fine on jhTAlib==20200211.0
- python -m pip install jhtalib --upgrade
- python
- import jhtalib as jhta
- ==> observe that it doesn't work anymore on latest jhTAlib
Fixed: 6db3b5e
Wow, less than 20 hours after I opened the issue, well done :)
I will give it a try!
Thank you for that, and thank you for the whole library in general, tremendously helpful
Keep on the good work !