Page MenuHomePhabricator

/usr/local/bin/webservice:109: DeprecationWarning: dist() and linux_distribution() functions are deprecated in Python 3.5
Closed, ResolvedPublic

Description

webservice is omitting deprecation warnings, at least on buster:

/usr/local/bin/webservice:109: DeprecationWarning: dist() and linux_distribution() functions are deprecated in Python 3.5
  job.tool.manifest["distribution"] = platform.linux_distribution()[

Event Timeline

The deprecated function doesn't have a replacement, stdlib docs suggests using a package such as distro if needed.

taavi@tools-sgebastion-10:~ $ cat /data/project/majavah-bot/service.manifest | grep distribution
distribution: debian

I guess for the Stretch -> Buster migration we want to change it to have the distro version instead of just name?

Change 713661 had a related patch set uploaded (by Majavah; author: Majavah):

[operations/software/tools-webservice@master] Replace distro with os release

https://gerrit.wikimedia.org/r/713661

Change 713661 merged by jenkins-bot:

[operations/software/tools-webservice@master] Replace distro with os release

https://gerrit.wikimedia.org/r/713661

Will ship with the next tools-webservice release