Skip to content
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

Schema.declared_fields should be set by metaclass #426

Closed
xlotlu opened this issue Apr 1, 2016 · 2 comments
Closed

Schema.declared_fields should be set by metaclass #426

xlotlu opened this issue Apr 1, 2016 · 2 comments

Comments

@xlotlu
Copy link

xlotlu commented Apr 1, 2016

Since the deepcopy is going to happen anyway, I think it should be done under SchemaMeta.__new__. This way one could have access to the final fields from the schema class without the need for instantiation.

@justanr
Copy link
Contributor

justanr commented Apr 1, 2016

See this comment thread, specifically my comment a few down.

I'm not 100% sure what the actual ramifications for doing this are - the Schema is an instance of SchemaMeta and can have instance variables set on it that are not accessible from the instance at all (well, from my testing and prodding) which makes serialization more complicated.

I think it's an interesting quirk (feature?) of the type system, but I'm not sure what the practical applications are.

@sloria
Copy link
Member

sloria commented Oct 18, 2018

Closing this for now, as this has gone stale and we don't have immediate plans to implement this. Feel free to re-open if there's more to discuss here.

@sloria sloria closed this as completed Oct 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants