From aca4393998d95a4d6b87ef3d257af02fb5a8668d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Mar 2026 16:26:12 +0000 Subject: [PATCH 1/3] Initial plan From c8139033970a562774a177cd4c56fd103b1208bf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Mar 2026 16:29:05 +0000 Subject: [PATCH 2/3] Use jtu.register_static for _Missing instead of register_pytree_node Co-authored-by: nstarman <8949649+nstarman@users.noreply.github.com> --- equinox/_module/_flatten.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/equinox/_module/_flatten.py b/equinox/_module/_flatten.py index e116c19e..4145f073 100644 --- a/equinox/_module/_flatten.py +++ b/equinox/_module/_flatten.py @@ -34,7 +34,7 @@ def __repr__(self): MISSING = _Missing() -jtu.register_pytree_node(_Missing, lambda _: ((), None), lambda _, __: MISSING) +jtu.register_static(_Missing) # Code template for flattening the wrapper fields From 91d2a1363c78c12b6bcc37f7218ebb71a29b1833 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Mar 2026 16:32:39 +0000 Subject: [PATCH 3/3] Apply register_static as a decorator on _Missing class Co-authored-by: nstarman <8949649+nstarman@users.noreply.github.com> --- equinox/_module/_flatten.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/equinox/_module/_flatten.py b/equinox/_module/_flatten.py index 4145f073..0a3dcb13 100644 --- a/equinox/_module/_flatten.py +++ b/equinox/_module/_flatten.py @@ -25,6 +25,7 @@ _INDENT: Final = " " * 4 +@jtu.register_static class _Missing: def __bool__(self): return False @@ -34,7 +35,6 @@ def __repr__(self): MISSING = _Missing() -jtu.register_static(_Missing) # Code template for flattening the wrapper fields