Mostly FYI in <https://github.com/pantsbuild/pants...
# development
b
Mostly FYI in https://github.com/pantsbuild/pants/pull/18052 Both
Target
and
Field
are switching from
frozen_after_init
to be vanilla
frozen
`dataclass`es. Non-dataclass subclasses of frozen dataclasses are not themselves frozen, but their frozen attributes are. All this means is people can now attach arbitrary values onto their instances of their subclasses. This isn't any different from other
frozen
dataclasses. I'm only noting it because I have to remove some lines from a test that tested this behavior. Again, still can't assign to any of the dataclasses fields. Also
__init__
is
final
c
will this information be preserved somewhere.. it may be a good thing to not forget ? 😉
b
🤷‍♂️ It's really more of an FYI. The only reason I thought about typing it up was because there's some code that tests this
c
perhaps in the PR doing the change to the test cases (and there may be a comment in the tests or there abouts) 🤷
b
To me, though. Attaching arbitrary values to any object is plain stupid, so it doens't need to be tested, because it's a huge footgun
I can call it out in the PR for sure
c
yep, so maybe only in the PR…
thanks 🙏
b
Oh duh, I'll switch the test to assign to the value. 😛