la communauté Python se dote d'un format de fichier standard porté par @brettcannon pour exprimer l'arbre de #dépendances d'un projet #Python avec leurs numéros de version, aussi appelé "lock file" ; ouvrant ainsi la porte à une homogénéisation des outils gérant les dépendances d'un projet comme #pip, #pipenv, #poetry, #pdm, #uv et sans doute d'autres.
https://fosstodon.org/https://peps.python.org/pep-0751/

At work we use #pipenv for python dependency management, but we're considering moving away from it (partly because it doesn't work well (at all) with a infra change we want to do).

My boss suggested #uv as an option. It looks cool, but within 5 minutes I found that essentially one of the things we want, and which is one of the reasons we want to leave pipenv (the infra change), just, doesn't work?

Like, it looks cool, and I think I'd be really nice with our current infra, but :pain:

For those using `uv` is this the right way to add a requirements.txt file to a project:
`cat requirements.txt | xargs -n 1 uv add`?

#python #venv #uv #pipenv #pip #pip3 #python3

Hey #Fedi, can you help me with a #Python environment pain-point?

TL;DR : I want global #virtualenv management

I've been using virtual environments for quite some time, but I might be missing some standard feature because switching env is a pain: I have to be in the right folder (where the venv dir was created) or manually configure a shell script.
Is there a tool that can provide me with the equivalent of ``envswitch envname`` regardless of the folder I'm in?

#venv #poetry #pipenv #askFedi

@itamarst My sense is that #uv solved the problems that #Pipenv set out to address & uv's approach is superior. Pipenv usage will be stable the same as python 2.7

Pipenv had many missteps & reasons for complaint. But when it started 8 years ago(!), python venv & req management were almost total chaos. Apart from Anaconda and Docker, it was common practice to YOLO an unpinned requirements.txt

Pipenv was a leap forward. Grateful for the effort. Generations of better tools have come since, tho

Bizarre oddness.

#poetry gives a bus error when installing certain things, while #pip & #pipenv just get on with it.

I've never experienced this until the past week or so.

#Python
How to convert a pip or pipenv based development project to Poetry?
Simple:

(install poetry)
poetry init
poetry shell
cat requirements.txt | xargs poetry add

Example output:
Using version ^3.0.3 for flask
Using version ^3.1.2 for wtforms
Using version ^2.0.32 for sqlalchemy
Using version ^4.2.0 for bcrypt
Using version ^2.32.3 for requests
Using version ^0.1.9 for flask-heroku
Using version ^23.0.0 for gunicorn

#poetry #python #pip #pipenv

It's been so long since I've used #pipenv that I'm actually having to read documentation on it 😔

Notre #hackaton pour rendre les shells accessibles est en cours jusqu'au 31 mai, nous publierons ici quelques contributions chaque jour.

Xogium propose des alias #bash qui désactivent les barres de progressions sur les commandes #docker et #pipenv (#python) car ces 2 commandes détournent des caractères brailles pour l'affichage de la barre...

Voilà qui améliore effectivement l'accessibilité de ces 2 commandes. Il y en a probablement d'autres dans le même genre.

#a11y