Skip to content

[BUG] ModuleNotFoundError: No module named 'packaging' for the check_update hook #29

@zimeg

Description

@zimeg

The slack_cli_hooks versions

slack_bolt==1.19.0rc1
slack_cli_hooks==0.0.0.dev2
slack_sdk==3.27.0

Python runtime version

Python 3.11.8

OS info

ProductName:            macOS
ProductVersion:         14.3
BuildVersion:           23D56
Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000

Describe the bug

The packaging module is not installed with this package so a ModuleNotFoundError is raised when calling the check_update hook. It seems like packaging is the only package not included in the standard library!

Steps to reproduce

$ slack create pkgs -t slack-samples/bolt-python-custom-function-template
$ cd pkgs

# Include only the slack_* modules
$ head -n 2 requirements.txt > tmp.txt && mv tmp.txt requirements.txt

$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install -r requirements.txt

$ slack update

Expected result

Updates are checked without any error

Actual result

$ slack update
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/Users/me/programming/sandbox/example/.venv/lib/python3.11/site-packages/slack_cli_hooks/hooks/check_update.py", line 10, in <module>
from packaging.version import Version
ModuleNotFoundError: No module named 'packaging'

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-triage-skipauto triage action will skip this issue, keeping it open for a long timebugSomething isn't workingdependenciesPull requests that update a dependency file

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions