Skip to content

Fix test_lazy_choices_help failure in Python 3.14 - #1922

Closed
vinayK34 wants to merge 1 commit into
httpie:masterfrom
vinayK34:fix/issue-1641-python314
Closed

Fix test_lazy_choices_help failure in Python 3.14#1922
vinayK34 wants to merge 1 commit into
httpie:masterfrom
vinayK34:fix/issue-1641-python314

Conversation

@vinayK34

Copy link
Copy Markdown

This PR fixes issue #1641 where test_lazy_choices_help was failing in Python 3.14 due to the help property being accessed during parser initialization, which caused the getter function to be called prematurely.

The fix modifies the help property in the LazyChoices class to avoid calling the getter during parser initialization while still maintaining proper help formatting when actually needed.

The change ensures that:

  1. The getter is not called during parser initialization (as expected by the test)
  2. Help formatting still works correctly when help is actually requested
  3. Backward compatibility is maintained

…thon 3.14

This fixes issue #1641 where test_lazy_choices_help fails in Python 3.14 due to 
the help property being accessed during parser initialization, which caused 
the getter function to be called prematurely.
@vinayK34
vinayK34 marked this pull request as ready for review August 10, 2026 10:03
@vinayK34 vinayK34 closed this by deleting the head repository Aug 10, 2026
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