Skip to content

Commit

Permalink
Use graphlib2 only in Py38; Fixes #8
Browse files Browse the repository at this point in the history
  • Loading branch information
maldoinc committed Nov 30, 2023
1 parent a0ace7e commit 747015a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Changelog = "https://github.com/maldoinc/wireup/releases"

[tool.poetry.dependencies]
python = "^3.8"
graphlib2 = "^0.4.7"
graphlib2 = {version="^0.4.7", python=">=3.8,<3.9"}

[tool.poetry.group.dev.dependencies]
ruff = "0.1.*"
Expand Down
6 changes: 5 additions & 1 deletion wireup/ioc/dependency_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

import asyncio
import functools
import sys
from typing import TYPE_CHECKING, Any, Callable, TypeVar, overload

from graphlib2 import TopologicalSorter
if sys.version_info[:2] > (3, 8):
from graphlib import TopologicalSorter
else:
from graphlib2 import TopologicalSorter

from wireup.errors import (
InvalidRegistrationTypeError,
Expand Down

0 comments on commit 747015a

Please sign in to comment.