> i.e. instead of > `pip install package` > and > `import package` > and > `pip freeze > requirements.txt` > for every import,
I am unclear on what you mean by "for every import". I have never once done this and I maintain half a dozen packages. Do people really not know what the requirements of the package they are authoring are? > we stick to, for every python script > `abc = import("package", "2.*")` I definitely don't want to worry about which version of a package I need at a module level. > from imports could be done like > `value = import("package", "1.*").value ` You might want to read about the difference between: `from package import module` and `import package.module as module` https://docs.python.org/3/reference/simple_stmts.html#the-import-statement > this completely removes the virtualenvs issue ??? Virtuelenv is amazing. > and solves alot of problematic issues with python imports ??? On Wed, Jun 10, 2020 at 9:50 AM Aditya Shankar <aditn...@gmail.com> wrote: > it'd be really cool if we could drop virtualenvs + requirements.txt > altogether, i.e., like deno, mordern javascript and so... > > i.e. instead of > `pip install package` > and > `import package` > and > `pip freeze > requirements.txt` > for every import, > > we stick to, for every python script > > `abc = import("package", "2.*")` > > from imports could be done like > > `value = import("package", "1.*").value ` > > this completely removes the virtualenvs issue, and solves alot of > problematic issues with python imports > _______________________________________________ > Python-ideas mailing list -- python-ideas@python.org > To unsubscribe send an email to python-ideas-le...@python.org > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/python-ideas@python.org/message/FNQLJJMEDNPV3TWHVI6GFSEZWRUHY6M6/ > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/4ZS55OHWNR4DKYLD3OFELIQ74ZACY2ME/ Code of Conduct: http://python.org/psf/codeofconduct/