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 calls to deprecated function getService from AbstractAnalysis #417

Merged
merged 3 commits into from
Nov 26, 2017

Conversation

xispa
Copy link
Member

@xispa xispa commented Nov 26, 2017

Description of the issue/feature this PR addresses

Removes all calls to the deprecated function getService from AbstractAnalysis. This function was returning the Analysis Service from which an Analysis was created. After the architectural refactoring of Analysis, objects from type Analysis acquire the values from the original AnalysisService without the need of maintaining this relationship (that had an overhead because of an HistoryAwareReferenceField was required). getService function was labelled as deprecated then and was returing the Analysis itself. With this Pull Request, the calls to getService have been removed and are using the fields provided by the Analysis object itself.

Current behavior before PR

Deprecation warnings because of the use of getService function in logs.

Desired behavior after PR is merged

No deprecation warnings in logs because the function getService is no longer used in the basecode.

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

@xispa xispa added the removal label Nov 26, 2017
@xispa xispa requested a review from ramonski November 26, 2017 19:23
Copy link
Contributor

@ramonski ramonski left a comment

Choose a reason for hiding this comment

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

Great PR and easy to understand. So the Analysis always is a "copy" of the AS at the moment in time when it was used for an AR, but maintains a reference to the newest version of the AS, right?

@xispa
Copy link
Member Author

xispa commented Nov 26, 2017

Yes @ramonski, the Analysis is a "copy" of the AnalysisService that was used as the "template" for its creation. Even though, maintans a reference to the newest AS (not the one was used as the "template") thanks to getAnalysisService function.

@ramonski ramonski merged commit 2898dc4 into senaite:master Nov 26, 2017
@xispa xispa deleted the remove-deprecate-getService branch November 27, 2017 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants