Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Mocking a MagicMock with a function spec results in an AsyncMock #81432

Copy link
Copy link
@jeremycline

Description

@jeremycline
Issue body actions
BPO 37251
Nosy @lisroach, @hroncok, @mariocj89, @miss-islington, @tirkarthi, @jeremycline, @msuozzo
PRs
  • bpo-37251: MagicMock with function spec used as a spec in mock.patch should return a MagicMock #14117
  • bpo-37251: Removes __code__ check from _is_async_obj. #15830
  • [3.8] bpo-37251: Removes __code__ check from _is_async_obj. (GH-15830) #15837
  • gh-81432: Make create_autospec generate AsyncMocks for awaitable classes #25347
  • 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 2019-06-12.14:00:18.556>
    labels = ['3.8', 'type-bug', 'library', '3.9']
    title = 'Mocking a MagicMock with a function spec results in an AsyncMock'
    updated_at = <Date 2021-04-11.17:20:48.974>
    user = 'https://github.com/jeremycline'

    bugs.python.org fields:

    activity = <Date 2021-04-11.17:20:48.974>
    actor = 'matthew.suozzo'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2019-06-12.14:00:18.556>
    creator = 'jcline'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37251
    keywords = ['patch']
    message_count = 11.0
    messages = ['345358', '345377', '345399', '345704', '346091', '346150', '346583', '351385', '351621', '351644', '390689']
    nosy_count = 7.0
    nosy_names = ['lisroach', 'hroncok', 'mariocj89', 'miss-islington', 'xtreak', 'jcline', 'matthew.suozzo']
    pr_nums = ['14117', '15830', '15837', '25347']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue37251'
    versions = ['Python 3.8', 'Python 3.9']

    Reactions are currently unavailable

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of lifestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
      No fields configured for issues without a type.

      Projects

      Status
      No status
      Show more project fields

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        Morty Proxy This is a proxified and sanitized view of the page, visit original site.