aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAaron Bauman <bman@gentoo.org>2020-08-06 21:12:15 -0400
committerZac Medico <zmedico@gentoo.org>2020-08-06 19:53:12 -0700
commitd695d866e4e7b2ab79264508f1520f89a5585e04 (patch)
treec574f7ccb007d78ff998c3633de9daa893406f72 /lib
parentlib/*: exempt two core files from ungrouped-imports check (diff)
downloadportage-d695d866e4e7b2ab79264508f1520f89a5585e04.tar.gz
portage-d695d866e4e7b2ab79264508f1520f89a5585e04.tar.bz2
portage-d695d866e4e7b2ab79264508f1520f89a5585e04.zip
*: drop all import __future__ statements
* We only support Py3 now. Signed-off-by: Aaron Bauman <bman@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/_emerge/Scheduler.py2
-rw-r--r--lib/_emerge/UserQuery.py2
-rw-r--r--lib/_emerge/actions.py2
-rw-r--r--lib/_emerge/chk_updated_cfg_files.py2
-rw-r--r--lib/_emerge/countdown.py4
-rw-r--r--lib/_emerge/depgraph.py4
-rw-r--r--lib/_emerge/help.py4
-rw-r--r--lib/_emerge/main.py2
-rw-r--r--lib/_emerge/post_emerge.py4
-rw-r--r--lib/_emerge/resolver/circular_dependency.py8
-rw-r--r--lib/_emerge/resolver/package_tracker.py4
-rw-r--r--lib/_emerge/resolver/slot_collision.py3
-rw-r--r--lib/_emerge/unmerge.py2
-rw-r--r--lib/portage/_emirrordist/FetchTask.py2
-rw-r--r--lib/portage/_global_updates.py4
-rw-r--r--lib/portage/_sets/__init__.py2
-rw-r--r--lib/portage/_sets/dbapi.py2
-rw-r--r--lib/portage/_sets/libs.py4
-rw-r--r--lib/portage/cache/anydbm.py5
-rw-r--r--lib/portage/cache/sqlite.py3
-rw-r--r--lib/portage/cvstree.py2
-rw-r--r--lib/portage/dbapi/vartree.py2
-rw-r--r--lib/portage/dispatch_conf.py5
-rw-r--r--lib/portage/elog/mod_echo.py4
-rw-r--r--lib/portage/emaint/main.py4
-rw-r--r--lib/portage/glsa.py27
-rw-r--r--lib/portage/localization.py4
-rw-r--r--lib/portage/metadata.py4
-rw-r--r--lib/portage/module.py5
-rw-r--r--lib/portage/news.py2
-rw-r--r--lib/portage/output.py2
-rw-r--r--lib/portage/package/ebuild/fetch.py2
-rw-r--r--lib/portage/sync/controller.py3
-rw-r--r--lib/portage/sync/old_tree_timestamp.py4
-rw-r--r--lib/portage/tests/__init__.py4
-rw-r--r--lib/portage/tests/util/test_xattr.py4
-rw-r--r--lib/portage/util/_dyn_libs/display_preserved_libs.py6
-rw-r--r--lib/portage/util/_eventloop/EventLoop.py5
-rw-r--r--lib/portage/util/_eventloop/PollSelectAdapter.py5
-rw-r--r--lib/portage/util/_xattr.py4
-rw-r--r--lib/portage/util/locale.py4
-rw-r--r--lib/portage/util/movefile.py2
42 files changed, 45 insertions, 124 deletions
diff --git a/lib/_emerge/Scheduler.py b/lib/_emerge/Scheduler.py
index 761ba31e0..2427d953c 100644
--- a/lib/_emerge/Scheduler.py
+++ b/lib/_emerge/Scheduler.py
@@ -1,8 +1,6 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import division, print_function
-
from collections import deque
import gc
import gzip
diff --git a/lib/_emerge/UserQuery.py b/lib/_emerge/UserQuery.py
index d5273e4ee..0469432fc 100644
--- a/lib/_emerge/UserQuery.py
+++ b/lib/_emerge/UserQuery.py
@@ -1,8 +1,6 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import print_function
-
import signal
import sys
diff --git a/lib/_emerge/actions.py b/lib/_emerge/actions.py
index 7d2d9b315..d259206ad 100644
--- a/lib/_emerge/actions.py
+++ b/lib/_emerge/actions.py
@@ -1,8 +1,6 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import division, print_function
-
import collections
import logging
import operator
diff --git a/lib/_emerge/chk_updated_cfg_files.py b/lib/_emerge/chk_updated_cfg_files.py
index e5e090767..f7f7ab868 100644
--- a/lib/_emerge/chk_updated_cfg_files.py
+++ b/lib/_emerge/chk_updated_cfg_files.py
@@ -1,8 +1,6 @@
# Copyright 1999-2012, 2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-from __future__ import print_function
-
import logging
import portage
diff --git a/lib/_emerge/countdown.py b/lib/_emerge/countdown.py
index 62e3c8dea..e9e774f9a 100644
--- a/lib/_emerge/countdown.py
+++ b/lib/_emerge/countdown.py
@@ -1,8 +1,6 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import print_function
-
import sys
import time
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index 0810cdaf1..e071be8df 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -1,9 +1,6 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import division, print_function
-
-import collections
import errno
import functools
import io
@@ -11,6 +8,7 @@ import logging
import stat
import textwrap
import warnings
+import collections
from collections import deque, OrderedDict
from itertools import chain
diff --git a/lib/_emerge/help.py b/lib/_emerge/help.py
index de3d7b593..15e1941ca 100644
--- a/lib/_emerge/help.py
+++ b/lib/_emerge/help.py
@@ -1,8 +1,6 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import print_function
-
from portage.output import bold, turquoise, green
def emerge_help():
diff --git a/lib/_emerge/main.py b/lib/_emerge/main.py
index 12323b17e..f4c7e2715 100644
--- a/lib/_emerge/main.py
+++ b/lib/_emerge/main.py
@@ -1,8 +1,6 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import print_function
-
import argparse
import locale
import platform
diff --git a/lib/_emerge/post_emerge.py b/lib/_emerge/post_emerge.py
index e971cf40d..0c4df0d32 100644
--- a/lib/_emerge/post_emerge.py
+++ b/lib/_emerge/post_emerge.py
@@ -1,8 +1,6 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import print_function
-
import logging
import textwrap
diff --git a/lib/_emerge/resolver/circular_dependency.py b/lib/_emerge/resolver/circular_dependency.py
index 109f22b9c..7d71e6c88 100644
--- a/lib/_emerge/resolver/circular_dependency.py
+++ b/lib/_emerge/resolver/circular_dependency.py
@@ -1,17 +1,17 @@
# Copyright 2010-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import print_function
+import logging
+
+from _emerge.DepPrioritySatisfiedRange import DepPrioritySatisfiedRange
+from _emerge.Package import Package
from itertools import chain, product
-import logging
from portage.dep import use_reduce, extract_affecting_use, check_required_use, get_required_use_flags
from portage.exception import InvalidDependString
from portage.output import colorize
from portage.util import writemsg_level
-from _emerge.DepPrioritySatisfiedRange import DepPrioritySatisfiedRange
-from _emerge.Package import Package
class circular_dependency_handler:
diff --git a/lib/_emerge/resolver/package_tracker.py b/lib/_emerge/resolver/package_tracker.py
index 2afa7923b..2cb648538 100644
--- a/lib/_emerge/resolver/package_tracker.py
+++ b/lib/_emerge/resolver/package_tracker.py
@@ -1,8 +1,6 @@
-# Copyright 2014 Gentoo Foundation
+# Copyright 2014-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import print_function
-
import bisect
import collections
diff --git a/lib/_emerge/resolver/slot_collision.py b/lib/_emerge/resolver/slot_collision.py
index df3816717..4fa07ff59 100644
--- a/lib/_emerge/resolver/slot_collision.py
+++ b/lib/_emerge/resolver/slot_collision.py
@@ -1,12 +1,11 @@
# Copyright 2010-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import print_function
-
from _emerge.AtomArg import AtomArg
from _emerge.Package import Package
from _emerge.PackageArg import PackageArg
from _emerge.UseFlagDisplay import pkg_use_display
+
from portage.dep import check_required_use
from portage.output import colorize
from portage._sets.base import InternalPackageSet
diff --git a/lib/_emerge/unmerge.py b/lib/_emerge/unmerge.py
index 548edaf0c..e8b7c9aaa 100644
--- a/lib/_emerge/unmerge.py
+++ b/lib/_emerge/unmerge.py
@@ -1,8 +1,6 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import print_function
-
import logging
import signal
import sys
diff --git a/lib/portage/_emirrordist/FetchTask.py b/lib/portage/_emirrordist/FetchTask.py
index 334da7420..457ca2ac6 100644
--- a/lib/portage/_emirrordist/FetchTask.py
+++ b/lib/portage/_emirrordist/FetchTask.py
@@ -1,8 +1,6 @@
# Copyright 2013-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import division
-
import collections
import errno
import logging
diff --git a/lib/portage/_global_updates.py b/lib/portage/_global_updates.py
index 730ade592..855551304 100644
--- a/lib/portage/_global_updates.py
+++ b/lib/portage/_global_updates.py
@@ -1,8 +1,6 @@
-# Copyright 2010-2014 Gentoo Foundation
+# Copyright 2010-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import print_function
-
import stat
from portage import best, os
diff --git a/lib/portage/_sets/__init__.py b/lib/portage/_sets/__init__.py
index ea0a8b9b4..efa6314ba 100644
--- a/lib/portage/_sets/__init__.py
+++ b/lib/portage/_sets/__init__.py
@@ -1,8 +1,6 @@
# Copyright 2007-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import print_function
-
__all__ = ["SETPREFIX", "get_boolean", "SetConfigError",
"SetConfig", "load_default_config"]
diff --git a/lib/portage/_sets/dbapi.py b/lib/portage/_sets/dbapi.py
index 288e4e75b..d73aedb8f 100644
--- a/lib/portage/_sets/dbapi.py
+++ b/lib/portage/_sets/dbapi.py
@@ -1,8 +1,6 @@
# Copyright 2007-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import division
-
import glob
import re
import time
diff --git a/lib/portage/_sets/libs.py b/lib/portage/_sets/libs.py
index 022e076f5..90efafe79 100644
--- a/lib/portage/_sets/libs.py
+++ b/lib/portage/_sets/libs.py
@@ -1,8 +1,6 @@
-# Copyright 2007-2013 Gentoo Foundation
+# Copyright 2007-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import print_function
-
from portage.exception import InvalidData
from portage.localization import _
from portage._sets.base import PackageSet
diff --git a/lib/portage/cache/anydbm.py b/lib/portage/cache/anydbm.py
index 4cdf264e2..70951f824 100644
--- a/lib/portage/cache/anydbm.py
+++ b/lib/portage/cache/anydbm.py
@@ -1,9 +1,7 @@
-# Copyright 2005-2010 Gentoo Foundation
+# Copyright 2005-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Author(s): Brian Harring (ferringb@gentoo.org)
-from __future__ import absolute_import
-
import dbm
try:
@@ -12,6 +10,7 @@ except ImportError:
gdbm = None
import pickle
+
from portage import _unicode_encode
from portage import os
from portage.cache import fs_template
diff --git a/lib/portage/cache/sqlite.py b/lib/portage/cache/sqlite.py
index 3a372bcfc..55ae8f0e5 100644
--- a/lib/portage/cache/sqlite.py
+++ b/lib/portage/cache/sqlite.py
@@ -1,9 +1,8 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import division
-
import re
+
from portage.cache import fs_template
from portage.cache import cache_errors
from portage import os
diff --git a/lib/portage/cvstree.py b/lib/portage/cvstree.py
index cfcb9f48c..72e2baf84 100644
--- a/lib/portage/cvstree.py
+++ b/lib/portage/cvstree.py
@@ -2,8 +2,6 @@
# Copyright 1998-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import print_function
-
import io
import re
import stat
diff --git a/lib/portage/dbapi/vartree.py b/lib/portage/dbapi/vartree.py
index fbf455363..5799d94f2 100644
--- a/lib/portage/dbapi/vartree.py
+++ b/lib/portage/dbapi/vartree.py
@@ -1,8 +1,6 @@
# Copyright 1998-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import division
-
__all__ = [
"vardbapi", "vartree", "dblink"] + \
["write_contents", "tar_contents"]
diff --git a/lib/portage/dispatch_conf.py b/lib/portage/dispatch_conf.py
index 71693bb36..148c9dd92 100644
--- a/lib/portage/dispatch_conf.py
+++ b/lib/portage/dispatch_conf.py
@@ -1,13 +1,10 @@
# archive_conf.py -- functionality common to archive-conf and dispatch-conf
-# Copyright 2003-2014 Gentoo Foundation
+# Copyright 2003-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-
# Library by Wayne Davison <gentoo@blorf.net>, derived from code
# written by Jeremy Wohl (http://igmus.org)
-from __future__ import print_function
-
import errno
import io
import functools
diff --git a/lib/portage/elog/mod_echo.py b/lib/portage/elog/mod_echo.py
index 52e8fad8d..80f2b11ac 100644
--- a/lib/portage/elog/mod_echo.py
+++ b/lib/portage/elog/mod_echo.py
@@ -1,9 +1,7 @@
# elog/mod_echo.py - elog dispatch module
-# Copyright 2007-2017 Gentoo Foundation
+# Copyright 2007-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import print_function
-
import sys
from portage.output import EOutput, colorize
from portage.const import EBUILD_PHASES
diff --git a/lib/portage/emaint/main.py b/lib/portage/emaint/main.py
index c743f9bc7..a3f7a1031 100644
--- a/lib/portage/emaint/main.py
+++ b/lib/portage/emaint/main.py
@@ -1,8 +1,6 @@
-# Copyright 2005-2015 Gentoo Foundation
+# Copyright 2005-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import print_function
-
import argparse
import sys
import textwrap
diff --git a/lib/portage/glsa.py b/lib/portage/glsa.py
index 27957180b..9260e7e09 100644
--- a/lib/portage/glsa.py
+++ b/lib/portage/glsa.py
@@ -1,28 +1,27 @@
# Copyright 2003-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import absolute_import
-
-import io
-import sys
-from urllib.request import urlopen as urllib_request_urlopen
import codecs
-import re
import operator
+import portage
+import re
+import sys
import xml.dom.minidom
-from io import StringIO
+
from functools import reduce
-import portage
+import io
+from io import StringIO
+
+from portage import _encodings, _unicode_decode, _unicode_encode
from portage import os
-from portage import _encodings
-from portage import _unicode_decode
-from portage import _unicode_encode
-from portage.versions import pkgsplit, vercmp
-from portage.util import grabfile
from portage.const import PRIVATE_PATH
-from portage.localization import _
from portage.dep import _slot_separator
+from portage.localization import _
+from portage.util import grabfile
+from portage.versions import pkgsplit, vercmp
+
+from urllib.request import urlopen as urllib_request_urlopen
# Note: the space for rgt and rlt is important !!
# FIXME: use slot deps instead, requires GLSA format versioning
diff --git a/lib/portage/localization.py b/lib/portage/localization.py
index de54295a2..ec41caf7b 100644
--- a/lib/portage/localization.py
+++ b/lib/portage/localization.py
@@ -1,9 +1,7 @@
# localization.py -- Code to manage/help portage localization.
-# Copyright 2004-2014 Gentoo Foundation
+# Copyright 2004-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import division
-
import locale
import math
diff --git a/lib/portage/metadata.py b/lib/portage/metadata.py
index f932c094a..a7177463f 100644
--- a/lib/portage/metadata.py
+++ b/lib/portage/metadata.py
@@ -1,16 +1,14 @@
# Copyright 1998-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import print_function
-
import logging
import operator
-import portage
import sys
import signal
from _emerge.ProgressHandler import ProgressHandler
+import portage
from portage import eapi_is_supported
from portage import os
from portage.cache.cache_errors import CacheError
diff --git a/lib/portage/module.py b/lib/portage/module.py
index 301bfbdba..c838edb50 100644
--- a/lib/portage/module.py
+++ b/lib/portage/module.py
@@ -1,9 +1,6 @@
-# Copyright 2005-2015 Gentoo Foundation
+# Copyright 2005-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-
-from __future__ import print_function
-
from portage import os
from portage.exception import PortageException
from portage.cache.mappings import ProtectedDict
diff --git a/lib/portage/news.py b/lib/portage/news.py
index 3d6b04e1e..28fcbba3a 100644
--- a/lib/portage/news.py
+++ b/lib/portage/news.py
@@ -2,8 +2,6 @@
# Copyright 2006-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import print_function
-
__all__ = ["NewsManager", "NewsItem", "DisplayRestriction",
"DisplayProfileRestriction", "DisplayKeywordRestriction",
"DisplayInstalledRestriction",
diff --git a/lib/portage/output.py b/lib/portage/output.py
index 098285a52..fb621b28c 100644
--- a/lib/portage/output.py
+++ b/lib/portage/output.py
@@ -1,8 +1,6 @@
# Copyright 1998-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import division
-
__docformat__ = "epytext"
import errno
diff --git a/lib/portage/package/ebuild/fetch.py b/lib/portage/package/ebuild/fetch.py
index 65cf6e123..7c61fe463 100644
--- a/lib/portage/package/ebuild/fetch.py
+++ b/lib/portage/package/ebuild/fetch.py
@@ -1,8 +1,6 @@
# Copyright 2010-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import print_function
-
__all__ = ['fetch']
import errno
diff --git a/lib/portage/sync/controller.py b/lib/portage/sync/controller.py
index 93cf7bfb4..cb68e2c37 100644
--- a/lib/portage/sync/controller.py
+++ b/lib/portage/sync/controller.py
@@ -1,9 +1,6 @@
# Copyright 2014-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import print_function
-
-
import sys
import logging
import grp
diff --git a/lib/portage/sync/old_tree_timestamp.py b/lib/portage/sync/old_tree_timestamp.py
index aaed18b56..258ff38a6 100644
--- a/lib/portage/sync/old_tree_timestamp.py
+++ b/lib/portage/sync/old_tree_timestamp.py
@@ -1,8 +1,6 @@
-# Copyright 2010-2014 Gentoo Foundation
+# Copyright 2010-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import division
-
import locale
import logging
import time
diff --git a/lib/portage/tests/__init__.py b/lib/portage/tests/__init__.py
index 84341ddae..972c974f2 100644
--- a/lib/portage/tests/__init__.py
+++ b/lib/portage/tests/__init__.py
@@ -1,9 +1,7 @@
# tests/__init__.py -- Portage Unit Test functionality
-# Copyright 2006-2013 Gentoo Foundation
+# Copyright 2006-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import print_function
-
import argparse
import sys
import time
diff --git a/lib/portage/tests/util/test_xattr.py b/lib/portage/tests/util/test_xattr.py
index 8e8c2a3d6..55b89abd5 100644
--- a/lib/portage/tests/util/test_xattr.py
+++ b/lib/portage/tests/util/test_xattr.py
@@ -1,10 +1,8 @@
-# Copyright 2010-2015 Gentoo Foundation
+# Copyright 2010-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
"""Tests for the portage.util._xattr module"""
-from __future__ import print_function
-
from unittest import mock
import subprocess
diff --git a/lib/portage/util/_dyn_libs/display_preserved_libs.py b/lib/portage/util/_dyn_libs/display_preserved_libs.py
index b16478d2b..8deafc25e 100644
--- a/lib/portage/util/_dyn_libs/display_preserved_libs.py
+++ b/lib/portage/util/_dyn_libs/display_preserved_libs.py
@@ -1,11 +1,9 @@
-# Copyright 2007-2013 Gentoo Foundation
+# Copyright 2007-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import print_function
-
import logging
-
import portage
+
from portage.output import colorize
def display_preserved_libs(vardb):
diff --git a/lib/portage/util/_eventloop/EventLoop.py b/lib/portage/util/_eventloop/EventLoop.py
index b111238a6..94e637853 100644
--- a/lib/portage/util/_eventloop/EventLoop.py
+++ b/lib/portage/util/_eventloop/EventLoop.py
@@ -1,8 +1,7 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import division
-
+import asyncio as _real_asyncio
import collections
import errno
import functools
@@ -13,8 +12,6 @@ import signal
import time
import traceback
-import asyncio as _real_asyncio
-
try:
import fcntl
except ImportError:
diff --git a/lib/portage/util/_eventloop/PollSelectAdapter.py b/lib/portage/util/_eventloop/PollSelectAdapter.py
index 08dc664a4..c4637a352 100644
--- a/lib/portage/util/_eventloop/PollSelectAdapter.py
+++ b/lib/portage/util/_eventloop/PollSelectAdapter.py
@@ -1,10 +1,9 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import division
+import select
from .PollConstants import PollConstants
-import select
class PollSelectAdapter:
diff --git a/lib/portage/util/_xattr.py b/lib/portage/util/_xattr.py
index 531c61efb..8225cfa30 100644
--- a/lib/portage/util/_xattr.py
+++ b/lib/portage/util/_xattr.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2019 Gentoo Authors
+# Copyright 2010-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
"""Portability shim for xattr support
@@ -11,8 +11,6 @@ See the standard xattr module for more documentation:
https://pypi.python.org/pypi/pyxattr
"""
-from __future__ import print_function
-
import contextlib
import os
import subprocess
diff --git a/lib/portage/util/locale.py b/lib/portage/util/locale.py
index f7e99a4fd..99c8f7ae7 100644
--- a/lib/portage/util/locale.py
+++ b/lib/portage/util/locale.py
@@ -1,12 +1,12 @@
#-*- coding:utf-8 -*-
-# Copyright 2015 Gentoo Foundation
+# Copyright 2015-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+
"""
Function to check whether the current used LC_CTYPE handles case
transformations of ASCII characters in a way compatible with the POSIX
locale.
"""
-from __future__ import absolute_import
import locale
import logging
diff --git a/lib/portage/util/movefile.py b/lib/portage/util/movefile.py
index 3a17d5240..4f8054f29 100644
--- a/lib/portage/util/movefile.py
+++ b/lib/portage/util/movefile.py
@@ -1,8 +1,6 @@
# Copyright 2010-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-from __future__ import absolute_import
-
__all__ = ['movefile']
import errno