Packaging cleanup: remove conditionals for < 2.6 support.
PEP 370 features and sys.dont_write_bytecode are always available
in 3.3; the distutils2 backport still has the conditionals.
I also renamed an internal misnamed method and fixed a few things
(“packaging2” name, stray print, unused import, fd leak).
diff --git a/Lib/packaging/dist.py b/Lib/packaging/dist.py
index de718cc..3019b7c 100644
--- a/Lib/packaging/dist.py
+++ b/Lib/packaging/dist.py
@@ -537,7 +537,7 @@
def _get_command_groups(self):
"""Helper function to retrieve all the command class names divided
into standard commands (listed in
- packaging2.command.STANDARD_COMMANDS) and extra commands (given in
+ packaging.command.STANDARD_COMMANDS) and extra commands (given in
self.cmdclass and not standard commands).
"""
extra_commands = [cmd for cmd in self.cmdclass
@@ -547,7 +547,7 @@
def print_commands(self):
"""Print out a help message listing all available commands with a
description of each. The list is divided into standard commands
- (listed in packaging2.command.STANDARD_COMMANDS) and extra commands
+ (listed in packaging.command.STANDARD_COMMANDS) and extra commands
(given in self.cmdclass and not standard commands). The
descriptions come from the command class attribute
'description'.