pgadmin4 icon indicating copy to clipboard operation
pgadmin4 copied to clipboard

Deprecation warning: pkg_resources

Open UpcraftLP opened this issue 2 months ago • 5 comments

Starting the application yields the following warning:

/venv/lib/python3.12/site-packages/passlib/pwd.py:16: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.

Desktop:

  • OS: Ubuntu 24.04
  • pgAdmin version: 9.8.0
  • Mode: Server
  • Browser (if running in server mode): chrome
  • Package type: Container

UpcraftLP avatar Sep 10 '25 03:09 UpcraftLP

I'm also running into this issue. Same setup as OP.

MatthewFletcher avatar Sep 15 '25 15:09 MatthewFletcher

@UpcraftLP @MatthewFletcher just checking, y'all are using python3.12?

Could you test this setup with python3.13?

benjaminjb avatar Sep 25 '25 21:09 benjaminjb

just checking, y'all are using python3.12?

Could you test this setup with python3.13?

yes, using 3.12 since that is what the docker image ships with. No I cant easily test with 3.13, since it appears building the docker container on windows is broken right now. (or rather, it builds fine but then the container is unable to start)

UpcraftLP avatar Sep 26 '25 03:09 UpcraftLP

running out of time ! As per the warning message: "The pkg_resources package is slated for removal as early as 2025-11-30."

Meetsch avatar Nov 07 '25 10:11 Meetsch

or rather, it builds fine but then the container is unable to start

Sounds to me like an issue with line endings, Windows uses /r/n while the files inside the container are expected to be using /n, especially script files, such as the entry script, which will fail to execute. This has tripped me many time.

@UpcraftLP Can you try the ~~#9349~~ #9353 PR? (Double check that files, especially shell script files, have the correct line ending. You may need to force git to recreate those files the first time, e.g. delete them and then use git reset to make it create the files with correct line endings)

Edit: Tested the PR on a Windows machine and the docker container built and run successfully (see #9353)

Guiorgy avatar Nov 12 '25 12:11 Guiorgy

@benjaminjb I just tested this, built an image with Python 13 and the warning went away. I'll open a PR

Guiorgy avatar Nov 16 '25 14:11 Guiorgy