Skip to content

Conversation

@RomainL972
Copy link

The runtime dependencies should be in "install_requires". "requires" is for build dependencies. Otherwise, the "requests" package won't correctly be installed when running "pip install python-powerdns" in a clean environment:

Python 3.10.12 (main, Aug 15 2025, 14:32:43) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import powerdns
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/romain/.../venv/lib/python3.10/site-packages/powerdns/__init__.py", line 26, in <module>
    from .client import PDNSApiClient
  File "/home/romain/.../venv/lib/python3.10/site-packages/powerdns/client.py", line 27, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'

Reference

The runtime dependencies should be in "install_requires". "requires" is for build dependencies. Otherwise, the "requests" package won't correctly be installed when running "pip install python-powerdns" in a clean environment:

```
Python 3.10.12 (main, Aug 15 2025, 14:32:43) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import powerdns
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/romain/.../venv/lib/python3.10/site-packages/powerdns/__init__.py", line 26, in <module>
    from .client import PDNSApiClient
  File "/home/romain/.../venv/lib/python3.10/site-packages/powerdns/client.py", line 27, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'
```

Reference: https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#declaring-required-dependency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant