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

c_make_encoder() has uncovered error: "argument 1 must be dict or None" #89432

Closed
sobolevn opened this issue Sep 23, 2021 · 5 comments
Closed
Labels
3.9 only security fixes 3.10 only security fixes 3.11 bug and security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@sobolevn
Copy link
Member

BPO 45269
Nosy @ambv, @miss-islington, @sobolevn
PRs
  • bpo-45269: test wrong markers type to c_make_encoder #28540
  • [3.10] bpo-45269: test wrong markers type to c_make_encoder (GH-28540) #28609
  • [3.9] bpo-45269: test wrong markers type to c_make_encoder (GH-28540) #28610
  • 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 = <Date 2021-09-28.21:57:29.057>
    created_at = <Date 2021-09-23.09:32:38.437>
    labels = ['type-bug', 'tests', '3.9', '3.10', '3.11']
    title = 'c_make_encoder() has uncovered error: "argument 1 must be dict or None"'
    updated_at = <Date 2021-09-28.21:57:29.056>
    user = 'https://github.com/sobolevn'

    bugs.python.org fields:

    activity = <Date 2021-09-28.21:57:29.056>
    actor = 'lukasz.langa'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-09-28.21:57:29.057>
    closer = 'lukasz.langa'
    components = ['Tests']
    creation = <Date 2021-09-23.09:32:38.437>
    creator = 'sobolevn'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45269
    keywords = ['patch']
    message_count = 5.0
    messages = ['402482', '402808', '402810', '402811', '402812']
    nosy_count = 3.0
    nosy_names = ['lukasz.langa', 'miss-islington', 'sobolevn']
    pr_nums = ['28540', '28609', '28610']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue45269'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @sobolevn
    Copy link
    Member Author

    Looks like we never test error that markers are limited to None and dict types. Here: https://github.com/python/cpython/blob/main/Modules/_json.c#L1252-L1255

    Coverage report: https://app.codecov.io/gh/python/cpython/blob/master/Modules/_json.c line: 1252

    I will submit a unit test for it today.

    Related: https://bugs.python.org/issue6986

    @sobolevn sobolevn added 3.9 only security fixes 3.10 only security fixes 3.11 bug and security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Sep 23, 2021
    @ambv
    Copy link
    Contributor

    ambv commented Sep 28, 2021

    New changeset e046aab by Nikita Sobolev in branch 'main':
    bpo-45269: test wrong markers type to c_make_encoder (GH-28540)
    e046aab

    @ambv
    Copy link
    Contributor

    ambv commented Sep 28, 2021

    New changeset c6b5cea by Miss Islington (bot) in branch '3.9':
    bpo-45269: test wrong markers type to c_make_encoder (GH-28540) (GH-28610)
    c6b5cea

    @ambv
    Copy link
    Contributor

    ambv commented Sep 28, 2021

    New changeset 1cb17be by Miss Islington (bot) in branch '3.10':
    bpo-45269: test wrong markers type to c_make_encoder (GH-28540) (GH-28609)
    1cb17be

    @ambv
    Copy link
    Contributor

    ambv commented Sep 28, 2021

    Thanks, Nikita! ✨ 🍰 ✨

    @ambv ambv closed this as completed Sep 28, 2021
    @ambv ambv closed this as completed Sep 28, 2021
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes 3.10 only security fixes 3.11 bug and security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants