Skip to content

Conversation

@Akuli
Copy link
Collaborator

@Akuli Akuli commented Aug 8, 2021

Skipped in #5888

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2021

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

def get_exec_path(env: Mapping[str, str] | None = ...) -> List[str]: ...

# NOTE: get_exec_path(): returns List[bytes] when env not None
def get_exec_path(env: Mapping[str, str] | None = ...) -> list[str]: ...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was the comment wrong? Sounds like something we should handle with overloads.

Copy link
Collaborator Author

@Akuli Akuli Aug 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried get_exec_path(), get_exec_path(None), get_exec_path(os.environ) and get_exec_path(os.environb). They all returned a list of strings. I also don't think this is different on windows, because windows generally uses byte strings less than unixy operating systems.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for checking! Maybe it was a Python 2 thing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what I thought too, but the function doesn't exist in Python 2. I also tried git blame, but that leads to 337abed which copies stubs from a different repo and gives no more history.

@srittau srittau merged commit 9af9cca into python:master Aug 8, 2021
@Akuli Akuli deleted the misc branch August 8, 2021 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants