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: introduce the packaging dependency #39

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

WilliamBergamin
Copy link
Contributor

Summary

This PR aims to resolve #29 where the packaging dependency is not installed on the system.

It seems like pip which uses the packaging project duplicates the logic into its source code rather then installing it as a dependency. Seems like the chicken and egg problem 🥚

This PR aims to introduce packaging as a dependency to the project, alternatively we could duplicate the logic like pip does, or find another solution rather then adding our first "real" dependency

Testing

  1. Create a new project with slack create -t https://github.com/slack-samples/bolt-python-custom-function-template
  2. edit the requirements.txt file so that it only contains (many other packages have the packaging dependency)
slack-cli-hooks
slack-bolt==1.19.0rc1
  1. run slack update
  2. Everything should work 🟢

Special notes

Important to not that many python development tools like pip, black and pytest use the packaging project, this is why we did not catch this error sooner

Requirements

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run ./scripts/install_and_run_tests.sh after making the changes.

@WilliamBergamin WilliamBergamin added the bug Something isn't working label Apr 15, 2024
@WilliamBergamin WilliamBergamin self-assigned this Apr 15, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.58%. Comparing base (2d7cc13) to head (5aecbd6).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #39   +/-   ##
=======================================
  Coverage   94.58%   94.58%           
=======================================
  Files          11       11           
  Lines         203      203           
=======================================
  Hits          192      192           
  Misses         11       11           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐣 Awesome! The slack update is working wonderfully for me now!

Copy link
Member

@seratch seratch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see! LGTM

@WilliamBergamin WilliamBergamin merged commit 120b296 into main Apr 16, 2024
9 checks passed
@WilliamBergamin WilliamBergamin deleted the add-packaging-dependency branch April 16, 2024 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] ModuleNotFoundError: No module named 'packaging' for the check_update hook
4 participants