Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix distutils warning when packaging/deploying apps #2123

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jamesls
Copy link
Member

@jamesls jamesls commented Nov 20, 2024

If distutils is imported before pip outside of a setup.py, you see a deprecation warning about distutils. This warning was being triggered whenever you run chalice package/deploy:

$ chalice package out
./site-packages/_distutils_hack/__init__.py:30: UserWarning: Setuptools is replacing distutils. Support for replacing an already imported distutils is deprecated. In the future, this condition will fail. Register concerns at https://github.com/pypa/setuptools/issues/new?template=distutils-deprecation.yml
  warnings.warn(

This was caused by a depdency we use, inquirer, using a dependency that used distutils. Upgrading to the latest major version of inquirer fixes this issue, which no longer depends on the affected package. As a result, we no longer see this warning message when running chalice package or chalice deploy.

This triggered several other dependencies that needed to be updated, which resulted in a few cosmetic code tweaks to make pylint happy.

If distutils is imported before pip outside of a `setup.py`, you see a
deprecation warning about distutils.  This was caused by a depdency we use,
`inquirer`, using a dependency that used distutils.
Upgrading to the latest major version of `inquirer` fixes this issue, which
no longer depends on the affected package.  As a result, we no longer see
this warning message when running `chalice package` or `chalice deploy`.

This triggered several other dependencies that needed to be updated, which
resulted in a few cosmetic code tweaks to make pylint happy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant