Please note that security bugs or issues should be reported to security@pgadmin.org.
Describe the bug
I got issue when trying to install pgadmin4 with uv and it eventually boils down to conflicting dependencies on both passlib and libpass. libpass is a fork of passlib and they have the same top level directory.
The two dependency trees are as follows:
For me, this only happens in uv because uv seems to be downloading and installing packages in parallel but I think installing packages with the same top level directory may trigger undefined behavior. For my uv run, there are 3 possible cases:
- The installed
passlib directory contains files from both packages. I then get weird errors saying for example some packages are missing in passlib
- If the installed
passlib directory is indeed from passlib, I got pkg_resources not found
- If the installed
passlib directory is from libpass, then there is no error
To Reproduce
Steps to reproduce the behavior:
- Install pgadmin4 with uv as a tool (uv tool install pgadmin4)
- The above scenario 1 does not always happen but to trigger scenario 2, one can run
uv pip install --python /path/to/tools/pgadmin4 --reinstall passlib which will produce the pkg_resources not found error
- To trigger scenario 3, one can run
uv pip install --python /path/to/tools/pgadmin4 --reinstall libpass
Expected behavior
Given that when libpass overrides passlib, there is no startup error, I think perhaps passlib is not needed any more. Anyway, passlib is 6 years old I think pgadmin4 should consider moving away from this
Error message
When files from both libraries got mixed, for me, it says: `cannot import name 'numeric_types' from 'passlib.utils.compat'
If passlib wins, it says: pkg_resources not found
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Linux RHEL9
- pgAdmin version: 9.12
- Mode: Server
- Browser (if running in server mode): chrome
- Package type: pip
Additional context
Add any other context about the problem here.
Please note that security bugs or issues should be reported to security@pgadmin.org.
Describe the bug
I got issue when trying to install pgadmin4 with uv and it eventually boils down to conflicting dependencies on both passlib and libpass. libpass is a fork of passlib and they have the same top level directory.
The two dependency trees are as follows:
passlib==1.*Flask-Security-Too==5.7.1->libpass>=1.9.3. See: https://github.com/pallets-eco/flask-security/blob/main/pyproject.tomlFor me, this only happens in
uvbecauseuvseems to be downloading and installing packages in parallel but I think installing packages with the same top level directory may trigger undefined behavior. For myuvrun, there are 3 possible cases:passlibdirectory contains files from both packages. I then get weird errors saying for example some packages are missing inpasslibpasslibdirectory is indeed frompasslib, I gotpkg_resourcesnot foundpasslibdirectory is fromlibpass, then there is no errorTo Reproduce
Steps to reproduce the behavior:
uv pip install --python /path/to/tools/pgadmin4 --reinstall passlibwhich will produce thepkg_resourcesnot found erroruv pip install --python /path/to/tools/pgadmin4 --reinstall libpassExpected behavior
Given that when
libpassoverridespasslib, there is no startup error, I think perhapspasslibis not needed any more. Anyway,passlibis 6 years old I think pgadmin4 should consider moving away from thisError message
When files from both libraries got mixed, for me, it says: `cannot import name 'numeric_types' from 'passlib.utils.compat'
If
passlibwins, it says:pkg_resourcesnot foundScreenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.