René's URL Explorer Experiment


Title: test: test_invalid_command[py_3.14-invalidCommand] fails on Python 3.14.5 due to argparse quoting change · Issue #1990 · commitizen-tools/commitizen · GitHub

Open Graph Title: test: test_invalid_command[py_3.14-invalidCommand] fails on Python 3.14.5 due to argparse quoting change · Issue #1990 · commitizen-tools/commitizen

X Title: test: test_invalid_command[py_3.14-invalidCommand] fails on Python 3.14.5 due to argparse quoting change · Issue #1990 · commitizen-tools/commitizen

Description: Description The tests/test_cli.py::test_invalid_command[py_3.14-invalidCommand] test started failing on Python 3.14.5 (released May 10, 2026) because CPython restored quoting of choices in argparse error messages: gh-130750: Restore quot...

Open Graph Description: Description The tests/test_cli.py::test_invalid_command[py_3.14-invalidCommand] test started failing on Python 3.14.5 (released May 10, 2026) because CPython restored quoting of choices in argparse...

X Description: Description The tests/test_cli.py::test_invalid_command[py_3.14-invalidCommand] test started failing on Python 3.14.5 (released May 10, 2026) because CPython restored quoting of choices in argparse...

Opengraph URL: https://github.com/commitizen-tools/commitizen/issues/1990

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"test: test_invalid_command[py_3.14-invalidCommand] fails on Python 3.14.5 due to argparse quoting change","articleBody":"## Description\n\nThe `tests/test_cli.py::test_invalid_command[py_3.14-invalidCommand]` test started failing on Python 3.14.5 (released [May 10, 2026](https://www.python.org/downloads/release/python-3145/)) because CPython restored quoting of choices in argparse error messages:\n\n\u003e [gh-130750](https://github.com/python/cpython/issues/130750): Restore quoting of choices in [argparse](https://docs.python.org/3.14/library/argparse.html#module-argparse) error messages for improved clarity and consistency with documentation.\n\u003e -- [3.14.5 changelog](https://docs.python.org/3.14/whatsnew/changelog.html#python-3-14-5-final)\n\n| Python | argparse \"invalid choice\" format |\n| --- | --- |\n| 3.10, 3.11 | `(choose from 'init', 'commit', ...)` (quoted) |\n| 3.12 | mixed |\n| 3.13, 3.14.0–3.14.4 | `(choose from init, commit, ...)` (unquoted) |\n| 3.14.5+ | `(choose from 'init', 'commit', ...)` (quoted, restored) |\n\nThe checked-in fixture `tests/test_cli/test_invalid_command_py_3_14_invalidCommand_.txt` was generated against 3.14.4 (unquoted), so it no longer matches.\n\n## Reproduction\n\n```bash\nuv run pytest tests/test_cli.py::test_invalid_command\n```\n\nMaster's last successful CI run was on 2026-05-09 (commit `1eb8cde6`) when the GitHub-hosted runner still had Python 3.14.4; runs on or after 2026-05-11 fail with the diff below.\n\n## Observed failure\n\n```\nFAILED tests/test_cli.py::test_invalid_command[py_3.14-invalidCommand] - AssertionError: FILES DIFFER\n-cz: error: argument {...}: invalid choice: 'invalidCommand' (choose from init, commit, ...)\n+cz: error: argument {...}: invalid choice: 'invalidCommand' (choose from 'init', 'commit', ...)\n```\n\nFull log: https://github.com/commitizen-tools/commitizen/actions/runs/25649120897/job/75283769681\n\n## Scope\n\nOnly the **1** `test_invalid_command_py_3_14_invalidCommand_.txt` fixture is affected by gh-130750 (the companion `--invalid-arg` case uses the metavar, not the choice list). The other 60+ Python-version-keyed fixtures (`test_command_shows_description_when_use_help_option_py_3_*_*.txt`, `test_no_argv_py_3_*_.txt`) capture argparse **help text**, which is unaffected by this change.\n\n## Suggested fix (short-term)\n\n**Skip the affected `test_invalid_command` parametrization on Python ≥ 3.14.5** until upstream stabilizes:\n\n```python\n@pytest.mark.parametrize(\n    \"arg\",\n    [\n        \"--invalid-arg\",\n        pytest.param(\n            \"invalidCommand\",\n            marks=pytest.mark.skipif(\n                (3, 14, 5) \u003c= sys.version_info \u003c (3, 15),\n                reason=(\n                    \"argparse error format changed in Python 3.14.5 (gh-130750); \"\n                    \"fixture matches 3.14.0-4 unquoted format\"\n                ),\n            ),\n        ),\n    ],\n)\n```\n\nSurfaced while working on #1846; this skip unblocks CI without changing PR scope. Implemented in #1991.\n\n## Future enhancement (still open after #1991)\n\nArgparse error output has churned across Python patch releases (3.10/3.11 quoted → 3.13/3.14.0–4 unquoted → 3.14.5 quoted). A more durable approach worth considering once the codebase is more stable:\n\n**Normalize argparse error output before `file_regression.check()`** — e.g., strip surrounding quotes around `choose from` items, or replace the variable parts with placeholders:\n\n```python\ndef _normalize_argparse_error(text: str) -\u003e str:\n    # Collapse \"'init', 'commit'\" and \"init, commit\" to a single canonical form\n    text = re.sub(\n        r\"\\(choose from [^)]+\\)\",\n        \"(choose from \u003cCHOICES\u003e)\",\n        text,\n    )\n    return text\n\n# Usage:\nfile_regression.check(_normalize_argparse_error(err), extension=\".txt\")\n```\n\nThat would let us delete the per-Python-version fixtures for `test_invalid_command[invalidCommand]` and stop chasing argparse formatting changes. **#1991 only implements the short-term skip; this enhancement is still open.**","author":{"url":"https://github.com/bearomorphism","@type":"Person","name":"bearomorphism"},"datePublished":"2026-05-11T03:50:36.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1990/commitizen/issues/1990"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:692af0e3-7759-9c73-a1ed-71eb13360526
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA18A:134A7F:181765E:232D4CC:6A4E54DA
html-safe-nonce6af40be67214d9a0125fecff817d3180472aaa33f5358ba2bb8bc7d1e1fd7dfe
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMThBOjEzNEE3RjoxODE3NjVFOjIzMkQ0Q0M6NkE0RTU0REEiLCJ2aXNpdG9yX2lkIjoiNDAwNzM0NjYyNTQ3MTAwODkwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac18686b3182befa6e5e4fc57cff13679aa391fbca3fcf3b14819465430085b20e
hovercard-subject-tagissue:4417945230
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/commitizen-tools/commitizen/1990/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ef6b1f0e3e3d0d47413e02b7bcec69749c016f3cd2e4ab8cb3d4d449cf275814/commitizen-tools/commitizen/issues/1990
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ef6b1f0e3e3d0d47413e02b7bcec69749c016f3cd2e4ab8cb3d4d449cf275814/commitizen-tools/commitizen/issues/1990
og:image:altDescription The tests/test_cli.py::test_invalid_command[py_3.14-invalidCommand] test started failing on Python 3.14.5 (released May 10, 2026) because CPython restored quoting of choices in argparse...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebearomorphism
hostnamegithub.com
expected-hostnamegithub.com
None030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0
turbo-cache-controlno-preview
go-importgithub.com/commitizen-tools/commitizen git https://github.com/commitizen-tools/commitizen.git
octolytics-dimension-user_id62252524
octolytics-dimension-user_logincommitizen-tools
octolytics-dimension-repository_id106127589
octolytics-dimension-repository_nwocommitizen-tools/commitizen
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id106127589
octolytics-dimension-repository_network_root_nwocommitizen-tools/commitizen
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef344f1eab54fc7dfc02d0d018cda7e158c3db65c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/commitizen-tools/commitizen/issues/1990#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommitizen-tools%2Fcommitizen%2Fissues%2F1990
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommitizen-tools%2Fcommitizen%2Fissues%2F1990
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=commitizen-tools%2Fcommitizen
Reloadhttps://github.com/commitizen-tools/commitizen/issues/1990
Reloadhttps://github.com/commitizen-tools/commitizen/issues/1990
Reloadhttps://github.com/commitizen-tools/commitizen/issues/1990
Please reload this pagehttps://github.com/commitizen-tools/commitizen/issues/1990
commitizen-tools https://github.com/commitizen-tools
commitizenhttps://github.com/commitizen-tools/commitizen
Please reload this pagehttps://github.com/commitizen-tools/commitizen/issues/1990
Notifications https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Fork 344 https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Star 3.5k https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Code https://github.com/commitizen-tools/commitizen
Issues 116 https://github.com/commitizen-tools/commitizen/issues
Pull requests 45 https://github.com/commitizen-tools/commitizen/pulls
Discussions https://github.com/commitizen-tools/commitizen/discussions
Actions https://github.com/commitizen-tools/commitizen/actions
Projects https://github.com/commitizen-tools/commitizen/projects
Security and quality 0 https://github.com/commitizen-tools/commitizen/security
Insights https://github.com/commitizen-tools/commitizen/pulse
Code https://github.com/commitizen-tools/commitizen
Issues https://github.com/commitizen-tools/commitizen/issues
Pull requests https://github.com/commitizen-tools/commitizen/pulls
Discussions https://github.com/commitizen-tools/commitizen/discussions
Actions https://github.com/commitizen-tools/commitizen/actions
Projects https://github.com/commitizen-tools/commitizen/projects
Security and quality https://github.com/commitizen-tools/commitizen/security
Insights https://github.com/commitizen-tools/commitizen/pulse
#2000https://github.com/commitizen-tools/commitizen/pull/2000
test: test_invalid_command[py_3.14-invalidCommand] fails on Python 3.14.5 due to argparse quoting changehttps://github.com/commitizen-tools/commitizen/issues/1990#top
#2000https://github.com/commitizen-tools/commitizen/pull/2000
issue-status: needs-triagehttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22issue-status%3A%20needs-triage%22
https://github.com/bearomorphism
bearomorphismhttps://github.com/bearomorphism
on May 11, 2026https://github.com/commitizen-tools/commitizen/issues/1990#issue-4417945230
May 10, 2026https://www.python.org/downloads/release/python-3145/
gh-130750https://github.com/python/cpython/issues/130750
argparsehttps://docs.python.org/3.14/library/argparse.html#module-argparse
3.14.5 changeloghttps://docs.python.org/3.14/whatsnew/changelog.html#python-3-14-5-final
https://github.com/commitizen-tools/commitizen/actions/runs/25649120897/job/75283769681https://github.com/commitizen-tools/commitizen/actions/runs/25649120897/job/75283769681
#1846https://github.com/commitizen-tools/commitizen/pull/1846
#1991https://github.com/commitizen-tools/commitizen/pull/1991
#1991https://github.com/commitizen-tools/commitizen/pull/1991
#1991https://github.com/commitizen-tools/commitizen/pull/1991
issue-status: needs-triagehttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22issue-status%3A%20needs-triage%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.