Skip to content

pgadmin4 is depending on both passlib and libpass (indirectly) which causes conflicts #10239

Description

@stevenylai

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:

  1. The installed passlib directory contains files from both packages. I then get weird errors saying for example some packages are missing in passlib
  2. If the installed passlib directory is indeed from passlib, I got pkg_resources not found
  3. If the installed passlib directory is from libpass, then there is no error

To Reproduce

Steps to reproduce the behavior:

  1. Install pgadmin4 with uv as a tool (uv tool install pgadmin4)
  2. 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
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions