warn method is deprecated #365

Closed
akhilman opened this Issue May 24, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@akhilman
Contributor

akhilman commented May 24, 2016

.../cement/ext/ext_logging.py:324: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
  self.backend.warn(msg, **kwargs)
@akhilman

This comment has been minimized.

Show comment
Hide comment
@akhilman

akhilman May 24, 2016

Contributor

Should we also rename ILog.warn() to ILog.warning()?

Contributor

akhilman commented May 24, 2016

Should we also rename ILog.warn() to ILog.warning()?

@derks

This comment has been minimized.

Show comment
Hide comment
@derks

derks Jun 14, 2016

Member

Yes, per the the doc logging.warn() is deprecated in Python 3.5 (as you mentined in Gitter, Thanks!):

Note There is an obsolete method warn which is functionally identical to warning. As warn is deprecated, please do not use it - use warning instead.

Therefore, at this point warn() should be fully deprecated and removed in master.

Member

derks commented Jun 14, 2016

Yes, per the the doc logging.warn() is deprecated in Python 3.5 (as you mentined in Gitter, Thanks!):

Note There is an obsolete method warn which is functionally identical to warning. As warn is deprecated, please do not use it - use warning instead.

Therefore, at this point warn() should be fully deprecated and removed in master.

@derks

This comment has been minimized.

Show comment
Hide comment
@derks

derks Jun 14, 2016

Member

Correction on that... the ILog interface defines that the implementation provide warn() and doesn't mention warning(). The interface should be modified to mention warning() (to be inline with the logger module that it is models after)... but the LoggingLogHandler.warn() should not be fully removed, will need to keep the deprecation note there and continue support through Cement 2.x. It can/will be dropped in Cement 3.

Member

derks commented Jun 14, 2016

Correction on that... the ILog interface defines that the implementation provide warn() and doesn't mention warning(). The interface should be modified to mention warning() (to be inline with the logger module that it is models after)... but the LoggingLogHandler.warn() should not be fully removed, will need to keep the deprecation note there and continue support through Cement 2.x. It can/will be dropped in Cement 3.

@derks derks modified the milestones: 2.10.0 Stable, 3.0.0 Stable Jun 14, 2016

@derks derks self-assigned this Jun 14, 2016

@derks derks modified the milestones: 2.10.0 Stable, 3.0.0 Stable Jul 6, 2016

derks added a commit that referenced this issue Jul 6, 2016

@derks derks closed this Jul 6, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment