Skip to content

Python 3.10 support in v3 #1400

@jayvdb

Description

@jayvdb
  • What is the current behavior?

Two tests fail on Python 3.10, with slightly different output on Python 3.10, that the tests do not expect.

[  101s] =================================== FAILURES ===================================
[  101s] ___________________ test_objecttype_as_container_extra_args ____________________
[  101s] 
[  101s]     def test_objecttype_as_container_extra_args():
[  101s]         with raises(TypeError) as excinfo:
[  101s]             Container("1", "2", "3")
[  101s]     
[  101s] >       assert "__init__() takes from 1 to 3 positional arguments but 4 were given" == str(
[  101s]             excinfo.value
[  101s]         )
[  101s] E       AssertionError: assert '__init__() t... 4 were given' == 'Container.__... 4 were given'
[  101s] E         - Container.__init__() takes from 1 to 3 positional arguments but 4 were given
[  101s] E         ? ----------
[  101s] E         + __init__() takes from 1 to 3 positional arguments but 4 were given
[  101s] 
[  101s] graphene/types/tests/test_objecttype.py:197: AssertionError
[  101s] _________________ test_objecttype_as_container_invalid_kwargs __________________
[  101s] 
[  101s]     def test_objecttype_as_container_invalid_kwargs():
[  101s]         with raises(TypeError) as excinfo:
[  101s]             Container(unexisting_field="3")
[  101s]     
[  101s] >       assert "__init__() got an unexpected keyword argument 'unexisting_field'" == str(
[  101s]             excinfo.value
[  101s]         )
[  101s] E       assert "__init__() g...isting_field'" == "Container.__...isting_field'"
[  101s] E         - Container.__init__() got an unexpected keyword argument 'unexisting_field'
[  101s] E         ? ----------
[  101s] E         + __init__() got an unexpected keyword argument 'unexisting_field'
[  101s] 
[  101s] graphene/types/tests/test_objecttype.py:206: AssertionError
  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
    a github repo, https://repl.it or similar.

  • What is the expected behavior?

Tests pass on Python 3.10

  • What is the motivation / use case for changing the behavior?

  • Please tell us about your environment:

    • Version:
    • Platform:
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions