Skip to content

Commit

Permalink
remove python-future dependency
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rst0git authored and avagin committed Jul 7, 2023
1 parent 02bd1bc commit c794f39
Show file tree
Hide file tree
Showing 16 changed files with 9 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ task:
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 -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
# 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
Expand Down Expand Up @@ -108,7 +108,7 @@ task:
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm || :
yum install -y dnf-plugins-core
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
systemctl stop sssd
# Even with selinux in permissive mode the selinux tests will be executed
Expand Down
1 change: 0 additions & 1 deletion .lgtm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ extraction:
- "libbsd-dev"
- "python3-yaml"
- "libnl-route-3-dev"
- "python-future"
- "gnutls-dev"
configure:
command:
Expand Down
1 change: 0 additions & 1 deletion contrib/debian/dev-packages.lst
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ libcap-dev
libaio-dev
python3-yaml
libnl-route-3-dev
python-future
2 changes: 0 additions & 2 deletions criu/Makefile.packages
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ REQ-RPM-PKG-NAMES += protobuf-devel
REQ-RPM-PKG-NAMES += protobuf-python
REQ-RPM-PKG-NAMES += libnl3-devel
REQ-RPM-PKG-NAMES += libcap-devel
REQ-RPM-PKG-NAMES += $(PYTHON)-future

REQ-RPM-PKG-TEST-NAMES += libaio-devel

Expand All @@ -15,7 +14,6 @@ REQ-DEB-PKG-NAMES += libprotobuf-c-dev
REQ-DEB-PKG-NAMES += protobuf-c-compiler
REQ-DEB-PKG-NAMES += protobuf-compiler
REQ-DEB-PKG-NAMES += $(PYTHON)-protobuf
REQ-DEB-PKG-NAMES += $(PYTHON)-future
REQ-DEB-PKG-NAMES += libnl-3-dev
REQ-DEB-PKG-NAMES += libcap-dev

Expand Down
1 change: 0 additions & 1 deletion lib/py/cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
from __future__ import print_function
import argparse
import sys
import json
Expand Down
1 change: 0 additions & 1 deletion scripts/build/Dockerfile.amd-rocm
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ RUN apt-get clean -qqy && apt-get update -qqy && apt-get install -qqy --no-insta
protobuf-compiler \
python-protobuf \
python3-minimal \
python3-future \
python-ipaddress \
curl \
wget \
Expand Down
1 change: 0 additions & 1 deletion scripts/build/Dockerfile.centos8
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ RUN yum install -y --allowerasing \
python3-devel \
python3-flake8 \
python3-PyYAML \
python3-future \
python3-protobuf \
python3-pip \
sudo \
Expand Down
2 changes: 0 additions & 2 deletions scripts/build/Dockerfile.hotspot-ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ COPY scripts/ci/apt-install /bin/apt-install
RUN apt-install protobuf-c-compiler \
libprotobuf-c-dev \
libaio-dev \
python3-future \
libprotobuf-dev \
protobuf-compiler \
libcap-dev \
Expand All @@ -31,4 +30,3 @@ WORKDIR /criu
RUN make mrproper && make -j $(nproc) CC="$CC"

ENTRYPOINT mvn -q -f test/javaTests/pom.xml test

3 changes: 1 addition & 2 deletions scripts/build/Dockerfile.linux32.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ RUN apt-install \
pkg-config \
protobuf-c-compiler \
protobuf-compiler \
python3-minimal \
python3-future
python3-minimal

COPY . /criu
WORKDIR /criu
Expand Down
1 change: 0 additions & 1 deletion scripts/build/Dockerfile.openj9-ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ COPY scripts/ci/apt-install /bin/apt-install
RUN apt-install protobuf-c-compiler \
libprotobuf-c-dev \
libaio-dev \
python3-future \
libprotobuf-dev \
protobuf-compiler \
libcap-dev \
Expand Down
3 changes: 1 addition & 2 deletions scripts/build/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ RUN apt-install \
python-is-python3 \
python3-minimal \
python3-protobuf \
python3-yaml \
python3-future
python3-yaml

COPY . /criu
WORKDIR /criu
Expand Down
1 change: 0 additions & 1 deletion scripts/ci/prepare-for-fedora-rawhide.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ dnf install -y \
protobuf-devel \
python3-flake8 \
python3-PyYAML \
python3-future \
python3-protobuf \
python3-junit_xml \
python3-pip \
Expand Down
4 changes: 2 additions & 2 deletions scripts/ci/run-ci-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ CI_PKGS=(protobuf-c-compiler libprotobuf-c-dev libaio-dev libgnutls28-dev
libgnutls30 libprotobuf-dev protobuf-compiler libcap-dev
libnl-3-dev gdb bash libnet-dev util-linux asciidoctor
libnl-route-3-dev time flake8 libbsd-dev python3-yaml
libperl-dev pkg-config python3-future python3-protobuf
python3-pip python3-importlib-metadata python3-junit.xml)
libperl-dev pkg-config python3-protobuf python3-pip
python3-importlib-metadata python3-junit.xml)

X86_64_PKGS=(gcc-multilib)

Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/vagrant.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ setup() {
ssh default sudo dnf upgrade -y
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 \
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
# Disable sssd to avoid zdtm test failures in pty04 due to sssd socket
ssh default sudo systemctl mask sssd
Expand Down
3 changes: 1 addition & 2 deletions soccr/test/tcp-test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python2
#!/usr/bin/env python3

from __future__ import print_function
import sys, socket
import hashlib

Expand Down
8 changes: 1 addition & 7 deletions test/zdtm.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
#!/usr/bin/env python
from __future__ import (
absolute_import,
division,
print_function,
unicode_literals
)
#!/usr/bin/env python3

import argparse
import atexit
Expand Down

0 comments on commit c794f39

Please sign in to comment.