Skip to content

Commit

Permalink
Removes pkg_resources
Browse files Browse the repository at this point in the history
  • Loading branch information
dmalan committed Nov 19, 2023
1 parent df74d44 commit 4399c8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions render50
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ from bs4 import BeautifulSoup
from copy import copy
from glob import glob
from natsort import natsorted, ns
from pkg_resources import DistributionNotFound, get_distribution
from importlib.metadata import PackageNotFoundError, version
from pygments import highlight
from pygments.formatters import HtmlFormatter
from pygments.lexers import get_lexer_for_filename, guess_lexer
Expand All @@ -39,11 +39,9 @@ if sys.version_info < (3, 9):

# Get version
try:
d = get_distribution("render50")
except DistributionNotFound:
__version__ = version("render50")
except PackageNotFoundError:
__version__ = "UNKNOWN"
else:
__version__ = d.version

# Prioritize these languages
# https://github.com/pygments/pygments/issues/2405
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
python_requires=">=3.9",
scripts=["render50"],
url="https://github.com/cs50/render50",
version="9.2.5"
version="9.2.6"
)

0 comments on commit 4399c8a

Please sign in to comment.