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

Depcrated use of datetime.datetime.utcnow() #131

Open
sean-maptek opened this issue Mar 15, 2024 · 0 comments
Open

Depcrated use of datetime.datetime.utcnow() #131

sean-maptek opened this issue Mar 15, 2024 · 0 comments

Comments

@sean-maptek
Copy link

In Python 3.12, the function datetime.datetime.utcnow() was deprecated.

The replacement is using datetime.now() with datetime.timezone.utc. There is datetime.UTC which was introduced in 3.11 but to support older versions datetime.timezone.utc can be used.

I was made aware of this in omf 1.0.1, as I have deprecated warnings turned on to try to get a head start on fixing up issues in my code for future versions of Python. The problem is bad for 1.0.1 because the usage is in omf.base.UidModel which makes it widespread and hard to disable.

Looking at the current state in dev branch (7b349ec at the time of writing) for the 2.0.0 dev work, the situation is not as bad as it only effects the omf.fileio.save().

Is there any interest in a pull request for 1.0.1 with this change for a potential 1.0.2 release? Specially, given the current delays in omf 2.0.

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

1 participant