diff --git a/aider/versioncheck.py b/aider/versioncheck.py index a09a2b536..787c76d3f 100644 --- a/aider/versioncheck.py +++ b/aider/versioncheck.py @@ -1,16 +1,19 @@ import requests import pkg_resources +import aider + +from aider.dump import dump def check_version(): - response = requests.get('https://pypi.org/pypi/aider/json') + response = requests.get('https://pypi.org/pypi/aider-chat/json') data = response.json() latest_version = data['info']['version'] - current_version = pkg_resources.get_distribution('aider').version + current_version = pkg_resources.get_distribution('aider-chat').version - if pkg_resources.parse_version(latest_version) > pkg_resources.parse_version(current_version): - print(f"A newer version of 'aider' is available: {latest_version}") - else: - print("You are using the latest version of 'aider'.") + if pkg_resources.parse_version(latest_version) <= pkg_resources.parse_version(current_version): + return + + print(f"Running aider version {current_version}, newer version available: {latest_version}") if __name__ == "__main__": check_version()