[issue25154] Drop the pyvenv script

2015-10-26 Thread Eric V. Smith

Eric V. Smith added the comment:

There's a typo here in 'executable':

+  '`{} -m venv`'.format(exeutable), file=sys.stderr)

And this could now be:
print('WARNING: the pyenv script is deprecated in favour of '
  f'`{executable} -m venv`', file=sys.stderr)

!

And since there is no .format() call, you can't accidentally pass it file=.

--
nosy: +eric.smith
Added file: http://bugs.python.org/file40861/issue25154-1.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-10-26 Thread Brett Cannon

Brett Cannon added the comment:

Took Eric's advice in 8828d7847e92 as well as actually tested the results this 
time. :P

--
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-10-26 Thread Brett Cannon

Changes by Brett Cannon :


--
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-10-25 Thread Brett Cannon

Brett Cannon added the comment:

Sorry for the delay on this; fell ill Friday and then had guests all weekend.

--
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-10-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7a5f8418b4ab by Brett Cannon in branch 'default':
Issue #25154: Make the file argument apply to the print function and
https://hg.python.org/cpython/rev/7a5f8418b4ab

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-10-25 Thread Stefan Behnel

Stefan Behnel added the comment:

May I ask how difficult it is for any of the core developers to fix a known 
typo in a Python source file?

--
nosy: +scoder

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-10-25 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixing a typo is trivial.  If the typo affects several version the changeset 
needs to be merged on all the applicable branches before being pushed.

--
nosy: +ezio.melotti

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-10-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Did you fix the "exeutable" typo?

--
nosy: +pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-10-20 Thread Brett Cannon

Brett Cannon added the comment:

Not yet. I will get to it no later than Friday (just a matter of either 
remembering to quickly fix it when I get home from work, bother setting up SSH 
keys at work, or simply doing it on Friday when I typically do all of my Python 
work).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-10-19 Thread Brett Cannon

Brett Cannon added the comment:

I have a typo in my commit where I accidentally placed the file argument in 
str.format() instead of for print() (pointed out on GitHub).

--
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-10-16 Thread Brett Cannon

Changes by Brett Cannon :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-10-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6ab285820db2 by Brett Cannon in branch 'default':
Issue #25154: Deprecate the pyvenv script.
https://hg.python.org/cpython/rev/6ab285820db2

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-09-25 Thread Brett Cannon

Brett Cannon added the comment:

Here is a patch that adds a message to stderr about the deprecation.

--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file40579/issue25154.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-09-24 Thread Remi Pointel

Remi Pointel added the comment:

I would prefer to keep this script with the version referring to the version of 
python used (pyvenv-3.4, pyvenv-3.5, ...).

--
nosy: +rpointel

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-09-23 Thread Brett Cannon

Brett Cannon added the comment:

python-dev did not seem to object to the idea.

--
assignee:  -> brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-09-18 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

I have a patch which will at least improve the error message when `python3 -m 
venv` fails because python3-venv isn't installed on Debian/Ubuntu.  I will work 
with Doko on this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-09-17 Thread Brett Cannon

New submission from Brett Cannon:

I propose that the pyvenv script be deprecated in Python 3.5 and removed in 
Python 3.8. The reason for this proposal is because it is non-obvious what 
version of Python a pyvenv command is tied to (heck, it isn't necessarily 
obvious that it's Python 3). There would be no loss in functionality since the 
exact same functionality is available through `python3 -m venv`. This is a 
backwards-compatibility change, hence the deprecation, but changing various 
shell scripts and such should be trivial thanks to the -m flag. This would also 
help promote the use of -m, especially for any projects that rely on being tied 
to a specific installed interpreter.

As pointed out in issue #25152, virtualenv provides a -p flag to specify what 
version of Python should be used to create a virtual environment: 
https://virtualenv.pypa.io/en/latest/reference.html#virtualenv-command. The 
pyvenv script and venv package provide no such mechanism since it is included 
in the stdlib, which makes sense since improvements will be tied to the stdlib 
of the Python interpreter being used while virtualenv is a standalone 
project/app.

Some may argue that worrying about this is unnecessary, but we are already 
ending up with OSs that come with multiple versions of Python pre-installed, 
let alone when people install their own versions of Python on top of the system 
installation. For instance, OS X Yosemite comes with Python 2.6 and 2.7, and 
then if you install the latest version of Python independently you end up with 
3 installations. If they all happened to have a pyvenv script you wouldn't 
easily know which Python interpreter the pyvenv command was going to use for 
the virtual environment.

Since the pyvenv script is just a script, the deprecation will be in the form 
of a message printed to sys.stderr in the Tools/scripts/pyvenv file mentioning 
that the deprecation and that people should switch to `python3 -m venv` 
instead. The long deprecation cycle is for those who have pyvenv provided by 
their OS and only upgrade Python every few years, and thus run the risk of 
missing the deprecation warning. As for the deprecation in Python 3.5.1, that's 
to get the warning out immediately and to minimize people missing the 
deprecation prior to the removal.

--
components: Installation
messages: 250910
nosy: brett.cannon
priority: normal
severity: normal
stage: needs patch
status: open
title: Drop the pyvenv script
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-09-17 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

I'm sympathetic, given that in Debian/Ubuntu (and maybe other distros) where we 
have both Python 3.4 and 3.5, we have to install /usr/bin/pyvenv-3.4 and 
pyvenv-3.5, and then use symlinks to provide the default version.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-09-17 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-09-17 Thread Laura Creighton

Laura Creighton added the comment:

Due to debian policy decision
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732703

neither pyenv nor python -m venv 

may work for you.

While things are getting changed, it would be good if people running into
this problem got a better error message than:

  Error: Command '['/bin/python3.4', '-Im', 'ensurepip', 
'--upgrade', '--default-pip']' returned non-zero exit status 1

such as 'Your python may not be configured with ensure-pip'

--
nosy: +lac

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-09-17 Thread Brett Cannon

Brett Cannon added the comment:

the ensurepip case is another issue, so if you want you can file a separate 
issue for it so it doesn't get lost.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-09-17 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +doko

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com