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

Deprecation warning in default set up #367

Merged
merged 1 commit into from
Feb 20, 2013
Merged

Conversation

tobes
Copy link
Contributor

@tobes tobes commented Feb 20, 2013

There is a deprecation warning when running CKAN with paster serve development.ini

[ckan.lib.maintain] Function subnav_named_route() in module lib.helpers has been deprecated. h.subnav_named_route is deprecated please use h.nav_named_link

@tobes
Copy link
Contributor

tobes commented Feb 18, 2013

This warning occurs when starting ckan notifying that this helper function has been depecated in ckan 2.0. Note this is not due to the function being called which would cause a different though similar log message.

As such this is the correct and expected behaviour.

I think we should close this but if you disagree what behaviour would you prefer and why?

cheers

@domoritz
Copy link
Contributor Author

Does this message occur on a clean CKAN installation? If it does, I think it is confusing for most people and should not be printed at all. Why do we need a warning for a function that is not even called anyway? I'd prefer no warnings in a default set up so that people do not think they have done something wrong. This would also have the side effect that real warnings are not hidden inside warnings that are not relevant at the moment.

@tobes
Copy link
Contributor

tobes commented Feb 18, 2013

Because the function exists and has in ckan for some time. It is used in a legacy template and also in the publishers_form (which may be removed) uses it in a template.

The point of this message is to notify users that a function has been depreciated in the current version of ckan and will later be removed. The log level is INFO when the function is called the log level is WARNING which is a higher level.

Maybe we could move the level to DEBUG. To be honest I'm not sure what log level a clean install sets.

@domoritz
Copy link
Contributor Author

From https://github.com/okfn/ckan/blob/2fce451fdb5b876f8362b8894f81d4393ed17e43/ckan/config/deployment.ini_tmpl#L315 I'd say the default is INFO. So changing the log level of deprecation warnings to DEBUG would make sense, I think.

@tobes
Copy link
Contributor

tobes commented Feb 20, 2013

@domoritz you win :) do you want to merge this when you get time

@domoritz
Copy link
Contributor Author

@tobes I'll assign myself and try it at some point today.

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.

None yet

2 participants