Bug #112366 | mysql-connector-python is triggering a Django deprecation warning | ||
---|---|---|---|
Submitted: | 16 Sep 2023 15:57 | Modified: | 16 Nov 2023 22:32 |
Reporter: | John Doe | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / Python | Severity: | S3 (Non-critical) |
Version: | 8.1.0 | OS: | CentOS (7) |
Assigned to: | CPU Architecture: | x86 | |
Tags: | Django |
[16 Sep 2023 15:57]
John Doe
[21 Sep 2023 14:43]
Nuno Mariz
Using the latest Django version (4.2.5) the warning is raised. Code: from django.conf import settings from django.utils import timezone settings.configure() print(timezone.utc) Result: $ python -Wall dev_django2.py (snip)/test.py:5: RemovedInDjango50Warning: The django.utils.timezone.utc alias is deprecated. Please update your code to use datetime.timezone.utc instead. print(timezone.utc) UTC
[16 Nov 2023 22:32]
Philip Olson
Posted by developer: Fixed as of the upcoming MySQL Connector/Python 8.3.0 release, and here's the proposed changelog entry from the documentation team: Django would report a deprecation warning about using django.utils.timezone.utc; updated code to instead use datetime.timezone.utc. Thank you for the bug report.