cloudsmith-cli icon indicating copy to clipboard operation
cloudsmith-cli copied to clipboard

Remove use of deprecated `method_whitelist` parameter

Open dhirschfeld opened this issue 1 year ago • 3 comments

method_whitelist is removed in urllib3>=2

Image

https://github.com/cloudsmith-io/cloudsmith-cli/blob/e4b76fee52ae3de72f31b1f9d466983af0bb6dc8/cloudsmith_cli/core/rest.py#L109

dhirschfeld avatar Feb 02 '25 00:02 dhirschfeld

I realise urllib3 is pinned: https://github.com/cloudsmith-io/cloudsmith-cli/blob/e4b76fee52ae3de72f31b1f9d466983af0bb6dc8/setup.py#L59

So this is actually a pip bug in that it let me install into my venv without downgrading urllib3.

Nevertheless, pinning to a 2-year old version of a common package doesn't play nicely with other packages and makes it awkward to install into an environment with other tools/packages who might want to use a more modern urllib3.

dhirschfeld avatar Feb 02 '25 00:02 dhirschfeld

hi @dhirschfeld, you're probably right. We'll take a look at updating this.

nickxn avatar May 02 '25 17:05 nickxn

A small note: This problem can cause the CLI to fail, even when a suitable version of urllib3 is installed, if PYTHONWARNINGS="error" is set in the environment. Concretely, versions greater-equal than 1.26.00 of urllib3 are affected, because this version already deprecates the method_whitelist (c.f. Release Notes)
Workarounds are to downgrade to an even older version pip install urllib3==1.25.11 or to unset PYTHONWARNINGS.

simchri avatar Oct 02 '25 15:10 simchri