You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code below loops through all possible "variable" names, and does not raise any exception:
from packaging.markers import Marker
names = [
"implementation_version",
"platform_python_implementation",
"implementation_name",
"python_full_version",
"platform_release",
"platform_version",
"platform_machine",
"platform_system",
"python_version",
"sys_platform",
"os_name",
"os.name",
"sys.platform",
"platform.version",
"platform.machine",
"platform.python_implementation",
"python_implementation",
"extra",
]
for name in names:
Marker(f"{name} == '1.2.3'").evaluate()
Edit: funnily enough, I had to remove the last place where raise UndefinedEnvironmentName was, because of coverage. I don't see a way of creating a proper unit test that goes through that clause.
IMO, packaging should assume an empty list of extras by default, rather than requiring the caller to specify it explicitly
Originally posted by @pfmoore in pypa/pip#11112 (comment)
I agree with @pfmoore. :)
The text was updated successfully, but these errors were encountered: