Skip to content

Commit

Permalink
fix: add upper bound for packaging version (#3331)
Browse files Browse the repository at this point in the history
`packaging` 22.0 removes `LegacyVersion`, which `pip-requirements-parser` is currently using
  • Loading branch information
aarnphm committed Dec 8, 2022
1 parent 2f5e247 commit b9b86fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Expand Up @@ -47,7 +47,7 @@ dependencies = [
"opentelemetry-instrumentation-asgi==0.35b0",
"opentelemetry-semantic-conventions==0.35b0",
"opentelemetry-util-http==0.35b0",
"packaging>=20.0",
"packaging>=20.0,<22",
"pathspec",
"pip-tools>=6.6.2",
"pip-requirements-parser>=31.2.0",
Expand Down
3 changes: 2 additions & 1 deletion src/bentoml/_internal/bento/build_config.py
Expand Up @@ -16,7 +16,6 @@
import psutil
import fs.copy
from pathspec import PathSpec
from pip_requirements_parser import RequirementsFile

from ..utils import bentoml_cattr
from ..utils import resolve_user_filepath
Expand Down Expand Up @@ -598,6 +597,8 @@ def write_to_bento(self, bento_fs: FS, build_ctx: str) -> None:
f.write(install_sh)

if self.requirements_txt is not None:
from pip_requirements_parser import RequirementsFile

requirements_txt = RequirementsFile.from_file(
resolve_user_filepath(self.requirements_txt, build_ctx),
include_nested=True,
Expand Down

0 comments on commit b9b86fd

Please sign in to comment.