# 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


from dnf.i18n import ucd, _, P_
import dnf.util
import libdnf
import warnings
    def __str__(self):
        string = super(MarkingError, self).__str__()
        if self.pkg_spec:
            string += ': ' + self.pkg_spec
        return string


class MarkingErrors(Error):
    # :api
    def __init__(self, no_match_group_specs=(), error_group_specs=(), no_match_pkg_specs=(),
                 error_pkg_specs=(), module_depsolv_errors=()):
        """Initialize the marking error instance."""
        msg = _("Problems in request:")
        if (no_match_pkg_specs):
            msg += "\n" + _("missing packages: ") + ", ".join(no_match_pkg_specs)
        if (error_pkg_specs):
            msg += "\n" + _("broken packages: ") + ", ".join(error_pkg_specs)
        if (no_match_group_specs):
            msg += "\n" + _("missing groups or modules: ") + ", ".join(no_match_group_specs)
        if (error_group_specs):
            msg += "\n" + _("broken groups or modules: ") + ", ".join(error_group_specs)
        if (module_depsolv_errors):
            msg_mod = dnf.util._format_resolve_problems(module_depsolv_errors[0])
            if module_depsolv_errors[1] == \
                    libdnf.module.ModulePackageContainer.ModuleErrorType_ERROR_IN_DEFAULTS:
                msg += "\n" + "\n".join([P_('Modular dependency problem with Defaults:',
                                            'Modular dependency problems with Defaults:',
                                            len(module_depsolv_errors)),
                                        msg_mod])
            else:

# 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/exceptions.py
from dnf.i18n import ucd, _, P_
import dnf.util
import libdnf
import warnings

    def __str__(self):
        string = super(MarkingError, self).__str__()
        if self.pkg_spec:
            string += ': ' + self.pkg_spec
        return string


class MarkingErrors(Error):
    # :api
    def __init__(self, no_match_group_specs=(), error_group_specs=(), no_match_pkg_specs=(),
                 error_pkg_specs=(), module_depsolv_errors=()):
        """Initialize the marking error instance."""
        msg = _("Problems in request:")
        if (no_match_pkg_specs):
            msg += "\n" + _("missing packages: ") + ", ".join(no_match_pkg_specs)
        if (error_pkg_specs):
            msg += "\n" + _("broken packages: ") + ", ".join(error_pkg_specs)
        if (no_match_group_specs):
            msg += "\n" + _("missing groups or modules: ") + ", ".join(no_match_group_specs)
        if (error_group_specs):
            msg += "\n" + _("broken groups or modules: ") + ", ".join(error_group_specs)
        if (module_depsolv_errors):
            msg_mod = dnf.util._format_resolve_problems(module_depsolv_errors[0])
            if module_depsolv_errors[1] == \
                    libdnf.module.ModulePackageContainer.ModuleErrorType_ERROR_IN_DEFAULTS:
                msg += "\n" + "\n".join([P_('Modular dependency problem with Defaults:',
                                            'Modular dependency problems with Defaults:',
                                            len(module_depsolv_errors)),
                                        msg_mod])
            else:

                msg += "\n" + "\n".join([P_('Modular dependency problem:',