← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1968606] [NEW] Importing neutron.common.config module registers config options

 

Public bug reported:

In case neutron.common.config is imported some config options are
registered as a side effect without calling any function. This is
causing errors for projects that import also other modules that end up
importing neutron.common.config - such as neutorn.db.models_v2. If a
project needs Neutron basic DB models and uses same config options then
there is no way how to make it work. Performing any action on imports is
an anti-pattern in Python.

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1968606

Title:
  Importing neutron.common.config module registers config options

Status in neutron:
  New

Bug description:
  In case neutron.common.config is imported some config options are
  registered as a side effect without calling any function. This is
  causing errors for projects that import also other modules that end up
  importing neutron.common.config - such as neutorn.db.models_v2. If a
  project needs Neutron basic DB models and uses same config options
  then there is no way how to make it work. Performing any action on
  imports is an anti-pattern in Python.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1968606/+subscriptions



Follow ups