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

Fix this warning please. #50994

Closed
wzlee opened this issue Dec 28, 2018 · 15 comments
Closed

Fix this warning please. #50994

wzlee opened this issue Dec 28, 2018 · 15 comments
Labels
Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged
Milestone

Comments

@wzlee
Copy link

wzlee commented Dec 28, 2018

/usr/local/Cellar/salt/2018.3.3/libexec/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):
[WARNING ] /usr/local/Cellar/salt/2018.3.3/libexec/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

[WARNING ] /usr/local/Cellar/salt/2018.3.3/libexec/lib/python3.7/site-packages/salt/transport/ipc.py:280: DeprecationWarning: encoding is deprecated, Use raw=False instead.
  self.unpacker = msgpack.Unpacker(encoding=encoding)

[WARNING ] /usr/local/Cellar/salt/2018.3.3/libexec/lib/python3.7/site-packages/salt/payload.py:145: DeprecationWarning: encoding is deprecated, Use raw=False instead.
  ret = msgpack.loads(msg, use_list=True, ext_hook=ext_type_decoder, encoding=encoding)
@garethgreenaway
Copy link
Contributor

garethgreenaway commented Dec 28, 2018

Fixed in #49487 and will be available in 2018.3.4 and future releases.

@BrianSidebotham
Copy link
Contributor

It looks like this was merged into the 2018.3 branch but not into the develop branch? I still get this warning when using the develop branch.

@garethgreenaway
Copy link
Contributor

The fix in 2018.3 will be merged forward and make it's way into develop. A merge forward including that fix hasn't happened yet. Most likely sometime this week once the previous merge forward has cleared.

@BrianSidebotham
Copy link
Contributor

@garethgreenaway Perfect, thanks for the confirmation. 👍

@jakehilton
Copy link

Upgraded to 2018.3.4 and still seeing this:

Feb 28 17:42:41 host-smaster208 salt-master[7695]: [WARNING ] /usr/local/lib/python3.6/dist-packages/salt/payload.py:145: DeprecationWarning: encoding is deprecated, Use raw=False instead.

@twangboy
Copy link
Contributor

twangboy commented Mar 1, 2019

It doesn't look like that PR addresses the msgpack deprecation warning.

@twangboy twangboy reopened this Mar 1, 2019
@hackacad
Copy link
Contributor

hackacad commented Mar 1, 2019

This issue has been fixed in 1ad8ed8#diff-30108e69fa3d1358454431c6c9b08965
Sounds like a pycache issue again. Could you cleanup salt/__pycache__ and restart the master?

@Ch3LL Ch3LL added the Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged label Mar 1, 2019
@Ch3LL Ch3LL added this to the Blocked milestone Mar 1, 2019
@wzlee
Copy link
Author

wzlee commented Mar 4, 2019

OK, I see.

@wzlee wzlee closed this as completed Mar 4, 2019
@rares-pop
Copy link
Contributor

rares-pop commented May 29, 2019

This doesn't seem to be fixed, in 2019.2.0, although I do have that PR changes:

(salt-venv) [asterisc@speedy salt-venv]$ salt -c ./etc/salt '*' test.version
[WARNING ] /home/asterisc/Work/salt/salt/transport/ipc.py:261: DeprecationWarning: encoding is deprecated, Use raw=False instead.
  self.unpacker = msgpack.Unpacker(encoding=encoding)

[WARNING ] /home/asterisc/Work/salt/salt/payload.py:149: DeprecationWarning: encoding is deprecated, Use raw=False instead.
  ret = msgpack.loads(msg, use_list=True, ext_hook=ext_type_decoder, encoding=encoding)

speedy:
    2019.2.0-317-gd98ab2e

@waynew waynew mentioned this issue May 29, 2019
@imcco
Copy link

imcco commented May 31, 2019

This doesn't seem to be fixed, in 2019.2.0, me too:

my script => test.py
import salt.client
local = salt.client.LocalClient()
local.cmd('*', 'test.fib', [10])
  • result
/root/test/py3env/lib/python3.5/site-packages/salt/transport/ipc.py:292: DeprecationWarning: encoding is deprecated, Use raw=False instead.
self.unpacker = msgpack.Unpacker(encoding=encoding)
/root/test/py3env/lib/python3.5/site-packages/salt/payload.py:149: DeprecationWarning: encoding is deprecated, Use raw=False instead.
ret = msgpack.loads(msg, use_list=True, ext_hook=ext_type_decoder, encoding=encoding)
  • my salt's version
# salt --version
salt 2019.2.0 (Fluorine)

@arno01
Copy link
Contributor

arno01 commented Jun 7, 2019

Same here when I use salt-ssh ... pillar.get ...

@unficyp
Copy link

unficyp commented Jun 30, 2019

root@salt_master:/usr/local/etc/salt # salt '*' test.version
[WARNING ] /usr/local/lib/python3.6/site-packages/salt/transport/ipc.py:292: DeprecationWarning: encoding is deprecated, Use raw=False instead.
self.unpacker = msgpack.Unpacker(encoding=encoding)

[WARNING ] /usr/local/lib/python3.6/site-packages/salt/payload.py:149: DeprecationWarning: encoding is deprecated, Use raw=False instead.
ret = msgpack.loads(msg, use_list=True, ext_hook=ext_type_decoder, encoding=encoding)

root@salt_master:/usr/local/etc/salt # salt --version
salt 2019.2.0 (Fluorine)

@imcco
Copy link

imcco commented Jul 1, 2019

root @ salt_master:/ usr / local / etc / salt#salt'*'test.version
[警告] /usr/local/lib/python3.6/site-packages/salt/transport/ipc.py:292:DreprecationWarning:不推荐使用编码,请改用raw = False。
self.unpacker = msgpack.Unpacker(encoding = encoding)

[警告] /usr/local/lib/python3.6/site-packages/salt/payload.py:149:不推荐使用DeprecationWarning:encoding,而是使用raw = False。
ret = msgpack.loads(msg,use_list = True,ext_hook = ext_type_decoder,encoding = encoding)

root @ salt_master:/ usr / local / etc /
salt #salt --version salt 2019.2.0(Fluorine)

It's OK ! Thanks

@visago
Copy link

visago commented Sep 25, 2019

Still happening in Salt 2019.20 with python3.6 (Ubuntu 18.04)

# salt '*' test.version
[WARNING ] /usr/local/lib/python3.6/dist-packages/salt/transport/ipc.py:292: DeprecationWarning: encoding is deprecated, Use raw=False instead.
  self.unpacker = msgpack.Unpacker(encoding=encoding)

[WARNING ] /usr/local/lib/python3.6/dist-packages/salt/payload.py:149: DeprecationWarning: encoding is deprecated, Use raw=False instead.
  ret = msgpack.loads(msg, use_list=True, ext_hook=ext_type_decoder, encoding=encoding)

@driverjb
Copy link

Still happening in Salt 2019.2.0 with python 2.7 (Fedora Server 30) installed from repository:

dnf install salt-master

$ sudo salt '*' test.version
[WARNING ] /usr/lib/python2.7/site-packages/salt/payload.py:149: DeprecationWarning: encoding is deprecated, Use raw=False instead.
ret = msgpack.loads(msg, use_list=True, ext_hook=ext_type_decoder, encoding=encoding)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged
Projects
None yet
Development

No branches or pull requests