← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2092445] [NEW] The django.utils.timezone.utc alias is deprecated.

 

Public bug reported:

OpenStack 2024.2 Dalmatian

[Tue Dec 24 10:43:08.239852 2024] [wsgi:error] [pid 130027:tid 130139]
[remote 10.101.14.143:53559] /usr/share/openstack-
dashboard/openstack_dashboard/usage/base.py:122:
RemovedInDjango50Warning: The django.utils.timezone.utc alias is
deprecated. Please update your code to use datetime.timezone.utc
instead.

Code:
start = timezone.make_naive(start, timezone.utc)
end = timezone.make_naive(end, timezone.utc)

Fix:
start = timezone.make_naive(start, datetime.timezone.utc)
end = timezone.make_naive(end, datetime.timezone.utc)

** Affects: horizon
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/2092445

Title:
  The django.utils.timezone.utc alias is deprecated.

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  OpenStack 2024.2 Dalmatian

  [Tue Dec 24 10:43:08.239852 2024] [wsgi:error] [pid 130027:tid 130139]
  [remote 10.101.14.143:53559] /usr/share/openstack-
  dashboard/openstack_dashboard/usage/base.py:122:
  RemovedInDjango50Warning: The django.utils.timezone.utc alias is
  deprecated. Please update your code to use datetime.timezone.utc
  instead.

  Code:
  start = timezone.make_naive(start, timezone.utc)
  end = timezone.make_naive(end, timezone.utc)

  Fix:
  start = timezone.make_naive(start, datetime.timezone.utc)
  end = timezone.make_naive(end, datetime.timezone.utc)

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/2092445/+subscriptions