-
Notifications
You must be signed in to change notification settings - Fork 105
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
frozen_box propagation into sub-nodes #150
Comments
Well that's something I guess I never thought about was propagating the settings to already created sub-boxes. It would make sense that all box objects coming into another box should adhere to the parents convention. However I can also see where some might find that detrimental, so it will have to be configurable (probably with auto inheritance being the standard.) This is something I will want to flush out for 5.0 |
…ks to David Aronchick) * Adding new parameter `box_inherent_settings` #150 (thanks to ipcoder)
…ttings and copy objects #150 (thanks to ipcoder) * Changing `BoxList.box_class` to be stored in `BoxList.box_options` dict as `box_class` * Removing support for single level circular references
I am starting to cut pre-releases for 5.0.0, if you are feeling adventurous please test it out and let me know if it solves your issues!
Details on the new wiki |
* Adding support for msgpack converters `to_msgpack` and `from_msgpack` * Adding support for comparision of `Box` to other boxes or dicts via the `-` sub operator #144 (thanks to Hitz) * Adding support to `|` union boxes like will come default in Python 3.9 from PEP 0584 * Adding `mypy` type checking, `black` formatting and other checks on commit * Adding new parameter `box_class` for cleaner inheritance #148 (thanks to David Aronchick) * Adding `dotted` option for `keys` method to return box_dots style keys (thanks to ipcoder) * Fixing box_dots to properly delete items from lists * Fixing box_dots to properly find items with dots in their key * Fixing that recast of subclassses of `Box` or `BoxList` were not fed box properties (thanks to Alexander Kapustin) * Changing that sub boxes are always created to properly propagate settings and copy objects #150 (thanks to ipcoder) * Changing that default_box will not raise key errors on `pop` #67 (thanks to Patrock) * Changing `to_csv` and `from_csv` to have same string and filename options as all other transforms * Changing back to no required external imports, instead have extra requires like [all] (thanks to wim glenn) * Changing from putting all details in README.rst to a github wiki at https://github.com/cdgriffith/Box/wiki * Changing `BoxList.box_class` to be stored in `BoxList.box_options` dict as `box_class` * Changing `del` will raise `BoxKeyError`, subclass of both `KeyError` and `BoxError` * Removing support for single level circular references * Removing readthedocs generation * Removing overrides for `keys`, `values` and `items` which will return views again
Is that a designed behaviour:
When combining a structure from pieces a mixed dict/Box hierarchy may emerge,
and to make it frozen one should now traverse it and change box-node by node, or
some ugly thing like that:
An alternative would be to make sure that
Box(struct, frozen_box=True)
would make sure all the sub-boxes are frozen too.
What do you think?
Thanks
The text was updated successfully, but these errors were encountered: