Closed RyanClark2k closed 1 year ago
Highly recommend not merging this until the commit is modified.
@ogrisel do you mind taking a look at this?
the committer email is still tied to my account, but the author is fixed...
Hum, I wonder why the CI is no longer running on this repo...
Meanwhile, could you please improve test_instance_with_slots
to check that the __slots__
attribute of the class of loaded instance has the same value as the slot specification of the original class?
I merged master to try to get the CI running.
Base: 83.42% // Head: 83.28% // Decreases project coverage by -0.14%
:warning:
Coverage data is based on head (
4823850
) compared to base (68a4230
). Patch coverage: 50.00% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Closing in favor of #495 due to committer email mixup.
This PR fixes issue #460. Two changes were required. First, if
__module__
was present inobj.__dict__
, we need to pass it along totype_kwargs
. See error message below.Second, if we pass
__slots__
and__module__
totype_kwargs
then we get the following error:To resolve this, I deleted the lines passing
__slots__
totype_kwargs
. Our unit testtest_instance_with_slots
still passes with this change. The deleted__slots__
lines were written 4 years ago and are possibly no longer useful. If there is reason to believe removing it could cause a regression, we should at least add a unit test that properly tests the functionality provided by these lines.I've run all unit tests locally with Python 3.6, 3.7, 3.8, 3.9, and 3.10 and verified non-regression. The new
NamedTuple
test fails on develop with Python 3.9 and 3.10 but passes on this branch. I'm happy to iterate here if there are changes needed.