Skip to content

Commit

Permalink
Do not set extra in default_environment (#554)
Browse files Browse the repository at this point in the history
PEP 508 says explicitly that the presence of extra in an environment
except in special cases.
  • Loading branch information
sbidoul committed Jun 4, 2022
1 parent 1aa82a8 commit 33255b7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion packaging/markers.py
Expand Up @@ -269,7 +269,6 @@ def default_environment() -> Dict[str, str]:
iver = format_full_version(sys.implementation.version)
implementation_name = sys.implementation.name
return {
"extra": "",
"implementation_name": implementation_name,
"implementation_version": iver,
"os_name": os.name,
Expand Down Expand Up @@ -335,6 +334,7 @@ def evaluate(self, environment: Optional[Dict[str, str]] = None) -> bool:
The environment is determined from the current Python process.
"""
current_environment = default_environment()
current_environment["extra"] = ""
if environment is not None:
current_environment.update(environment)

Expand Down
1 change: 0 additions & 1 deletion tests/test_markers.py
Expand Up @@ -109,7 +109,6 @@ def test_matches_expected(self):
)

assert environment == {
"extra": "",
"implementation_name": sys.implementation.name,
"implementation_version": iver,
"os_name": os.name,
Expand Down

0 comments on commit 33255b7

Please sign in to comment.