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

Require setuptools, cheroot/__init__.py imports pkg_resources #367

Closed
wants to merge 1 commit into from

Conversation

hrnciar
Copy link

@hrnciar hrnciar commented May 3, 2021

❓ What kind of change does this PR introduce?

  • 🐞 bug fix
  • 🐣 feature
  • πŸ“‹ docs update
  • πŸ“‹ tests/coverage improvement
  • πŸ“‹ refactoring
  • πŸ’₯ other

πŸ“‹ What is the related issue number (starting with #)

❓ What is the current behavior? (You can also link to an open issue here)
pkg_resources needs setuptools as a runtime dependency. Since it wasn't specified so far, there was a possibility of ModuleNotFoundError: No module named 'pkg_resources' in case of setuptools not being present. There is a way how to install packages without setuptools or setuptools can be uninstalled after cheroot package was installed. My PR prevents this error.

❓ What is the new behavior (if this is a feature change)?

πŸ“‹ Other information:

πŸ“‹ Checklist:

  • I think the code is well written
  • I wrote good commit messages
  • I have squashed related commits together after the changes have been approved
  • Unit tests for the changes exist
  • Integration tests for the changes exist (if applicable)
  • I used the same coding conventions as the rest of the project
  • The new code doesn't generate linter offenses
  • Documentation reflects the changes
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences

This change is Reviewable

@webknjaz
Copy link
Member

webknjaz commented May 3, 2021

It's an optional dependency. This is why that import is wrapped with try/except. OTOH nowadays it's probably better to rely on importlib_metadata.

@webknjaz webknjaz closed this May 3, 2021
@webknjaz webknjaz added the invalid This is irrelevant label May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This is irrelevant
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants