Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

releaseWizard.py DeprecationWarning: datetime.datetime.utcnow() is deprecated #14063

Open
ChrisHegarty opened this issue Dec 13, 2024 · 1 comment

Comments

@ChrisHegarty
Copy link
Contributor

I get many verbose warnings when running the release wizard, which obfuscate the output. E.g.

/Users/chegar/git/tmp/lucene/./dev-tools/scripts/releaseWizard.py:102: 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).
  'epoch': unix_time_millis(datetime.utcnow()),
/Users/chegar/git/tmp/lucene/./dev-tools/scripts/releaseWizard.py:1852: 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).
  return datetime.utcnow() + timedelta(hours=73)
@rmuir
Copy link
Member

rmuir commented Dec 13, 2024

change to datetime.now(tz=UTC)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants