Skip to content
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

Remove commented out code #582

Merged
merged 1 commit into from
Mar 25, 2021
Merged

Remove commented out code #582

merged 1 commit into from
Mar 25, 2021

Conversation

aaronayres35
Copy link
Contributor

This PR simply removes a few sections of commented out code

Copy link
Contributor

@rahulporuri rahulporuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Not sure what _pickles is.

@rahulporuri
Copy link
Contributor

Note that there are a couple of other instances of _pickle* that are commented which can also be removed. And if i understand correctly, we can also remove the persistence related methods - __getstate__ and __setstate__.

I tried digging and at the bottom of the search - i still find these lines commented. I don't know which PR/why these lines were commented out.

@corranwebster
Copy link
Contributor

LGTM. Not sure what _pickles is.

It looks like it's used by the Serializable class: https://github.com/enthought/chaco/blob/e3423614d654a203bd82ee087c085abe13b465b1/chaco/serializable.py which even has tests https://github.com/enthought/chaco/blob/e3423614d654a203bd82ee087c085abe13b465b1/chaco/tests/serializable_base.py but isn't used anywhere in Chaco.

Modern usage would be to mark traits as transient if you don't want them serialized (which is automatic for property and delegate traits).

The whole system can probably go.

@corranwebster
Copy link
Contributor

I've added #583 for dealing with __getstate__ and __setstate__.

The _post_load methods are more interesting, because they hint at things which might go into a traits_init function and allow simplification of __init__ functions, but that's a bigger and more complex job.

@aaronayres35 aaronayres35 merged commit 2d36abd into master Mar 25, 2021
@aaronayres35 aaronayres35 deleted the remove-commented-out-code branch March 25, 2021 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants