[Pkg-salt-team] Bug#921630: Bug#921630: salt-common: Python DeprecationWarning when using platform.linux_distribution in Python 3.5+

Benjamin Drung benjamin.drung at cloud.ionos.com
Thu Feb 7 15:01:10 GMT 2019


Hi,

Am Donnerstag, den 07.02.2019, 08:05 -0500 schrieb Malcolm Acker:
> Package: salt-common
> Version: 2018.3.3+dfsg1-2
> Severity: normal
> 
> Dear Maintainer,
> 
> The following error messages are printed to console/log and causes
> issues with OS-level targeting via grains:
> 
>     2019-02-07 07:34:10,823 [py.warnings      :110 ][WARNING ][1645]
> /usr/lib/python3/dist-packages/salt/loader.py:741:
> DeprecationWarning: dist() and linux_distribution() functions are
> deprecated in Python 3.5
>       ret = funcs[key]()
> 
>     2019-02-07 07:34:10,884 [py.warnings      :110 ][WARNING ][1645]
> /usr/lib/python3/dist-packages/salt/grains/core.py:1756:
> DeprecationWarning: dist() and linux_distribution() functions are
> deprecated in Python 3.5
>       linux_distribution(supported_dists=_supported_dists)]
> 
> This is solved upstream in the following merge request:
> - https://github.com/saltstack/salt/pull/50822/
> 
> This fix requires an additional package dependency: python3-distro

I don't like that pull requests. I makes the code more longer, harder
to read, and requires python3-distro for Python 3.7. I came up with a
different solution (two hours before you created this bug report):
https://github.com/saltstack/salt/pull/51541

-- 
Benjamin Drung
System Developer
Debian & Ubuntu Developer

1&1 IONOS Cloud GmbH | Greifswalder Str. 207 | 10405 Berlin | Germany
E-mail: benjamin.drung at cloud.ionos.com | Web: www.ionos.de

Head Office: Berlin, Germany
District Court Berlin Charlottenburg, Registration number: HRB 125506 B
Executive Management: Christoph Steffens, Matthias Steinberg, Achim
Weiss

Member of United Internet



More information about the pkg-salt-team mailing list