Skip to content

Commit

Permalink
Merge pull request #439 from pyupio/fix/packaging-LegacyVersion
Browse files Browse the repository at this point in the history
Remove the LegacyVersion import
  • Loading branch information
yeisonvargasf authored Dec 8, 2022
2 parents a9da481 + 2c4bb4b commit 7c72120
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions safety/safety.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import requests
from packaging.specifiers import SpecifierSet
from packaging.utils import canonicalize_name
from packaging.version import parse as parse_version, Version, LegacyVersion, parse
from packaging.version import parse as parse_version

from .constants import (API_MIRRORS, CACHE_FILE, OPEN_MIRRORS, REQUEST_TIMEOUT, API_BASE_URL)
from .errors import (DatabaseFetchError, DatabaseFileNotFoundError,
Expand Down Expand Up @@ -458,7 +458,7 @@ def review(report=None, params=None):
major = None
if recommended:
secure_v.append(recommended)
major = parse(recommended)
major = parse_version(recommended)

remediations[key] = {'vulns_found': value.get('vulnerabilities_found', 0),
'version': value.get('current_version'),
Expand Down

0 comments on commit 7c72120

Please sign in to comment.