Skip to content
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

Replace py.std.<module> with traditional imports #592

Closed
obestwalter opened this issue Aug 27, 2017 · 5 comments
Closed

Replace py.std.<module> with traditional imports #592

obestwalter opened this issue Aug 27, 2017 · 5 comments
Assignees
Labels
level:easy rought estimate that this might be quite easy to implement type:internal should have no impact on the user (refactoring, infrastructure, tools, etc.)

Comments

@obestwalter
Copy link
Member

py.std. is handy if you know your way around the stdlib and want to have all modules at your fingertips (when e.g. prototyping or hacking something together).

From the viewpoint of making it easier for new contributors this is another abstraction to be learned. It also trips up IDEs like PyCharm, loosing all the perks of static code analysis and code completion.

Thereofore I would like to replace the remainung (16) occurrences of that with the traditional way of using stdlib modules, via importing them directly.

@obestwalter obestwalter added the type:internal should have no impact on the user (refactoring, infrastructure, tools, etc.) label Aug 27, 2017
@obestwalter obestwalter self-assigned this Aug 27, 2017
@The-Compiler
Copy link
Member

pytest recently did the same (with the goal of getting rid of pylib entirely at some point), so 👍

@obestwalter
Copy link
Member Author

thanks, good to know - getting rid of it completely in the long run might also be a good idea.

@gaborbernat
Copy link
Member

also what about using six as Python 2/3 compatibility? there are some places in the code base where we now naively do these compatibility with if else ?

@RonnyPfannschmidt
Copy link

@gaborbernat good point, but please lets open a new issue for that

@obestwalter
Copy link
Member Author

obestwalter commented Sep 6, 2017

I opened an issue that outlines all changes necessary to get rid of py. - which also includes the py2/py3 compat layer, because py.builtin is partially used for that: #610

@obestwalter obestwalter added the level:easy rought estimate that this might be quite easy to implement label Sep 7, 2017
@asottile asottile self-assigned this Sep 10, 2017
@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
level:easy rought estimate that this might be quite easy to implement type:internal should have no impact on the user (refactoring, infrastructure, tools, etc.)
Projects
None yet
Development

No branches or pull requests

5 participants