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 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

This comment has been minimized.

Copy link
Member Author

tirkarthi commented Oct 21, 2018

cc @pablogsal for review

@pablogsal pablogsal added the skip news label Oct 21, 2018
Copy link
Member

pablogsal left a comment

Thanks for the catch and the PR!

@pablogsal

This comment has been minimized.

Copy link
Member

pablogsal commented Oct 21, 2018

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

@pablogsal pablogsal force-pushed the tirkarthi:bpo35036 branch from 1d15290 to ea7c4fb Oct 21, 2018
@pablogsal pablogsal merged commit c3f52a5 into python:master Oct 21, 2018
5 checks passed
5 checks passed
Azure Pipelines PR #20181021.25 succeeded
Details
bedevere/issue-number Issue number 35036 found
Details
bedevere/news "skip news" label found
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@tirkarthi

This comment has been minimized.

Copy link
Member Author

tirkarthi commented Oct 21, 2018

Sure, thanks for merging it :)

@tirkarthi tirkarthi deleted the tirkarthi:bpo35036 branch Oct 22, 2018
yahya-abou-imran added a commit to yahya-abou-imran/cpython that referenced this pull request Nov 2, 2018
…10024)

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

This comment has been minimized.

Copy link

miss-islington commented Oct 8, 2019

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

miss-islington added 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

This comment has been minimized.

Copy link

bedevere-bot commented Oct 8, 2019

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.