8000 Fix compatibility with NiceGUI 2.16.x by pascalzauberzeug · Pull Request #286 · zauberzeug/rosys · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix compatibility with NiceGUI 2.16.x #286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 12, 2025
Merged

Conversation

pascalzauberzeug
Copy link
Contributor
@pascalzauberzeug pascalzauberzeug commented May 11, 2025

We had problems installing the newest NiceGUI version 2.16.1 together with RoSys that we didn't really understand, since the version requirements don't contradict themselves:

# 15 19.86 ERROR: Cannot install -r requirements.txt (line 11), -r requirements.txt (line 8) and uvicorn[standard]==0.34.0 because these package versions have conflicting dependencies.
# 15 19.86
# 15 19.86 The conflict is caused by:
# 15 19.86   rosys 0.23.0 depends on uvicorn!=0.29.0
# 15 19.86   nicegui 2.16.1 depends on uvicorn>=0.22.0
# 15 19.86   uvicorn[standard] 0.34.0 depends on uvicorn 0.34.0 (Installed)

I still don't quite understand the underlying issue, but requiring httpx = "^0.25.0" instead of httpx = "^0.24.0" in RoSys does fix it.

@pascalzauberzeug pascalzauberzeug added this to the 0.24.0 milestone May 11, 2025
@pascalzauberzeug pascalzauberzeug self-assigned this May 11, 2025
@pascalzauberzeug pascalzauberzeug added the bug Something isn't working label May 11, 2025
@evnchn
Copy link
evnchn commented May 11, 2025

@pascalzauberzeug Did you upgrade pip? Before upgrading pip (on 24.3.1) I indeed get the same message as you. After upgrading to pip 25.1.1, I get this instead. Try it on your machine, too!

ERROR: Cannot install httpx and nicegui==2.16.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    nicegui 2.16.1 depends on h11>=0.16.0
    httpcore 0.17.3 depends on h11<0.15 and >=0.13
    httpcore 0.17.2 depends on h11<0.15 and >=0.13
    httpcore 0.17.1 depends on h11<0.15 and >=0.13
    httpcore 0.17.0 depends on h11<0.15 and >=0.13
    httpcore 0.16.3 depends on h11<0.15 and >=0.13
    httpcore 0.16.2 depends on h11<0.15 and >=0.13
    httpcore 0.16.1 depends on h11<0.15 and >=0.13
    httpcore 0.16.0 depends on h11<0.15 and >=0.13
    httpcore 0.15.0 depends on h11<0.13 and >=0.11

@falkoschindler I think the issue may have to be intrinsically with NiceGUI itself. Though a simple fix in RoSys is much appreciated, we should proceed with more care and caution.

@evnchn
Copy link
evnchn commented May 11, 2025

Boiled things down further:

pip install nicegui==2.16.1
pip install rosys==0.23.0

Then:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
rosys 0.23.0 requires httpx<0.25.0,>=0.24.0, but you have httpx 0.28.1 which is incompatible.

Realization: ^0.24.0 actually means <0.25.0,>=0.24.0

So RoSys before the PR excluding httpx 0.25.1 (aka the release of httpx where httpcore 1.0 support was introduced) means it marks itself incompatible with h11 0.16.0, which is only supported by httpcore 1.0.9 as of two weeks ago.

Therefore, it is right to do https = "^0.25.0" in RoSys, and not touch NiceGUI in any way. Though I wonder why not use >=

@falkoschindler
Copy link
Contributor
falkoschindler commented May 11, 2025

@evnchn httpx = "^0.25.0" means >=0.25.0 but <1.0.0. This can be a reasonable limitation in case 1.0.0 introduces breaking changes in the future.

Edit: I just noticed my statement is wrong.

@evnchn
Copy link
evnchn commented May 11, 2025

From the above, where "^0.24.0" is resolved to httpx<0.25.0,>=0.24.0, I'm not sure if that's the case.

(Edit: Made a typo to "^0.25.0" previously...)

@codingpaula
Copy link
Contributor

According to the poetry documentation here, ^0.24.0 means >=0.24.0, <0.25.0 since its major version is below 1. NiceGUI has >=0.24.0 for httpx and uses 0.28.1 (see poetry.lock), RoSys has ^0.24.0 which causes the clash.

@evnchn
Copy link
evnchn commented May 12, 2025

Hmm but I just hope to get this across correctly @falkoschindler

httpx = "^0.25.0" means >=0.25.0 but <1.0.0. This can be a reasonable limitation in case 1.0.0 introduces breaking changes in the future.

Unfortunately not. httpx = "^0.25.0" means >=0.25.0 but <0.26.0 since its major version is below 1, and a version change is "allowed if the new version number does not modify the left-most non-zero digit" aka does not modify the 25. @codingpaula's comment at #286 (comment) also agrees.

So, we may want to do:

@pascalzauberzeug
Copy link
Contributor Author

@evnchn @codingpaula and I decided to use >= 0.25.1 and just fix it when/if it breaks

@falkoschindler
Copy link
Contributor

@evnchn You're right! I must have misread the documentation. Sorry for the confusion. 🤦🏻‍♂️

@pascalzauberzeug pascalzauberzeug merged commit a94041b into main May 12, 2025
5 checks passed
@pascalzauberzeug pascalzauberzeug deleted the nicegui_compatibility branch May 12, 2025 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0