adriangb / xpresso

A composable Python ASGI web framework
https://xpresso-api.dev/
MIT License
176 stars 4 forks source link

Pip can't resolve dependencies #83

Closed dantownsend closed 2 years ago

dantownsend commented 2 years ago

I'm having some trouble installing the following from a requirements file:

jinja2
piccolo[postgres]
piccolo_admin
xpresso
uvicorn

Pip can't resolve the dependencies and gets caught in an endless loop.

It only started today - I noticed because the CI started failing. I can't see anything in the latest Xpresso release which may have caused this.

Do you have any ideas?

adriangb commented 2 years ago

Weird. I have made some changes in the last week, but mostly loosening dependencies. I'll try this and report back.

dantownsend commented 2 years ago

@adriangb Thanks :)

adriangb commented 2 years ago

Worked fine in a colab notebook: https://colab.research.google.com/drive/1yojpO7dArlvlqh6GUay9NedM7AlSpH-g#scrollTo=wWX8WOo8FBzV

Could you post the Python/pip versions, and maybe point me to the failing CI runs and I can take a look at those as well?

Also I assume this works fine without Xpresso?

Edit: I do see an issue with click in the logs for the colab notebook, but xpresso doesn't require click so it looks like it's something else, plus it still installs

dantownsend commented 2 years ago

Here's the failing CI run: https://github.com/piccolo-orm/piccolo/runs/5512366041?check_suite_focus=true

The CI is running Python 3.10.

I tried it locally in a Docker container running Python 3.9 and Pip 21.2.4.

Yeah, it works OK without Xpresso. It could be some other package which doesn't play nice though.

adriangb commented 2 years ago

I was able to reproduce now. I narrowed the issue down to:

piccolo_admin
starlette>=0.19.0

As of accf69a6c6fc3201deb7da94fea2282c1bd84579 Xpresso depends on starlette>=0.19.0 so that we can use https://github.com/encode/starlette/pull/1435. I did this to avoid juggling compatibility; I thought there'd be no reason to install Xpresso along with FastAPI. But it seems like piccolo_admin depends on FastAPI.

So there's two options here:

I'll look into the former, I don't think it will be too hard.

dantownsend commented 2 years ago

Thanks for looking into it. I've had problems too in the past with FastAPI version pinning a specific Starlette version.

I can't easily remove FastAPI from Piccolo Admin unfortunately.

I can temporarily disable the integration test, so there's no immediate pressure to get this fixed.

adriangb commented 2 years ago

I think I'll have a fix up in the next 15 min, let me try that before you disable the integration tests 😄

dantownsend commented 2 years ago

Awesome, thanks! 🚀

adriangb commented 2 years ago

All set! Build should be up on PyPi in the next 5 min

dantownsend commented 2 years ago

@adriangb Perfect, thank you!