Skip to content

Commit

Permalink
replaced distutils with packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
rongxin-liu committed Oct 17, 2023
1 parent 955637c commit b3f0a0c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"Topic :: Software Development :: Libraries :: Python Modules"
],
description="CS50 library for Python",
install_requires=["Flask>=1.0", "SQLAlchemy==1.4.46", "sqlparse", "termcolor", "wheel"],
install_requires=["Flask>=1.0", "packaging", "SQLAlchemy==1.4.46", "sqlparse", "termcolor", "wheel"],
keywords="cs50",
license="GPLv3",
long_description_content_type="text/markdown",
name="cs50",
package_dir={"": "src"},
packages=["cs50"],
url="https://github.com/cs50/python-cs50",
version="9.2.6"
version="9.2.7"
)
1 change: 0 additions & 1 deletion src/cs50/cs50.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import re
import sys

from distutils.sysconfig import get_python_lib
from os.path import abspath, join
from termcolor import colored
from traceback import format_exception
Expand Down
7 changes: 5 additions & 2 deletions src/cs50/flask.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ def _wrap_flask(f):
if f is None:
return

from distutils.version import StrictVersion
from packaging.version import Version, InvalidVersion
from .cs50 import _formatException

if f.__version__ < StrictVersion("1.0"):
try:
if Version(f.__version__) < Version("1.0"):
return
except InvalidVersion:
return

if os.getenv("CS50_IDE_TYPE") == "online":
Expand Down

0 comments on commit b3f0a0c

Please sign in to comment.