jazzband / django-silk

Silky smooth profiling for Django
MIT License
4.35k stars 333 forks source link

Package 'autopep8' shouldn't need to be required when installing django-silk #660

Closed PabloAlexis611 closed 1 year ago

PabloAlexis611 commented 1 year ago

Since autopep8 is purely for Python code formatting, the installation of autopep8 should be optional/maybe be provided via extras instead. Maybe something like pip install django-silk[dev]

albertyw commented 1 year ago

django-silk supports generating a python snippet to refire a request - https://github.com/jazzband/django-silk/blob/ed3e3261af96dc054fe72b80cd567313f835515b/silk/code_generation/django_test_client.py#L45-L48

This python snippet gets run through autopep8 so autopep8 is a runtime dependency of django-silk, not just a test dependency.