-
Notifications
You must be signed in to change notification settings - Fork 66
Closed
Description
Describe the bug
If I import uplink from master branch without first installing the pydantic package, Python throws an error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\temp\venv\lib\site-packages\uplink\__init__.py", line 2, in <module>
from uplink import returns, types
File "c:\temp\venv\lib\site-packages\uplink\returns.py", line 6, in <module>
from uplink import decorators
File "c:\temp\venv\lib\site-packages\uplink\decorators.py", line 11, in <module>
from uplink import arguments, helpers, hooks, interfaces, utils
File "c:\temp\venv\lib\site-packages\uplink\arguments.py", line 14, in <module>
from uplink.converters import keys
File "c:\temp\venv\lib\site-packages\uplink\converters\__init__.py", line 18, in <module>
from uplink.converters.pydantic_ import PydanticConverter
File "c:\temp\venv\lib\site-packages\uplink\converters\pydantic_.py", line 1, in <module>
import pydantic
ModuleNotFoundError: No module named 'pydantic'
To Reproduce
Steps to reproduce the behavior:
- install uplink from master (
pip install git+https://github.com/prkumar/uplink.git@master) python -c "import uplink"
Expected behavior
uplink shouldn't require pydantic to be installed
Additional context
Looks like removing this line, fixes the issue:
uplink/uplink/converters/pydantic_.py
Line 1 in 87bdc5d
| import pydantic |
I will link a PR that does this change 😄
Metadata
Metadata
Assignees
Labels
No labels