Skip to content
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

python3Packages: add Sanic HTTP Server (and dependencies) #53144

Closed
wants to merge 3 commits into from

Conversation

thoughtpolice
Copy link
Member

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
@thoughtpolice thoughtpolice self-assigned this Jan 1, 2019
@thoughtpolice
Copy link
Member Author

@GrahamcOfBorg build python3Packages.uvloop python3Packages.httptools python3Packages.sanic

let
# Ideally, websockets 7.0 will be supported in the future, but
# for now, sanic requires 6.x
ws = websockets.overrideAttrs (_: {
Copy link
Member

Choose a reason for hiding this comment

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

We can't have a different version of a package in python-packages.nix as that will result in collisions.

Copy link
Member Author

Choose a reason for hiding this comment

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

Am I missing something here, or are you suggesting that python-packages.nix infrastructure cannot feature any version overrides in any expressions? That seems... extremely not-Nix like. Or are you worried that ws will end up pulled in by possible downstream users of sanic (due to propagatedBuildInputs)?

Copy link
Member

Choose a reason for hiding this comment

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

Python cannot handle having multiple versions of a module in a single closure. If someone wants to build a Python env with this package, and another package that uses the other version of ws, they will get a collision. Now, one could say that is a risk/problem for the user whenever they compose such environment, but that would severely reduce the quality of the package set.

@mmahut
Copy link
Member

mmahut commented Aug 13, 2019

Are there any updates on this pull request, please?

@thoughtpolice
Copy link
Member Author

Unfortunately not. Sanic has moved to supporting websockets 0.7.x, but the same problem has cropped up yet again: websockets is now on 0.8.x, making these packages mutually exclusive in the same way.

I'm closing this since I have little hope this will be rectified anytime soon.

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.

None yet

3 participants