From 30be9a44bb74c039bfea04e7d796485efe275a2f Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Thu, 2 Nov 2023 19:55:11 +0800 Subject: [PATCH] Update v1.1.5 --- VERSION | 2 +- arxiv_dl/arxiv_dl.py | 1 - arxiv_dl/updater.py | 11 +++++++++-- setup.py | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index 1b87bcd..314c3d7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.4 \ No newline at end of file +1.1.5 \ No newline at end of file diff --git a/arxiv_dl/arxiv_dl.py b/arxiv_dl/arxiv_dl.py index 307ed5d..c7aa001 100644 --- a/arxiv_dl/arxiv_dl.py +++ b/arxiv_dl/arxiv_dl.py @@ -22,7 +22,6 @@ scrape_metadata_nips, scrape_metadata_openreview, ) -from .updater import check_update def main( diff --git a/arxiv_dl/updater.py b/arxiv_dl/updater.py index 1ccf806..56f875e 100644 --- a/arxiv_dl/updater.py +++ b/arxiv_dl/updater.py @@ -7,7 +7,14 @@ def check_latest_version(): """Check the latest version of arxiv-dl on PyPI.""" pypi_url = "https://pypi.org/pypi/arxiv-dl/json" - response = requests.get(pypi_url) + try: + response = requests.get(pypi_url) + except requests.exceptions.ConnectionError: + return "" + except Exception as e: + # print(e) + return "" + if response.status_code == 200: pypi_data = response.text pypi_data = json.loads(pypi_data) @@ -31,7 +38,7 @@ def check_update(): if latest_version and latest_version != current_version: print( - f"[arxiv-dl] latest version available: {latest_version}. You may update by running: pip install --upgrade arxiv-dl" + f"[arxiv-dl] latest version available: {latest_version}. You may update by running: pip install --upgrade arxiv-dl\n" ) diff --git a/setup.py b/setup.py index bc0180c..0cd1403 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ MAJOR = 1 MINOR = 1 -MICRO = 4 +MICRO = 5 VERSION = "%d.%d.%d" % (MAJOR, MINOR, MICRO)