fix the import cycle between log and versionutils

Registered by Doug Hellmann on 2014-03-06

There is a circular dependency between versionutils and the logging code. To break it, we have a few options:

We could move the LogAdapter.deprecated() method to a function in versionutils with the other deprecation-related code. That means moving the 'fatal_deprecations' configuration option, and updating all callers.

We could also change the implementation of the deprecated() decorator in versionutils to not call LOG.deprecated(). That might mean duplicating the logic from LOG.deprecated().

We could also move most of the body of LOG.deprecated() to versionutils but keep the method. This limits the number of changes we have to make in the callers, but means that oslo.log depends on oslo.versionutils. We can eliminate the circular dependency by having the function in versionutils use python's standard logger instead of oslo.log.

I like option 3. - dhellmann

Blueprint information

Status:
Complete
Approver:
None
Priority:
Medium
Drafter:
Doug Hellmann
Direction:
Needs approval
Assignee:
Doug Hellmann
Definition:
Approved
Series goal:
Accepted for kilo
Implementation:
Implemented
Milestone target:
milestone icon 2015.1.0
Started by
Doug Hellmann on 2014-09-24
Completed by
Doug Hellmann on 2015-01-29

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/fix-import-cycle-log-and-versionutils,n,z

Addressed by: https://review.openstack.org/95273
    Add fix-import-cycle-log-and-versionutils spec

Remove oslo.log and move deprecated() to versionutils: https://review.openstack.org/123868

Resubmit the spec for review for kilo: https://review.openstack.org/124845

26 Nov 2014 - This work is blocked until we have a version of oslo.context ready for release, and can release oslo.log to update the versiontutils module in the incubator to use it. - dhellmann

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.