Pip 2020-12-02

By Max Woerner Chase

What I know about pip's new resolver:

Okay, here's the deal.

Now, if I try to write that PR, that's a lot of effort on my part, and it could be pretty complicated. But consider: my alternative is something like devpi, which I would have to commit to setting up on every machine I do personal projects on. If I can manage to implement this (or help someone else do it; I just want it done), then I don't have to change my workflow, and it'll continue to just work, with only the bare minimum required setup. (Like, this current project's code is just... not going to work without Python 3.8 or later.)

So, what do I think I know about what has to change?

Well, old-style constraints are basically old-style requirements in a funny hat, and new-style constraints are their own specific thing. I believe that getting URL constraints to work requires the creation of a new kind of constraint, so the first thing I want to look at is how new-style constraints are defined, and used.

So, let's get into it.

Okay, some of the logic lives in pip itself, and some of it lives in resolvelib. Or is resolvelib vendored? Not sure the modules match up. Okay, looks like any changes I make need to be in resolvelib (or packaging? Looks more likely to be packaging) first, then the vendored copies need to be updated.

Okay, I confused myself several times looking into that. Here's what I've got currently:

To get started, I decided to just follow along with the development documentation. I've got pip cloned, and tox is running tests. There are a few failures so far; I'll have to see later if those are expected, or something I need to fix in my environment. It's also probably going to yell at me about missing Python versions, since I didn't try to reach parity with what pip supports.

I don't know how much more I'm going to get done tonight; I want to just see the baseline state of the fresh clone. I should probably also mention this in the GitHub issue, make sure to communicate, like, basic things.

Update from running tox: it is, in fact, complaining to me about missing pythons. Including some that I see installed under pyenv. Oh dear, this could get messy.

Well, I'll work things out tomorrow. For now, I'd like to wrap up.

Good night.