Forum Discussion

Anonymous's avatar
Anonymous
2 years ago

SDK install deprecated

Got this on a recent reinstall of logicmonitor_sdk using pip. 

DEPRECATION: logicmonitor_sdk is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559

The part that worries me is that pip 23.1 will enforce the pyproject.toml and given the rate that LM publishes updates the SDK, pip installs will break at some point. For me that point is pretty soon because 23.1 is the current version of pip. Luckily, I haven’t upgraded my pip from 22.3.1 to 23.1 like it’s prompting me to.

Anybody else tried pip installing it while already on 23.1? Guess I’ll mock it up in docker.

  • Anonymous's avatar
    Anonymous
    2 years ago

    Ok, looks like it’s limited to that version of pip. Ran it in a vanilla windows environment with pip 23.1 with no warnings. Reverted to snapshot from before the python install and got the same error with pip 22.3.1. 

  • Anonymous's avatar
    Anonymous

    Ok, looks like it’s limited to that version of pip. Ran it in a vanilla windows environment with pip 23.1 with no warnings. Reverted to snapshot from before the python install and got the same error with pip 22.3.1. 

  • Anonymous's avatar
    Anonymous

    Linux or Windows (guessing Linux/Mac)? I replicated your behavior in an ubuntu container. 

  • I updated pip in a venv and its at 23.1. I then installed logicmonitor_sdk and didn’t receive any warnings or errors.

    $ pip --version
    pip 23.1 from /home/joew/projects/lm_sdk_test/.venv/lib/python3.8/site-packages/pip (python 3.8)

    $ pip install logicmonitor_sdk
    Collecting logicmonitor_sdk
    Using cached logicmonitor-sdk-3.0.172.tar.gz (571 kB)
    Installing build dependencies ... done
    Getting requirements to build wheel ... done
    Preparing metadata (pyproject.toml) ... done
    Collecting urllib3>=1.15 (from logicmonitor_sdk)
    Using cached urllib3-1.26.15-py2.py3-none-any.whl (140 kB)
    Collecting six>=1.10 (from logicmonitor_sdk)
    Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
    Collecting certifi (from logicmonitor_sdk)
    Using cached certifi-2022.12.7-py3-none-any.whl (155 kB)
    Collecting python-dateutil (from logicmonitor_sdk)
    Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
    Building wheels for collected packages: logicmonitor_sdk
    Building wheel for logicmonitor_sdk (pyproject.toml) ... done
    Created wheel for logicmonitor_sdk: filename=logicmonitor_sdk-3.0.172-py3-none-any.whl size=1740268 sha256=09946170e27341835b3ce56e6d402f790bb0133b3d62cb4f1ef5fc81d59fe3d1
    Stored in directory: /home/joew/.cache/pip/wheels/cf/66/1f/140c99b6c2c039156dba3bf505c47485eb08d1e58628276968
    Successfully built logicmonitor_sdk
    Installing collected packages: urllib3, six, certifi, python-dateutil, logicmonitor_sdk
    Successfully installed certifi-2022.12.7 logicmonitor_sdk-3.0.172 python-dateutil-2.8.2 six-1.16.0 urllib3-1.26.15