Skip to content

[3.10] bpo-45192: Fix a bug that infers the type of an os.PathLike[bytes] object as str (GH-28323) - #29111

Merged
ambv merged 1 commit into
python:3.10from
miss-islington:backport-6270d3e-3.10
Oct 20, 2021
Merged

ambv merged 1 commit into
python:3.10from
miss-islington:backport-6270d3e-3.10

Conversation

@miss-islington

@miss-islington miss-islington commented Oct 20, 2021 •

Copy link
Copy Markdown
Contributor

An object implementing the os.PathLike protocol can represent a file
system path as a str or bytes object.
Therefore, _infer_return_type function should infer os.PathLike[str]
object as str type and os.PathLike[bytes] object as bytes type.
(cherry picked from commit 6270d3e)

Co-authored-by: Kyungmin Lee rekyungmin@gmail.com

https://bugs.python.org/issue45192

…ject as str (pythonGH-28323)

An object implementing the os.PathLike protocol can represent a file
system path as a str or bytes object.
Therefore, _infer_return_type function should infer os.PathLike[str]
object as str type and os.PathLike[bytes] object as bytes type.
(cherry picked from commit 6270d3e)

Co-authored-by: Kyungmin Lee <rekyungmin@gmail.com>
@miss-islington

Copy link
Copy Markdown
Contributor Author

@rekyungmin and @ambv: Status check is done, and it's a success ✅ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants