Skip to content

Prefer flat namespace over using typing.io and typing.re #589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
srittau opened this issue Oct 28, 2018 · 5 comments
Closed

Prefer flat namespace over using typing.io and typing.re #589

srittau opened this issue Oct 28, 2018 · 5 comments

Comments

@srittau
Copy link
Collaborator

srittau commented Oct 28, 2018

The conclusion of python/typeshed#1652 says that importing from typing instead of typing.io and typing.re should be encouraged. That requires changes to PEP 484 as well the standard library documentation.

@srittau
Copy link
Collaborator Author

srittau commented Oct 28, 2018

Opened https://bugs.python.org/issue35089 for the documentation issue, python/cpython#10173 for the corresponding PR.

@srittau
Copy link
Collaborator Author

srittau commented Oct 29, 2018

I think this is done now.

@srittau srittau closed this as completed Oct 29, 2018
@gvanrossum
Copy link
Member

The io and re namespaces still exist for backward compatibility, right? Could we ever start deprecating those?

@srittau
Copy link
Collaborator Author

srittau commented Oct 29, 2018

It seems that typeshed never included those namespaces, so I guess using them in type checkers has never worked. That seems like a indication that deprecating them should not be too disrupting.

@gvanrossum
Copy link
Member

gvanrossum commented Oct 29, 2018 via email

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

No branches or pull requests

2 participants