Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dist() and linux_distribution() functions are deprecated warning on python3.7.1 #50792

Closed
kk21986 opened this issue Dec 7, 2018 · 9 comments
Closed
Assignees
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix python3 regarding Python 3 support severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around v3001.1 vulnerable version
Milestone

Comments

@kk21986
Copy link

kk21986 commented Dec 7, 2018

Description of Issue/Question

Getting the below warning messages on salt 2018.3.3 with python3.7.1. Due to these warning messages the automation not behaving properly which uses salt.

/usr/local/tools/python371/lib/python3.7/site-packages/salt/version.py:632: DeprecationWarning: dist() and linux_distribution() functions are deprecated in Python 3.5 lin_ver = linux_distribution()

Setup

Steps to Reproduce Issue

Compile python 3.7.1 on centos 6 and install salt using pip. Then run the salt --version-report where you can see the those warning message.

Versions Report

`# salt --versions-report
/usr/local/tools/python371/lib/python3.7/site-packages/salt/utils/immutabletypes.py:38: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
class ImmutableList(collections.Sequence):
/usr/local/tools/python371/lib/python3.7/site-packages/salt/version.py:632: DeprecationWarning: dist() and linux_distribution() functions are deprecated in Python 3.5
lin_ver = linux_distribution()
Salt Version:
Salt: 2018.3.3

Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.7.5
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.10
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 3.7.1 (default, Nov 23 2018, 02:59:05)
python-gnupg: Not Installed
PyYAML: 3.13
PyZMQ: 17.1.2
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.2.5

System Versions:
dist: redhat 6.9 Santiago
locale: UTF-8
machine: x86_64
release: 2.6.39-400.296.2.el6.x86_64
system: Linux
version: Red Hat Enterprise Linux Server 6.9 Santiago
`

@garethgreenaway garethgreenaway added this to the Approved milestone Dec 10, 2018
@garethgreenaway garethgreenaway added Bug broken, incorrect, or confusing behavior severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P2 Priority 2 labels Dec 10, 2018
@garethgreenaway garethgreenaway self-assigned this Dec 10, 2018
@garethgreenaway garethgreenaway added Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged Bug broken, incorrect, or confusing behavior severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P2 Priority 2 and removed Bug broken, incorrect, or confusing behavior severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P2 Priority 2 Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged labels Dec 10, 2018
@garethgreenaway
Copy link
Contributor

@kk21986 Thanks for the report. The collections deprecation messages were taken care of in #49487 and we have logic in place to rely on the distro library when platform no longer has those functions, we just need to ensure distro is included with our packages. Thanks!

@garethgreenaway garethgreenaway added the fixed-pls-verify fix is linked, bug author to confirm fix label Dec 11, 2018
@kk21986
Copy link
Author

kk21986 commented Dec 19, 2018

@garethgreenaway Thanks. Today I have noticed the same error on loader as well.

/usr/local/tools/python371/lib/python3.7/site-packages/salt/loader.py:765: DeprecationWarning: dist() and linux_distribution() functions are deprecated in Python 3.5
  ret = funcs[key]()

Is this related with the same one or do I have to open new issue for this?

@garethgreenaway
Copy link
Contributor

@kk21986 Looks related. Thanks for the update.

@garethgreenaway
Copy link
Contributor

@kk21986 To confirm, did you see that message after the above fix was in place? Looking closer it appears that this would be related to grains and the deprecation but should be fixed by the PR.

@kk21986
Copy link
Author

kk21986 commented Feb 9, 2019

Looks like fixed. Unfortunately the dist value is showing Unknown on Windows.
System Versions: dist: Unknown OS Name Unknown OS Release Unknown OS Codename locale: cp1252 machine: AMD64 release: 2012ServerR2 system: Windows version: 2012ServerR2 6.3.9600 SP0 Multiprocessor Free

@ikoruk
Copy link

ikoruk commented May 6, 2019

I am still getting the warning on Mac OS Mojave with salt 2019.2.0.

@garethgreenaway
Copy link
Contributor

Needs a backport but will also likely be fixed when we're able to start focusing on various fixes needed for Python 3.8.

@sagetherage sagetherage added python3 regarding Python 3 support and removed fixed-pls-verify fix is linked, bug author to confirm fix P2 Priority 2 labels May 29, 2020
@s0undt3ch
Copy link
Collaborator

FYI, I believe 3001 no longer throws any of these warnings.

@s0undt3ch s0undt3ch added the v3001.1 vulnerable version label Jun 14, 2020
@garethgreenaway garethgreenaway added the fixed-pls-verify fix is linked, bug author to confirm fix label Jun 24, 2020
@sagetherage
Copy link
Contributor

Closing this as fix in v3001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix python3 regarding Python 3 support severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around v3001.1 vulnerable version
Projects
None yet
Development

No branches or pull requests

5 participants