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

Deprecate attributes attribute #341

Closed
Thetwam opened this issue Nov 18, 2019 · 1 comment · Fixed by #388
Closed

Deprecate attributes attribute #341

Thetwam opened this issue Nov 18, 2019 · 1 comment · Fixed by #388
Assignees

Comments

@Thetwam
Copy link
Member

Thetwam commented Nov 18, 2019

CanvasObject.set_attributes() sets an attribute called attributes that includes all the attributes (as a dict) sent to the function. This is not used anywhere in the function, or anywhere else in the library except for the to_json function.

Based on its docstring, the intention of to_json is to return the original JSON that created the object. As we've discovered (see #303), this is not actually the case. self.attributes can be created, mutated, and updated in many different ways that to_json does not accurately reflect. This information can be gathered from Requester._cache much more reliably. I also have a suspicion that most people don't really use to_json anyways.

We should deprecate attributes and to_json(), and ultimately remove them in a later release.

@Thetwam
Copy link
Member Author

Thetwam commented Jul 6, 2020

Related: #387

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant