Wagtail docs version detection fails if wagtail-cli is installed as tool
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Issue summary
If I install the wagtail cli as a tool as per the instructions
uv tool install wagtail-cli
then wt docs is not able to detect the wagtail version of the project I am in. However wt --version is able to correctly determine the wagtail version of the current project.
The docs command tries to detect the wagtail version with importlib
The --version command detects the wagtail version by executing wagtail
Steps to reproduce
- Install the wagtail-cli as a tool
- In a project with wagtail installed, activate the project virtual environment
- Run
wt --versionand observe that the current wagtail version is printed - Run queries with
wt docsand note that all requests go to stable
Additional information
No response
Can be reproduced
Not confirmed
Technical details
$ wt --version
wagtail-cli 0.2.0
Wagtail: You are using Wagtail 7.4.3
Django: 6.0.8
Working on this
If you would like to contribute to this issue, follow these steps:
- Confirm that the issue is reproducible, either on a fresh Wagtail project or the bakerydemo.
- Once confirmed, view our contributing guidelines, add a comment to the issue once you're ready to start.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the problem with uv tool install wagtail-cli in a Wagtail project, then compare src/wagtail_cli/docs.py lines 55-61 with the version handling in src/wagtail_cli/cli/main.py lines 216-224. Confirm that wt docs detects the current project’s Wagtail version rather than routing requests to stable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100