pganssle,
@pganssle@qoto.org avatar

datetime.utcnow and datetime.utcfromtimestamp will be deprecated in 3.12: https://github.com/python/cpython/issues/103857

If you maintain a package, now is probably a good time to grep your source code for utcnow and utcfromtimestamp to get out ahead of the deprecation warnings. 📅🕐

pganssle,
@pganssle@qoto.org avatar

It’s relatively easy to make a drop-in replacement for these, but also we’re deprecating them because they’re conceptually the wrong thing to do, so it’s best to migrate to using aware datetimes if possible: https://blog.ganssle.io/articles/2019/11/utcnow.html

hugovk,
@hugovk@mastodon.social avatar

@pganssle I'm getting a deprecation warning from dateutil 😅
https://github.com/dateutil/dateutil/issues/1284

qlp,
@qlp@linh.social avatar

@pganssle Doing a quick grep of my projects, including venv directories, for 'datetime.utcnow' comes back with results from protobuf, black, blackd and pydantic.

One of pip's depedencies, cachecontrol, also comes up.

qlp,
@qlp@linh.social avatar

@pganssle Thankfully, I don't see explicit references to either in the code that I've written. Whew!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programming
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines