namespace-ee / django-datadog-logger

MIT License
22 stars 12 forks source link

ModuleNotFoundError: No module named 'pytz' #35

Closed vachillo closed 2 days ago

vachillo commented 3 months ago

Description

datadog logger uses library pytz, which this library does not have listed as a dependency

Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.

What I Did

ran poetry install with this library as a dependency and got a runtime error from the library:

File "/opt/webapp/api/.venv/lib/python3.11/site-packages/django_datadog_logger/formatters/datadog.py", line 8, in <module>
  import pytz
ModuleNotFoundError: No module named 'pytz'
FabianClemenz commented 4 weeks ago

I encountered this issue too

Could you please include pytz as dependency?

browniebroke commented 1 week ago

Sent a minimal fix in https://github.com/namespace-ee/django-datadog-logger/pull/36 - then realised that CI is broken at the moment because it uses python setup.py test which no longer works on the latest setuptools.

Since Django is dropping support for pytz in favour of the built-in zoneinfo module from the stdlib, I went one step further and did the migration in https://github.com/namespace-ee/django-datadog-logger/pull/37 (which is based on #36)

lnagel commented 2 days ago

Released 0.7.2 and starting upgrade on our own projects.