jazzband / tablib

Python Module for Tabular Datasets in XLS, CSV, JSON, YAML, &c.
https://tablib.readthedocs.io/
MIT License
4.63k stars 593 forks source link

DeprecationWarning: datetime.datetime.utcnow() #582

Closed MatteoGuadrini closed 8 months ago

MatteoGuadrini commented 8 months ago
/.../venv/lib/python3.12/site-packages/openpyxl/packaging/core.py:99: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
  now = datetime.datetime.utcnow()
/.../venv/lib/python3.12/site-packages/openpyxl/writer/excel.py:292: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
  workbook.properties.modified = datetime.datetime.utcnow()

It seems one of dependencies of tablib project, in this case openpyxl: https://github.com/jazzband/tablib/blob/4fd9a68c24a2a95fc471d0fc29a2a911b469f93f/pyproject.toml#L38 has a deprecation warning. In the original repository I haven't found any issues opened. Regards.

claudep commented 8 months ago

This was fixed in openpyxl in https://foss.heptapod.net/openpyxl/openpyxl/-/commit/5f99eb3897d79c533

No openpyxl releases contain this fix for now, but I guess this will come soon. I'm closing, as there is nothing we can do in tablib to fix that.