Message377323
I've also created this alternative to option 2:
- https://github.com/jaraco/zipp/tree/bugfix/bpo-40564-mixin
This alternative approach uses a mix-in rather than subclasses, creating a new class on-demand. I was hoping this approach would enable just augmenting the instance rather than affecting `source.__class__`, but when I got to the implementation, I found that `source.__class__` had to be mutated regardless.
This approach does have an advantage over option 2 in that it would support other ZipFile subclasses for source. It has the disadvantage in that it creates a new subclass for every instance created.
I've thought about it a lot and while I'm not particularly happy with any of the approaches, I'm leaning toward option 2. |
|
Date |
User |
Action |
Args |
2020-09-22 14:09:07 | jaraco | set | recipients:
+ jaraco, xtreak, bustawin |
2020-09-22 14:09:07 | jaraco | set | messageid: <1600783747.02.0.841488051195.issue40564@roundup.psfhosted.org> |
2020-09-22 14:09:07 | jaraco | link | issue40564 messages |
2020-09-22 14:09:06 | jaraco | create | |
|