Document the virtualenv, activate and deactivate hooks
Los mantenedores suelen responder en 1 día
@officialasishkumar ya está trabajando en esto.
Desde el 4/12/2026.
- #553 de @officialasishkumar — abierto
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 82/100
- Tipo de issue
- Documentación
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- bash, fish, shell, zsh
- Área
- documentation
Línea de trabajo
Empieza por la documentación existente del hook virtualenv-delete en el README y luego lee el código de registro y ejecución de los hooks para virtualenv, activate y deactivate, para confirmar los nombres de los hooks, las variables y el comportamiento de la shell descritos en la issue. Añade una sección Hooks con esos detalles, un ejemplo de activate/deactivate en Bash, Zsh y Fish, y un enlace a la documentación existente de virtualenv-delete. El trabajo estará terminado cuando los puntos de los hooks documentados y el ejemplo coincidan con el comportamiento descrito en la issue.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the intended use case
- Writing a hook script for pyenv-virtualenv, e.g. a plugin like pyenv-jupyter-kernel that reacts to
pyenv virtualenv, or a user script in$(pyenv root)/pyenv.d/activate/that sets an environment variable whenever a virtualenv is activated (#428, #514). pyenv virtualenv,pyenv activateandpyenv deactivatesupport hooks (before_virtualenv/after_virtualenv,before_activate/after_activate,before_deactivate/after_deactivate), but the README doesn't mention them. Only thevirtualenv-deletehooks are documented. The "Reset existing virtualenv" section even says "virtualenv-deleteandvirtualenvPyenv hooks are run", butvirtualenvhooks aren't explained anywhere.- The Pyenv wiki's Authoring plugins page explains the general mechanism, but not which hook points pyenv-virtualenv has. In #514 the advice was to read
pyenv-sh-activate's source to see where hook code runs. - Things you currently can only learn from the source:
- the registration functions and the variables hook code can read (
VERSION_NAME,VIRTUALENV_NAME,VIRTUALENV_PATH,STATUSforvirtualenv;venv,prefix,shellforactivate/deactivate); - that the
stdoutofactivate/deactivatehooks is evaluated by the user's shell, so a hook changes the shell environment by printing code in the syntax of$shell; - that activation first deactivates the current virtualenv, so the
deactivatehooks run on activation too, with emptyvenv/prefixif none was active.
- the registration functions and the variables hook code can read (
Describe the solution you'd like
A "Hooks" section in the README that lists the hook scripts, their registration functions and variables, says when they run, and gives a short example of an activate/deactivate hook pair that works in Bash, Zsh and Fish. It should link to the existing virtualenv-delete hook docs.
Describe alternatives you've considered
Adding this to the Pyenv wiki's Authoring plugins page instead. But the hook points belong to this plugin and change with its code, so they're better documented next to it, like the virtualenv-delete hooks already are.
[ ] In particular, did you consider writing a plugin? Note that if your plugin has general applicability, you can publish it in the 3rd-party plugin catalog on the Pyenv Wiki as per the link above.
- Not applicable: this is about documenting the hook points that plugins use.
Additional context
I checked the behaviour described above with pyenv 2.8.15 and pyenv-virtualenv master (6fb661f) in Bash, Zsh and Fish 4.9.3, with manual and automatic activation.
- Lenguaje dominante
- Shell
- Estrellas
- 6.7k
- Forks
- 433
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 11
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de pyenv/pyenv-virtualenv
-
Creating a virtualenv from system leaves a self-referencing symlink inside itPosiblemente ocupada @dhananjay6561 la tomó hace 3 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
pyenv/pyenv-virtualenv#548 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
virtualenv-delete with a trailing slash can remove all of $PYENV_ROOT/versionsPosiblemente ocupada @dhananjay6561 la tomó hace 4 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
pyenv/pyenv-virtualenv#546 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Fish: activating a conda env doesn't set CONDA_PREFIX or run its activate.d/deactivate.d scriptsPosiblemente ocupada @officialasishkumar la tomó hoy. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 76/100
pyenv/pyenv-virtualenv#550 ·
Los mantenedores suelen responder en 1 día
-
`pyenv virtualenv (version) (name)` ignores specified version and uses homebrew's `python` versionAbierto
Dificultad 3/5 Medio día Aptitud para principiantes 55/100
pyenv/pyenv-virtualenv#531 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
pyenv/pyenv-virtualenv#524 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de pyenv/pyenv-virtualenv
Issues similares
-
package-update
Dificultad 1/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
bug client P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Link Checker ReportAbiertoautomated issue report
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
rockerBOO/awesome-neovim#2642 ·
Los mantenedores suelen responder en 3 días
-
Add IDs for contributorsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
rocky-linux/documentation#3569 · 4 comentarios ·
Los mantenedores suelen responder en 1 día