Skip to content

Declare click as a dependency - #105

Closed
Kayvan-Zahiri wants to merge 1 commit into
explosion:mainfrom
Kayvan-Zahiri:declare-click
Closed

Kayvan-Zahiri wants to merge 1 commit into
explosion:mainfrom
Kayvan-Zahiri:declare-click

Conversation

@Kayvan-Zahiri

Copy link
Copy Markdown

Description

weasel/util/config.py imports click directly, but click isn't in install_requires. It used to arrive through typer, and current typer (0.27.2) no longer depends on click, so a fresh install can't be imported:

$ pip install weasel        # 1.0.0, typer 0.27.2
$ python -c "import weasel"
ModuleNotFoundError: No module named 'click'

This adds click>=8.0.0 to setup.cfg and requirements.txt (click.shell_completion needs 8.0). It's the same fix spaCy made in explosion/spaCy#13973.

Tested in a clean Python 3.12 venv: import weasel fails on main and works on this branch. Test suite: 54 passed. test_project_assets, test_project_config_interpolation[10_0] and test_remote fail the same way on main in the same environment.

Types of change

Bug fix (packaging).

Checklist

  • I confirm that I have the right to submit this contribution under the project's MIT license.
  • I ran the test suite, and all new and existing tests passed. (54 passed; the two failures and one error above also fail on main.)
  • My changes don't require a change to the documentation, or if they do, I've added all required information.

Written with AI assistance. The runs above are real.

weasel/util/config.py imports click directly, but it was only ever
installed through typer, and current typer no longer depends on click,
so a fresh install fails on import. Same fix spaCy made in #13973.
@Kayvan-Zahiri

Copy link
Copy Markdown
Author

Closing: 3bff77f (v1.0.1) declares click>=8.0.0,<9.0.0 directly in setup.cfg and requirements.txt, which covers this.

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