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

fix datetime utc warning #323

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

utnapischtim
Copy link
Contributor

@utnapischtim utnapischtim commented May 2, 2024

  • tests: update test matrix
  • models: change to datetime.now

For reviewers:
i am not sure about the change from pytz to datetime object itself: https://github.com/inveniosoftware/invenio-records/pull/323/files#diff-469dc6e514838423126b5d9cb7f8a97cb5d024fd648dd95a3be624c49a7e720bL99 my problem is that i don't know why the value in this _serialize method now has the tz_infoset already. it could be because of the change from datetime.utcnow to datetime.now(UTC) but i am not sure

QUESTION:
i tried to remove the SQLALCHEMY_DATABASE_URI variable from the test.yml file, but it didn't work. there are other packages out there which don't need this variable. why is it that this packages needs this variable. the problem was, that mysql used the postgresql URI without setting the mysql URI explicitly

@utnapischtim utnapischtim force-pushed the fix-datetime-utc-warning branch 6 times, most recently from d018e6c to 48eba24 Compare May 2, 2024 20:07
@utnapischtim utnapischtim force-pushed the fix-datetime-utc-warning branch 2 times, most recently from a56fb09 to 4a86350 Compare May 4, 2024 21:39
* datetime.utcnow is deprecated, change to datetime.now(timezone.utc)

* arrow.utcnow() not necessary datetime.now(timezone.utc) does the same

* Draft4Validator, API changed, required needs to be a function now

* pytest-black -> pytest-black-ng former unsupported

* catch expected deprecation warnings to not pop up in logs and to make
  it more predictable after removing the deprecation warnings from the
  code

* the datetime has already set the tz_info. pytz is not necessary
  anymore
@utnapischtim utnapischtim marked this pull request as ready for review May 11, 2024 17:45
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

Successfully merging this pull request may close these issues.

1 participant