[issue38483] [venv] Add ~/.venvrc to change module defaults

2019-11-23 Thread Cooper Lees


Change by Cooper Lees :


--
resolution:  -> rejected
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



[issue38483] [venv] Add ~/.venvrc to change module defaults

2019-11-22 Thread Cooper Lees


Cooper Lees  added the comment:

I vote in the stdlib. This is the biggest win of venv over virtualenv The aim 
of this request is to allow developers to customize some of the venv defaults 
to make it easier to move from project to project.

To ensure a clean development environment, some days I create multiple venvs 
(virtual environments) a day. I treat my venv's ephemeral, and I am sure many 
other do too. Being able to set `--upgrade-deps` and/or other defaults via a 
config file just saves a few more key strokes and allows Python to be even more 
delightful to develop in over other languages.

In regards to you bringing up pyenv.cfg + metadata, this attacks a totally 
different problem. This is allowing developers to set some defaults for venv 
creation. It does not change any internal meta data and is just an optional 
optimization developers can choose to use.

--

___
Python tracker 

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



[issue38483] [venv] Add ~/.venvrc to change module defaults

2019-11-22 Thread Brett Cannon


Brett Cannon  added the comment:

Is this best served in the stdlib or in an external tool like how 
virtualenvwrapper is separate from virtualenv? While I get the convenience of 
not having to install another tool to do this, it does bring in some complexity 
that does not directly tie into the metadata required by venv to write out to 
pyvenv.cfg or the directories and files that it creates.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue38483] [venv] Add ~/.venvrc to change module defaults

2019-10-28 Thread Cooper Lees


Cooper Lees  added the comment:

Updated PR to use venv.ini. Will fix any CI errors encountered.

--

___
Python tracker 

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



[issue38483] [venv] Add ~/.venvrc to change module defaults

2019-10-22 Thread Eryk Sun


Eryk Sun  added the comment:

In Windows, dot files cannot be hidden (i.e. set the hidden file attribute), 
unlike how they're conventionally hidden in Unix. Doing so breaks normal 
access. A directory such as ".venv" can be hidden, but that's still going 
against convention. For Windows, I suggest using "$APPDATA/Python/venv.ini" as 
the default path. 

Note that, while "$APPDATA/Python" happens to be the base directory for 
per-user package installations, i.e. site.getuserbase(), I'm not suggesting to 
use the user base directory as the default in Unix and macOS systems. 

For comparison, pip uses "$APPDATA/pip/pip.ini" in Windows and 
"$HOME/.config/pip/pip.conf" in Unix. In macOS it prefers 
"$HOME/Library/Application Support/pip" over "$HOME/.config/pip" if the former 
exists.

--
nosy: +eryksun

___
Python tracker 

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



[issue38483] [venv] Add ~/.venvrc to change module defaults

2019-10-21 Thread Cooper Lees


Cooper Lees  added the comment:

Good point. Happy to match the virtualenv module and use `.ini` if others agree.

--

___
Python tracker 

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



[issue38483] [venv] Add ~/.venvrc to change module defaults

2019-10-21 Thread Laurie Opperman


Laurie Opperman  added the comment:

".xrc" usually means a file to be run (by a shell) at shell start, and 
therefore is a script of command to run ("rc" seems to come from "runcom", ie 
run commands).

INI files usually have a ".ini" or ".cfg" suffix. `virtualenv`, for example, 
used an INI file similar to your proposal: 
https://virtualenv.pypa.io/en/stable/reference/#configuration-file.

--
nosy: +Epic_Wink

___
Python tracker 

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



[issue38483] [venv] Add ~/.venvrc to change module defaults

2019-10-15 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue38483] [venv] Add ~/.venvrc to change module defaults

2019-10-15 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
pull_requests:  -16359

___
Python tracker 

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



[issue38483] [venv] Add ~/.venvrc to change module defaults

2019-10-15 Thread Cooper Lees


Change by Cooper Lees :


--
pull_requests: +16359
pull_request: https://github.com/python/cpython/pull/168

___
Python tracker 

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



[issue38483] [venv] Add ~/.venvrc to change module defaults

2019-10-15 Thread Cooper Lees


Change by Cooper Lees :


--
keywords: +patch
pull_requests: +16358
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16802

___
Python tracker 

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



[issue38483] [venv] Add ~/.venvrc to change module defaults

2019-10-15 Thread Cooper Lees


New submission from Cooper Lees :

I'd like to propose adding a run commands (.venvrc) file support to the venv 
library.

File Location: `~/.venvrc`

This file will support all current CLI arguments and override the defaults for 
each CLI if present in the file. I will also endeavour to add test for POSIX + 
Windows systems.

I propose using `configparser` and an `.ini` style config for the `.venvrc`.

My main use for this is to allow myself to default to always using 
`--upgrade-deps` when I create new venvs.

Thoughts? Concerns?

--
components: Library (Lib)
messages: 354712
nosy: cooperlees
priority: normal
severity: normal
status: open
title: [venv] Add ~/.venvrc to change module defaults
type: enhancement
versions: Python 3.9

___
Python tracker 

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