sphinx-contrib / sphinx-contrib/autoprogram
Compatibility with Python 3.14 argparse.ArgumentParser color argument
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 48
- Forks
- 24
- Avg merge
- 2h 15m
- Merged PRs (30d)
- 1
Description
Since Python 3.14, argparse.ArgumentParser has a color argument (default True).
Unfortunately, this does not work well with autoprogram, with ANSI color escape sequences littered in the literal usage textbox, such as:
[1;34musage: [0m[1;35mmy-program
According to the documentation , a clean way out for autoprogram to fix this issue might be to set the NO_COLOR environment variable before loading the module during build.
EDIT: indeed, setting NO_COLOR=1 in the environment of sphinx-build fixes the issue for us, but unfortunately also removes all colors from sphinx build output.
Contributor guide
No contributing guide indexed for this repository
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
Start by reproducing the Python 3.14 argparse color behavior during the autoprogram build, using the issue's ANSI-littered usage output as the failure case. Investigate how the module is loaded by sphinx-build and the suggested NO_COLOR environment setting; done means autoprogram usage has no escape sequences without removing colors from Sphinx build output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100