Skip to content

Commit

Permalink
Remove distutils
Browse files Browse the repository at this point in the history
  • Loading branch information
kzrnm committed Apr 14, 2024
1 parent 3945825 commit 58a2911
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions onlinejudge_command/update_checking.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import distutils.version
import http.client
import json
import time
from logging import getLogger
from typing import *

import packaging.version
import requests

import onlinejudge.__about__ as api_version
Expand Down Expand Up @@ -73,8 +73,8 @@ def get_latest_version_from_pypi(package_name: str) -> str:


def is_update_available_on_pypi(package_name: str, current_version: str) -> bool:
a = distutils.version.StrictVersion(current_version)
b = distutils.version.StrictVersion(get_latest_version_from_pypi(package_name))
a = packaging.version.parse(current_version)
b = packaging.version.parse(get_latest_version_from_pypi(package_name))
return a < b


Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
install_requires=[
'online-judge-api-client >= 10.9.0, < 11',
'colorama >= 0.3, < 1',
'packaging >= 24',
'requests >= 2, < 3',
],
packages=find_packages(exclude=('tests', 'docs')),
Expand Down

0 comments on commit 58a2911

Please sign in to comment.