You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running python -Wd ca/manage.py check I get a deprecation warning (paths trimmed for privacy):
user@host:~/src/...$ python -Wd ca/manage.py check
.../lib/python3.12/site-packages/ninja/signature/utils.py:96: RemovedInDjango60Warning: Converter 'uuid' is already registered. Support for overriding registered converters is deprecated and will be removed in Django 6.0.
register_converter(NinjaUUIDConverter, "uuid")
django-ninja registers a converter called uuid, which is already registered by Django. Support for overriding a converter will be removed in Django 6.0. This converter is also problematic as it alters the behavior of views unrelated to django-ninja: A standard Django view using the uuid converter will receive a different type of value depending on if django-ninja is used or not - this was also already raised in #280.
From the looks of it, I think the converter can be safely removed. If not, it has to be renamed. Please advice on your preferred course of action, I'm happy to make a PR.
Versions (please complete the following information):
Python version: 3.12 (should not matter)
Django version: 5.1
Django-Ninja version: 1.3.0
Pydantic version: 2.8.2 (should not matter)
The text was updated successfully, but these errors were encountered:
Sharing a monkeypatch I used to suppress this behavior. The behavior of the uuid converter has always been to return a UUID instance since Django 2.0. I don't really think it should behave differently in Django Ninja than the int converter (i.e. returning str instead of the actual type).
Describe the bug
When running
python -Wd ca/manage.py check
I get a deprecation warning (paths trimmed for privacy):django-ninja registers a converter called
uuid
, which is already registered by Django. Support for overriding a converter will be removed in Django 6.0. This converter is also problematic as it alters the behavior of views unrelated to django-ninja: A standard Django view using theuuid
converter will receive a different type of value depending on if django-ninja is used or not - this was also already raised in #280.From the looks of it, I think the converter can be safely removed. If not, it has to be renamed. Please advice on your preferred course of action, I'm happy to make a PR.
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: