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

[WIP] Replace instance of deprecated utcnow() and utcfromtimestamp() #18460

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

cat-bro
Copy link
Contributor

@cat-bro cat-bro commented Jun 28, 2024

For "Support Python 3.13 and Numpy 2" cofest topic with @nsoranzo

ref #16854

These functions will be deprecated with python 3.12 https://docs.python.org/3/whatsnew/3.12.html#deprecated

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@nsoranzo nsoranzo changed the title Replace instance of utcnow() and utcfromtimestamp() as these with be deprecated Replace instance of deprecated utcnow() and utcfromtimestamp() Jun 28, 2024
@cat-bro
Copy link
Contributor Author

cat-bro commented Jun 28, 2024

this replacement is not equivalent. datetime.utcnow() is not timezone aware and what I have replaced it with is. I'll need to fix this.

@cat-bro cat-bro changed the title Replace instance of deprecated utcnow() and utcfromtimestamp() [WIP] Replace instance of deprecated utcnow() and utcfromtimestamp() Jun 29, 2024
@nsoranzo
Copy link
Member

nsoranzo commented Sep 6, 2024

utcnow is also used in lib/galaxy/model/orm/now.py to define our own now function, which is then imported in a dozen files ($ ack --type=python 'galaxy.model.orm.now' to find them).

@jdavcs jdavcs marked this pull request as draft November 12, 2024 05:18
@jdavcs
Copy link
Member

jdavcs commented Nov 12, 2024

Converted to draft status due to WIP title edit. (that way it's easier to filter this out during release review).

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

Successfully merging this pull request may close these issues.

3 participants