Skip to content

fix: defer help_formatter to prevent eager getter in Python 3.14+ (#1641)#1902

Open
fazalpsinfo-cmyk wants to merge 1 commit into
httpie:masterfrom
fazalpsinfo-cmyk:fix/deferred-help-formatter
Open

fix: defer help_formatter to prevent eager getter in Python 3.14+ (#1641)#1902
fazalpsinfo-cmyk wants to merge 1 commit into
httpie:masterfrom
fazalpsinfo-cmyk:fix/deferred-help-formatter

Conversation

@fazalpsinfo-cmyk

Copy link
Copy Markdown

Alternative fix for #1641. Python 3.14 calls _check_help during argument registration,
triggering LazyChoices.help getter → load() → getter() eagerly.

This approach defers help_formatter assignment until after super().init(),
which prevents the premature getter call while preserving the existing behavior.

Fixes #1641

Support my work: https://buymeacoffee.com/muhamedfazalps

…tpie#1641)

Python 3.14 calls _check_help during argument registration, which
triggers LazyChoices.help getter → load() → getter() eagerly.
Deferring help_formatter assignment until after super().__init__()
prevents this premature call.
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.

test_lazy_choices_help fails on Python 3.14

1 participant