Don't let Path inherit from dict#190
Don't let Path inherit from dict#190sloria merged 1 commit intomarshmallow-code:devfrom Nobatek:dev_path_object
Conversation
|
Hm, I don't recall why I made This PR is probably the right way to go. |
|
Great. How shall we proceed? Should I merge this? Considering the modifications in the tests, do you consider this a breaking change? I would say it isn't and those tests were wrongish, but maybe I'm focusing on my own experience of apispec. |
|
Yeah, I think this can be merged as is. It looks like a breaking change, but it shouldn't affect most users. @lafrech Is this still WIP? If not, can you rewrite the commit message without "WIP"? |
|
Alright, I rebased, reviewed and modified the commit message. I checked those tests again and I don't think anyone should be affected. Thanks. |
While investigating #189, I've been wondering why
Pathinherits fromdictand in the meantime holds content in itsoperationsattribute.It looks like most content is duplicated in
operationsand inPathitself. In fact, inheriting fromdictseems kinda strange.This PR removes this inheritance to simplify the code. It makes more sense to me this way. It brings no enhancement, but tries to improve maintainability.
What was the reason for the original design? Any objection to this simplification?
I had to modify 2 tests to get this going. This could mean I'm totally mistaken, but from the name of the tests, I don't think the behaviour I modified is what was being tested, rather a side-effect.
Feedback welcome.
Note that if this PR is applied, we'll probably need to change
into
to get the behaviour proposed in #189.