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

Update mapping.py #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update mapping.py #59

wants to merge 1 commit into from

Conversation

ChrisHeerschap
Copy link

Using this module, I get the following to STDERR during shinken config check:

/var/lib/shinken/modules/livestatus/mapping.py:45: DeprecationWarning: shinken.schedulerlink is deprecated module path ; schedulerlink must now be imported from shinken.objects.schedulerlink ; please update your code accordingly
  from shinken.schedulerlink import SchedulerLink
/var/lib/shinken/modules/livestatus/mapping.py:46: DeprecationWarning: shinken.reactionnerlink is deprecated module path ; reactionnerlink must now be imported from shinken.objects.reactionnerlink ; please update your code accordingly
  from shinken.reactionnerlink import ReactionnerLink
/var/lib/shinken/modules/livestatus/mapping.py:47: DeprecationWarning: shinken.brokerlink is deprecated module path ; brokerlink must now be imported from shinken.objects.brokerlink ; please update your code accordingly
  from shinken.brokerlink import BrokerLink
/var/lib/shinken/modules/livestatus/mapping.py:48: DeprecationWarning: shinken.receiverlink is deprecated module path ; receiverlink must now be imported from shinken.objects.receiverlink ; please update your code accordingly
  from shinken.receiverlink import ReceiverLink
/var/lib/shinken/modules/livestatus/mapping.py:49: DeprecationWarning: shinken.pollerlink is deprecated module path ; pollerlink must now be imported from shinken.objects.pollerlink ; please update your code accordingly
  from shinken.pollerlink import PollerLink

Adding ".objects" to lines 45-49 in the mapping.py fixes these errors.

Using this module, I get the following to STDERR during shinken config check:

'''
/var/lib/shinken/modules/livestatus/mapping.py:45: DeprecationWarning: shinken.schedulerlink is deprecated module path ; schedulerlink must now be imported from shinken.objects.schedulerlink ; please update your code accordingly
  from shinken.schedulerlink import SchedulerLink
/var/lib/shinken/modules/livestatus/mapping.py:46: DeprecationWarning: shinken.reactionnerlink is deprecated module path ; reactionnerlink must now be imported from shinken.objects.reactionnerlink ; please update your code accordingly
  from shinken.reactionnerlink import ReactionnerLink
/var/lib/shinken/modules/livestatus/mapping.py:47: DeprecationWarning: shinken.brokerlink is deprecated module path ; brokerlink must now be imported from shinken.objects.brokerlink ; please update your code accordingly
  from shinken.brokerlink import BrokerLink
/var/lib/shinken/modules/livestatus/mapping.py:48: DeprecationWarning: shinken.receiverlink is deprecated module path ; receiverlink must now be imported from shinken.objects.receiverlink ; please update your code accordingly
  from shinken.receiverlink import ReceiverLink
/var/lib/shinken/modules/livestatus/mapping.py:49: DeprecationWarning: shinken.pollerlink is deprecated module path ; pollerlink must now be imported from shinken.objects.pollerlink ; please update your code accordingly
  from shinken.pollerlink import PollerLink
'''

Adding ".objects" to lines 45-49 in the mapping.py fixes these errors.
@gst
Copy link
Contributor

gst commented May 5, 2015

hi @ChrisHeerschap
thanks for the PR.
Yeah we are aware of that change (actually it's me who made these deprecationwarning ;) ).

but, for now, we keep these imports as it.. So that livestatus can continue to just work with previous Shinken version when this refactorization occured.

but I keep the PR open until .. until we can drop previous shinken versions (< 2.4) support ; which will be sooner than later ;)

@gst
Copy link
Contributor

gst commented May 5, 2015

NB: it's not errors, it's warnings ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants