launchdarkly / python-server-sdk

LaunchDarkly Server-side SDK for Python
https://docs.launchdarkly.com/sdk/server-side/python
Other
38 stars 44 forks source link

DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated #224

Closed jose-reveni closed 9 months ago

jose-reveni commented 9 months ago

Describe the bug DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).

To reproduce Run with python 3.12

Expected behavior No deprecated functions are used

SDK version 8.1.7

Additional context https://github.com/launchdarkly/python-server-sdk/blob/main/ldclient/impl/model/value_parsing.py#L26

keelerm84 commented 9 months ago

Thank you for bringing this to our attention. I will work on getting this resolved as soon as I am able.

One thing to note: We introduced some deprecations in the latest version of v8 so be prepared for those changes once I have a fix out for this. Let me know if you have any questions about that, and I'll let you know as soon as I have a version released with the fix.

keelerm84 commented 9 months ago

Fixed in 8.2.1