Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Salt warnings and testuite for Python 3.11 (#635)
* Switch to `FullArgSpec` since Py 3.11 no longer has `ArgSpec`, deprecated since Py 3.0 Signed-off-by: Pedro Algarvio <[email protected]> * Backport `locale.getdefaultlocale()` into Salt. It's getting removed in Py 3.13 Signed-off-by: Pedro Algarvio <[email protected]> * Stop using the deprecated `pipes` module Signed-off-by: Pedro Algarvio <[email protected]> * Stop using the deprecated `cgi` module. Signed-off-by: Pedro Algarvio <[email protected]> * Add `__getstate__` to blacklisted methods, present in Py 3.11 Signed-off-by: Pedro Algarvio <[email protected]> * Fix test_state test * Use proper keys since Python's base64 in Py3.11 is more picky ``` ❯ artifacts/salt/bin/python3 Python 3.10.11 (main, May 5 2023, 02:31:54) [GCC 11.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import base64 >>> base64.b64decode("AAAAB3NzaC1kcQ9J5bYTEyZ==", validate=True) b'\x00\x00\x00\x07ssh-dq\x0fI\xe5\xb6\x13\x13&' ``` ``` $ artifacts/salt/bin/python3 Python 3.11.3 (main, May 5 2023, 02:31:40) [GCC 11.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import base64 >>> base64.b64decode("AAAAB3NzaC1kcQ9J5bYTEyZ==", validate=True) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/tmp/testing/artifacts/salt/lib/python3.11/base64.py", line 88, in b64decode return binascii.a2b_base64(s, strict_mode=validate) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ binascii.Error: Excess data after padding ``` Signed-off-by: Pedro Algarvio <[email protected]> --------- Signed-off-by: Pedro Algarvio <[email protected]> Co-authored-by: Pedro Algarvio <[email protected]> Co-authored-by: Marek Czernek <[email protected]>
- Loading branch information