-
Notifications
You must be signed in to change notification settings - Fork 107
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
Make Handler
subclassable
#130
Conversation
*breaking change!* The core now provides a handler called `BaseHandler` that is designed for subclassing. This replaces the `Handler` object for plugin-api use. This also updates the release notes since this is a breaking change. Required PR: pulp/pulpcore#130 https://pulp.plan.io/issues/4719 closes #4719
38dcca8
to
e085eb2
Compare
e085eb2
to
e38dd1b
Compare
Codecov Report
@@ Coverage Diff @@
## master #130 +/- ##
=========================================
+ Coverage 67.07% 67.18% +0.1%
=========================================
Files 64 64
Lines 3028 3029 +1
=========================================
+ Hits 2031 2035 +4
+ Misses 997 994 -3
Continue to review full report at Codecov.
|
The `Handler` object was not very subclassable, so this improves it in a few ways. - hardcoded `Handler` calls are no longer used - classmethods replace staticmethods - the HOP_BY_HOP constant is now available on the object - add a DISTRIBUTION_MODEL constant that subclasses can declare their corresponding distribution model type. If declared only that model type will be matched. If unspecified, `BaseDistribution` will be used. Unrelated to the subclassing an error case was removed which would silence all exceptions to the log which is not a good behavior. https://pulp.plan.io/issues/4719 closes pulp#4719
e38dd1b
to
a42ef95
Compare
@gmbnomis I pushed my changes from your review. |
LGTM now. I just set |
Using the `distributon_model` attribute introduced in pulp/pulpcore#130, restrict the pulp_cookbook content app to CookbookDistributions only.
The
Handler
object was not very subclassable, so this improves it in afew ways.
Handler
calls are no longer usedcorresponding distribution model type. If declared only that model
type will be matched. If unspecified,
BaseDistribution
will be used.Unrelated to the subclassing an error case was removed which would
silence all exceptions to the log which is not a good behavior.
https://pulp.plan.io/issues/4719
closes #4719