virtualenv-burrito icon indicating copy to clipboard operation
virtualenv-burrito copied to clipboard

Upgrade to support python3

Open RaghavRao opened this issue 5 years ago • 5 comments

Python 2 has reached end of life in January 2020, causing venvburrito to fail on install

RaghavRao avatar Jan 27 '20 07:01 RaghavRao

In what way does it fail? python2 didn’t just stop working in January.

mattrobenolt avatar Jan 28 '20 15:01 mattrobenolt

It fails here:

curl -sL https://raw.githubusercontent.com/brainsik/virtualenv-burrito/master/virtualenv-burrito.sh | $SHELL File "", line 1 import platform;print ".".join(platform.python_version().split(".")[:2]) ^ SyntaxError: invalid syntax

richamehta87 avatar Apr 27 '20 20:04 richamehta87

So what's the team's official stance on supporting Python3 exclusively? I think it makes sense to go this direction because:

  • The rationale of having virtualenv and virtualenvwrapper is to isolate Python environments and prevent messing with the system-utilized Python.
  • Python2 is no longer supported since start of this year. (So this tool is catering to an unsupported Python version by default.)
  • Anyone starting a new project should be choosing Python3 exclusively. (So any tool that caters to Python2 by default is useless for them.)
  • As it stands, the only things that has any business to do with Python2 are OS-level utilities/daemons like, say, those in Ubuntu 16.04 which is still a supported Ubuntu version but was released with a Python 2.7 interpreter. (But these things won't benefit from a tool like virtualenv so we can stand to abandon them).

Of course, it is very likely that a bunch of non-systems-level projects are still on Python2. But I guess the question is does this project want to support them? Can't they just, for instance, checkout a specific revision of virtualenv-burrito to support themselves? (To be clear, I have nothing against supporting legacy but I want to know this project's official stance on this so I can adjust myself accordingly; I heavily favor supporting Python3 exclusively.)

I know the mkvirtualenv -p exists so it's not like Python3 is not supported at all. However, the problem is that the latest version of pip is Python3-exclusive so now by default this project is, at least, one pip version behind. And actually this seems to conflict when creating a Python3 virtualenv. It seems that Python3, somehow, must use pip 20 which virtualenv-burrito can't serve (this is a problem I encountered personally and, caveat, I didn't really investigate why it happens but I managed to solve it by moving exclusively to Python3).

skytreader avatar May 21 '20 22:05 skytreader

FYI I have a working branch ready to PR if this project decides to support Python3 exclusively.

skytreader avatar May 22 '20 00:05 skytreader

My POV here as someone who has long used this project and highly advocated and a maintainer, I don’t use it anymore with python3. The problems this project addressed don’t exist in the ecosystem anymore. Python3 has virtualenv built in and paired with pyenv has been a really solid setup. You’re free to use virtualenv and virtualenvwrapper directly these days, and the problems this project attempted to solve many years ago just aren’t a problem today.

mattrobenolt avatar May 22 '20 08:05 mattrobenolt