Skip to content

Missing dependency on packaging in django-csp 4.0b3 #265

@titouanc

Description

@titouanc

Following the update from 4.0b2 to 4.0b3 in our project (based on Python 3.10), the CI is now failing because of the following error:

$ python manage.py collectstatic
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/local/lib/python3.10/site-packages/csp/apps.py", line 3, in <module>
    from csp.checks import *  # noqa: F403 (here to register the checks)
File "/usr/local/lib/python3.10/site-packages/csp/checks.py", line 12, in <module>
    from packaging.version import Version
ModuleNotFoundError: No module named 'packaging'

This looks related to the changes introduced in e9e4e27

I fixed the issue by manually adding packaging to our dependencies, but the proper fix would be to include it in django-csp's own dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions