Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Python2-related __future__ imports #1640

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/scripts/store_benchmark.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
import os
import os.path
import json
Expand Down
1 change: 0 additions & 1 deletion .github/scripts/validate_benchmark.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
import os.path
import sys
import json
Expand Down
1 change: 0 additions & 1 deletion example_extensions/hello_cmd/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Copyright Contributors to the Rez Project


from __future__ import print_function, with_statement
from setuptools import setup


Expand Down
2 changes: 0 additions & 2 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
This script uses venv/virtualenv to create a standalone, production-ready Rez
installation in the specified directory.
"""
from __future__ import print_function

import argparse
import os
import sys
Expand Down
1 change: 0 additions & 1 deletion release-rez.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
Read RELEASE.md before using this utility.
"""
from __future__ import print_function
import argparse
import os
from datetime import date
Expand Down
3 changes: 0 additions & 3 deletions repository/hello_world_py/1.0.0/python/hello_world.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
from __future__ import print_function


def hello():
print("Hello world!")
2 changes: 0 additions & 2 deletions repository/tbb/4.3/install.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import print_function

import sys
import shutil
import os
Expand Down
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# Copyright Contributors to the Rez Project


from __future__ import print_function, with_statement

import fnmatch
import os
import os.path
Expand Down
1 change: 0 additions & 1 deletion src/build_utils/license/change_copyright
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#
# dumb script to update copyright notice in a py sourcefile
#
from __future__ import print_function
import argparse
import sys
import os
Expand Down
2 changes: 0 additions & 2 deletions src/rez/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# Copyright Contributors to the Rez Project


from __future__ import print_function

from rez.utils._version import _rez_version
import rez.deprecations
import sys
Expand Down
1 change: 0 additions & 1 deletion src/rez/backport/zipfile.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
from __future__ import absolute_import
from zipfile import *
1 change: 0 additions & 1 deletion src/rez/bind/PyQt.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
Binds the python PyQt module as a rez package.
"""
from __future__ import absolute_import
from rez.bind import _pymodule
from rez.bind._utils import get_version_in_python

Expand Down
1 change: 0 additions & 1 deletion src/rez/bind/PySide.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
Binds the python PySide module as a rez package.
"""
from __future__ import absolute_import
from rez.bind import _pymodule


Expand Down
2 changes: 0 additions & 2 deletions src/rez/bind/_pymodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
the current python interpreter - this is rez's, inside its installation
virtualenv.
"""
from __future__ import absolute_import, print_function

from rez.bind._utils import check_version, find_exe, make_dirs, \
get_version_in_python, run_python_command, log
from rez.package_maker import make_package
Expand Down
1 change: 0 additions & 1 deletion src/rez/bind/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
Utility functions for bind modules.
"""
from __future__ import absolute_import
from rez.version import Version
from rez.exceptions import RezBindError
from rez.config import config
Expand Down
1 change: 0 additions & 1 deletion src/rez/bind/arch.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
Creates the system architecture package.
"""
from __future__ import absolute_import
from rez.package_maker import make_package
from rez.version import Version
from rez.bind._utils import check_version
Expand Down
1 change: 0 additions & 1 deletion src/rez/bind/cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
Binds a cmake executable as a rez package.
"""
from __future__ import absolute_import
from rez.package_maker import make_package
from rez.bind._utils import check_version, find_exe, extract_version, make_dirs
from rez.utils.platform_ import platform_
Expand Down
1 change: 0 additions & 1 deletion src/rez/bind/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Copyright Contributors to the Rez Project


from __future__ import absolute_import
from rez.bind._utils import find_exe, extract_version, make_dirs, log
from rez.package_maker import make_package
from rez.utils.lint_helper import env
Expand Down
2 changes: 0 additions & 2 deletions src/rez/bind/hello_world.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
requirement. This is not typical! This package is intended as a very simple test
case, and for that reason we do not want any dependencies.
"""
from __future__ import absolute_import, print_function

from rez.package_maker import make_package
from rez.version import Version
from rez.utils.lint_helper import env
Expand Down
1 change: 0 additions & 1 deletion src/rez/bind/os.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
Creates the operating system package.
"""
from __future__ import absolute_import
from rez.package_maker import make_package
from rez.version import Version
from rez.bind._utils import check_version
Expand Down
1 change: 0 additions & 1 deletion src/rez/bind/pip.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
Binds the python pip module as a rez package.
"""
from __future__ import absolute_import
from rez.bind import _pymodule


Expand Down
1 change: 0 additions & 1 deletion src/rez/bind/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
Creates the system platform package.
"""
from __future__ import absolute_import
from rez.package_maker import make_package
from rez.version import Version
from rez.bind._utils import check_version
Expand Down
1 change: 0 additions & 1 deletion src/rez/bind/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
Binds a python executable as a rez package.
"""
from __future__ import absolute_import
from rez.bind._utils import check_version, find_exe, extract_version, \
make_dirs, log, run_python_command
from rez.package_maker import make_package
Expand Down
1 change: 0 additions & 1 deletion src/rez/bind/rez.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
Binds rez itself as a rez package.
"""
from __future__ import absolute_import
import rez
from rez.package_maker import make_package
from rez.bind._utils import check_version
Expand Down
1 change: 0 additions & 1 deletion src/rez/bind/rezgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
Binds rez-gui as a rez package.
"""
from __future__ import absolute_import
import rez
from rez.package_maker import make_package
from rez.bind._utils import check_version, make_dirs
Expand Down
1 change: 0 additions & 1 deletion src/rez/bind/setuptools.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
Binds the python setuptools module as a rez package.
"""
from __future__ import absolute_import
from rez.bind import _pymodule


Expand Down
1 change: 0 additions & 1 deletion src/rez/bind/sip.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
Binds the python PyQt module as a rez package.
"""
from __future__ import absolute_import
from rez.bind import _pymodule
from rez.bind._utils import get_version_in_python

Expand Down
2 changes: 0 additions & 2 deletions src/rez/build_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# Copyright Contributors to the Rez Project


from __future__ import print_function

from rez.packages import iter_packages
from rez.exceptions import BuildProcessError, BuildContextResolveError, \
ReleaseHookCancellingError, RezError, ReleaseError, BuildError, \
Expand Down
2 changes: 0 additions & 2 deletions src/rez/cli/_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
"""
The main command-line entry point.
"""
from __future__ import print_function

import sys
import importlib
from argparse import _StoreTrueAction, SUPPRESS
Expand Down
2 changes: 0 additions & 2 deletions src/rez/cli/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# Copyright Contributors to the Rez Project


from __future__ import print_function

import os
import sys
import signal
Expand Down
2 changes: 0 additions & 2 deletions src/rez/cli/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
'''
Run a benchmarking suite for runtime resolves.
'''
from __future__ import print_function

import json
import os
import os.path
Expand Down
2 changes: 0 additions & 2 deletions src/rez/cli/bind.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
'''
Create a Rez package for existing software.
'''
from __future__ import print_function

import argparse


Expand Down
2 changes: 0 additions & 2 deletions src/rez/cli/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
'''
Build a package from source.
'''
from __future__ import print_function

import os


Expand Down
2 changes: 0 additions & 2 deletions src/rez/cli/bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
'''
Bundle a context and its packages into a relocatable dir.
'''
from __future__ import print_function

import os
import os.path
import sys
Expand Down
2 changes: 0 additions & 2 deletions src/rez/cli/complete.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
"""
Prints package completion strings.
"""
from __future__ import print_function

import argparse


Expand Down
2 changes: 0 additions & 2 deletions src/rez/cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
'''
Print current rez settings.
'''
from __future__ import print_function

import json


Expand Down
2 changes: 0 additions & 2 deletions src/rez/cli/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
'''
Print information about the current rez context, or a given context file.
'''
from __future__ import print_function

# Disable the following:
# - context tracking
# - package caching
Expand Down
1 change: 0 additions & 1 deletion src/rez/cli/cp.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
'''
Copy a package from one repository to another.
'''
from __future__ import print_function


def setup_parser(parser, completions=False):
Expand Down
1 change: 0 additions & 1 deletion src/rez/cli/depends.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
Perform a reverse package dependency lookup.
"""
from __future__ import print_function


def setup_parser(parser, completions=False):
Expand Down
1 change: 0 additions & 1 deletion src/rez/cli/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
'''
Open a rez-configured shell, possibly interactive.
'''
from __future__ import print_function


def setup_parser(parser, completions=False):
Expand Down
1 change: 0 additions & 1 deletion src/rez/cli/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
Utility for displaying help for the given package.
"""
from __future__ import print_function


def setup_parser(parser, completions=False):
Expand Down
1 change: 0 additions & 1 deletion src/rez/cli/interpret.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
'''
Execute some Rex code and print the interpreted result.
'''
from __future__ import print_function


def setup_parser(parser, completions=False):
Expand Down
1 change: 0 additions & 1 deletion src/rez/cli/memcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
Manage and query memcache server(s).
"""
from __future__ import print_function


def setup_parser(parser, completions=False):
Expand Down
1 change: 0 additions & 1 deletion src/rez/cli/mv.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
'''
Move a package from one repository to another.
'''
from __future__ import print_function


def setup_parser(parser, completions=False):
Expand Down
1 change: 0 additions & 1 deletion src/rez/cli/pip.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
Install a pip-compatible python package, and its dependencies, as rez packages.
"""
from __future__ import print_function
from argparse import REMAINDER
import logging

Expand Down
1 change: 0 additions & 1 deletion src/rez/cli/pkg-cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
'''
Manipulate a package cache.
'''
from __future__ import print_function
from argparse import SUPPRESS
import os.path
import sys
Expand Down
1 change: 0 additions & 1 deletion src/rez/cli/pkg-ignore.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
'''
Disable a package so it is hidden from resolves.
'''
from __future__ import print_function


def setup_parser(parser, completions=False):
Expand Down
1 change: 0 additions & 1 deletion src/rez/cli/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
Get a list of a package's plugins.
"""
from __future__ import print_function


def setup_parser(parser, completions=False):
Expand Down
2 changes: 0 additions & 2 deletions src/rez/cli/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
'''
Build a package from source and deploy it.
'''
from __future__ import print_function

import os
import sys
from subprocess import call
Expand Down
Loading