| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…ndulum.from_timestamp`
CodSpeed Performance ReportMerging #803 will not alter performanceComparing Taragolis:remove-deprecated-from-python-stdlib (aac69cc) with master (3e3fec6) Summary✅ 1 untouched benchmarks |
Sorry, something went wrong.
Related: python-pendulum/pendulum#696 Unit tests showing deprecation warnings, see python-pendulum/pendulum#803
| dt = datetime( | ||
| dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, dt.microsecond | ||
| ) | ||
| dt = DateTime.fromtimestamp(timestamp, tz=UTC) |
There was a problem hiding this comment.
I think the current suggestion is recursive and does not use the correct keyword:
| dt = DateTime.fromtimestamp(timestamp, tz=UTC) | |
| dt = _datetime.datetime.fromtimestamp(timestamp, tzinfo=UTC) |
For the develop branch, the change must be done in pendulum/pendulum.py:491
dt = datetime.datetime.utcfromtimestamp(timestamp).replace(tzinfo=UTC)to
dt = datetime.datetime.fromtimestamp(timestamp, tzinfo=UTC)
Sorry, something went wrong.
Related: python-pendulum/pendulum#696 Unit tests showing deprecation warnings, see python-pendulum/pendulum#803
|
Also interested in this fix; is there help needed to get this through? (I see a failing test, but unsure if that's accurate as this is pretty old.) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Pull Request Check List
datetime.datetime.utcfromtimestamp() is deprecated into the Python 3.12 as result current implementation raise warning message
/usr/local/lib/python3.12/site-packages/pendulum/__init__.py:295 DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: