2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 01:51:51 +00:00

remove python-future dependency

This commit removes the dependency on the __future__ module, which was
used to enable Python 3 features in Python 2 code. With support for
Python 2 being dropped, it is no longer necessary to maintain backward
compatibility.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
This commit is contained in:
Radostin Stoyanov 2023-06-21 23:48:32 +01:00 committed by Andrei Vagin
parent 376f3d1800
commit 642fd99bfd
16 changed files with 9 additions and 29 deletions

View File

@ -36,7 +36,7 @@ task:
ln -sf /usr/include/google/protobuf/descriptor.proto images/google/protobuf/descriptor.proto ln -sf /usr/include/google/protobuf/descriptor.proto images/google/protobuf/descriptor.proto
dnf config-manager --set-enabled crb # Same as CentOS 8 powertools dnf config-manager --set-enabled crb # Same as CentOS 8 powertools
dnf -y install epel-release epel-next-release dnf -y install epel-release epel-next-release
dnf -y install --allowerasing asciidoc gcc git gnutls-devel libaio-devel libasan libcap-devel libnet-devel libnl3-devel libbsd-devel libselinux-devel make protobuf-c-devel protobuf-devel python-devel python-PyYAML python-future python-protobuf python-junit_xml python3-importlib-metadata python-flake8 xmlto dnf -y install --allowerasing asciidoc gcc git gnutls-devel libaio-devel libasan libcap-devel libnet-devel libnl3-devel libbsd-devel libselinux-devel make protobuf-c-devel protobuf-devel python-devel python-PyYAML python-protobuf python-junit_xml python3-importlib-metadata python-flake8 xmlto
systemctl stop sssd systemctl stop sssd
# Even with selinux in permissive mode the selinux tests will be executed. # Even with selinux in permissive mode the selinux tests will be executed.
# The Cirrus CI user runs as a service from selinux point of view and is # The Cirrus CI user runs as a service from selinux point of view and is
@ -108,7 +108,7 @@ task:
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm || : yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm || :
yum install -y dnf-plugins-core yum install -y dnf-plugins-core
yum config-manager --set-enabled powertools yum config-manager --set-enabled powertools
yum install -y --allowerasing asciidoc gcc git gnutls-devel libaio-devel libasan libcap-devel libnet-devel libnl3-devel libbsd-devel libselinux-devel make protobuf-c-devel protobuf-devel python3-devel python3-flake8 python3-PyYAML python3-future python3-protobuf python3-importlib-metadata python3-junit_xml xmlto yum install -y --allowerasing asciidoc gcc git gnutls-devel libaio-devel libasan libcap-devel libnet-devel libnl3-devel libbsd-devel libselinux-devel make protobuf-c-devel protobuf-devel python3-devel python3-flake8 python3-PyYAML python3-protobuf python3-importlib-metadata python3-junit_xml xmlto
alternatives --set python /usr/bin/python3 alternatives --set python /usr/bin/python3
systemctl stop sssd systemctl stop sssd
# Even with selinux in permissive mode the selinux tests will be executed # Even with selinux in permissive mode the selinux tests will be executed

View File

@ -22,7 +22,6 @@ extraction:
- "libbsd-dev" - "libbsd-dev"
- "python3-yaml" - "python3-yaml"
- "libnl-route-3-dev" - "libnl-route-3-dev"
- "python-future"
- "gnutls-dev" - "gnutls-dev"
configure: configure:
command: command:

View File

@ -17,4 +17,3 @@ libcap-dev
libaio-dev libaio-dev
python3-yaml python3-yaml
libnl-route-3-dev libnl-route-3-dev
python-future

View File

@ -6,7 +6,6 @@ REQ-RPM-PKG-NAMES += protobuf-devel
REQ-RPM-PKG-NAMES += protobuf-python REQ-RPM-PKG-NAMES += protobuf-python
REQ-RPM-PKG-NAMES += libnl3-devel REQ-RPM-PKG-NAMES += libnl3-devel
REQ-RPM-PKG-NAMES += libcap-devel REQ-RPM-PKG-NAMES += libcap-devel
REQ-RPM-PKG-NAMES += $(PYTHON)-future
REQ-RPM-PKG-TEST-NAMES += libaio-devel REQ-RPM-PKG-TEST-NAMES += libaio-devel
@ -15,7 +14,6 @@ REQ-DEB-PKG-NAMES += libprotobuf-c-dev
REQ-DEB-PKG-NAMES += protobuf-c-compiler REQ-DEB-PKG-NAMES += protobuf-c-compiler
REQ-DEB-PKG-NAMES += protobuf-compiler REQ-DEB-PKG-NAMES += protobuf-compiler
REQ-DEB-PKG-NAMES += $(PYTHON)-protobuf REQ-DEB-PKG-NAMES += $(PYTHON)-protobuf
REQ-DEB-PKG-NAMES += $(PYTHON)-future
REQ-DEB-PKG-NAMES += libnl-3-dev REQ-DEB-PKG-NAMES += libnl-3-dev
REQ-DEB-PKG-NAMES += libcap-dev REQ-DEB-PKG-NAMES += libcap-dev

View File

@ -1,5 +1,4 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
from __future__ import print_function
import argparse import argparse
import sys import sys
import json import json

View File

@ -55,7 +55,6 @@ RUN apt-get clean -qqy && apt-get update -qqy && apt-get install -qqy --no-insta
protobuf-compiler \ protobuf-compiler \
python-protobuf \ python-protobuf \
python3-minimal \ python3-minimal \
python3-future \
python-ipaddress \ python-ipaddress \
curl \ curl \
wget \ wget \

View File

@ -28,7 +28,6 @@ RUN yum install -y --allowerasing \
python3-devel \ python3-devel \
python3-flake8 \ python3-flake8 \
python3-PyYAML \ python3-PyYAML \
python3-future \
python3-protobuf \ python3-protobuf \
python3-pip \ python3-pip \
sudo \ sudo \

View File

@ -6,7 +6,6 @@ COPY scripts/ci/apt-install /bin/apt-install
RUN apt-install protobuf-c-compiler \ RUN apt-install protobuf-c-compiler \
libprotobuf-c-dev \ libprotobuf-c-dev \
libaio-dev \ libaio-dev \
python3-future \
libprotobuf-dev \ libprotobuf-dev \
protobuf-compiler \ protobuf-compiler \
libcap-dev \ libcap-dev \
@ -31,4 +30,3 @@ WORKDIR /criu
RUN make mrproper && make -j $(nproc) CC="$CC" RUN make mrproper && make -j $(nproc) CC="$CC"
ENTRYPOINT mvn -q -f test/javaTests/pom.xml test ENTRYPOINT mvn -q -f test/javaTests/pom.xml test

View File

@ -21,8 +21,7 @@ RUN apt-install \
pkg-config \ pkg-config \
protobuf-c-compiler \ protobuf-c-compiler \
protobuf-compiler \ protobuf-compiler \
python3-minimal \ python3-minimal
python3-future
COPY . /criu COPY . /criu
WORKDIR /criu WORKDIR /criu

View File

@ -6,7 +6,6 @@ COPY scripts/ci/apt-install /bin/apt-install
RUN apt-install protobuf-c-compiler \ RUN apt-install protobuf-c-compiler \
libprotobuf-c-dev \ libprotobuf-c-dev \
libaio-dev \ libaio-dev \
python3-future \
libprotobuf-dev \ libprotobuf-dev \
protobuf-compiler \ protobuf-compiler \
libcap-dev \ libcap-dev \

View File

@ -30,8 +30,7 @@ RUN apt-install \
python-is-python3 \ python-is-python3 \
python3-minimal \ python3-minimal \
python3-protobuf \ python3-protobuf \
python3-yaml \ python3-yaml
python3-future
COPY . /criu COPY . /criu
WORKDIR /criu WORKDIR /criu

View File

@ -24,7 +24,6 @@ dnf install -y \
protobuf-devel \ protobuf-devel \
python3-flake8 \ python3-flake8 \
python3-PyYAML \ python3-PyYAML \
python3-future \
python3-protobuf \ python3-protobuf \
python3-junit_xml \ python3-junit_xml \
python3-pip \ python3-pip \

View File

@ -5,8 +5,8 @@ CI_PKGS=(protobuf-c-compiler libprotobuf-c-dev libaio-dev libgnutls28-dev
libgnutls30 libprotobuf-dev protobuf-compiler libcap-dev libgnutls30 libprotobuf-dev protobuf-compiler libcap-dev
libnl-3-dev gdb bash libnet-dev util-linux asciidoctor libnl-3-dev gdb bash libnet-dev util-linux asciidoctor
libnl-route-3-dev time flake8 libbsd-dev python3-yaml libnl-route-3-dev time flake8 libbsd-dev python3-yaml
libperl-dev pkg-config python3-future python3-protobuf libperl-dev pkg-config python3-protobuf python3-pip
python3-pip python3-importlib-metadata python3-junit.xml) python3-importlib-metadata python3-junit.xml)
X86_64_PKGS=(gcc-multilib) X86_64_PKGS=(gcc-multilib)

View File

@ -38,7 +38,7 @@ setup() {
ssh default sudo dnf upgrade -y ssh default sudo dnf upgrade -y
ssh default sudo dnf install -y gcc git gnutls-devel nftables-devel libaio-devel \ ssh default sudo dnf install -y gcc git gnutls-devel nftables-devel libaio-devel \
libasan libcap-devel libnet-devel libnl3-devel libbsd-devel make protobuf-c-devel \ libasan libcap-devel libnet-devel libnl3-devel libbsd-devel make protobuf-c-devel \
protobuf-devel python3-flake8 python3-future python3-protobuf python3-importlib-metadata \ protobuf-devel python3-flake8 python3-protobuf python3-importlib-metadata \
python3-junit_xml rubygem-asciidoctor iptables libselinux-devel libbpf-devel python3-junit_xml rubygem-asciidoctor iptables libselinux-devel libbpf-devel
# Disable sssd to avoid zdtm test failures in pty04 due to sssd socket # Disable sssd to avoid zdtm test failures in pty04 due to sssd socket
ssh default sudo systemctl mask sssd ssh default sudo systemctl mask sssd

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python3
from __future__ import print_function
import sys, socket import sys, socket
import hashlib import hashlib

View File

@ -1,10 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
from __future__ import (
absolute_import,
division,
print_function,
unicode_literals
)
import argparse import argparse
import atexit import atexit