Closed bashtage closed 2 days ago
pickling of ModelMatrix is needed in statsmodels to match current patsy behavior.
hatch fmt
seems to have gone a bit haywire
Better after running black and a few manual fixes.
Thanks for the patch @bashtage !
I simplified it down a little (just used the class constructors rather than a new method), and fixed some new typing conventions that would have broken in older versions of Python. But otherwise looked good!
Also, for formatting you can use: hatch run lint:format
. I think hatch added fmt
functionality after I set this up, so I might need to update it... but I'm eying moving to uv
too.
3.13 waa the reason for the constructors. Not sure if this is a bug in 3.13 but tests fail using the obvious reduce style.
Ah! I should have realised you had a reason for this! Sorry! I'll look into this soon.
Looks like this is due to changes in Python 3.13 that affect wrapt
's ObjectProxy
. It is fixed in 1.17, which should be released shortly. For now I'll just bump the dependency in formulaic for Python 3.13 to require wrapt 1.17.0rc1 or later.
Add
__reduce__ex__
to classes using ObjectProxy Add tests of equivalence