Skip to content

Commit

Permalink
Packaging and compat fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcharnock committed Aug 17, 2023
1 parent 5ab86e4 commit 9c9ada2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
8 changes: 6 additions & 2 deletions lightbus/commands/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
from pathlib import Path

if sys.version_info < (3, 10):
from importlib_metadata import version as importlib_version
from importlib.metadata import entry_points as _entry_points

def entry_points(group):
return _entry_points()[group]

else:
from importlib.metadata import version as importlib_version
from importlib.metadata import entry_points


logger = logging.getLogger(__name__)
Expand Down
6 changes: 5 additions & 1 deletion lightbus/utilities/importing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
from typing import Sequence, Tuple, Callable

if sys.version_info < (3, 10):
from importlib_metadata import entry_points
from importlib.metadata import entry_points as _entry_points

def entry_points(group):
return _entry_points()[group]

else:
from importlib.metadata import entry_points

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,5 @@ async-timeout = "^4.0.3"
debug = "lightbus:DebugSchemaTransport"

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
requires = ["poetry>=1.0.0"]
build-backend = "poetry.core.masonry.api"

0 comments on commit 9c9ada2

Please sign in to comment.