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

bpo-35036: Use empty message as default for logger #10024

Merged
merged 2 commits into from
Oct 21, 2018

Conversation

tirkarthi
Copy link
Member

@tirkarthi tirkarthi commented Oct 21, 2018

This fixes the change introduced in ee171a2 where self.info() was replaced with self.logger.info() . self.info was deprecated but it had a default of message='' and the new change also follows the same. I think this is a no-op and can be removed but that is subjected to approval from the reviewer.

Original self.info definition :

def info(self, message='', nonl=False):
    # type: (unicode, bool) > None
    """Emit an informational message.

    If *nonl* is true, don't emit a newline at the end (which implies that
    more info output will follow soon.)

    .. deprecated:: 1.6
       Use :mod:`sphinx.util.logging` instead.
    """
    warnings.warn('app.info() is now deprecated. Use sphinx.util.logging instead.',
                  RemovedInSphinx20Warning)
    logger.info(message, nonl=nonl)

https://bugs.python.org/issue35036

@tirkarthi
Copy link
Member Author

cc @pablogsal for review

Copy link
Member

@pablogsal pablogsal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the catch and the PR!

@pablogsal
Copy link
Member

I have pushed to your branch removing the logline, as it is not doing anything and can be safely deleted.

@tirkarthi
Copy link
Member Author

Sure, thanks for merging it :)

@miss-islington
Copy link
Contributor

Thanks @tirkarthi for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 8, 2019
…10024)

Previous to commit ee171a2 the logline was working because of self.info() (now
deprecated) defaults to an empty message.
(cherry picked from commit c3f52a5)

Co-authored-by: Xtreak <tirkarthi@users.noreply.github.com>
@bedevere-bot
Copy link

GH-16637 is a backport of this pull request to the 2.7 branch.

miss-islington added a commit that referenced this pull request Oct 8, 2019
Previous to commit ee171a2 the logline was working because of self.info() (now
deprecated) defaults to an empty message.
(cherry picked from commit c3f52a5)

Co-authored-by: Xtreak <tirkarthi@users.noreply.github.com>
gpshead pushed a commit to gpshead/cpython that referenced this pull request Sep 2, 2022
…10024)

Previous to commit ee171a2 the logline was working because of self.info() (now
deprecated) defaults to an empty message.
ned-deily pushed a commit that referenced this pull request Sep 2, 2022
…GH-96498)

Previous to commit ee171a2 the logline was working because of self.info() (now
deprecated) defaults to an empty message.

Co-authored-by: Xtreak <tirkarthi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants