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

DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working #52120

Closed
cboltz opened this issue Mar 8, 2019 · 7 comments · Fixed by #54309
Labels
Bug broken, incorrect, or confusing behavior Duplicate Duplicate of another issue or PR - will be closed fixed-pls-verify fix is linked, bug author to confirm fix
Milestone

Comments

@cboltz
Copy link

cboltz commented Mar 8, 2019

Description of Issue/Question

When running salt on openSUSE Tumbleweed, I get the following warnings:

# salt-key
/usr/lib/python3.7/site-packages/salt/utils/odict.py:25: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Callable
/usr/lib/python3.7/site-packages/salt/loader.py:19: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import MutableMapping
/usr/lib/python3.7/site-packages/salt/utils/immutabletypes.py:17: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  class ImmutableDict(collections.Mapping):
/usr/lib/python3.7/site-packages/salt/daemons/__init__.py:9: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import namedtuple, Iterable, Sequence, Mapping
Accepted Keys:
[...]

The above is from salt-key, but I get the same warnings when I for example run salt \* state.highstate

Setup

latest openSUSE Tumbleweed (see below for version details) as saltmaster

Steps to Reproduce Issue

run salt or salt-key

Versions Report

salt --versions-report
/usr/lib/python3.7/site-packages/salt/utils/odict.py:25: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Callable
/usr/lib/python3.7/site-packages/salt/loader.py:19: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import MutableMapping
/usr/lib/python3.7/site-packages/salt/utils/immutabletypes.py:17: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  class ImmutableDict(collections.Mapping):
/usr/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.2
 
Dependency Versions:
           cffi: 1.11.5
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.10
        libgit2: 0.27.7
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.5.6
   mysql-python: Not Installed
      pycparser: 2.19
       pycrypto: 3.7.2
   pycryptodome: Not Installed
         pygit2: 0.27.0
         Python: 3.7.2 (default, Dec 30 2018, 16:18:15) [GCC]
   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.3.1
 
System Versions:
           dist:   
         locale: UTF-8
        machine: x86_64
        release: 4.20.13-1-default
         system: Linux
        version: Not Installed
@gtmanfred
Copy link
Contributor

This was fixed in 2018.3.4 #49452

@Ch3LL Ch3LL added Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix labels Mar 11, 2019
@Ch3LL Ch3LL added this to the Approved milestone Mar 11, 2019
@Ch3LL Ch3LL added the Duplicate Duplicate of another issue or PR - will be closed label Mar 11, 2019
@kaidokert
Copy link
Contributor

I'm running 2019.2.0 on Mac, installed through brew install saltstack

[WARNING ] /usr/local/Cellar/salt/2019.2.0_1/libexec/lib/python3.7/site-packages/salt/utils/path.py:265: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  if not isinstance(exes, collections.Iterable):

Also separate warning:

[WARNING ] /usr/local/Cellar/salt/2019.2.0_1/libexec/lib/python3.7/site-packages/salt/loader.py:772: DeprecationWarning: dist() and linux_distribution() functions are deprecated in Python 3.5
  ret = funcs[key]()

For some reason, export PYTHONWARNINGS="ignore::DeprecationWarning,ignore::PendingDeprecationWarning" does not quiet these either.

Salt Version:
           Salt: 2019.2.0
 
Dependency Versions:
           cffi: 1.11.5
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.10
        libgit2: 0.28.1
        libnacl: Not Installed
       M2Crypto: 0.31.0
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.6.1
   mysql-python: Not Installed
      pycparser: 2.19
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: 0.28.1
         Python: 3.7.4 (default, Jul  9 2019, 18:13:23)
   python-gnupg: Not Installed
         PyYAML: 3.13
          PyZMQ: 18.0.1
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.3.2
 
System Versions:
           dist:   
         locale: UTF-8
        machine: x86_64
        release: 18.5.0
         system: Darwin
        version: 10.14.4 x86_64

@Kimamisa
Copy link
Contributor

This wasn't merged... I mean, it was, but was reverted. This ticket should still be open.

@boltronics
Copy link
Contributor

Still an issue in Salt 2019.2.2 on Debian Buster (Python 3.7.3):

$ lsb_release -c
Codename:	buster
$ dpkg -l | grep -i salt
ii  salt-common                          2019.2.2+ds-1               all          shared libraries that salt requires for all packages
ii  salt-master                          2019.2.2+ds-1               all          remote manager to administer servers via salt
ii  salt-minion                          2019.2.2+ds-1               all          client package for salt, the distributed remote execution system
ii  salt-ssh                             2019.2.2+ds-1               all          remote manager to administer servers via Salt SSH
ii  salt-syndic                          2019.2.2+ds-1               all          master-of-masters for salt, the distributed remote execution system
$ sudo salt-call test.ping
[WARNING ] /usr/lib/python3/dist-packages/salt/utils/path.py:265: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  if not isinstance(exes, collections.Iterable):

[WARNING ] /usr/lib/python3/dist-packages/salt/transport/zeromq.py:42: VisibleDeprecationWarning: zmq.eventloop.minitornado is deprecated in pyzmq 14.0 and will be removed.
    Install tornado itself to use zmq with the tornado IOLoop.
    
  import zmq.eventloop.ioloop

local:
    True
$ 

The warnings don't show when using the same Salt release/repository in Debian Stretch (Python 3.5.3).

@rosscdh
Copy link

rosscdh commented May 23, 2020

+1 messes certain scripts up
salt 3000.3
saltstack/salt:latest docker image

@DmitryKuzmenko
Copy link
Contributor

@rosscdh last occurrences of this issue are fixed in #57240 and will be released in Sodium.

@rosscdh
Copy link

rosscdh commented May 26, 2020 via email

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 Duplicate Duplicate of another issue or PR - will be closed fixed-pls-verify fix is linked, bug author to confirm fix
Projects
None yet
8 participants