public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH gentoolkit 1/4] Remove imports from __future__
@ 2020-12-20 22:10 Matt Turner
  2020-12-20 22:10 ` [gentoo-portage-dev] [PATCH gentoolkit 2/4] Remove $Header$ Matt Turner
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Matt Turner @ 2020-12-20 22:10 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Matt Turner

gentoolkit supports only Python 3.6+ now, so these are not used.

Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
 bin/eclean                                   | 3 ---
 bin/eclean-dist                              | 3 ---
 bin/eclean-pkg                               | 3 ---
 bin/ekeyword                                 | 2 --
 bin/enalyze                                  | 2 --
 bin/epkginfo                                 | 2 --
 bin/equery                                   | 2 --
 bin/euse                                     | 8 ++++----
 bin/imlate                                   | 2 --
 bin/revdep-rebuild                           | 2 --
 pym/gentoolkit/base.py                       | 2 --
 pym/gentoolkit/dbapi.py                      | 2 --
 pym/gentoolkit/eclean/clean.py               | 3 ---
 pym/gentoolkit/eclean/cli.py                 | 3 ---
 pym/gentoolkit/eclean/exclude.py             | 3 ---
 pym/gentoolkit/eclean/output.py              | 3 ---
 pym/gentoolkit/eclean/pkgindex.py            | 3 ---
 pym/gentoolkit/eclean/search.py              | 3 ---
 pym/gentoolkit/ekeyword/ekeyword.py          | 2 --
 pym/gentoolkit/ekeyword/ekeyword_unittest.py | 2 --
 pym/gentoolkit/enalyze/analyze.py            | 2 --
 pym/gentoolkit/enalyze/output.py             | 2 --
 pym/gentoolkit/enalyze/rebuild.py            | 3 ---
 pym/gentoolkit/eprefix.py                    | 2 --
 pym/gentoolkit/equery/__init__.py            | 2 --
 pym/gentoolkit/equery/belongs.py             | 2 --
 pym/gentoolkit/equery/changes.py             | 2 --
 pym/gentoolkit/equery/check.py               | 2 --
 pym/gentoolkit/equery/depends.py             | 2 --
 pym/gentoolkit/equery/depgraph.py            | 2 --
 pym/gentoolkit/equery/files.py               | 2 --
 pym/gentoolkit/equery/has.py                 | 2 --
 pym/gentoolkit/equery/hasuse.py              | 2 --
 pym/gentoolkit/equery/list_.py               | 2 --
 pym/gentoolkit/equery/meta.py                | 2 --
 pym/gentoolkit/equery/size.py                | 2 --
 pym/gentoolkit/equery/uses.py                | 2 --
 pym/gentoolkit/equery/which.py               | 2 --
 pym/gentoolkit/eshowkw/keywords_header.py    | 2 --
 pym/gentoolkit/imlate/imlate.py              | 3 ---
 pym/gentoolkit/module_base.py                | 2 --
 pym/gentoolkit/revdep_rebuild/analyse.py     | 2 --
 pym/gentoolkit/revdep_rebuild/assign.py      | 2 --
 pym/gentoolkit/revdep_rebuild/cache.py       | 2 --
 pym/gentoolkit/revdep_rebuild/collect.py     | 2 --
 pym/gentoolkit/revdep_rebuild/rebuild.py     | 2 --
 pym/gentoolkit/revdep_rebuild/settings.py    | 2 --
 pym/gentoolkit/revdep_rebuild/stuff.py       | 2 --
 pym/gentoolkit/test/eclean/creator.py        | 3 ---
 pym/gentoolkit/test/eclean/distsupport.py    | 2 --
 pym/gentoolkit/test/eclean/test_clean.py     | 2 --
 pym/gentoolkit/test/eclean/test_search.py    | 3 ---
 setup.py                                     | 3 ---
 53 files changed, 4 insertions(+), 122 deletions(-)

diff --git a/bin/eclean b/bin/eclean
index 715787b..90f9e55 100755
--- a/bin/eclean
+++ b/bin/eclean
@@ -4,9 +4,6 @@
 Distributed under the terms of the GNU General Public License v2
 """
 
-from __future__ import print_function
-
-
 # Meta:
 __author__ = "Thomas de Grenier de Latour (tgl), " + \
 	"modular re-write by: Brian Dolbec (dol-sen)"
diff --git a/bin/eclean-dist b/bin/eclean-dist
index 715787b..90f9e55 100755
--- a/bin/eclean-dist
+++ b/bin/eclean-dist
@@ -4,9 +4,6 @@
 Distributed under the terms of the GNU General Public License v2
 """
 
-from __future__ import print_function
-
-
 # Meta:
 __author__ = "Thomas de Grenier de Latour (tgl), " + \
 	"modular re-write by: Brian Dolbec (dol-sen)"
diff --git a/bin/eclean-pkg b/bin/eclean-pkg
index 715787b..90f9e55 100755
--- a/bin/eclean-pkg
+++ b/bin/eclean-pkg
@@ -4,9 +4,6 @@
 Distributed under the terms of the GNU General Public License v2
 """
 
-from __future__ import print_function
-
-
 # Meta:
 __author__ = "Thomas de Grenier de Latour (tgl), " + \
 	"modular re-write by: Brian Dolbec (dol-sen)"
diff --git a/bin/ekeyword b/bin/ekeyword
index 72b3f95..2e3c78e 100755
--- a/bin/ekeyword
+++ b/bin/ekeyword
@@ -13,8 +13,6 @@ the current list as they appear, and ebuilds are processed as they appear.
 
 """
 
-from __future__ import print_function
-
 import os
 import sys
 # This block ensures that ^C interrupts are handled quietly.
diff --git a/bin/enalyze b/bin/enalyze
index 5991f60..a0bb29a 100755
--- a/bin/enalyze
+++ b/bin/enalyze
@@ -12,8 +12,6 @@ packages that use them.  It can also be used to help rebuild /etc/portage/packag
 files in the event of corruption, and possibly more.
 """
 
-from __future__ import print_function
-
 import sys
 # This block ensures that ^C interrupts are handled quietly.
 try:
diff --git a/bin/epkginfo b/bin/epkginfo
index 75a2f3f..4f87176 100755
--- a/bin/epkginfo
+++ b/bin/epkginfo
@@ -7,8 +7,6 @@
 
 """Shortcut to equery meta"""
 
-from __future__ import print_function
-
 __authors__ = (
 	'Douglas Anderson <douglasjanderson@gmail.com>: equery meta',
 	'Ned Ludd <solar@gentoo.org>: first full implimentation'
diff --git a/bin/equery b/bin/equery
index 292321e..77371d1 100755
--- a/bin/equery
+++ b/bin/equery
@@ -10,8 +10,6 @@ information about packages, such as the files they own, their USE flags,
 the MD5 sum of each file owned by a given package, and many other things.
 """
 
-from __future__ import print_function
-
 import os
 import sys
 # This block ensures that ^C interrupts are handled quietly.
diff --git a/bin/euse b/bin/euse
index 15a2a6e..263d0f2 100755
--- a/bin/euse
+++ b/bin/euse
@@ -184,7 +184,7 @@ VER
 #       worth another look to avoid calling python unnecessariy. Or we could
 #       just write the whole thing in python. ;)
 reduce_incrementals() {
-	echo $@ | python -c "from __future__ import print_function;import sys
+	echo $@ | python -c "import sys
 r=[]
 for x in sys.stdin.read().split():
 	if x[0] == '-' and x[1:] in r:
@@ -202,7 +202,7 @@ print(' '.join(r))"
 # Similar to reduce_incrementals but negative flags trump positive
 # flags, regardless of which follows which
 reduce_incrementals_trump() {
-	echo $@ | python -c "from __future__ import print_function;import sys
+	echo $@ | python -c "import sys
 r=[]
 for x in sys.stdin.read().split():
 	if x[0] == '-' and x[1:] in r:
@@ -221,7 +221,7 @@ print(' '.join(r))"
 # * - Lines of package atom followed by flags
 #     (app-editors/vim flag1 flag2 -flag3)
 reduce_package_use() {
-	echo "${@}" | python -c "from __future__ import print_function;import sys,re
+	echo "${@}" | python -c "import sys,re
 h={}; getflags=re.compile(r'(-?[\w*-]+)')
 for x in sys.stdin.read().split('\n'):
 	if not x: continue
@@ -541,7 +541,7 @@ get_flagstatus_helper_pkg() {
 		if [[ -z "${atoms[@]/[<>=]*/}" ]]; then
 			atoms=($(
 				echo "${atoms[@]}" | python -c "
-from __future__ import print_function;import portage.dep as dep, sys
+import portage.dep as dep, sys
 print(' '.join(dep.match_to_list('$5-$6',sys.stdin.read().split())))"))
 		fi
 		flags=$(for atom in ${atoms[@]}; do
diff --git a/bin/imlate b/bin/imlate
index d186f0d..040d19e 100755
--- a/bin/imlate
+++ b/bin/imlate
@@ -13,8 +13,6 @@ the current list as they appear, and ebuilds are processed as they appear.
 
 """
 
-from __future__ import print_function
-
 import os
 import sys
 # This block ensures that ^C interrupts are handled quietly.
diff --git a/bin/revdep-rebuild b/bin/revdep-rebuild
index b77ebe9..24d349e 100755
--- a/bin/revdep-rebuild
+++ b/bin/revdep-rebuild
@@ -11,8 +11,6 @@ those broken binaries and shared libraries. It is useful when an upgraded packag
 dependent upon the upgraded package.
 """
 
-from __future__ import print_function
-
 import sys
 # This block ensures that ^C interrupts are handled quietly.
 try:
diff --git a/pym/gentoolkit/base.py b/pym/gentoolkit/base.py
index bc08561..aabccea 100644
--- a/pym/gentoolkit/base.py
+++ b/pym/gentoolkit/base.py
@@ -8,8 +8,6 @@
 """Gentoolkit Base Module class to hold common module operation functions
 """
 
-from __future__ import print_function
-
 __docformat__ = 'epytext'
 
 
diff --git a/pym/gentoolkit/dbapi.py b/pym/gentoolkit/dbapi.py
index 113545d..4768078 100644
--- a/pym/gentoolkit/dbapi.py
+++ b/pym/gentoolkit/dbapi.py
@@ -11,8 +11,6 @@
 	take advantage of them being lazy-loaded.
 """
 
-from __future__ import print_function
-
 print("gentoolkit.dbapi is deprecated.\n",
 	"Please migrate to using the assigned calls directly")
 
diff --git a/pym/gentoolkit/eclean/clean.py b/pym/gentoolkit/eclean/clean.py
index c62abb9..2b750e3 100644
--- a/pym/gentoolkit/eclean/clean.py
+++ b/pym/gentoolkit/eclean/clean.py
@@ -4,9 +4,6 @@
 # Distributed under the terms of the GNU General Public License v2
 
 
-from __future__ import print_function
-
-
 import os
 import sys
 
diff --git a/pym/gentoolkit/eclean/cli.py b/pym/gentoolkit/eclean/cli.py
index 39aafd3..e31fde9 100644
--- a/pym/gentoolkit/eclean/cli.py
+++ b/pym/gentoolkit/eclean/cli.py
@@ -4,9 +4,6 @@
 # Distributed under the terms of the GNU General Public License v2
 
 
-from __future__ import print_function
-
-
 __author__ = "Thomas de Grenier de Latour (tgl), " + \
 	"modular re-write by: Brian Dolbec (dol-sen)"
 __email__ = "degrenier@easyconnect.fr, " + \
diff --git a/pym/gentoolkit/eclean/exclude.py b/pym/gentoolkit/eclean/exclude.py
index c734493..ee5e1e1 100644
--- a/pym/gentoolkit/eclean/exclude.py
+++ b/pym/gentoolkit/eclean/exclude.py
@@ -4,9 +4,6 @@
 # Distributed under the terms of the GNU General Public License v2
 
 
-from __future__ import print_function
-
-
 import os
 import sys
 if sys.hexversion < 0x3000000:
diff --git a/pym/gentoolkit/eclean/output.py b/pym/gentoolkit/eclean/output.py
index 93662d6..122d550 100644
--- a/pym/gentoolkit/eclean/output.py
+++ b/pym/gentoolkit/eclean/output.py
@@ -4,9 +4,6 @@
 # Distributed under the terms of the GNU General Public License v2
 
 
-from __future__ import print_function
-
-
 import sys
 from portage.output import blue, yellow, teal, green, red
 from gentoolkit.pprinter import cpv, number
diff --git a/pym/gentoolkit/eclean/pkgindex.py b/pym/gentoolkit/eclean/pkgindex.py
index c1f5f9d..6cf9000 100644
--- a/pym/gentoolkit/eclean/pkgindex.py
+++ b/pym/gentoolkit/eclean/pkgindex.py
@@ -3,9 +3,6 @@
 # Copyright 2003-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-from __future__ import print_function
-
-
 import subprocess
 import os
 import sys
diff --git a/pym/gentoolkit/eclean/search.py b/pym/gentoolkit/eclean/search.py
index f68aacf..992949c 100644
--- a/pym/gentoolkit/eclean/search.py
+++ b/pym/gentoolkit/eclean/search.py
@@ -4,9 +4,6 @@
 # Distributed under the terms of the GNU General Public License v2
 
 
-from __future__ import print_function
-
-
 import os
 import stat
 import sys
diff --git a/pym/gentoolkit/ekeyword/ekeyword.py b/pym/gentoolkit/ekeyword/ekeyword.py
index a86a9c2..4e57c09 100755
--- a/pym/gentoolkit/ekeyword/ekeyword.py
+++ b/pym/gentoolkit/ekeyword/ekeyword.py
@@ -36,8 +36,6 @@ Examples:
   $ %(prog)s s390=amd64 foo-1.ebuild
 """
 
-from __future__ import print_function
-
 import argparse
 import collections
 import difflib
diff --git a/pym/gentoolkit/ekeyword/ekeyword_unittest.py b/pym/gentoolkit/ekeyword/ekeyword_unittest.py
index 7446914..ef2e256 100755
--- a/pym/gentoolkit/ekeyword/ekeyword_unittest.py
+++ b/pym/gentoolkit/ekeyword/ekeyword_unittest.py
@@ -5,8 +5,6 @@
 
 """Unittests for ekeyword"""
 
-from __future__ import print_function
-
 import os
 import subprocess
 import tempfile
diff --git a/pym/gentoolkit/enalyze/analyze.py b/pym/gentoolkit/enalyze/analyze.py
index 1d3d9c0..30ffa93 100644
--- a/pym/gentoolkit/enalyze/analyze.py
+++ b/pym/gentoolkit/enalyze/analyze.py
@@ -8,8 +8,6 @@
 """Provides a breakdown list of USE flags or keywords used and by
 what packages according to the Installed package database"""
 
-from __future__ import print_function
-
 import gentoolkit
 from gentoolkit.module_base import ModuleBase
 from gentoolkit import pprinter as pp
diff --git a/pym/gentoolkit/enalyze/output.py b/pym/gentoolkit/enalyze/output.py
index 3d63394..993565a 100644
--- a/pym/gentoolkit/enalyze/output.py
+++ b/pym/gentoolkit/enalyze/output.py
@@ -8,8 +8,6 @@
 both screen and file output
 """
 
-from __future__ import print_function
-
 import time
 
 from gentoolkit import pprinter as pp
diff --git a/pym/gentoolkit/enalyze/rebuild.py b/pym/gentoolkit/enalyze/rebuild.py
index d6ccef9..4ad571f 100644
--- a/pym/gentoolkit/enalyze/rebuild.py
+++ b/pym/gentoolkit/enalyze/rebuild.py
@@ -10,9 +10,6 @@
 what packages according to the Installed package database"""
 
 
-from __future__ import print_function
-
-
 import os
 import sys
 if sys.hexversion < 0x3000000:
diff --git a/pym/gentoolkit/eprefix.py b/pym/gentoolkit/eprefix.py
index 48bd140..5acaa79 100644
--- a/pym/gentoolkit/eprefix.py
+++ b/pym/gentoolkit/eprefix.py
@@ -4,8 +4,6 @@
 # Distributed under the terms of the GNU General Public License v2
 
 
-#from __future__ import print_function
-
 """Eprefix support module to set the EPREFIX variable
 used in all gentoolkit modules
 
diff --git a/pym/gentoolkit/equery/__init__.py b/pym/gentoolkit/equery/__init__.py
index f33cca5..6167710 100644
--- a/pym/gentoolkit/equery/__init__.py
+++ b/pym/gentoolkit/equery/__init__.py
@@ -6,8 +6,6 @@
 
 """Gentoo package query tool"""
 
-from __future__ import print_function
-
 __all__ = (
 	'format_options',
 	'format_package_names',
diff --git a/pym/gentoolkit/equery/belongs.py b/pym/gentoolkit/equery/belongs.py
index 8c16b89..cf53916 100644
--- a/pym/gentoolkit/equery/belongs.py
+++ b/pym/gentoolkit/equery/belongs.py
@@ -10,8 +10,6 @@ Note: Normally, only one package will own a file. If multiple packages own
       the same file, it usually constitutes a problem, and should be reported.
 """
 
-from __future__ import print_function
-
 __docformat__ = 'epytext'
 
 # =======
diff --git a/pym/gentoolkit/equery/changes.py b/pym/gentoolkit/equery/changes.py
index 92e81b5..f86edf6 100644
--- a/pym/gentoolkit/equery/changes.py
+++ b/pym/gentoolkit/equery/changes.py
@@ -6,8 +6,6 @@
 
 """Displays the ChangeLog entry for the latest installable version of an atom"""
 
-from __future__ import print_function
-
 __docformat__ = 'epytext'
 
 # =======
diff --git a/pym/gentoolkit/equery/check.py b/pym/gentoolkit/equery/check.py
index d5a22a3..c00789b 100644
--- a/pym/gentoolkit/equery/check.py
+++ b/pym/gentoolkit/equery/check.py
@@ -6,8 +6,6 @@
 
 """Checks timestamps and MD5 sums for files owned by a given installed package"""
 
-from __future__ import print_function
-
 __docformat__ = 'epytext'
 
 # =======
diff --git a/pym/gentoolkit/equery/depends.py b/pym/gentoolkit/equery/depends.py
index 8ffc745..e654e84 100644
--- a/pym/gentoolkit/equery/depends.py
+++ b/pym/gentoolkit/equery/depends.py
@@ -6,8 +6,6 @@
 
 """List all packages that depend on a atom given query"""
 
-from __future__ import print_function
-
 __docformat__ = 'epytext'
 
 # =======
diff --git a/pym/gentoolkit/equery/depgraph.py b/pym/gentoolkit/equery/depgraph.py
index 9fbdd42..9ad21c2 100644
--- a/pym/gentoolkit/equery/depgraph.py
+++ b/pym/gentoolkit/equery/depgraph.py
@@ -6,8 +6,6 @@
 
 """Display a direct dependency graph for a given package"""
 
-from __future__ import print_function
-
 __docformat__ = 'epytext'
 
 # =======
diff --git a/pym/gentoolkit/equery/files.py b/pym/gentoolkit/equery/files.py
index 10c7fde..05c2235 100644
--- a/pym/gentoolkit/equery/files.py
+++ b/pym/gentoolkit/equery/files.py
@@ -6,8 +6,6 @@
 
 """List files owned by a given package."""
 
-from __future__ import print_function
-
 __docformat__ = 'epytext'
 
 # =======
diff --git a/pym/gentoolkit/equery/has.py b/pym/gentoolkit/equery/has.py
index 37e4d3f..dddaab3 100644
--- a/pym/gentoolkit/equery/has.py
+++ b/pym/gentoolkit/equery/has.py
@@ -6,8 +6,6 @@
 
 """List all installed packages that match for a given ENVIRONMENT variable"""
 
-from __future__ import print_function
-
 __docformat__ = 'epytext'
 
 # =======
diff --git a/pym/gentoolkit/equery/hasuse.py b/pym/gentoolkit/equery/hasuse.py
index aa47974..5ec8244 100644
--- a/pym/gentoolkit/equery/hasuse.py
+++ b/pym/gentoolkit/equery/hasuse.py
@@ -6,8 +6,6 @@
 
 """List all installed packages that have a given USE flag"""
 
-from __future__ import print_function
-
 __docformat__ = 'epytext'
 
 # =======
diff --git a/pym/gentoolkit/equery/list_.py b/pym/gentoolkit/equery/list_.py
index c547ac3..dca14b1 100644
--- a/pym/gentoolkit/equery/list_.py
+++ b/pym/gentoolkit/equery/list_.py
@@ -6,8 +6,6 @@
 
 """List installed packages matching the query pattern"""
 
-from __future__ import print_function
-
 __docformat__ = 'epytext'
 
 # =======
diff --git a/pym/gentoolkit/equery/meta.py b/pym/gentoolkit/equery/meta.py
index 2e8f91e..aa1de6a 100644
--- a/pym/gentoolkit/equery/meta.py
+++ b/pym/gentoolkit/equery/meta.py
@@ -6,8 +6,6 @@
 
 """Display metadata about a given package."""
 
-from __future__ import print_function
-
 __docformat__ = 'epytext'
 
 # =======
diff --git a/pym/gentoolkit/equery/size.py b/pym/gentoolkit/equery/size.py
index 4151767..ee63c0b 100644
--- a/pym/gentoolkit/equery/size.py
+++ b/pym/gentoolkit/equery/size.py
@@ -6,8 +6,6 @@
 
 """Print total size of files contained in a given package"""
 
-from __future__ import print_function
-
 __docformat__ = 'epytext'
 
 # =======
diff --git a/pym/gentoolkit/equery/uses.py b/pym/gentoolkit/equery/uses.py
index e565b0d..e344e62 100644
--- a/pym/gentoolkit/equery/uses.py
+++ b/pym/gentoolkit/equery/uses.py
@@ -6,8 +6,6 @@
 
 """Display USE flags for a given package"""
 
-from __future__ import print_function
-
 __docformat__ = 'epytext'
 
 # =======
diff --git a/pym/gentoolkit/equery/which.py b/pym/gentoolkit/equery/which.py
index a071801..ba3547c 100644
--- a/pym/gentoolkit/equery/which.py
+++ b/pym/gentoolkit/equery/which.py
@@ -8,8 +8,6 @@
 configuration
 """
 
-from __future__ import print_function
-
 __docformat__ = 'epytext'
 
 # =======
diff --git a/pym/gentoolkit/eshowkw/keywords_header.py b/pym/gentoolkit/eshowkw/keywords_header.py
index 31261dc..00ecb27 100644
--- a/pym/gentoolkit/eshowkw/keywords_header.py
+++ b/pym/gentoolkit/eshowkw/keywords_header.py
@@ -2,8 +2,6 @@
 # Copyright 2001-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-from __future__ import print_function
-
 __all__ = ['keywords_header']
 
 from portage import settings as ports
diff --git a/pym/gentoolkit/imlate/imlate.py b/pym/gentoolkit/imlate/imlate.py
index 40e2914..3e22791 100755
--- a/pym/gentoolkit/imlate/imlate.py
+++ b/pym/gentoolkit/imlate/imlate.py
@@ -4,9 +4,6 @@
 # $Id$
 # Author: Christian Ruppert <idl0r@gentoo.org>
 
-# Python 2.6 compatibility
-from __future__ import print_function
-
 __version__ = "git"
 
 # works just with stable keywords!
diff --git a/pym/gentoolkit/module_base.py b/pym/gentoolkit/module_base.py
index e5d79e4..9f6ad91 100644
--- a/pym/gentoolkit/module_base.py
+++ b/pym/gentoolkit/module_base.py
@@ -9,8 +9,6 @@
 """General Base Module class to hold common module operation functions
 """
 
-from __future__ import print_function
-
 __docformat__ = 'epytext'
 
 
diff --git a/pym/gentoolkit/revdep_rebuild/analyse.py b/pym/gentoolkit/revdep_rebuild/analyse.py
index 6ca3f10..4269ade 100644
--- a/pym/gentoolkit/revdep_rebuild/analyse.py
+++ b/pym/gentoolkit/revdep_rebuild/analyse.py
@@ -2,8 +2,6 @@
 
 """Analysis module"""
 
-from __future__ import print_function
-
 import os
 import re
 import time
diff --git a/pym/gentoolkit/revdep_rebuild/assign.py b/pym/gentoolkit/revdep_rebuild/assign.py
index 48c8c93..1e5f3e9 100644
--- a/pym/gentoolkit/revdep_rebuild/assign.py
+++ b/pym/gentoolkit/revdep_rebuild/assign.py
@@ -4,8 +4,6 @@
 Functions used for determining the package the broken lib belongs to.
 """
 
-from __future__ import print_function
-
 import errno
 import os
 import io
diff --git a/pym/gentoolkit/revdep_rebuild/cache.py b/pym/gentoolkit/revdep_rebuild/cache.py
index ec9f168..66fbd9d 100644
--- a/pym/gentoolkit/revdep_rebuild/cache.py
+++ b/pym/gentoolkit/revdep_rebuild/cache.py
@@ -3,8 +3,6 @@
 Functions for reading, saving and verifying the data caches
 """
 
-from __future__ import print_function
-
 from portage import os
 import time
 import sys
diff --git a/pym/gentoolkit/revdep_rebuild/collect.py b/pym/gentoolkit/revdep_rebuild/collect.py
index cbac878..9f7d301 100644
--- a/pym/gentoolkit/revdep_rebuild/collect.py
+++ b/pym/gentoolkit/revdep_rebuild/collect.py
@@ -2,8 +2,6 @@
 
 """Data collection module"""
 
-from __future__ import print_function
-
 import re
 from portage import os
 import glob
diff --git a/pym/gentoolkit/revdep_rebuild/rebuild.py b/pym/gentoolkit/revdep_rebuild/rebuild.py
index 3f152e7..4109c4f 100644
--- a/pym/gentoolkit/revdep_rebuild/rebuild.py
+++ b/pym/gentoolkit/revdep_rebuild/rebuild.py
@@ -14,8 +14,6 @@ Creation date: 2010/10/17
 License: BSD
 """
 
-from __future__ import print_function
-
 import os
 import sys
 import logging
diff --git a/pym/gentoolkit/revdep_rebuild/settings.py b/pym/gentoolkit/revdep_rebuild/settings.py
index 718fee7..efdb975 100644
--- a/pym/gentoolkit/revdep_rebuild/settings.py
+++ b/pym/gentoolkit/revdep_rebuild/settings.py
@@ -2,8 +2,6 @@
 
 """Default settings"""
 
-from __future__ import print_function
-
 import argparse
 import os
 import sys
diff --git a/pym/gentoolkit/revdep_rebuild/stuff.py b/pym/gentoolkit/revdep_rebuild/stuff.py
index 002eb4b..432dc8f 100644
--- a/pym/gentoolkit/revdep_rebuild/stuff.py
+++ b/pym/gentoolkit/revdep_rebuild/stuff.py
@@ -3,8 +3,6 @@
 """Utilities submodule"""
 
 
-from __future__ import print_function
-
 import subprocess
 
 import portage
diff --git a/pym/gentoolkit/test/eclean/creator.py b/pym/gentoolkit/test/eclean/creator.py
index de50426..1c46b2d 100644
--- a/pym/gentoolkit/test/eclean/creator.py
+++ b/pym/gentoolkit/test/eclean/creator.py
@@ -6,9 +6,6 @@
 #
 # $Header$
 
-from __future__ import with_statement
-from __future__ import print_function
-
 import os
 import sys
 if sys.hexversion < 0x3000000:
diff --git a/pym/gentoolkit/test/eclean/distsupport.py b/pym/gentoolkit/test/eclean/distsupport.py
index 78016ba..0f52238 100644
--- a/pym/gentoolkit/test/eclean/distsupport.py
+++ b/pym/gentoolkit/test/eclean/distsupport.py
@@ -6,8 +6,6 @@
 # $Header$
 
 
-from __future__ import print_function
-
 import re
 import os
 from tempfile import mkdtemp
diff --git a/pym/gentoolkit/test/eclean/test_clean.py b/pym/gentoolkit/test/eclean/test_clean.py
index 0fc9469..08c1be8 100755
--- a/pym/gentoolkit/test/eclean/test_clean.py
+++ b/pym/gentoolkit/test/eclean/test_clean.py
@@ -6,8 +6,6 @@
 #
 # $Header$
 
-from __future__ import print_function
-
 __version__= "0.0.1"
 __author__ = "Brian Dolbec"
 __email__ = "brian.dolbec@gmail.com"
diff --git a/pym/gentoolkit/test/eclean/test_search.py b/pym/gentoolkit/test/eclean/test_search.py
index 6dc26a2..ac6a886 100755
--- a/pym/gentoolkit/test/eclean/test_search.py
+++ b/pym/gentoolkit/test/eclean/test_search.py
@@ -9,9 +9,6 @@
 # $Header$
 
 
-from __future__ import print_function
-
-
 import unittest
 import re
 import os
diff --git a/setup.py b/setup.py
index 777b7f3..a9cd80c 100755
--- a/setup.py
+++ b/setup.py
@@ -1,8 +1,5 @@
 #!/usr/bin/env python
 
-from __future__ import print_function
-
-
 import re
 import sys
 import subprocess
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-portage-dev] [PATCH gentoolkit 2/4] Remove $Header$
  2020-12-20 22:10 [gentoo-portage-dev] [PATCH gentoolkit 1/4] Remove imports from __future__ Matt Turner
@ 2020-12-20 22:10 ` Matt Turner
  2020-12-20 22:10 ` [gentoo-portage-dev] [PATCH gentoolkit 3/4] Remove Python < 3 version checks Matt Turner
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Matt Turner @ 2020-12-20 22:10 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Matt Turner

Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
 bin/ekeyword                              | 2 --
 bin/enalyze                               | 2 --
 bin/epkginfo                              | 2 --
 bin/equery                                | 2 --
 bin/euse                                  | 2 --
 bin/imlate                                | 2 --
 bin/revdep-rebuild                        | 2 --
 pym/gentoolkit/__init__.py                | 2 --
 pym/gentoolkit/atom.py                    | 2 --
 pym/gentoolkit/base.py                    | 2 --
 pym/gentoolkit/cpv.py                     | 2 --
 pym/gentoolkit/dbapi.py                   | 2 --
 pym/gentoolkit/dependencies.py            | 2 --
 pym/gentoolkit/ekeyword/Makefile          | 2 --
 pym/gentoolkit/enalyze/__init__.py        | 2 --
 pym/gentoolkit/equery/__init__.py         | 2 --
 pym/gentoolkit/equery/belongs.py          | 2 --
 pym/gentoolkit/equery/changes.py          | 2 --
 pym/gentoolkit/equery/check.py            | 2 --
 pym/gentoolkit/equery/depends.py          | 2 --
 pym/gentoolkit/equery/depgraph.py         | 2 --
 pym/gentoolkit/equery/files.py            | 2 --
 pym/gentoolkit/equery/has.py              | 2 --
 pym/gentoolkit/equery/hasuse.py           | 2 --
 pym/gentoolkit/equery/list_.py            | 2 --
 pym/gentoolkit/equery/meta.py             | 2 --
 pym/gentoolkit/equery/size.py             | 2 --
 pym/gentoolkit/equery/uses.py             | 2 --
 pym/gentoolkit/equery/which.py            | 2 --
 pym/gentoolkit/formatters.py              | 2 --
 pym/gentoolkit/helpers.py                 | 2 --
 pym/gentoolkit/keyword.py                 | 2 --
 pym/gentoolkit/metadata.py                | 2 --
 pym/gentoolkit/module_base.py             | 2 --
 pym/gentoolkit/package.py                 | 2 --
 pym/gentoolkit/pprinter.py                | 2 --
 pym/gentoolkit/query.py                   | 2 --
 pym/gentoolkit/sets.py                    | 2 --
 pym/gentoolkit/test/__init__.py           | 2 --
 pym/gentoolkit/test/eclean/__init__.py    | 2 --
 pym/gentoolkit/test/eclean/creator.py     | 2 --
 pym/gentoolkit/test/eclean/distsupport.py | 2 --
 pym/gentoolkit/test/eclean/test_clean.py  | 2 --
 pym/gentoolkit/test/eclean/test_search.py | 2 --
 pym/gentoolkit/test/equery/__init__.py    | 2 --
 pym/gentoolkit/test/test_atom.py          | 2 --
 pym/gentoolkit/test/test_cpv.py           | 2 --
 pym/gentoolkit/versionmatch.py            | 2 --
 48 files changed, 96 deletions(-)

diff --git a/bin/ekeyword b/bin/ekeyword
index 2e3c78e..8767fe3 100755
--- a/bin/ekeyword
+++ b/bin/ekeyword
@@ -2,8 +2,6 @@
 #
 # Copyright 2002-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2 or later
-#
-# $Header$
 
 """Manage KEYWORDS in ebuilds easily.
 
diff --git a/bin/enalyze b/bin/enalyze
index a0bb29a..9e27bed 100755
--- a/bin/enalyze
+++ b/bin/enalyze
@@ -3,8 +3,6 @@
 # Copyright 2010 Brian Dolbec <brian.dolbec@gmail.com>
 # Copyright 2002-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2 or later
-#
-# $Header$
 
 """'enalyze' is a flexible utility for Gentoo linux which can display various
 information about installed packages, such as the USE flags used and the
diff --git a/bin/epkginfo b/bin/epkginfo
index 4f87176..5d3aab2 100755
--- a/bin/epkginfo
+++ b/bin/epkginfo
@@ -2,8 +2,6 @@
 #
 # Copyright 2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2 or later
-#
-# $Header$
 
 """Shortcut to equery meta"""
 
diff --git a/bin/equery b/bin/equery
index 77371d1..386194d 100755
--- a/bin/equery
+++ b/bin/equery
@@ -2,8 +2,6 @@
 #
 # Copyright 2002-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2 or later
-#
-# $Header$
 
 """equery is a flexible utility for Gentoo linux which can display various
 information about packages, such as the files they own, their USE flags,
diff --git a/bin/euse b/bin/euse
index 263d0f2..c3b6638 100755
--- a/bin/euse
+++ b/bin/euse
@@ -2,8 +2,6 @@
 # Disable globbing because "-*" and such is valid as a use flag.
 set -f
 
-# $Header$
-
 # bash replacement for the original euse by Arun Bhanu
 # Author: Marius Mauch <genone@gentoo.org>
 #         Jared Hancock (Signigicant rewrite for package.use support)
diff --git a/bin/imlate b/bin/imlate
index 040d19e..cd4f7ab 100755
--- a/bin/imlate
+++ b/bin/imlate
@@ -2,8 +2,6 @@
 #
 # Copyright 2002-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2 or later
-#
-# $Header$
 
 """Manage KEYWORDS in ebuilds easily.
 
diff --git a/bin/revdep-rebuild b/bin/revdep-rebuild
index 24d349e..51783c5 100755
--- a/bin/revdep-rebuild
+++ b/bin/revdep-rebuild
@@ -3,8 +3,6 @@
 # Copyright 2010 Brian Dolbec <brian.dolbec@gmail.com>
 # Copyright 2002-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2 or later
-#
-# $Header$
 
 """'revdep-rebuild' scans libraries and binaries for missing shared library dependencies and attempts to fix them by re-emerging
 those broken binaries and shared libraries. It is useful when an upgraded package breaks other software packages that are
diff --git a/pym/gentoolkit/__init__.py b/pym/gentoolkit/__init__.py
index 5032c8d..9af78fc 100644
--- a/pym/gentoolkit/__init__.py
+++ b/pym/gentoolkit/__init__.py
@@ -3,8 +3,6 @@
 # Copyright 2003-2004 Karl Trygve Kalleberg
 # Copyright 2003-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-#
-# $Header$
 
 """Gentoolkit is a collection of administration scripts for Gentoo"""
 
diff --git a/pym/gentoolkit/atom.py b/pym/gentoolkit/atom.py
index b86c89c..364fe4e 100644
--- a/pym/gentoolkit/atom.py
+++ b/pym/gentoolkit/atom.py
@@ -3,8 +3,6 @@
 # Copyright(c) 2009, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2
-#
-# $Header$
 
 """Subclasses portage.dep.Atom to provide methods on a Gentoo atom string."""
 
diff --git a/pym/gentoolkit/base.py b/pym/gentoolkit/base.py
index aabccea..372ed74 100644
--- a/pym/gentoolkit/base.py
+++ b/pym/gentoolkit/base.py
@@ -2,8 +2,6 @@
 #
 # Copyright(c) 2009 - 2010, Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-#
-# $Header: $
 
 """Gentoolkit Base Module class to hold common module operation functions
 """
diff --git a/pym/gentoolkit/cpv.py b/pym/gentoolkit/cpv.py
index 2e8e167..563dab8 100644
--- a/pym/gentoolkit/cpv.py
+++ b/pym/gentoolkit/cpv.py
@@ -3,8 +3,6 @@
 # Copyright(c) 2009-2010 Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2
-#
-# $Header$
 
 """Provides attributes and methods for a category/package-version string."""
 
diff --git a/pym/gentoolkit/dbapi.py b/pym/gentoolkit/dbapi.py
index 4768078..be37f32 100644
--- a/pym/gentoolkit/dbapi.py
+++ b/pym/gentoolkit/dbapi.py
@@ -2,8 +2,6 @@
 #
 # Copyright 2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-#
-# $Header$
 
 """Provides access to Portage database api
 	Note: this file is deprecated, please replace all use
diff --git a/pym/gentoolkit/dependencies.py b/pym/gentoolkit/dependencies.py
index 8536369..38676a2 100644
--- a/pym/gentoolkit/dependencies.py
+++ b/pym/gentoolkit/dependencies.py
@@ -1,8 +1,6 @@
 # Copyright(c) 2009, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2
-#
-# $Header: $
 
 """Provides a class for easy calculating dependencies for a given CPV."""
 
diff --git a/pym/gentoolkit/ekeyword/Makefile b/pym/gentoolkit/ekeyword/Makefile
index 0021c7a..1219d19 100644
--- a/pym/gentoolkit/ekeyword/Makefile
+++ b/pym/gentoolkit/ekeyword/Makefile
@@ -1,8 +1,6 @@
 # Copyright 2004 Karl Trygve Kalleberg <karltk@gentoo.org>
 # Copyright 2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-#
-# $Header$
 
 include ../../makedefs.mak
 
diff --git a/pym/gentoolkit/enalyze/__init__.py b/pym/gentoolkit/enalyze/__init__.py
index 6e9652d..6a40215 100644
--- a/pym/gentoolkit/enalyze/__init__.py
+++ b/pym/gentoolkit/enalyze/__init__.py
@@ -4,8 +4,6 @@
 # Copyright(c) 2010, Gentoo Foundation
 # Copyright 2003-2004 Karl Trygve Kalleberg
 # Licensed under the GNU General Public License, v2
-#
-# $Header: $
 
 """Gentoo's installed packages analysis and repair tool"""
 
diff --git a/pym/gentoolkit/equery/__init__.py b/pym/gentoolkit/equery/__init__.py
index 6167710..4640086 100644
--- a/pym/gentoolkit/equery/__init__.py
+++ b/pym/gentoolkit/equery/__init__.py
@@ -1,8 +1,6 @@
 # Copyright(c) 2009, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2
-#
-# $Header: $
 
 """Gentoo package query tool"""
 
diff --git a/pym/gentoolkit/equery/belongs.py b/pym/gentoolkit/equery/belongs.py
index cf53916..8289366 100644
--- a/pym/gentoolkit/equery/belongs.py
+++ b/pym/gentoolkit/equery/belongs.py
@@ -1,8 +1,6 @@
 # Copyright(c) 2009, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2
-#
-# $Header: $
 
 """List all packages owning a particular file
 
diff --git a/pym/gentoolkit/equery/changes.py b/pym/gentoolkit/equery/changes.py
index f86edf6..f234ecb 100644
--- a/pym/gentoolkit/equery/changes.py
+++ b/pym/gentoolkit/equery/changes.py
@@ -1,8 +1,6 @@
 # Copyright(c) 2009, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2 or higher
-#
-# $Header: $
 
 """Displays the ChangeLog entry for the latest installable version of an atom"""
 
diff --git a/pym/gentoolkit/equery/check.py b/pym/gentoolkit/equery/check.py
index c00789b..e965164 100644
--- a/pym/gentoolkit/equery/check.py
+++ b/pym/gentoolkit/equery/check.py
@@ -1,8 +1,6 @@
 # Copyright(c) 2009, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2
-#
-# $Header: $
 
 """Checks timestamps and MD5 sums for files owned by a given installed package"""
 
diff --git a/pym/gentoolkit/equery/depends.py b/pym/gentoolkit/equery/depends.py
index e654e84..7461ade 100644
--- a/pym/gentoolkit/equery/depends.py
+++ b/pym/gentoolkit/equery/depends.py
@@ -1,8 +1,6 @@
 # Copyright(c) 2009, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2
-#
-# $Header: $
 
 """List all packages that depend on a atom given query"""
 
diff --git a/pym/gentoolkit/equery/depgraph.py b/pym/gentoolkit/equery/depgraph.py
index 9ad21c2..4ee37ee 100644
--- a/pym/gentoolkit/equery/depgraph.py
+++ b/pym/gentoolkit/equery/depgraph.py
@@ -1,8 +1,6 @@
 # Copyright(c) 2009, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2
-#
-# $Header: $
 
 """Display a direct dependency graph for a given package"""
 
diff --git a/pym/gentoolkit/equery/files.py b/pym/gentoolkit/equery/files.py
index 05c2235..cfcd306 100644
--- a/pym/gentoolkit/equery/files.py
+++ b/pym/gentoolkit/equery/files.py
@@ -1,8 +1,6 @@
 # Copyright(c) 2009, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2
-#
-# $Header: $
 
 """List files owned by a given package."""
 
diff --git a/pym/gentoolkit/equery/has.py b/pym/gentoolkit/equery/has.py
index dddaab3..c1c8bba 100644
--- a/pym/gentoolkit/equery/has.py
+++ b/pym/gentoolkit/equery/has.py
@@ -1,8 +1,6 @@
 # Copyright(c) 2009, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2 or higher
-#
-# $Header: $
 
 """List all installed packages that match for a given ENVIRONMENT variable"""
 
diff --git a/pym/gentoolkit/equery/hasuse.py b/pym/gentoolkit/equery/hasuse.py
index 5ec8244..07207bc 100644
--- a/pym/gentoolkit/equery/hasuse.py
+++ b/pym/gentoolkit/equery/hasuse.py
@@ -1,8 +1,6 @@
 # Copyright(c) 2009, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2 or higher
-#
-# $Header: $
 
 """List all installed packages that have a given USE flag"""
 
diff --git a/pym/gentoolkit/equery/list_.py b/pym/gentoolkit/equery/list_.py
index dca14b1..f66dfed 100644
--- a/pym/gentoolkit/equery/list_.py
+++ b/pym/gentoolkit/equery/list_.py
@@ -1,8 +1,6 @@
 # Copyright(c) 2009, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2 or higher
-#
-# $Header: $
 
 """List installed packages matching the query pattern"""
 
diff --git a/pym/gentoolkit/equery/meta.py b/pym/gentoolkit/equery/meta.py
index aa1de6a..2e632d5 100644
--- a/pym/gentoolkit/equery/meta.py
+++ b/pym/gentoolkit/equery/meta.py
@@ -1,8 +1,6 @@
 # Copyright(c) 2009, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2 or higher
-#
-# $Header: $
 
 """Display metadata about a given package."""
 
diff --git a/pym/gentoolkit/equery/size.py b/pym/gentoolkit/equery/size.py
index ee63c0b..cb570ba 100644
--- a/pym/gentoolkit/equery/size.py
+++ b/pym/gentoolkit/equery/size.py
@@ -1,8 +1,6 @@
 # Copyright(c) 2009, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2
-#
-# $Header: $
 
 """Print total size of files contained in a given package"""
 
diff --git a/pym/gentoolkit/equery/uses.py b/pym/gentoolkit/equery/uses.py
index e344e62..1260f56 100644
--- a/pym/gentoolkit/equery/uses.py
+++ b/pym/gentoolkit/equery/uses.py
@@ -1,8 +1,6 @@
 # Copyright(c) 2009, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2
-#
-# $Header: $
 
 """Display USE flags for a given package"""
 
diff --git a/pym/gentoolkit/equery/which.py b/pym/gentoolkit/equery/which.py
index ba3547c..326e692 100644
--- a/pym/gentoolkit/equery/which.py
+++ b/pym/gentoolkit/equery/which.py
@@ -1,8 +1,6 @@
 # Copyright(c) 2009, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2
-#
-# $Header: $
 
 """Display the path to the ebuild that would be used by Portage with the current
 configuration
diff --git a/pym/gentoolkit/formatters.py b/pym/gentoolkit/formatters.py
index 98010dc..e8b1428 100644
--- a/pym/gentoolkit/formatters.py
+++ b/pym/gentoolkit/formatters.py
@@ -3,8 +3,6 @@
 # Copyright 2004 Karl Trygve Kalleberg <karltk@gentoo.org>
 # Copyright(c) 2010, Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-#
-# $Header$
 
 import sys
 import time
diff --git a/pym/gentoolkit/helpers.py b/pym/gentoolkit/helpers.py
index a551550..b4cc795 100644
--- a/pym/gentoolkit/helpers.py
+++ b/pym/gentoolkit/helpers.py
@@ -1,8 +1,6 @@
 # Copyright(c) 2009-2010, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2 or higher
-#
-# $Header$
 
 """Miscellaneous helper functions and classes.
 
diff --git a/pym/gentoolkit/keyword.py b/pym/gentoolkit/keyword.py
index 0f3807c..9edf4aa 100644
--- a/pym/gentoolkit/keyword.py
+++ b/pym/gentoolkit/keyword.py
@@ -1,8 +1,6 @@
 # Copyright(c) 2004-2010, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2
-#
-# $Header$
 
 """Provides common methods on Gentoo GLEP 53 keywords.
 
diff --git a/pym/gentoolkit/metadata.py b/pym/gentoolkit/metadata.py
index 0b58392..ecf60c3 100644
--- a/pym/gentoolkit/metadata.py
+++ b/pym/gentoolkit/metadata.py
@@ -1,8 +1,6 @@
 # Copyright(c) 2009, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2
-#
-# $Header$
 
 """Provides an easy-to-use python interface to Gentoo's metadata.xml file.
 
diff --git a/pym/gentoolkit/module_base.py b/pym/gentoolkit/module_base.py
index 9f6ad91..322088d 100644
--- a/pym/gentoolkit/module_base.py
+++ b/pym/gentoolkit/module_base.py
@@ -3,8 +3,6 @@
 # Copyright 2010 Brian Dolbec <brian.dolbec@gmail.com>
 # Copyright(c) 2010, Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-#
-# $Header: $
 
 """General Base Module class to hold common module operation functions
 """
diff --git a/pym/gentoolkit/package.py b/pym/gentoolkit/package.py
index bdeba17..37209d5 100644
--- a/pym/gentoolkit/package.py
+++ b/pym/gentoolkit/package.py
@@ -2,8 +2,6 @@
 # Copyright(c) 2004-2010, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2
-#
-# $Header$
 
 """Provides an interface to package information stored by package managers.
 
diff --git a/pym/gentoolkit/pprinter.py b/pym/gentoolkit/pprinter.py
index 610d72a..25e145b 100644
--- a/pym/gentoolkit/pprinter.py
+++ b/pym/gentoolkit/pprinter.py
@@ -3,8 +3,6 @@
 # Copyright 2004 Karl Trygve Kalleberg <karltk@gentoo.org>
 # Copyright 2004-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-#
-# $Header$
 
 """Provides a consistent color scheme for Gentoolkit scripts."""
 
diff --git a/pym/gentoolkit/query.py b/pym/gentoolkit/query.py
index 9d1a313..c2b8d56 100644
--- a/pym/gentoolkit/query.py
+++ b/pym/gentoolkit/query.py
@@ -3,8 +3,6 @@
 # Copyright(c) 2004-2010, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2
-#
-# $Header$
 
 """Provides common methods on a package query."""
 
diff --git a/pym/gentoolkit/sets.py b/pym/gentoolkit/sets.py
index 70315e9..d130603 100644
--- a/pym/gentoolkit/sets.py
+++ b/pym/gentoolkit/sets.py
@@ -1,8 +1,6 @@
 # Copyright(c) 2010, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2 or higher
-#
-# $Header$
 
 """Provides access to Portage sets api"""
 
diff --git a/pym/gentoolkit/test/__init__.py b/pym/gentoolkit/test/__init__.py
index 946b552..9e41686 100644
--- a/pym/gentoolkit/test/__init__.py
+++ b/pym/gentoolkit/test/__init__.py
@@ -2,8 +2,6 @@
 # Copyright 2009 Gentoo Foundation
 #
 # Distributed under the terms of the GNU General Public License v2
-#
-# $Header$
 
 __all__ = ['cmp']
 
diff --git a/pym/gentoolkit/test/eclean/__init__.py b/pym/gentoolkit/test/eclean/__init__.py
index e5a3c12..310e0d5 100644
--- a/pym/gentoolkit/test/eclean/__init__.py
+++ b/pym/gentoolkit/test/eclean/__init__.py
@@ -2,5 +2,3 @@
 # Copyright 2010 Gentoo Foundation
 #
 # Distributed under the terms of the GNU General Public License v2
-#
-# $Header$
diff --git a/pym/gentoolkit/test/eclean/creator.py b/pym/gentoolkit/test/eclean/creator.py
index 1c46b2d..4320e88 100644
--- a/pym/gentoolkit/test/eclean/creator.py
+++ b/pym/gentoolkit/test/eclean/creator.py
@@ -3,8 +3,6 @@
 # Copyright 2010 Brian Dolbec <brian.dolbec@gmail.com>
 # Copyright 2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-#
-# $Header$
 
 import os
 import sys
diff --git a/pym/gentoolkit/test/eclean/distsupport.py b/pym/gentoolkit/test/eclean/distsupport.py
index 0f52238..fd858d4 100644
--- a/pym/gentoolkit/test/eclean/distsupport.py
+++ b/pym/gentoolkit/test/eclean/distsupport.py
@@ -3,8 +3,6 @@
 #
 # License: GPL2/BSD
 
-# $Header$
-
 
 import re
 import os
diff --git a/pym/gentoolkit/test/eclean/test_clean.py b/pym/gentoolkit/test/eclean/test_clean.py
index 08c1be8..0c35e93 100755
--- a/pym/gentoolkit/test/eclean/test_clean.py
+++ b/pym/gentoolkit/test/eclean/test_clean.py
@@ -3,8 +3,6 @@
 # Copyright 2010 Brian Dolbec <brian.dolbec@gmail.com>
 # Copyright 2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-#
-# $Header$
 
 __version__= "0.0.1"
 __author__ = "Brian Dolbec"
diff --git a/pym/gentoolkit/test/eclean/test_search.py b/pym/gentoolkit/test/eclean/test_search.py
index ac6a886..5a20e38 100755
--- a/pym/gentoolkit/test/eclean/test_search.py
+++ b/pym/gentoolkit/test/eclean/test_search.py
@@ -6,8 +6,6 @@
 #
 # License: GPL2/BSD
 
-# $Header$
-
 
 import unittest
 import re
diff --git a/pym/gentoolkit/test/equery/__init__.py b/pym/gentoolkit/test/equery/__init__.py
index 94423e9..78f7f00 100644
--- a/pym/gentoolkit/test/equery/__init__.py
+++ b/pym/gentoolkit/test/equery/__init__.py
@@ -2,5 +2,3 @@
 # Copyright 2009 Gentoo Foundation
 #
 # Distributed under the terms of the GNU General Public License v2
-#
-# $Header$
diff --git a/pym/gentoolkit/test/test_atom.py b/pym/gentoolkit/test/test_atom.py
index 6177222..664bf40 100644
--- a/pym/gentoolkit/test/test_atom.py
+++ b/pym/gentoolkit/test/test_atom.py
@@ -3,8 +3,6 @@
 #
 # License: GPL2/BSD
 
-# $Header$
-
 import unittest
 
 from gentoolkit.atom import Atom
diff --git a/pym/gentoolkit/test/test_cpv.py b/pym/gentoolkit/test/test_cpv.py
index b34edfb..3817e9f 100644
--- a/pym/gentoolkit/test/test_cpv.py
+++ b/pym/gentoolkit/test/test_cpv.py
@@ -3,8 +3,6 @@
 # Copyright(c) 2009, Gentoo Foundation
 #
 # Licensed under the GNU General Public License, v2
-#
-# $Header$
 
 import unittest
 
diff --git a/pym/gentoolkit/versionmatch.py b/pym/gentoolkit/versionmatch.py
index 914672f..0d1c6ab 100644
--- a/pym/gentoolkit/versionmatch.py
+++ b/pym/gentoolkit/versionmatch.py
@@ -5,8 +5,6 @@
 #
 # Copyright: 2005-2007 Brian Harring <ferringb@gmail.com>
 # License: GPL2/BSD
-#
-# $Header$
 
 """Gentoo version comparison object from pkgcore.ebuild.atom_restricts."""
 
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-portage-dev] [PATCH gentoolkit 3/4] Remove Python < 3 version checks
  2020-12-20 22:10 [gentoo-portage-dev] [PATCH gentoolkit 1/4] Remove imports from __future__ Matt Turner
  2020-12-20 22:10 ` [gentoo-portage-dev] [PATCH gentoolkit 2/4] Remove $Header$ Matt Turner
@ 2020-12-20 22:10 ` Matt Turner
  2020-12-20 22:10 ` [gentoo-portage-dev] [PATCH gentoolkit 4/4] Remove inherits from object Matt Turner
  2020-12-21  1:58 ` [gentoo-portage-dev] [PATCH gentoolkit 1/4] Remove imports from __future__ Zac Medico
  3 siblings, 0 replies; 5+ messages in thread
From: Matt Turner @ 2020-12-20 22:10 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Matt Turner

Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
 pym/gentoolkit/eclean/exclude.py          |  2 --
 pym/gentoolkit/enalyze/rebuild.py         |  2 --
 pym/gentoolkit/equery/uses.py             |  2 --
 pym/gentoolkit/equery/which.py            |  2 --
 pym/gentoolkit/helpers.py                 |  2 --
 pym/gentoolkit/profile.py                 |  3 ---
 pym/gentoolkit/revdep_rebuild/analyse.py  |  2 --
 pym/gentoolkit/revdep_rebuild/assign.py   |  6 ------
 pym/gentoolkit/revdep_rebuild/cache.py    |  7 +------
 pym/gentoolkit/revdep_rebuild/collect.py  | 10 +---------
 pym/gentoolkit/revdep_rebuild/settings.py |  9 +--------
 pym/gentoolkit/test/eclean/creator.py     |  2 --
 pym/gentoolkit/test/test_keyword.py       |  2 --
 13 files changed, 3 insertions(+), 48 deletions(-)

diff --git a/pym/gentoolkit/eclean/exclude.py b/pym/gentoolkit/eclean/exclude.py
index ee5e1e1..45ecd52 100644
--- a/pym/gentoolkit/eclean/exclude.py
+++ b/pym/gentoolkit/eclean/exclude.py
@@ -6,8 +6,6 @@
 
 import os
 import sys
-if sys.hexversion < 0x3000000:
-	from io import open
 import re
 import portage
 from portage import _encodings, _unicode_encode
diff --git a/pym/gentoolkit/enalyze/rebuild.py b/pym/gentoolkit/enalyze/rebuild.py
index 4ad571f..3f3f4fd 100644
--- a/pym/gentoolkit/enalyze/rebuild.py
+++ b/pym/gentoolkit/enalyze/rebuild.py
@@ -12,8 +12,6 @@ what packages according to the Installed package database"""
 
 import os
 import sys
-if sys.hexversion < 0x3000000:
-	from io import open
 
 import gentoolkit
 from gentoolkit.module_base import ModuleBase
diff --git a/pym/gentoolkit/equery/uses.py b/pym/gentoolkit/equery/uses.py
index 1260f56..dfb6f31 100644
--- a/pym/gentoolkit/equery/uses.py
+++ b/pym/gentoolkit/equery/uses.py
@@ -12,8 +12,6 @@ __docformat__ = 'epytext'
 
 import os
 import sys
-if sys.hexversion < 0x3000000:
-	from io import open
 
 from functools import partial
 from getopt import gnu_getopt, GetoptError
diff --git a/pym/gentoolkit/equery/which.py b/pym/gentoolkit/equery/which.py
index 326e692..c7fabd7 100644
--- a/pym/gentoolkit/equery/which.py
+++ b/pym/gentoolkit/equery/which.py
@@ -14,8 +14,6 @@ __docformat__ = 'epytext'
 
 import os
 import sys
-if sys.hexversion < 0x3000000:
-	from io import open
 from getopt import gnu_getopt, GetoptError
 
 
diff --git a/pym/gentoolkit/helpers.py b/pym/gentoolkit/helpers.py
index b4cc795..02ac20e 100644
--- a/pym/gentoolkit/helpers.py
+++ b/pym/gentoolkit/helpers.py
@@ -25,8 +25,6 @@ __docformat__ = 'epytext'
 
 import os
 import sys
-if sys.hexversion < 0x3000000:
-	from io import open
 import re
 from functools import partial
 from itertools import chain
diff --git a/pym/gentoolkit/profile.py b/pym/gentoolkit/profile.py
index 01f823a..dcd02cc 100644
--- a/pym/gentoolkit/profile.py
+++ b/pym/gentoolkit/profile.py
@@ -15,9 +15,6 @@ import os.path
 import portage
 import sys
 
-if sys.hexversion < 0x3000000:
-	from io import open
-
 from portage import _encodings, _unicode_encode
 
 
diff --git a/pym/gentoolkit/revdep_rebuild/analyse.py b/pym/gentoolkit/revdep_rebuild/analyse.py
index 4269ade..6ce1568 100644
--- a/pym/gentoolkit/revdep_rebuild/analyse.py
+++ b/pym/gentoolkit/revdep_rebuild/analyse.py
@@ -6,8 +6,6 @@ import os
 import re
 import time
 import sys
-if sys.hexversion < 0x3000000:
-	from io import open
 
 from portage import _encodings, _unicode_encode
 from portage.output import bold, blue, yellow, green
diff --git a/pym/gentoolkit/revdep_rebuild/assign.py b/pym/gentoolkit/revdep_rebuild/assign.py
index 1e5f3e9..3fa9299 100644
--- a/pym/gentoolkit/revdep_rebuild/assign.py
+++ b/pym/gentoolkit/revdep_rebuild/assign.py
@@ -15,12 +15,6 @@ import portage
 from portage import portdb
 from portage.output import bold, red, yellow, green
 
-# Make all str conversions unicode
-try:
-	str = unicode
-except NameError:
-	pass
-
 
 class _file_matcher(object):
 	"""
diff --git a/pym/gentoolkit/revdep_rebuild/cache.py b/pym/gentoolkit/revdep_rebuild/cache.py
index 66fbd9d..f8b7841 100644
--- a/pym/gentoolkit/revdep_rebuild/cache.py
+++ b/pym/gentoolkit/revdep_rebuild/cache.py
@@ -6,11 +6,6 @@ Functions for reading, saving and verifying the data caches
 from portage import os
 import time
 import sys
-if sys.hexversion < 0x3000000:
-	from io import open
-	_unicode = unicode  # noqa
-else:
-	_unicode = str
 
 from portage import _encodings, _unicode_encode
 from portage.output import red
@@ -59,7 +54,7 @@ def save_cache(logger, to_save={}, temp_path=DEFAULTS['DEFAULT_TMP_DIR']):
 	try:
 		_file = open(_unicode_encode(os.path.join(temp_path, 'timestamp'),
 			encoding=_encodings['fs']), mode='w', encoding=_encodings['content'])
-		_file.write(_unicode(int(time.time())))
+		_file.write(str(int(time.time())))
 		_file.close()
 
 		for key,val in to_save.items():
diff --git a/pym/gentoolkit/revdep_rebuild/collect.py b/pym/gentoolkit/revdep_rebuild/collect.py
index 9f7d301..74a44f7 100644
--- a/pym/gentoolkit/revdep_rebuild/collect.py
+++ b/pym/gentoolkit/revdep_rebuild/collect.py
@@ -7,8 +7,6 @@ from portage import os
 import glob
 import stat
 import sys
-if sys.hexversion < 0x3000000:
-	from io import open
 
 import portage
 from portage import _encodings, _unicode_encode
@@ -16,12 +14,6 @@ from portage.output import blue, yellow
 from .settings import parse_revdep_config
 
 
-if sys.hexversion < 0x3000000:
-	_basestring = basestring  # noqa
-else:
-	_basestring = str
-
-
 def parse_conf(conf_file, visited=None, logger=None):
 	''' Parses supplied conf_file for libraries pathes.
 		conf_file is file or files to parse
@@ -30,7 +22,7 @@ def parse_conf(conf_file, visited=None, logger=None):
 	lib_dirs = set()
 	to_parse = set()
 
-	if isinstance(conf_file, _basestring):
+	if isinstance(conf_file, str):
 		conf_file = [conf_file]
 
 	for conf in conf_file:
diff --git a/pym/gentoolkit/revdep_rebuild/settings.py b/pym/gentoolkit/revdep_rebuild/settings.py
index efdb975..c8d77bc 100644
--- a/pym/gentoolkit/revdep_rebuild/settings.py
+++ b/pym/gentoolkit/revdep_rebuild/settings.py
@@ -5,20 +5,13 @@
 import argparse
 import os
 import sys
-if sys.hexversion < 0x3000000:
-	from io import open
 import re
 import glob
 
 import portage
 from portage import _encodings, _unicode_encode
 
-if sys.version_info[0] >= 3:
-	_unicode = str
-else:
-	_unicode = unicode  # noqa
-
-portage_root = _unicode(portage.root)
+portage_root = str(portage.root)
 
 DEFAULTS = {
 		'DEFAULT_LD_FILE': os.path.join(portage_root, 'etc/ld.so.conf'),
diff --git a/pym/gentoolkit/test/eclean/creator.py b/pym/gentoolkit/test/eclean/creator.py
index 4320e88..678c203 100644
--- a/pym/gentoolkit/test/eclean/creator.py
+++ b/pym/gentoolkit/test/eclean/creator.py
@@ -6,8 +6,6 @@
 
 import os
 import sys
-if sys.hexversion < 0x3000000:
-	from io import open
 import shutil
 import random
 
diff --git a/pym/gentoolkit/test/test_keyword.py b/pym/gentoolkit/test/test_keyword.py
index 6a03859..99a79b5 100644
--- a/pym/gentoolkit/test/test_keyword.py
+++ b/pym/gentoolkit/test/test_keyword.py
@@ -37,8 +37,6 @@ class TestGentoolkitKeyword(unittest.TestCase):
 			'~amd64', '~ppc', '~x86', '~amd64-linux', '~x86-linux',
 			'~ppc-macos', '~x86-macos', '~x86-solaris'
 		]
-		if sys.hexversion < 0x3000000:
-			self.assertEqual(sorted(kwds_presort, cmp=compare_strs), kwds_postsort)
 		self.assertEqual(sorted(kwds_presort, key = keyword.Keyword), kwds_postsort)
 
 
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-portage-dev] [PATCH gentoolkit 4/4] Remove inherits from object
  2020-12-20 22:10 [gentoo-portage-dev] [PATCH gentoolkit 1/4] Remove imports from __future__ Matt Turner
  2020-12-20 22:10 ` [gentoo-portage-dev] [PATCH gentoolkit 2/4] Remove $Header$ Matt Turner
  2020-12-20 22:10 ` [gentoo-portage-dev] [PATCH gentoolkit 3/4] Remove Python < 3 version checks Matt Turner
@ 2020-12-20 22:10 ` Matt Turner
  2020-12-21  1:58 ` [gentoo-portage-dev] [PATCH gentoolkit 1/4] Remove imports from __future__ Zac Medico
  3 siblings, 0 replies; 5+ messages in thread
From: Matt Turner @ 2020-12-20 22:10 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Matt Turner

Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
 pym/gentoolkit/cpv.py                     | 2 +-
 pym/gentoolkit/eclean/clean.py            | 2 +-
 pym/gentoolkit/eclean/output.py           | 2 +-
 pym/gentoolkit/eclean/pkgindex.py         | 2 +-
 pym/gentoolkit/eclean/search.py           | 2 +-
 pym/gentoolkit/enalyze/lib.py             | 4 ++--
 pym/gentoolkit/equery/belongs.py          | 2 +-
 pym/gentoolkit/equery/check.py            | 2 +-
 pym/gentoolkit/equery/depends.py          | 2 +-
 pym/gentoolkit/formatters.py              | 2 +-
 pym/gentoolkit/helpers.py                 | 4 ++--
 pym/gentoolkit/keyword.py                 | 2 +-
 pym/gentoolkit/metadata.py                | 8 ++++----
 pym/gentoolkit/module_base.py             | 2 +-
 pym/gentoolkit/package.py                 | 2 +-
 pym/gentoolkit/revdep_rebuild/analyse.py  | 2 +-
 pym/gentoolkit/revdep_rebuild/assign.py   | 2 +-
 pym/gentoolkit/test/eclean/creator.py     | 2 +-
 pym/gentoolkit/test/eclean/distsupport.py | 6 +++---
 pym/gentoolkit/test/eclean/test_clean.py  | 2 +-
 pym/gentoolkit/versionmatch.py            | 2 +-
 21 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/pym/gentoolkit/cpv.py b/pym/gentoolkit/cpv.py
index 563dab8..5238e24 100644
--- a/pym/gentoolkit/cpv.py
+++ b/pym/gentoolkit/cpv.py
@@ -37,7 +37,7 @@ isvalid_rev_re = re.compile(r'(\d+|0\d+\.\d+)')
 # Classes
 # =======
 
-class CPV(object):
+class CPV:
 	"""Provides methods on a category/package-version string.
 
 	Will also correctly split just a package or package-version string.
diff --git a/pym/gentoolkit/eclean/clean.py b/pym/gentoolkit/eclean/clean.py
index 2b750e3..3f6fe45 100644
--- a/pym/gentoolkit/eclean/clean.py
+++ b/pym/gentoolkit/eclean/clean.py
@@ -11,7 +11,7 @@ import gentoolkit.pprinter as pp
 from gentoolkit.eclean.pkgindex import PkgIndex
 
 
-class CleanUp(object):
+class CleanUp:
 	"""Performs all cleaning actions to distfiles or package directories.
 
 	@param controller: a progress output/user interaction controller function
diff --git a/pym/gentoolkit/eclean/output.py b/pym/gentoolkit/eclean/output.py
index 122d550..e2ed221 100644
--- a/pym/gentoolkit/eclean/output.py
+++ b/pym/gentoolkit/eclean/output.py
@@ -9,7 +9,7 @@ from portage.output import blue, yellow, teal, green, red
 from gentoolkit.pprinter import cpv, number
 
 
-class OutputControl(object):
+class OutputControl:
 	"""Outputs data according to predetermined options and handles any user
 	interaction.
 
diff --git a/pym/gentoolkit/eclean/pkgindex.py b/pym/gentoolkit/eclean/pkgindex.py
index 6cf9000..46c734d 100644
--- a/pym/gentoolkit/eclean/pkgindex.py
+++ b/pym/gentoolkit/eclean/pkgindex.py
@@ -13,7 +13,7 @@ from gentoolkit.eprefix import EPREFIX
 import portage
 
 
-class PkgIndex(object):
+class PkgIndex:
 	"""Handle the cleaning of the binpkg Package
 	Index file
 
diff --git a/pym/gentoolkit/eclean/search.py b/pym/gentoolkit/eclean/search.py
index 992949c..8f6e52f 100644
--- a/pym/gentoolkit/eclean/search.py
+++ b/pym/gentoolkit/eclean/search.py
@@ -50,7 +50,7 @@ def get_distdir():
 distdir = get_distdir()
 
 
-class DistfilesSearch(object):
+class DistfilesSearch:
 	"""
 
 		@param output: verbose output method or (lambda x: None) to turn off
diff --git a/pym/gentoolkit/enalyze/lib.py b/pym/gentoolkit/enalyze/lib.py
index 8580bb7..50c7d11 100644
--- a/pym/gentoolkit/enalyze/lib.py
+++ b/pym/gentoolkit/enalyze/lib.py
@@ -17,7 +17,7 @@ from gentoolkit.flag import (reduce_flags, get_flags, get_all_cpv_use,
 import portage
 
 
-class FlagAnalyzer(object):
+class FlagAnalyzer:
 	"""Specialty functions for analysing an installed package's
 	USE flags.  Can be used for single or mulitple use without
 	needing to be reset unless the system USE flags are changed.
@@ -142,7 +142,7 @@ class FlagAnalyzer(object):
 		return _flags
 
 
-class KeywordAnalyser(object):
+class KeywordAnalyser:
 	"""Specialty functions for analysing the installed package db for
 	keyword useage and the packages that used them.
 
diff --git a/pym/gentoolkit/equery/belongs.py b/pym/gentoolkit/equery/belongs.py
index 8289366..1c9ab13 100644
--- a/pym/gentoolkit/equery/belongs.py
+++ b/pym/gentoolkit/equery/belongs.py
@@ -36,7 +36,7 @@ QUERY_OPTS = {
 # Classes
 # =======
 
-class BelongsPrinter(object):
+class BelongsPrinter:
 	"""Outputs a formatted list of packages that claim to own a files."""
 
 	def __init__(self, verbose=True, name_only=False):
diff --git a/pym/gentoolkit/equery/check.py b/pym/gentoolkit/equery/check.py
index e965164..47eba98 100644
--- a/pym/gentoolkit/equery/check.py
+++ b/pym/gentoolkit/equery/check.py
@@ -41,7 +41,7 @@ QUERY_OPTS = {
 # Classes
 # =======
 
-class VerifyContents(object):
+class VerifyContents:
 	"""Verify installed packages' CONTENTS files.
 
 	The CONTENTS file contains timestamps and MD5 sums for each file owned
diff --git a/pym/gentoolkit/equery/depends.py b/pym/gentoolkit/equery/depends.py
index 7461ade..74c6933 100644
--- a/pym/gentoolkit/equery/depends.py
+++ b/pym/gentoolkit/equery/depends.py
@@ -33,7 +33,7 @@ QUERY_OPTS = {
 # Classes
 # =======
 
-class DependPrinter(object):
+class DependPrinter:
 	"""Output L{gentoolkit.dependencies.Dependencies} objects."""
 	def __init__(self, verbose=True):
 		self.verbose = verbose
diff --git a/pym/gentoolkit/formatters.py b/pym/gentoolkit/formatters.py
index e8b1428..097c186 100644
--- a/pym/gentoolkit/formatters.py
+++ b/pym/gentoolkit/formatters.py
@@ -94,7 +94,7 @@ def format_timestamp(timestamp):
 
 	return time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(int(timestamp)))
 
-class CpvValueWrapper(object):
+class CpvValueWrapper:
 	"""Format a cpv and linewrap pre-formatted values"""
 
 	def __init__(self, cpv_width=None, width=None):
diff --git a/pym/gentoolkit/helpers.py b/pym/gentoolkit/helpers.py
index 02ac20e..a979ca7 100644
--- a/pym/gentoolkit/helpers.py
+++ b/pym/gentoolkit/helpers.py
@@ -44,7 +44,7 @@ from gentoolkit.versionmatch import VersionMatch
 # Classes
 # =======
 
-class ChangeLog(object):
+class ChangeLog:
 	"""Provides methods for working with a Gentoo ChangeLog file.
 
 	Example usage:
@@ -216,7 +216,7 @@ class ChangeLog(object):
 		return result
 
 
-class FileOwner(object):
+class FileOwner:
 	"""Creates a function for locating the owner of filename queries.
 
 	Example usage:
diff --git a/pym/gentoolkit/keyword.py b/pym/gentoolkit/keyword.py
index 9edf4aa..e997efe 100644
--- a/pym/gentoolkit/keyword.py
+++ b/pym/gentoolkit/keyword.py
@@ -23,7 +23,7 @@ __all__ = (
 # Classes
 # =======
 
-class Keyword(object):
+class Keyword:
 	"""Provides common methods on a GLEP 53 keyword."""
 
 	def __init__(self, keyword):
diff --git a/pym/gentoolkit/metadata.py b/pym/gentoolkit/metadata.py
index ecf60c3..9dc9619 100644
--- a/pym/gentoolkit/metadata.py
+++ b/pym/gentoolkit/metadata.py
@@ -48,7 +48,7 @@ from portage import settings
 # Classes
 # =======
 
-class _Maintainer(object):
+class _Maintainer:
 	"""An object for representing one maintainer.
 
 	@type email: str or None
@@ -78,7 +78,7 @@ class _Maintainer(object):
 		return "<%s %r>" % (self.__class__.__name__, self.email)
 
 
-class _Useflag(object):
+class _Useflag:
 	"""An object for representing one USE flag.
 
 	@todo: Is there any way to have a keyword option to leave in
@@ -111,7 +111,7 @@ class _Useflag(object):
 		return "<%s %r>" % (self.__class__.__name__, self.name)
 
 
-class _Upstream(object):
+class _Upstream:
 	"""An object for representing one package's upstream.
 
 	@type maintainers: list
@@ -167,7 +167,7 @@ class _Upstream(object):
 		return [(e.text, e.get('type')) for e in self.node.findall('remote-id')]
 
 
-class MetaData(object):
+class MetaData:
 	"""Access metadata.xml"""
 
 	def __init__(self, metadata_path):
diff --git a/pym/gentoolkit/module_base.py b/pym/gentoolkit/module_base.py
index 322088d..0632469 100644
--- a/pym/gentoolkit/module_base.py
+++ b/pym/gentoolkit/module_base.py
@@ -17,7 +17,7 @@ import gentoolkit.pprinter as pp
 from gentoolkit.formatters import format_options
 from gentoolkit.base import mod_usage
 
-class ModuleBase(object):
+class ModuleBase:
 	"""E-app base module class to parse module options print module help, etc.."""
 
 	def __init__(self):
diff --git a/pym/gentoolkit/package.py b/pym/gentoolkit/package.py
index 37209d5..4c851bc 100644
--- a/pym/gentoolkit/package.py
+++ b/pym/gentoolkit/package.py
@@ -423,7 +423,7 @@ class Package(CPV):
 		return self.cpv not in unmasked
 
 
-class PackageFormatter(object):
+class PackageFormatter:
 	"""When applied to a L{gentoolkit.package.Package} object, determine the
 	location (Portage Tree vs. overlay), install status and masked status. That
 	information can then be easily formatted and displayed.
diff --git a/pym/gentoolkit/revdep_rebuild/analyse.py b/pym/gentoolkit/revdep_rebuild/analyse.py
index 6ce1568..3e46a51 100644
--- a/pym/gentoolkit/revdep_rebuild/analyse.py
+++ b/pym/gentoolkit/revdep_rebuild/analyse.py
@@ -115,7 +115,7 @@ def extract_dependencies_from_la(la, libraries, to_check, logger):
 	return broken
 
 
-class LibCheck(object):
+class LibCheck:
 	def __init__(self, scanned_files, logger, searchlibs=None, searchbits=None,
 				all_masks=None, masked_dirs=None):
 		'''LibCheck init function.
diff --git a/pym/gentoolkit/revdep_rebuild/assign.py b/pym/gentoolkit/revdep_rebuild/assign.py
index 3fa9299..570c114 100644
--- a/pym/gentoolkit/revdep_rebuild/assign.py
+++ b/pym/gentoolkit/revdep_rebuild/assign.py
@@ -16,7 +16,7 @@ from portage import portdb
 from portage.output import bold, red, yellow, green
 
 
-class _file_matcher(object):
+class _file_matcher:
 	"""
 	Compares files by basename and parent directory (device, inode),
 	so comparisons work regardless of directory symlinks. If a
diff --git a/pym/gentoolkit/test/eclean/creator.py b/pym/gentoolkit/test/eclean/creator.py
index 678c203..da5123e 100644
--- a/pym/gentoolkit/test/eclean/creator.py
+++ b/pym/gentoolkit/test/eclean/creator.py
@@ -94,7 +94,7 @@ def make_symlinks(path, links, targets):
 			os.path.join(path, links[i]))
 
 
-class TestDirCreation(object):
+class TestDirCreation:
     """"""
 
     distfile_list = ['ExtUtils-ParseXS-2.22.tar.gz',
diff --git a/pym/gentoolkit/test/eclean/distsupport.py b/pym/gentoolkit/test/eclean/distsupport.py
index fd858d4..0fc2db8 100644
--- a/pym/gentoolkit/test/eclean/distsupport.py
+++ b/pym/gentoolkit/test/eclean/distsupport.py
@@ -335,7 +335,7 @@ def get_props(cpvs):
 		props[cpv] = PROPS[cpv].copy()
 	return props
 
-class Dbapi(object):
+class Dbapi:
 	"""Fake portage dbapi class used to return
 	pre-determined test data in place of a live system
 
@@ -397,7 +397,7 @@ class Dbapi(object):
 		return props
 
 
-class OutputSimulator(object):
+class OutputSimulator:
 	"""Simple output accumulator used for testing.
 	Simulates eclean.output.OutputControl class """
 
@@ -432,7 +432,7 @@ class OutputSimulator(object):
 		self.callback('list_pkgs', pkgs)
 
 
-class TestDisfiles(object):
+class TestDisfiles:
 
 	def __init__(self):
 		self.workdir = None
diff --git a/pym/gentoolkit/test/eclean/test_clean.py b/pym/gentoolkit/test/eclean/test_clean.py
index 0c35e93..2f50e27 100755
--- a/pym/gentoolkit/test/eclean/test_clean.py
+++ b/pym/gentoolkit/test/eclean/test_clean.py
@@ -20,7 +20,7 @@ __email__ = "brian.dolbec@gmail.com"
 #  from gentoolkit.eclean.clean import CleanUp
 
 
-#  class Controllers(object):
+#  class Controllers:
 #          """Contains controller methods for use in testing
 #          the clean module methods"""
 
diff --git a/pym/gentoolkit/versionmatch.py b/pym/gentoolkit/versionmatch.py
index 0d1c6ab..9287c13 100644
--- a/pym/gentoolkit/versionmatch.py
+++ b/pym/gentoolkit/versionmatch.py
@@ -21,7 +21,7 @@ from gentoolkit.cpv import CPV
 # Classes
 # =======
 
-class VersionMatch(object):
+class VersionMatch:
 	"""Gentoo version comparison object from pkgcore.ebuild.atom_restricts.
 
 	Any overriding of this class *must* maintain numerical order of
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [gentoo-portage-dev] [PATCH gentoolkit 1/4] Remove imports from __future__
  2020-12-20 22:10 [gentoo-portage-dev] [PATCH gentoolkit 1/4] Remove imports from __future__ Matt Turner
                   ` (2 preceding siblings ...)
  2020-12-20 22:10 ` [gentoo-portage-dev] [PATCH gentoolkit 4/4] Remove inherits from object Matt Turner
@ 2020-12-21  1:58 ` Zac Medico
  3 siblings, 0 replies; 5+ messages in thread
From: Zac Medico @ 2020-12-21  1:58 UTC (permalink / raw
  To: gentoo-portage-dev, Matt Turner


[-- Attachment #1.1: Type: text/plain, Size: 262 bytes --]

On 12/20/20 2:10 PM, Matt Turner wrote:
> gentoolkit supports only Python 3.6+ now, so these are not used.
> 
> Signed-off-by: Matt Turner <mattst88@gentoo.org>

The whole series LGTM (including "Remove unused sys imports" patch 5/4).
-- 
Thanks,
Zac


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 981 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-12-21  1:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-20 22:10 [gentoo-portage-dev] [PATCH gentoolkit 1/4] Remove imports from __future__ Matt Turner
2020-12-20 22:10 ` [gentoo-portage-dev] [PATCH gentoolkit 2/4] Remove $Header$ Matt Turner
2020-12-20 22:10 ` [gentoo-portage-dev] [PATCH gentoolkit 3/4] Remove Python < 3 version checks Matt Turner
2020-12-20 22:10 ` [gentoo-portage-dev] [PATCH gentoolkit 4/4] Remove inherits from object Matt Turner
2020-12-21  1:58 ` [gentoo-portage-dev] [PATCH gentoolkit 1/4] Remove imports from __future__ Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox