Skip to content

Commit

Permalink
Raise error when 2.7 env
Browse files Browse the repository at this point in the history
  • Loading branch information
Secrus committed May 19, 2022
1 parent 0cb0b3a commit ccc21fd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/poetry/utils/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -1637,9 +1637,12 @@ def get_pip_command(self, embedded: bool = False) -> list[str]:
]

def get_supported_tags(self) -> list[Tag]:
output = self.run_python_script(GET_SYS_TAGS)
if self.get_version_info() < (3, 0, 0):
raise NotImplementedError("Poetry does not support python 2.7 environments")
else:
output = self.run_python_script(GET_SYS_TAGS)

return [Tag(*t) for t in json.loads(output)]
return [Tag(*t) for t in json.loads(output)]

def get_marker_env(self) -> dict[str, Any]:
output = self.run_python_script(GET_ENVIRONMENT_INFO)
Expand Down

0 comments on commit ccc21fd

Please sign in to comment.