Fedora releases are integers, and Arch's osrelease is simply `rolling`,
so https://github.com/saltstack/salt/pull/45636 caused these tests to
regress. This fixes them by moving the osrelease check until after the
MacOS check.
It also fixes the windows check, which would _always_ evaluate to `True`
since it was not calling the function. Therefore, the `if` would just be
a simple boolean which would resolve to `True` since it was just checking
a function reference.
When using Python 3 to generate the documentation, it will fail:
$ make -C doc html SPHINXBUILD=/usr/share/sphinx/scripts/python3/sphinx-build
[...]
File "salt/config/__init__.py", line 84, in _gather_buffer_space
if HAS_PSUTIL and psutil.version_info >= (0, 6, 0):
TypeError: '>=' not supported between instances of 'Mock' and 'tuple'
Therefore add fake version variables to the mocked msgpack and psutil
module.
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
The salt/sdb/keyring_db.py
Traceback (most recent call last):
File "salt/sdb/keyring_db.py", line 53, in <module>
import keyring
File "/usr/lib/python2.7/dist-packages/keyring/__init__.py", line 6, in <module>
from .core import (set_keyring, get_keyring, set_password, get_password,
File "/usr/lib/python2.7/dist-packages/keyring/core.py", line 148, in <module>
init_backend()
File "/usr/lib/python2.7/dist-packages/keyring/core.py", line 64, in init_backend
keyrings = filter(limit, backend.get_all_keyring())
File "/usr/lib/python2.7/dist-packages/keyring/util/__init__.py", line 20, in wrapper
func.always_returns = func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/keyring/backend.py", line 191, in get_all_keyring
exceptions=TypeError))
File "/usr/lib/python2.7/dist-packages/keyring/util/__init__.py", line 29, in suppress_exceptions
for callable in callables:
File "/usr/lib/python2.7/dist-packages/keyring/backend.py", line 183, in is_class_viable
keyring_cls.priority
File "/usr/lib/python2.7/dist-packages/keyring/util/properties.py", line 22, in __get__
return self.fget.__get__(None, owner)()
File "/usr/lib/python2.7/dist-packages/keyring/backends/kwallet.py", line 128, in priority
return super(DBusKeyringKWallet4, cls).priority - 1
File "/usr/lib/python2.7/dist-packages/keyring/util/properties.py", line 22, in __get__
return self.fget.__get__(None, owner)()
File "/usr/lib/python2.7/dist-packages/keyring/backends/kwallet.py", line 31, in priority
bus = dbus.SessionBus(mainloop=DBusGMainLoop())
NameError: global name 'DBusGMainLoop' is not defined
Therefore also mock the keyring module when generating the
documentation. This fixes#45072.
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
This helper was designed to ensure that the paths returned were all
unicode types, but on a couple platforms having the path be a unicode
type causes a traceback deep in the stdlib within posixpath.
To work around this, this commit makes the helper a generator that
simply decodes each tuple returned from os.walk as we iterate.