mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Removed Python 2 and Python 3.5- support
Deprecation of Python versions below 3.6 gives opportunity to unify the build and install requirements for OpenZFS packages. The minimal supported Python version is 3.6 as this is the most recent Python package CentOS/RHEL 7 users can get. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rich Ercolani <rincebrain@gmail.com> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: szubersk <szuberskidamian@gmail.com> Closes #12925
This commit is contained in:
@@ -71,8 +71,6 @@ export SYSTEM_FILES_COMMON='arp
|
||||
printf
|
||||
ps
|
||||
pwd
|
||||
python
|
||||
python2
|
||||
python3
|
||||
quotaon
|
||||
readlink
|
||||
|
||||
@@ -92,27 +92,13 @@ typeset -a pos_cmds_out=(
|
||||
}
|
||||
}")
|
||||
|
||||
#
|
||||
# N.B. json.tool is needed to guarantee consistent ordering of fields,
|
||||
# sed is needed to trim trailing space in CentOS 6's json.tool output
|
||||
#
|
||||
# As of Python 3.5 the behavior of json.tool changed to keep the order
|
||||
# the same as the input and the --sort-keys option was added. Detect when
|
||||
# --sort-keys is supported and apply the option to ensure the expected order.
|
||||
#
|
||||
if python -m json.tool --sort-keys <<< "{}"; then
|
||||
JSON_TOOL_CMD="python -m json.tool --sort-keys"
|
||||
else
|
||||
JSON_TOOL_CMD="python -m json.tool"
|
||||
fi
|
||||
|
||||
typeset -i cnt=0
|
||||
typeset cmd
|
||||
for cmd in ${pos_cmds[@]}; do
|
||||
log_must zfs program $TESTPOOL $TESTZCP $TESTDS $cmd 2>&1
|
||||
log_must zfs program -j $TESTPOOL $TESTZCP $TESTDS $cmd 2>&1
|
||||
OUTPUT=$(zfs program -j $TESTPOOL $TESTZCP $TESTDS $cmd 2>&1 |
|
||||
$JSON_TOOL_CMD | sed 's/[[:space:]]*$//')
|
||||
python3 -m json.tool --sort-keys)
|
||||
if [ "$OUTPUT" != "${pos_cmds_out[$cnt]}" ]; then
|
||||
log_note "Got :$OUTPUT"
|
||||
log_note "Expected:${pos_cmds_out[$cnt]}"
|
||||
|
||||
@@ -30,7 +30,7 @@ verify_runnable "global"
|
||||
# Verify that the required dependencies for testing are installed.
|
||||
@PYTHON@ -c "import cffi" 2>/dev/null
|
||||
if [ $? -eq 1 ]; then
|
||||
log_unsupported "python-cffi not found by Python"
|
||||
log_unsupported "python3-cffi not found by Python"
|
||||
fi
|
||||
|
||||
# We don't just try to "import libzfs_core" because we want to skip these tests
|
||||
|
||||
@@ -87,7 +87,7 @@ log_must xattrtest -f 10 -x 3 -s 32768 -r -k -p /$TESTPOOL/$TESTFS2/xattrsadir
|
||||
# OpenZFS issue #7432
|
||||
log_must zfs set compression=on xattr=sa $TESTPOOL/$TESTFS2
|
||||
log_must touch /$TESTPOOL/$TESTFS2/attrs
|
||||
log_must eval "python -c 'print \"a\" * 4096' | \
|
||||
log_must eval "python3 -c 'print \"a\" * 4096' | \
|
||||
set_xattr_stdin bigval /$TESTPOOL/$TESTFS2/attrs"
|
||||
log_must zfs set compression=off xattr=on $TESTPOOL/$TESTFS2
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ log_must zfs snapshot $POOL/fs@c
|
||||
# 4. Create an empty file and add xattrs to it to exercise reclaiming a
|
||||
# dnode that requires more than 1 slot for its bonus buffer (Zol #7433)
|
||||
log_must zfs set compression=on xattr=sa $POOL/fs
|
||||
log_must eval "python -c 'print \"a\" * 512' |
|
||||
log_must eval "python3 -c 'print \"a\" * 512' |
|
||||
set_xattr_stdin bigval /$POOL/fs/attrs"
|
||||
log_must zfs snapshot $POOL/fs@d
|
||||
|
||||
|
||||
Reference in New Issue
Block a user