gijswobben / pymed

PyMed is a Python library that provides access to PubMed.
MIT License
193 stars 111 forks source link

api.py is broken #15

Closed fluoridepsychosis closed 5 years ago

fluoridepsychosis commented 5 years ago

Describe the bug

When importing pymed I get the following error:

$ python3 
Python 3.5.3 (default, Sep 27 2018, 17:25:39)  
[GCC 6.3.0 20170516] on linux 
Type "help", "copyright", "credits" or "license" for more information.
>>> from pymed import PubMed 
Traceback (most recent call last): 
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/pymed/__init__.py", line 1, in <module> 
    from .api import PubMed
  File "/usr/local/lib/python3.5/dist-packages/pymed/api.py", line 118
    response = requests.get(f"{BASE_URL}{url}", params=parameters)
                                             ^ 
SyntaxError: invalid syntax
>>> import pymed 
Traceback (most recent call last): 
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/pymed/__init__.py", line 1, in <module>
    from .api import PubMed
  File "/usr/local/lib/python3.5/dist-packages/pymed/api.py", line 118
    response = requests.get(f"{BASE_URL}{url}", params=parameters)
                                             ^
SyntaxError: invalid syntax `

To Reproduce Just try to import it in the interpreter.

Environment (please complete the following information):

gijswobben commented 5 years ago

I should probably write this down in the docs somewhere.. That syntax is supported from Python 3.6. If you upgrade (which I recommend you do anyway), it should work fine. Python 3.7.3 is the latest stable version.

fluoridepsychosis commented 5 years ago

my bad