From 627780cbb74b86b31016c822dcf2b0bfcbb337cb Mon Sep 17 00:00:00 2001 From: Waf Project Date: Tue, 12 Nov 2024 07:52:23 +0800 Subject: [PATCH] Remove old __future references__ --- utils/sign_file.py | 4 +--- waflib/Scripting.py | 2 -- waflib/Tools/c_config.py | 2 -- waflib/Tools/intltool.py | 2 -- waflib/Tools/qt5.py | 2 -- waflib/Utils.py | 2 -- waflib/extras/cpplint.py | 1 - wscript | 2 -- 8 files changed, 1 insertion(+), 16 deletions(-) diff --git a/utils/sign_file.py b/utils/sign_file.py index 41c5afc5..af63b0dd 100755 --- a/utils/sign_file.py +++ b/utils/sign_file.py @@ -4,8 +4,6 @@ A script that creates signed Python files. """ -from __future__ import print_function - import os import argparse import subprocess @@ -94,7 +92,7 @@ def parse_args(): help='Files you wish to sign') parser.add_argument('--overwrite', action='store_true', - dest='overwrite', default=False, + dest='overwrite', default=False, help='Overwrite the original file' ' (sign the original file)') diff --git a/waflib/Scripting.py b/waflib/Scripting.py index 1bb074e4..296e0125 100644 --- a/waflib/Scripting.py +++ b/waflib/Scripting.py @@ -4,8 +4,6 @@ "Module called for configuring, compiling and installing targets" -from __future__ import with_statement - import os, shlex, shutil, traceback, errno, sys, stat from waflib import Utils, Configure, Logs, Options, ConfigSet, Context, Errors, Build, Node diff --git a/waflib/Tools/c_config.py b/waflib/Tools/c_config.py index 8b8b89eb..1b55b7ab 100644 --- a/waflib/Tools/c_config.py +++ b/waflib/Tools/c_config.py @@ -6,8 +6,6 @@ C/C++/D configuration helpers """ -from __future__ import with_statement - import os, re, shlex from waflib import Build, Utils, Task, Options, Logs, Errors, Runner from waflib.TaskGen import after_method, feature diff --git a/waflib/Tools/intltool.py b/waflib/Tools/intltool.py index af95ba80..419911b3 100644 --- a/waflib/Tools/intltool.py +++ b/waflib/Tools/intltool.py @@ -27,8 +27,6 @@ Usage:: Usage of the :py:mod:`waflib.Tools.gnu_dirs` is recommended, but not obligatory. """ -from __future__ import with_statement - import os, re from waflib import Context, Task, Utils, Logs import waflib.Tools.ccroot diff --git a/waflib/Tools/qt5.py b/waflib/Tools/qt5.py index 727f9896..2120a84f 100644 --- a/waflib/Tools/qt5.py +++ b/waflib/Tools/qt5.py @@ -102,8 +102,6 @@ To use Qt6 set the want_qt6 attribute, ie: conf.want_qt6 = True; """ -from __future__ import with_statement - try: from xml.sax import make_parser from xml.sax.handler import ContentHandler diff --git a/waflib/Utils.py b/waflib/Utils.py index 02f9dbaf..034d625e 100644 --- a/waflib/Utils.py +++ b/waflib/Utils.py @@ -9,8 +9,6 @@ The portability fixes try to provide a consistent behavior of the Waf API through Python versions 2.5 to 3.X and across different platforms (win32, linux, etc) """ -from __future__ import with_statement - import atexit, os, sys, errno, inspect, re, datetime, platform, base64, signal, functools, time, shlex try: diff --git a/waflib/extras/cpplint.py b/waflib/extras/cpplint.py index 1302d210..17d4ac39 100644 --- a/waflib/extras/cpplint.py +++ b/waflib/extras/cpplint.py @@ -35,7 +35,6 @@ When using this tool, the wscript will look like: bld(features='cpplint', source=bld.path.ant_glob('**/*.hpp')) ''' -from __future__ import absolute_import import sys, re import logging from waflib import Errors, Task, TaskGen, Logs, Options, Node, Utils diff --git a/wscript b/wscript index e9cb87ff..ec1fe63f 100644 --- a/wscript +++ b/wscript @@ -9,8 +9,6 @@ To add a tool that does not exist in the folder compat15, pass an absolute path: ./waf-light --tools=compat15,/comp/waf/aba.py --prelude=$'\tfrom waflib.extras import aba\n\taba.foo()' """ -from __future__ import with_statement - VERSION="2.1.3" APPNAME='waf' REVISION=''