Skip to content

Commit f538a68

Browse files
committed
use canonicalize_name() on extras identifier
1 parent 2bf065a commit f538a68

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tox/tox_env/python/virtual_env/package/pyproject.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
from cachetools import cached
1515
from packaging.requirements import Requirement
16+
from packaging.utils import canonicalize_name
1617
from pyproject_api import (
1718
BackendFailed,
1819
CmdStatus,
@@ -313,7 +314,7 @@ def _load_deps_from_static(self, for_env: EnvConfigSet) -> list[Requirement] | N
313314
]
314315
optional_deps = project.get("optional-dependencies", {})
315316
for extra, reqs in optional_deps.items():
316-
deps_with_markers.extend((Requirement(req), {extra}) for req in (reqs or []))
317+
deps_with_markers.extend((Requirement(req), {canonicalize_name(extra)}) for req in (reqs or []))
317318
return dependencies_with_extras_from_markers(
318319
deps_with_markers=deps_with_markers,
319320
extras=extras,

0 commit comments

Comments
 (0)