Refs #510 - Models can no longer be pickled#511
Refs #510 - Models can no longer be pickled#511alexhayes wants to merge 2 commits intoschematics:masterfrom
Conversation
…ickling models.
…ProxyType with dict.
|
Just to be sure that |
|
I am thinking of instead of using different dicts, actually marking the values with metadata to know if they are valid or not. This would simplify the structure back to a single container which could expose iterators for data in each state. |
|
@lkraider given what you've said above will that be something that will be happening in the short term or is it more a mid-long term goal? I'm just wondering if I should expect that this PR will be merged (in which case I might use my fork for the time being knowing that it will be merged) or if I should hold off upgrading from |
|
I want to fix this by removing the |
See #510
Essentially
MappingProxyTypedoes not support pickle and thus models could not be pickled anymore.I've replaced
MappingProxyTypewithdict.As far as I can tell the access to the only attribute that was using
MappingProxyType(schematics.ModelDict._valid) is governed by the API (of course this is Python and we all need to behave as consenting adults) and thus perhaps a read-only dict is not that important?If it's deemed that this solution is OK I'll fix up the Python 2.6/2.7 failing tests.