[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Proposed changes to python-virtualenv



On Jun 04, 2014, at 11:07 PM, Zygmunt Krynicki wrote:

>Barry, would it be sensible to default to python2 (so keep existing outside
>behaviour unchanged) and then only after a grace period and enough
>announcements make python3 the default? To me doing it right now seems like
>breaking lots of scripting for no good reason.

Possibly, but if we're going to make the change, it makes sense to me to do it
in Jessie.  So what would be a good grace period?

Looking a little more at the implementation of virtualenv, I think it might be
possible to give the -p/--python option a default of `python2` to mimic the
old behavior.  The difference is that virtualenv re-execs itself with the
specified interpreter when it is not sys.executable.  So after the port to
Python 3, the default would re-exec itself with /usr/bin/python2.  That
doesn't seem terrible to me.

(A possible downside is if Python 2 isn't installed, in which case you'd get
an error.  That's probably unlikely to happen in practice.)

Still, it begs the question: when would we switch the default back to python3?

-Barry

Attachment: signature.asc
Description: PGP signature


Reply to: