I’m wondering if there’s another way. Since the original intention is to have a dependency group that does not show up as extras, maybe we should instead provide a way to declare an optional dependency group as (air-quotes) non-public?
Say
[project.optional-dependencies]
auth = ["cryptography"]
tests = ["pytest"]
[project]
extras = ["auth"]
If the extras
key is missing, the default is to populate the value with all keys in optional-dependencies
. If it’s explicitly given, it lists the extras that’d go into metadata.