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

Deprecation Warning: datetime.datetime.utcnow #908

Open
giggio opened this issue Apr 26, 2024 · 1 comment
Open

Deprecation Warning: datetime.datetime.utcnow #908

giggio opened this issue Apr 26, 2024 · 1 comment

Comments

@giggio
Copy link

giggio commented Apr 26, 2024

I'm getting a deprecation warning:

/lib/security/howdy/compare.py:59: 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).
  "Date: " + datetime.datetime.utcnow().strftime("%Y/%m/%d %H:%M:%S UTC"),

It is coming from this line:

_("Date: ") + datetime.datetime.utcnow().strftime("%Y/%m/%d %H:%M:%S UTC"),


I've searched for similar issues already, and my issue has not been reported yet.

Linux distribution (if applicable): Ubuntu 24.04 LTS

Howdy version (sudo howdy version): 2.6.1


Workaround:
Add to the lines just before (you need to use tabs, not spaces):

    import warnings
    warnings.filterwarnings("ignore", category=DeprecationWarning)
@chinggg
Copy link

chinggg commented May 7, 2024

Arch Linux using howdy from AUR is facing the same issue

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