# Path: dnf/i18n.py
# class UnicodeStream(object):
#     def __init__(self, stream, encoding):
#     def write(self, s):
#     def __getattr__(self, name):
# def _full_ucd_support(encoding):
# def _guess_encoding():
# def setup_locale():
# def setup_stdout():
# def ucd_input(ucstring):
# def ucd(obj):
# def _exact_width_char(uchar):
# def chop_str(msg, chop=None):
# def exact_width(msg):
# def fill_exact_width(msg, fill, chop=None, left=True, prefix='', suffix=''):
# def textwrap_fill(text, width=70, initial_indent='', subsequent_indent=''):
#     def _indent_at_beg(line):
# def select_short_long(width, msg_short, msg_long):
# def translation(name):
#     def ucd_wrapper(fnc):
# def pgettext(context, message):
# _, P_ = translation("dnf")
# C_ = pgettext
# 
# Path: dnf/yum/rpmtrans.py
# class TransactionDisplay(object):
#     # :api
# 
#     def __init__(self):
#         # :api
#         pass
# 
#     # use constants from dnf.callback which are the official API
#     PKG_CLEANUP = _add_deprecated_action("PKG_CLEANUP")
#     PKG_DOWNGRADE = _add_deprecated_action("PKG_DOWNGRADE")
#     PKG_REMOVE = _add_deprecated_action("PKG_REMOVE")
#     PKG_ERASE = PKG_REMOVE
#     PKG_INSTALL = _add_deprecated_action("PKG_INSTALL")
#     PKG_OBSOLETE = _add_deprecated_action("PKG_OBSOLETE")
#     PKG_REINSTALL = _add_deprecated_action("PKG_REINSTALL")
#     PKG_UPGRADE = _add_deprecated_action("PKG_UPGRADE")
#     PKG_VERIFY = _add_deprecated_action("PKG_VERIFY")
#     TRANS_PREPARATION = _add_deprecated_action("TRANS_PREPARATION")
#     PKG_SCRIPTLET = _add_deprecated_action("PKG_SCRIPTLET")
#     TRANS_POST = _add_deprecated_action("TRANS_POST")
# 
#     def progress(self, package, action, ti_done, ti_total, ts_done, ts_total):
#         """Report ongoing progress on a transaction item. :api
# 
#         :param package: a package being processed
#         :param action: the action being performed
#         :param ti_done: number of processed bytes of the transaction
#            item being processed
#         :param ti_total: total number of bytes of the transaction item
#            being processed
#         :param ts_done: number of actions processed in the whole
#            transaction
#         :param ts_total: total number of actions in the whole
#            transaction
# 
#         """
#         pass
# 
#     def scriptout(self, msgs):
#         """Hook for reporting an rpm scriptlet output.
# 
#         :param msgs: the scriptlet output
#         """
#         pass
# 
#     def error(self, message):
#         """Report an error that occurred during the transaction. :api"""
#         pass
# 
#     def filelog(self, package, action):
#         # check package object type - if it is a string - just output it
#         """package is the same as in progress() - a package object or simple
#            string action is also the same as in progress()"""
#         pass
# 
#     def verify_tsi_package(self, pkg, count, total):
#         # TODO: replace with verify_tsi?
#         self.progress(pkg, dnf.transaction.PKG_VERIFY, 100, 100, count, total)


import fnmatch
import hawkey
import itertools
import libdnf.transaction
import logging
import operator
import pwd
import re
import sys
import time
import dnf.base
import dnf.callback
import dnf.cli.progress
import dnf.cli.term
import dnf.conf
import dnf.crypto
import dnf.i18n
import dnf.transaction
import dnf.util
import dnf.yum.misc
from dnf.cli.format import format_number, format_time
from dnf.i18n import _, C_, P_, ucd, fill_exact_width, textwrap_fill, exact_width, select_short_long
from dnf.pycomp import xrange, basestring, long, unicode, sys_maxsize
from dnf.yum.rpmtrans import TransactionDisplay
from dnf.db.history import MergedTransactionWrapper
            output_list.append(format_key_val(_("Epoch"), pkg.epoch))
        key = select_short_long(12, C_("short", "Version"),
                                    C_("long", "Version"))
        output_list.append(format_key_val(key, pkg.version))
        # Translators: This message should be no longer than 12 characters.
        output_list.append(format_key_val(_("Release"), pkg.release))
        key = select_short_long(12, C_("short", "Arch"),
                                    C_("long", "Architecture"))
        output_list.append(format_key_val(key, pkg.arch))
        key = select_short_long(12, C_("short", "Size"), C_("long", "Size"))
        output_list.append(format_key_val(key,
                                          format_number(float(pkg._size))))
        # Translators: This message should be no longer than 12 characters.
        output_list.append(format_key_val(_("Source"), pkg.sourcerpm))
        key = select_short_long(12, C_("short", "Repo"),
                                    C_("long", "Repository"))
        output_list.append(format_key_val(key, pkg.repoid))

        if pkg._from_system:
            history_repo = self.history.repo(pkg)
            if history_repo:
                # Translators: This message should be no longer than 12 chars.
                output_list.append(format_key_val(_("From repo"), history_repo))
        if self.conf.verbose:
            # :hawkey does not support changelog information
            # print(_("Committer   : %s") % ucd(pkg.committer))
            # print(_("Committime  : %s") % time.ctime(pkg.committime))
            # Translators: This message should be no longer than 12 characters.
            output_list.append(format_key_val(_("Packager"), pkg.packager))
            # Translators: This message should be no longer than 12 characters.

# Path: dnf/i18n.py
# class UnicodeStream(object):
#     def __init__(self, stream, encoding):
#     def write(self, s):
#     def __getattr__(self, name):
# def _full_ucd_support(encoding):
# def _guess_encoding():
# def setup_locale():
# def setup_stdout():
# def ucd_input(ucstring):
# def ucd(obj):
# def _exact_width_char(uchar):
# def chop_str(msg, chop=None):
# def exact_width(msg):
# def fill_exact_width(msg, fill, chop=None, left=True, prefix='', suffix=''):
# def textwrap_fill(text, width=70, initial_indent='', subsequent_indent=''):
#     def _indent_at_beg(line):
# def select_short_long(width, msg_short, msg_long):
# def translation(name):
#     def ucd_wrapper(fnc):
# def pgettext(context, message):
# _, P_ = translation("dnf")
# C_ = pgettext
# 
# Path: dnf/yum/rpmtrans.py
# class TransactionDisplay(object):
#     # :api
# 
#     def __init__(self):
#         # :api
#         pass
# 
#     # use constants from dnf.callback which are the official API
#     PKG_CLEANUP = _add_deprecated_action("PKG_CLEANUP")
#     PKG_DOWNGRADE = _add_deprecated_action("PKG_DOWNGRADE")
#     PKG_REMOVE = _add_deprecated_action("PKG_REMOVE")
#     PKG_ERASE = PKG_REMOVE
#     PKG_INSTALL = _add_deprecated_action("PKG_INSTALL")
#     PKG_OBSOLETE = _add_deprecated_action("PKG_OBSOLETE")
#     PKG_REINSTALL = _add_deprecated_action("PKG_REINSTALL")
#     PKG_UPGRADE = _add_deprecated_action("PKG_UPGRADE")
#     PKG_VERIFY = _add_deprecated_action("PKG_VERIFY")
#     TRANS_PREPARATION = _add_deprecated_action("TRANS_PREPARATION")
#     PKG_SCRIPTLET = _add_deprecated_action("PKG_SCRIPTLET")
#     TRANS_POST = _add_deprecated_action("TRANS_POST")
# 
#     def progress(self, package, action, ti_done, ti_total, ts_done, ts_total):
#         """Report ongoing progress on a transaction item. :api
# 
#         :param package: a package being processed
#         :param action: the action being performed
#         :param ti_done: number of processed bytes of the transaction
#            item being processed
#         :param ti_total: total number of bytes of the transaction item
#            being processed
#         :param ts_done: number of actions processed in the whole
#            transaction
#         :param ts_total: total number of actions in the whole
#            transaction
# 
#         """
#         pass
# 
#     def scriptout(self, msgs):
#         """Hook for reporting an rpm scriptlet output.
# 
#         :param msgs: the scriptlet output
#         """
#         pass
# 
#     def error(self, message):
#         """Report an error that occurred during the transaction. :api"""
#         pass
# 
#     def filelog(self, package, action):
#         # check package object type - if it is a string - just output it
#         """package is the same as in progress() - a package object or simple
#            string action is also the same as in progress()"""
#         pass
# 
#     def verify_tsi_package(self, pkg, count, total):
#         # TODO: replace with verify_tsi?
#         self.progress(pkg, dnf.transaction.PKG_VERIFY, 100, 100, count, total)


# Path: dnf/cli/output.py
import fnmatch
import hawkey
import itertools
import libdnf.transaction
import logging
import operator
import pwd
import re
import sys
import time
import dnf.base
import dnf.callback
import dnf.cli.progress
import dnf.cli.term
import dnf.conf
import dnf.crypto
import dnf.i18n
import dnf.transaction
import dnf.util
import dnf.yum.misc
from dnf.cli.format import format_number, format_time
from dnf.i18n import _, C_, P_, ucd, fill_exact_width, textwrap_fill, exact_width, select_short_long
from dnf.pycomp import xrange, basestring, long, unicode, sys_maxsize
from dnf.yum.rpmtrans import TransactionDisplay
from dnf.db.history import MergedTransactionWrapper

            output_list.append(format_key_val(_("Epoch"), pkg.epoch))
        key = select_short_long(12, C_("short", "Version"),
                                    C_("long", "Version"))
        output_list.append(format_key_val(key, pkg.version))
        # Translators: This message should be no longer than 12 characters.
        output_list.append(format_key_val(_("Release"), pkg.release))
        key = select_short_long(12, C_("short", "Arch"),
                                    C_("long", "Architecture"))
        output_list.append(format_key_val(key, pkg.arch))
        key = select_short_long(12, C_("short", "Size"), C_("long", "Size"))
        output_list.append(format_key_val(key,
                                          format_number(float(pkg._size))))
        # Translators: This message should be no longer than 12 characters.
        output_list.append(format_key_val(_("Source"), pkg.sourcerpm))
        key = select_short_long(12, C_("short", "Repo"),
                                    C_("long", "Repository"))
        output_list.append(format_key_val(key, pkg.repoid))

        if pkg._from_system:
            history_repo = self.history.repo(pkg)
            if history_repo:
                # Translators: This message should be no longer than 12 chars.
                output_list.append(format_key_val(_("From repo"), history_repo))
        if self.conf.verbose:
            # :hawkey does not support changelog information
            # print(_("Committer   : %s") % ucd(pkg.committer))
            # print(_("Committime  : %s") % time.ctime(pkg.committime))
            # Translators: This message should be no longer than 12 characters.
            output_list.append(format_key_val(_("Packager"), pkg.packager))
            # Translators: This message should be no longer than 12 characters.

            output_list.append(format_key_val(_("Buildtime"),