[EPIC] Upgrade to django 3.2
(Total: 0:00 h)
See the subtasks for the identified work.
- Related to Refactor #6529: Pulp 3 may be using Django in an unsafe way (with async) added
Here's my branch: https://github.com/daviddavis/pulpcore/tree/django3
Most of everything is working aside from the task code (more on this below). The django-guid package has a 3.x version which they recommend using since it supports ASGI. However, it does not support Python 3.6. But it appears that django-guid 2.2 is working for now.
The biggest change will be handling django's ORM in our async code. Django's ORM is not async safe and therefore you have to use
sync_to_async() when calling django's ORM (otherwise you get an error).
Alternatively, there is a variable we can set
DJANGO_ALLOW_ASYNC_UNSAFE but I don't think we should go this route. From the django docs, it says, "do not use this in production environments".
 "SynchronousOnlyOperation: You cannot call this from an async context - use a thread or sync_to_async"
The compatibility status of django-guardian is a little unclear still. They have it in their test matrix but there is an unmerged PR addressing some compatibility issue.
- Sprint/Milestone set to 3.14.0
- Subject changed from Upgrade to django 3.2 to [Epic] Upgrade to django 3.2
- Description updated (diff)
- Related to deleted (Refactor #6529: Pulp 3 may be using Django in an unsafe way (with async))
- Related to Task #8853: [EPIC] Drop support for Python 3.6 added
- Related to deleted (Task #8853: [EPIC] Drop support for Python 3.6)
- Blocked by Task #8853: [EPIC] Drop support for Python 3.6 added
- Sprint/Milestone changed from 3.14.0 to 3.15.0
- Sprint/Milestone deleted (
We don't really need both the epic and the subtask, closing the subtask, making this one the "real" issue.
- Subject changed from [Epic] Upgrade to django 3.2 to Upgrade to django 3.2
- Sprint/Milestone set to 3.15.0
- Subject changed from Upgrade to django 3.2 to [EPIC] Upgrade to django 3.2
Please register to edit this issue
Also available in: Atom