-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Please make pydantic
optional dependency, not required one
#2777
Comments
I understand that you would like to avoid using Pydantic. But currently the Webserver dependency (fastapi) would require it. Could you please list the platform which you use and currently don't have pydantic binaries? Btw rust being required to build rust is totally normal in the compiler world? Even gcc and clang are Self-hosting compilers. I don't really understand your security concern. But I get that it's going to be a pain to build when no binaries are available. |
@RazCrimson Thank you for responding! Rust does not build on older macOS (all powerpc, some older x86), I think it does not build for powerpc on OpenBSD as well (perhaps even on FreeBSD for ppc 32-bit). I am pretty sure there are other non-mainstream platforms where Rust does not build. P. S. Both gcc and clang can be built with other C/C++ compilers, they do not require themselves to build. |
@RazCrimson It will be sufficient to add a configure option to disable Pydantic and whatever needs it. I.e. nothing will change by default, but at the same time we could unbreak the package for Rustless systems. |
Sure, I think that should be possible as long as we don't require the webserver plugin |
@RazCrimson That would be awesome! |
The default "pip install glances" do not install the Webserver requirements. Pydantic should be installed only if you use "pip install glances[web]" or "pip install glances[all]". |
So we have to move pydantic from requirements.txt to requirements-webui.txt ? |
Yea, but I think there was some pydantic import that was failing. We'll probably have to fix that and check if everything works right. |
I tried to remove
It looks like MacPorts does not specifically configure it in some way: https://github.com/macports/macports-ports/blob/master/sysutils/glances/Portfile |
@nicolargo Please consider making
pydantic
an optional dependency: forcing a dependency on Rust is undesirable for several reasons (it is a very heavy dependency to build, it is broken on some platforms and cannot be built there at all, it is questionable from security point of view, since it requires itself to build).The text was updated successfully, but these errors were encountered: