FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

trace.CoverageResult fails merging input file with non-empty callers · Issue #51524 · python/cpython · GitHub

Repository navigation

trace.CoverageResult fails merging input file with non-empty callers #51524

Closed

Description

mannequin
BPO 7275
Nosy @berkerpeksag, @iritkatriel
Files
  • trace.diff: Proposed patch for out of place 'callers' argument
  • issue7275.diff
  • 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 = None
    closed_at = None
    created_at = <Date 2009-11-06.18:12:00.434>
    labels = ['easy', 'type-bug', '3.9', '3.10', '3.11', 'library']
    title = 'CoverageResult fails to merge input file with non-empty callers in trace.py'
    updated_at = <Date 2022-01-20.23:10:32.121>
    user = 'https://bugs.python.org/glinsvad'

    bugs.python.org fields:

    activity = <Date 2022-01-20.23:10:32.121>
    actor = 'iritkatriel'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2009-11-06.18:12:00.434>
    creator = 'glinsvad'
    dependencies = []
    files = ['15279', '42558']
    hgrepos = []
    issue_num = 7275
    keywords = ['easy']
    message_count = 4.0
    messages = ['94991', '109980', '263925', '411054']
    nosy_count = 4.0
    nosy_names = ['dstanek', 'glinsvad', 'berker.peksag', 'iritkatriel']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue7275'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    Linked PRs

    Activity

    1. glinsvad commented on Nov 6, 2009

      glinsvadmannequin
      MannequinAuthor

      trace.CoverageResults expects arguments in the order "counts, calledfuncs,
      infile, callers..." but the try statement in the last part of __init__
      passes "counts, calledfuncs, callers" as positional arguments to a new
      instance of the same class. Thus, the secondary instance erroneously
      obtains a dict for the "infile" argument, so I propose passing "callers"
      as a keyword argument to avoid this.

      Not that this has gone unnoticed because an empty dict for the "infile"
      argument evaluates to False in "if self.infile:", which must have been
      intended as "if self.infile is not None:". If, however, the original
      instance loads a pickle file with a non-empty "callers" argument, the
      secondary instance tries to run "open({}, 'rb')", which yields:

      TypeError: coercing to Unicode: need string or buffer, dict found

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on Nov 6, 2009
    3. BreamoreBoy commented on Jul 11, 2010

      BreamoreBoymannequin
      Mannequin

      The attached patch is effectively a one liner.

    4. berkerpeksag commented on Apr 21, 2016

      Member

      Thanks for the report and for the patch, Christian. Here is a patch with a test.

    5. changed the title [-]CoverageResult fails to merge input file with non-empty callers in trace.py (patch)[/-] [+]CoverageResult fails to merge input file with non-empty callers in trace.py[/+] on Apr 21, 2016
    6. iritkatriel commented on Jan 20, 2022

      Member

      The patch needs to be converted to a GitHub PR.

    7. transferred this issue fromon Apr 10, 2022
    8. furkanonder commented on Nov 20, 2022

      Contributor

      @iritkatriel I opened a PR for this issue.

    9. changed the title [-]CoverageResult fails to merge input file with non-empty callers in trace.py[/-] [+]trace.CoverageResult fails merging input file with non-empty callers[/+] on Nov 20, 2022
    10. added a commit that references this issue on Nov 28, 2022
    11. added 4 commits that reference this issue on Nov 28, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.10 (EOL)end of life3.11only security fixeseasystdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions


        Back | FazBrowse Home | New Git URL