|
@wbolster, thanks for your PR! By analyzing the history of the files in this pull request, we identified @serhiy-storchaka, @Yhg1s and @warsaw to be potential reviewers. |
|
Will this get backported to 2.7.x? |
|
hi, author here. is there anything i can do to help move this pr forward? |
There was a problem hiding this comment.
This change breaks pickle. See my comments on the tracker.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
There was a problem hiding this comment.
LGTM, but please add a test in test_exceptions() to make sure that is_safe attribute cannot be modified, near the "badtype(lambda: setattr(u, 'int', i))" test.
| self.__dict__['int'] = int | ||
| self.__dict__['is_safe'] = is_safe | ||
| super().__setattr__('int', int) | ||
| super().__setattr__('is_safe', is_safe) |
There was a problem hiding this comment.
I suggest to use object.__setattr__(self, 'int', int).
|
@serhiy-storchaka: "This change breaks pickle. See my comments on the tracker." Oh, I missed this comment. It should be fixed. Please rebase also your change. |
|
Since this has lingered for a long time with no word from the original author, I've gone ahead and implemented appropriate pickle/unpickle logic. I've created a new PR (#9078) since this one is old and has merge conflicts. I suggest closing this. |
|
thanks all, especially @taleinat for finishing my first attempt! |
https://bugs.python.org/issue30977