Roundup Tracker - Issues

Issue 2551278

datetime.datetime.utcnow deprecation
Type: behavior Severity: normal
Components: Web interface, Mail interface, Command-line interface Versions: 2.4.0
Status: fixed fixed
: rouilj : rouilj
Priority: : Blocker, Deprecation

Created on 2023-05-25 23:35 by rouilj, last changed 2023-07-27 05:17 by rouilj.

msg7775 Author: [hidden] (rouilj) Date: 2023-05-25 23:35
3.12 test is throwing the following warnings:

 /home/runner/work/roundup/roundup/roundup/ DeprecationWarning: datetime.utcnow() 
is deprecated and scheduled for removal in a future version. Use timezone-aware objects to 
represent datetimes in UTC:

probably need a roundup/anypy/ that exports a utcnow() function and then
and import and replace datetime.datetime.utcnow() to utcnow() in:,, test/

msg7785 Author: [hidden] (rouilj) Date: 2023-06-18 21:30
See also:
msg7815 Author: [hidden] (rouilj) Date: 2023-07-25 20:31
changeset:   7587:8f29e4ea05ce

fixes this using the method described.
msg7819 Author: [hidden] (rouilj) Date: 2023-07-27 04:00
Checked coverage. It was taking the alternate branch that used utcnow() and not now(UTC).

changeset:   7589:6894f152d49a should fix this I think.
msg7820 Author: [hidden] (rouilj) Date: 2023-07-27 05:17
And it did fix it, but other dates in the module were naive dates
and had to be converted to tz aware dates for 3.11+ otherwise the arithmetic would
fail. Also had to marshall/unmarshall to iso format when saving in the db.

changeset:   7590:5fbd3af526bd

passed ci and I verified that both code paths in were executed.
Date User Action Args
2023-07-27 05:17:01rouiljsetmessages: + msg7820
2023-07-27 04:00:31rouiljsetmessages: + msg7819
2023-07-25 20:31:24rouiljsetstatus: new -> fixed
assignee: rouilj
messages: + msg7815
resolution: fixed
type: behavior
2023-06-26 19:20:13rouiljsetversions: + 2.4.0
2023-06-18 21:30:26rouiljsetmessages: + msg7785
2023-05-25 23:35:34rouiljcreate