You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(hip): 12 list-argument makers can't resolve a str enum name either #2394
Follow-up to #2356/#2393. _make_index's str-name resolution bug (an argument whose own default is None, so its enum namespace can't be inferred) was fixed in #2393 for the 5 sites listed in #2356 (hopopt/ipv6_opts's _make_opt_mpl/_make_opt_smf_dpd, httpv1's _make_start_line).
A wider AST scan during that fix found a separate 12-site family in pcapkit/protocols/internet/hip.py, same symptom but a different shape: the name is a loop variable over a list parameter (e.g. _make_param_dh_group_list(groups=['Group_384_bit_group'])), so _make_index_namespace's isinstance(value, str) check can't match the list. Confirmed broken by measurement: the member form of the same call builds the correct bytes, the string-name form raises ProtocolNotImplemented.
Not mechanical: of the 9 enums these need, 5 (Enum_Suite, Enum_NATTraversal, Enum_Registration, Enum_ESPTransformSuite, Enum_Transport) are currently imported only under TYPE_CHECKING in hip.py. Fixing this means promoting those imports to runtime — a real decision (possible import-cycle implications), not a one-line namespace=X if X is not None else Y patch.
Activity
docs(pep): record a deterministic-construction-arguments proposal
test(hip): drop counted numbers from the #2394 str-name test
test(hip): drop counted numbers from the #2394 str-name test (#2402)