Skip to content

logger failure in suspicious.py #79217

Description

@tirkarthi
BPO 35036
Nosy @cjrh, @pablogsal, @miss-islington, @tirkarthi
PRs
  • bpo-35036: Use empty message as default for logger #10024
  • [2.7] bpo-35036: Remove empty log line in the suspicious.py tool (GH-10024) #16637
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/tirkarthi'
    closed_at = <Date 2018-10-21.12:58:34.694>
    created_at = <Date 2018-10-21.06:56:45.824>
    labels = ['type-bug', '3.8', 'build']
    title = 'logger failure in suspicious.py'
    updated_at = <Date 2019-10-08.03:43:56.276>
    user = 'https://github.com/tirkarthi'

    bugs.python.org fields:

    activity = <Date 2019-10-08.03:43:56.276>
    actor = 'miss-islington'
    assignee = 'xtreak'
    closed = True
    closed_date = <Date 2018-10-21.12:58:34.694>
    closer = 'pablogsal'
    components = ['Build']
    creation = <Date 2018-10-21.06:56:45.824>
    creator = 'xtreak'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35036
    keywords = ['patch']
    message_count = 4.0
    messages = ['328191', '328212', '328213', '354164']
    nosy_count = 4.0
    nosy_names = ['cjrh', 'pablogsal', 'miss-islington', 'xtreak']
    pr_nums = ['10024', '16637']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue35036'
    versions = ['Python 3.8']

    Activity

    1. tirkarthi commented on Oct 21, 2018

      @tirkarthi
      MemberAuthor

      There were some recent changes made in ee171a2 to fix Sphinx related deprecation warnings. During the change self.info() was changed to self.logger.info() . Logger expects a positional argument that contains the message thus causing failure. I think empty string can be passed here. I changed it back to self.info() and ran make suspicious locally and it only printed deprecation warning. Looking the source the previous method had message default to '' thus self.info() was working.

      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)
      

      Sample failure : https://travis-ci.org/python/cpython/jobs/444263040#L560

      I am adding @pablogsal for thoughts on the fix. I will add a PR shortly.

    2. added
      buildThe build process and cross-build
      type-bugAn unexpected behavior, bug, or error
      on Oct 21, 2018
    3. self-assigned this
      on Oct 21, 2018
    4. pablogsal commented on Oct 21, 2018

      @pablogsal
      Member

      New changeset c3f52a5 by Pablo Galindo (Xtreak) in branch 'master':
      bpo-35036: Remove empty log line in the suspicious.py tool (GH-10024)
      c3f52a5

    5. pablogsal commented on Oct 21, 2018

      @pablogsal
      Member

      Thanks @XTreak for the catch and PR!

    6. miss-islington commented on Oct 8, 2019

      @miss-islington
      Contributor

      New changeset e78d79c by Miss Islington (bot) in branch '2.7':
      bpo-35036: Remove empty log line in the suspicious.py tool (GH-10024)
      e78d79c

    7. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    3.8 (EOL)end of lifebuildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions