-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deepcopy(frozendict[<key type>, <value type>])
returns empty dict instead of type
#29
Comments
Can you give me the result of:
|
|
And this is a problem because....? |
I'm hoping to use Small example w/ pydantic if it helps: from frozendict import frozendict
from pydantic import BaseModel
class Base(BaseModel):
a: frozendict[str, int]
class Sub(Base):
pass
print(Sub.__fields__["a"].outer_type_) |
I think this is a bug in python's edit: in case you're interested: https://bugs.python.org/issue45167 |
I reopen it, since the type hint does not work at all in the C Extension |
Fixed ecf771c |
Thanks. Btw, the original |
OS version: macOS Big Sur 11.4
Python3 version (python3 -V -V):
Steps to reproduce:
I don't exactly know why this is happening, but a bit of debugging info:
__new__
and__init__
are never called (but did confirm it is called for something likefrozendict()
)__deepcopy__
is called, but only for thedeepcopy(frozendict[str, int])
case... and thentype(self)
isdict
, notfrozendict
which seems weird.The text was updated successfully, but these errors were encountered: