Skip to content

Migrate from pipenv to uv - #113

Open
Thynix wants to merge 1 commit into
mainfrom
uv-migrate
Open

Thynix wants to merge 1 commit into
mainfrom
uv-migrate

Conversation

@Thynix

@Thynix Thynix commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

This also fixes dependency problems; Claude elaborates:

The old lockfile pinned pelican==4.1.2 + jinja2==3.1.6, which is
actually broken (from jinja2 import Markup — removed in modern jinja2).
A fresh pipenv install today would have hit the exact same crash. Root
cause: the markdown<3 pin, kept for markdown-i18n==2.1.2. Turned out
markdown_i18n isn't even loaded anywhere in
pelicanconf.py/publishconf.py (dead dependency), and its code imports
Python 2's HTMLParser, so it couldn't have worked under Python 3 anyway.
I dropped markdown-i18n and the markdown<3 pin, which let the resolver
pick up modern pelican==4.12.0 (compatible with current jinja2), and
added back pelican[markdown] since the site has real .md content and
newer pelican made Markdown support optional.

This also fixes dependency problems; Claude elaborates:

> The old lockfile pinned pelican==4.1.2 + jinja2==3.1.6, which is
> actually broken (from jinja2 import Markup — removed in modern jinja2).
> A fresh pipenv install today would have hit the exact same crash. Root
> cause: the markdown<3 pin, kept for markdown-i18n==2.1.2. Turned out
> markdown_i18n isn't even loaded anywhere in
> pelicanconf.py/publishconf.py (dead dependency), and its code imports
> Python 2's HTMLParser, so it couldn't have worked under Python 3 anyway.
> I dropped markdown-i18n and the markdown<3 pin, which let the resolver
> pick up modern pelican==4.12.0 (compatible with current jinja2), and
> added back pelican[markdown] since the site has real .md content and
> newer pelican made Markdown support optional.
Comment thread README.md

python3 -m pip install pipenv
pipenv shell
curl -LsSf https://astral.sh/uv/install.sh | sh

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really want to encourage people to run shell scripts unchecked?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. I can think of nothing that can go wrong. 😛 Given that it's the recommended installation technique I just pasted it; would you rather link to https://docs.astral.sh/uv/getting-started/installation/ for more options?

@ArneBab ArneBab Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the only way on that page that’s somewhat safe is cargo install --locked uv.

But at the current state of Astral and OpenAI I’d just avoid it, because our maintenance timeframe is already much longer than the lifetime of Astral as standalone company, and at the size of the source code of uv I don’t think that forks can survive.

So I’d avoid uv and do the package updates without switching to uv.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migrating to pyproject.toml can be done without uv (and I think it is a very good idea to switch to pyproject.toml – we’ll need to do that in other python projects, too)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants