def auto_classifiers(cfg):
    """Generate a list of classifiers for pypi from all sections of config.

    Args:
        cfg (Config):  current package configuration

    Returns:
        (list of str)
    """
    items = set(cfg['pypi']['classifiers'])
    intended_versions = cfg['pysetup']['intended_versions']
    if intended_versions:
        items.add('Programming Language :: Python')
        ver_cla_tpl = 'Programming Language :: Python :: {}.{}'
        major_versions = set()
        for ver in intended_versions:
            items.add(ver_cla_tpl.format(ver[0], ver[1]))
            major_versions.add(ver[0])
        ver_cla_tpl = 'Programming Language :: Python :: {}'
        for ver in major_versions:
            items.add(ver_cla_tpl.format(ver))
        if len(major_versions) == 1:
            ver, = major_versions
            items.add(f'Programming Language :: Python :: {ver} :: Only')
    return sorted(items)
