fix: datetime.utcfromtimestamp is deprecated and scheduled for removal
datetime.utcfromtimestamp was deprecated in python 3.12. It is used in this project in
- slack_sdk/oauth/installation_store/models/installation.py
- slack_sdk/oauth/installation_store/models/bot.py
- slack_sdk/oauth/state_store/sqlalchemy/init.py
We should replace
datetime.utcfromtimestamp(self.installed_at)
In favor of
datetime.fromtimestamp(self.installed_at, tz=timezone.utc)
Unit test should be added to ensure backwards compatibility
Requirements
For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. :bow:
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.
Any news on this? I was working through all our deprecations in pytest and stumbled over this. It's been a long time with no activity for an easy fix.