Fix naive offset-naive/aware error in asset compilation [CRI-191] - #23922
Conversation
The XBlockPackageStorage used to return offset-naive datetime objects
which were compared to offset-aware objects when we ran static asset
collection:
./manage.py lms collectstatic
Close CRI-191
|
Thanks for the pull request, @regisb! I've created OSPR-4476 to keep track of it in JIRA. JIRA is a place for product owners to prioritize feature reviews by the engineering development teams. Feel free to add as much of the following information to the ticket:
All technical communication about the code itself will still be done via the GitHub pull request interface. As a reminder, our process documentation is here. |
|
Your PR has finished running tests. There were no failures. |
feanil
left a comment
There was a problem hiding this comment.
Is the timestamp this is going to be connected to always going to be UTC? Should they both be using the timezone.get_current_timezone() function from django.utils.timezone instead? If not, why not?
|
@feanil It does not matter which timezone is being used to obtain an offset-aware datetime. Using a different timezone would result in a different However, it does matter that we have an offset-aware datetime in order to be able to perform datetime comparisons while collecting assets. The relevant piece of code is in django/contrib/staticfiles/management/commands/collectstatic.py (line 280): |
|
@regisb 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production. |
|
EdX Release Notice: This PR has been deployed to the production environment. |
The XBlockPackageStorage used to return offset-naive datetime objects
which were compared to offset-aware objects when we ran static asset
collection:
Close CRI-191 (which is a Juniper issue, cc @nedbat)