Use abc instead of NotImplementedError
Bug #1346797 reported by
Marc Koderer
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Undecided
|
Marc Koderer | ||
OpenStack Heat |
Fix Released
|
Low
|
Daniel Gonzalez Nothnagel | ||
tempest |
Fix Released
|
Low
|
Danny Al-Gaaf |
Bug Description
Problem:
=======
Use of abc for abstract classes is better than raising NotImplementedError exceptions due to various reasons (see [1], [2]).
Usage of abc will fail fast if a subclass doesn't implement the full interface.
This should be the preferred mechanism to define common interfaces.
References:
=========
[1]: http://
[2]: dbader.
Changed in tempest: | |
assignee: | nobody → Marc Koderer (m-koderer) |
Changed in cinder: | |
assignee: | nobody → Marc Koderer (m-koderer) |
Changed in cinder: | |
status: | New → In Progress |
Changed in tempest: | |
status: | New → In Progress |
Changed in tempest: | |
importance: | Undecided → Low |
Changed in heat: | |
assignee: | nobody → Daniel Gonzalez Nothnagel (dgonzalez) |
Changed in heat: | |
importance: | Undecided → Low |
status: | In Progress → Triaged |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/108606 /git.openstack. org/cgit/ openstack/ tempest/ commit/ ?id=235e4f53ee0 5dc4c4226bd7b32 7068ed031e76c5
Committed: https:/
Submitter: Jenkins
Branch: master
commit 235e4f53ee05dc4 c4226bd7b327068 ed031e76c5
Author: Marc Koderer <email address hidden>
Date: Tue Jul 22 10:15:08 2014 +0200
Use python abc in auth class
Instead of using NotImplementedError the abc class has the advantage
that it fails faster if a class doesn't implement the needed interface.
Adapt unit test and test class.
Change-Id: Ide914a4bb577a2 8a3d202cbf088c4 04323a29b21
Partial-Bug: #1346797