python-slack-sdk icon indicating copy to clipboard operation
python-slack-sdk copied to clipboard

fix: datetime.utcfromtimestamp is deprecated and scheduled for removal

Open WilliamBergamin opened this issue 8 months ago • 1 comments

datetime.utcfromtimestamp was deprecated in python 3.12. It is used in this project in

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.

WilliamBergamin avatar Mar 28 '25 15:03 WilliamBergamin

👋 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.

github-actions[bot] avatar Apr 28 '25 00:04 github-actions[bot]

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.

apenney avatar Sep 25 '25 16:09 apenney