Skip to content

lowercase list and dict in the rest of stdlib - #5892

Merged
srittau merged 10 commits into
python:masterfrom
Akuli:misc
Aug 8, 2021
Merged

srittau merged 10 commits into
python:masterfrom
Akuli:misc

Conversation

@Akuli

@Akuli Akuli commented Aug 8, 2021

Copy link
Copy Markdown
Collaborator

Skipped in #5888

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Aug 8, 2021

Copy link
Copy Markdown
Contributor

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

Comment thread stdlib/os/__init__.pyi
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
Copy Markdown
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.

@Akuli Akuli Aug 8, 2021

Copy link
Copy Markdown
Collaborator Author

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
Copy Markdown
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
Copy Markdown
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