Skip to content

Commit

Permalink
moved semver logic
Browse files Browse the repository at this point in the history
  • Loading branch information
sigmarkarl committed Jan 23, 2024
1 parent 4c79f3b commit 5209d4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 0 additions & 5 deletions jupyterlab/extensions/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,6 @@ def get_semver_version(version: str) -> str:
Returns
Semver compatible version
"""
if "/running" in version:
version = "~4.0.11"
elif "/services" in version:
version = "~7.0.11"

return re.sub(
r"(a|b|rc)(\d+)$",
lambda m: f"{PYTHON_TO_SEMVER[m.group(1)]}{m.group(2)}",
Expand Down
5 changes: 5 additions & 0 deletions jupyterlab/semver.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,11 @@ def make_range(range_, loose):

class Range:
def __init__(self, range_, loose):
if "/running" in range_:
range_ = "~4.0.11"
elif "/services" in range_:
range_ = "~7.0.11"

self.loose = loose
# First, split based on boolean or ||
self.raw = range_
Expand Down

0 comments on commit 5209d4a

Please sign in to comment.