@app.route('/pypi/releases/<dist_name>')
def releases(dist_name):
    """ This is the /pypi/releases/<dist_name> entry point, it is the interface
    between Stallion and the PyPI RPC service when checking for updates.

    :param dist_name: the package name (distribution name).
    """
    pkg_res = get_pkg_res()

    data = {}

    pkg_dist_version = pkg_res.get_distribution(dist_name).version
    pypi_rel = get_pypi_releases(dist_name)

    data["dist_name"] = dist_name
    data["pypi_info"] = pypi_rel
    data["current_version"] = pkg_dist_version

    if pypi_rel:
        pypi_last_version = pkg_res.parse_version(pypi_rel[0])
        current_version = pkg_res.parse_version(pkg_dist_version)
        last_version = pkg_dist_version.lower() != pypi_rel[0].lower()

        data["last_is_great"] = pypi_last_version > current_version
        data["last_version_differ"] = last_version

        if data["last_is_great"]:
            DIST_PYPI_CACHE.add(dist_name.lower())
        else:
            try:
                DIST_PYPI_CACHE.remove(dist_name.lower())
            except __HOLE__:
                pass

    return render_template('pypi_update.html', **data)
dataset/ETHPy150Open perone/stallion/stallion/main.py/releases