Re:PEP 704 – Require virtual environments by default for pac...
by whalesalad on Wednesday March 15, 2023 @09:04AM
(#35167710)
This defeats one of the coolest parts of virtualenvs which is that they can be placed anywhere. It’s just a directory.
[ Parent
| on HN ]
Re:PEP 704 – Require virtual environments by default for pac...
by tedivm on Wednesday March 15, 2023 @09:33AM
(#35168074)
This pep already partially does that.
> The error message SHOULD inform the user that a virtual environment is required, SHOULD provide shell-specific instructions on how to create and activate a virtual environment named .venv, and SHOULD provide a link to a documentation page that explains how to create and activate a virtual environment.
Re:PEP 704 – Require virtual environments by default for pac...
by meandmycode on Wednesday March 15, 2023 @10:02AM
(#35168476)
Why do you say this is one of the coolest part?
Re:PEP 704 – Require virtual environments by default for pac...
by whalesalad on Wednesday March 15, 2023 @09:14PM
(#35176935)
Because the best part about unix/linux is that everything is a file (or more broadly, everything are files and folders) and this is congruent with that.
The more I program, the more I appreciate:
- 1. tools that are extremely small and functional and can be composed together (re: unix pipes, cat foo | grep bar)
- 2. things that are just files and folders on disk, so that they can get introspected, moved to different disks, symlinked, put on FUSE filesystems, etc. The common interface of file or folder is very flexible.
Re:PEP 704 – Require virtual environments by default for pac...
by twic on Wednesday March 15, 2023 @10:19AM
(#35168681)
Nothing about that proposal changes how venvs work. It just changes what the global python command does. Anything you do explicitly with a venv today, you could still do under that proposal.
Re:PEP 704 – Require virtual environments by default for pac...
by DangitBobby on Wednesday March 15, 2023 @11:17AM
(#35169635)
I'd call this a minor convenience at best. Symlinks would still make it possible, of course.
Re:PEP 704 – Require virtual environments by default for pac...
by whalesalad on Wednesday March 15, 2023 @12:09PM
(#35170500)
I know it's not the end of the world, but I prefer to keep my dependencies outside of the project root in deployed scenarios. Ex, /srv/venv and /srv/app