The following files had deprecation warnings for "Oxygen" that should
be handled in the next feature release (Fluorine):
- salt/client/mixins.py
- salt/states/lxc.py
- salt/utils/__init__.py
The pgjsonb returner wants a database with a timestamp column using
the type TIMESTAMP WITH TIME ZONE. Despite this, it's inserted its
timestamps as a date-time-zone string. This means that the minion has
needed to waste time formatting the timetamp, and then PostgreSQL has
wasted even more time parsing it back into a Unix timestamp for
storage.
Also, the code has been buggy on Python 2, which doesn't properly
support the %z format specifier to strftime() and has therefore sent
timestamps using the wrong time zone.
Solve both these problems by having the minion retrieve a Unix
timestamp by calling time.time(), sending it unmolested to PostgreSQL,
and using the PostgreSQL function to_timestamp() to store it.
Closes#44544.
The target file was being read as binary, but written as text, causing file.line to append an extra linesep on every line.
Added integration test to ensure file.line produces the expected content.
Using _splitlines_preserving_trailing_newline() strips off line
endings, mangling the unified_diff output. Switching to splitlines
with the keepends option resolves this issue, while still
preserving trailing newline.
Fixes#41474
A regression was introduced in 8d6fdb7, which modified pillar handling
for salt-call so that we would not recompile pillar data if it was
compiled already at the time that states were being run. But this didn't
account for instances where pillar had yet to be compiled at all, and
thus the __pillar__ dict would be empty. This commit contains a one-line
fix that fixes the regression.
Remove _winreg dependency
Do ALL the things with win32api
Use salt.utils.to_unicode for all unicode conversions
Only use mbcs for returned values
salt.utils.to_unicode returns None if the passed value is None