snowflakedb / snowpark-python

Snowflake Snowpark Python API
Apache License 2.0
263 stars 108 forks source link

SNOW-1021381: Deprecation warning for pkg_resources #1220

Open info-rchitect opened 8 months ago

info-rchitect commented 8 months ago

Please answer these questions before submitting your issue. Thanks!

  1. What version of Python are you using?

    3.8.10

  2. What operating system and processor architecture are you using?

    Windows-10-10.0.19045-SP0

  3. What are the component versions in the environment (pip freeze)?

aiofiles==22.1.0 aiosqlite==0.19.0 anyio==4.1.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 asn1crypto==1.5.1 asttokens==2.4.1 attrs==23.1.0 Babel==2.13.1 backcall==0.2.0 beautifulsoup4==4.12.2 black==23.11.0 bleach==6.1.0 certifi==2023.11.17 cffi==1.16.0 charset-normalizer==3.3.2 click==8.1.7 cloudpickle==2.2.1 colorama==0.4.6 comm==0.2.0 contourpy==1.1.1 coverage==7.3.2 cryptography==41.0.7 cycler==0.12.1 dataiku-api-client==12.1.0 debugpy==1.8.0 decorator==5.1.1 defusedxml==0.7.1 diptest==0.6.1 docutils==0.20.1 exceptiongroup==1.2.0 executing==2.0.1 fastjsonschema==2.19.0 filelock==3.13.1 fitter==1.7.0 flake8==6.1.0 fonttools==4.46.0 fqdn==1.5.1 idna==3.6 importlib-metadata==7.0.0 importlib-resources==6.1.1 iniconfig==2.0.0 ipykernel==6.27.1 ipython==8.12.3 ipython-genutils==0.2.0 ipywidgets==7.6.6 isoduration==20.11.0 jaraco.classes==3.3.0 jedi==0.19.1 Jinja2==3.1.2 joblib==1.3.2 json5==0.9.14 jsonpointer==2.4 jsonschema==4.20.0 jsonschema-specifications==2023.11.2 jupyter==1.0.0 jupyter-console==6.6.3 jupyter-events==0.9.0 jupyter-ydoc==0.2.5 jupyter_client==8.6.0 jupyter_core==5.5.0 jupyter_server==2.11.2 jupyter_server_fileid==0.9.0 jupyter_server_terminals==0.4.4 jupyter_server_ydoc==0.8.0 jupyterlab==3.6.6 jupyterlab-widgets==1.1.7 jupyterlab_pygments==0.3.0 jupyterlab_server==2.25.2 keyring==24.3.0 kiwisolver==1.4.5 littleutils==0.2.2 loguru==0.7.2 markdown-it-py==3.0.0 MarkupSafe==2.1.3 matplotlib==3.7.4 matplotlib-inline==0.1.6 mccabe==0.7.0 mdurl==0.1.2 mistune==3.0.2 more-itertools==10.1.0 mypy==1.7.1 mypy-extensions==1.0.0 nbclassic==1.0.0 nbclient==0.9.0 nbconvert==7.12.0 nbformat==5.9.2 nest-asyncio==1.5.8 nh3==0.2.14 nodejs==0.1.1 notebook==6.5.4 notebook_shim==0.2.3 numpy==1.24.4 optional-django==0.1.0 outdated==0.2.2 overrides==7.4.0 packaging==23.2 pandas==1.3.5 pandas-flavor==0.6.0 pandocfilters==1.5.0 parso==0.8.3 pathspec==0.11.2 patsy==0.5.4 pickleshare==0.7.5 Pillow==10.1.0 pingouin==0.5.3 pkginfo==1.9.6 pkgutil_resolve_name==1.3.10 platformdirs==3.11.0 plotly==5.18.0 pluggy==1.3.0 polars==0.19.19 prometheus-client==0.19.0 prompt-toolkit==3.0.41 psutil==5.9.6 pure-eval==0.2.2 pyarrow==10.0.1 pycodestyle==2.11.1 pycparser==2.21 pyflakes==3.1.0 Pygments==2.17.2 PyJWT==2.8.0 pyOpenSSL==23.3.0 pyparsing==3.1.1 pytest==7.4.3 python-dateutil==2.8.2 python-json-logger==2.0.7 pytz==2023.3.post1 pywin32==306 pywin32-ctypes==0.2.2 pywinpty==2.0.12 PyYAML==6.0.1 pyzmq==25.1.2 qtconsole==5.5.1 QtPy==2.4.1 readme-renderer==42.0 referencing==0.31.1 requests==2.31.0 requests-toolbelt==1.0.0 rfc3339-validator==0.1.4 rfc3986==2.0.0 rfc3986-validator==0.1.1 rich==13.7.0 rich-click==1.7.3 rpds-py==0.13.2 scikit-learn==1.3.2 scipy==1.10.1 seaborn==0.13.0 Send2Trash==1.8.2 six==1.16.0 sniffio==1.3.0 snowflake-connector-python==3.6.0 snowflake-snowpark-python==1.11.1 sortedcontainers==2.4.0 soupsieve==2.5 stack-data==0.6.3 statsmodels==0.14.0 tabulate==0.9.0 tenacity==8.2.3 terminado==0.18.0 threadpoolctl==3.2.0 tinycss2==1.2.1 toml==0.10.2 tomli==2.0.1 tomlkit==0.12.3 tornado==6.4 tqdm==4.66.1 traitlets==5.14.0 twine==4.0.2 types-python-dateutil==2.8.19.14 typing_extensions==4.8.0 uri-template==1.3.0 urllib3==1.26.18 wcwidth==0.2.12 webcolors==1.13 webencodings==0.5.1 websocket-client==1.7.0 widgetsnbextension==3.5.2 win32-setctime==1.1.0 xarray==2023.1.0 y-py==0.6.2 ypy-websocket==0.8.4 zipp==3.17.0 zmq==0.0.0

  1. What did you do?

    Run this line of code

  2. What did you expect to see?

    I should see no deprecation warnings like this:

C:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\myokg-d4QFTo_t-py3.8\lib\site-packages\snowflake\snowpark\session.py:24
  C:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\mypkg-d4QFTo_t-py3.8\lib\site-packages\snowflake\snowpark\session.py:24: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

C:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\mypkg-d4QFTo_t-py3.8\lib\site-packages\pkg_resources\__init__.py:2868
  C:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\mypkg-d4QFTo_t-py3.8\lib\site-packages\pkg_resources\__init__.py:2868: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)
  1. Can you set logging to DEBUG and collect the logs?

Not needed IMO

sfc-gh-mkeller commented 3 months ago

Can this be triaged and fixed @sfc-gh-yixie ?

top-jvn commented 1 month ago

We are also experiencing this warning every time we run pytest locally or in CI.

Is there any update on the issue?