def check_new_version(myversion, version_url):
    """Compares current web2py's version with the latest stable web2py version.

    Args:
        myversion: the current version as stored in file `web2py/VERSION`
        version_URL: the URL that contains the version
                     of the latest stable release

    Returns:
        tuple: state, version

        - state : `True` if upgrade available, `False` if current
          version is up-to-date, -1 on error
        - version : the most up-to-version available

    """
    try:
        from urllib import urlopen
        version = urlopen(version_url).read()
        pversion = parse_version(version)
        pmyversion = parse_version(myversion)
    except __HOLE__:
        import traceback
        print traceback.format_exc()
        return -1, myversion

    if pversion[:3]+pversion[-6:] > pmyversion[:3]+pmyversion[-6:]:
        return True, version
    else:
        return False, version
dataset/ETHPy150Open uwdata/termite-data-server/web2py/gluon/admin.py/check_new_version