Skip to content

Add support for graphql-core 3.2.0 #1415

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

Closed
wants to merge 3 commits into from

Conversation

ddelange
Copy link

@ddelange ddelange commented Apr 4, 2022

From graphql-core 3.2 ref graphql-python/graphql-core@09ff14f

From our CI:

tests/test_app/test_service/conftest.py:9: in <module>
    from graphene.test import Client as GraphqlClient
/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/graphene/test/__init__.py:2: in <module>
    from graphql.error import format_error as format_graphql_error
E   ImportError: cannot import name 'format_error' from 'graphql.error' (/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/graphql/error/__init__.py)

Currently running graphene==3.0b7 in CI which allows graphql-core==3.2.0:

gql==3.1.0
graphene==3.0b7
graphql-core==3.2.0
graphql-relay==3.1.0

If I try pinning graphene==3.0b8 or graphene==3.0.0 (and thereby disallow graphql-core==3.2.0), our installation breaks as all stable versions of gql (except 0.1.0) require graphql-core>=3.2.0:

version tree

$ pipgrip --tree -vv gql graphene==3.0.0
INFO: discovering gql
INFO: discovering graphene==3.0.0
INFO: fact: _root_ is root
INFO: derived: root
INFO: fact: root depends on gql (*)
INFO: fact: root depends on graphene (==3.0.0)
INFO: selecting _root_ (0.0.0)
INFO: derived: graphene (==3.0.0)
INFO: derived: gql (*)
INFO: fact: graphene (3.0) depends on aniso8601 (>=8,<10)
INFO: fact: graphene (3.0) depends on graphql-core (~=3.1.2)
INFO: fact: graphene (3.0) depends on graphql-relay (>=3.0,<4)
INFO: selecting graphene (3.0)
INFO: derived: graphql-relay (>=3.0,<4)
INFO: derived: graphql-core (~=3.1.2)
INFO: derived: aniso8601 (>=8,<10)
INFO: discovering graphql-relay<4,>=3.0
INFO: discovering graphql-core~=3.1.2
INFO: discovering aniso8601<10,>=8
INFO: selecting aniso8601 (9.0.1)
INFO: selecting graphql-core (3.1.7)
INFO: fact: graphql-relay (3.1.5) depends on graphql-core (>=3.1,<3.2)
INFO: selecting graphql-relay (3.1.5)
INFO: fact: gql (3.1.0) depends on graphql-core (>=3.2,<3.3)
INFO: fact: gql (3.1.0) depends on yarl (<2.0,>=1.6)
INFO: derived: not gql (3.1.0)
INFO: discovering gql==3.0.0
INFO: fact: gql (3.0.0) depends on graphql-core (>=3.2,<3.3)
INFO: fact: gql (3.0.0) depends on yarl (<2.0,>=1.6)
INFO: derived: not gql (3.0.0)
INFO: discovering gql==2.0.0
INFO: fact: gql (2.0.0) depends on graphql-core (>=2.3.2,<3)
INFO: fact: gql (2.0.0) depends on promise (>=2.3,<3)
INFO: fact: gql (2.0.0) depends on requests (>=2.12,<3)
INFO: fact: gql (2.0.0) depends on six (>=1.10.0)
INFO: derived: not gql (2.0.0)
INFO: discovering gql==0.5.0
INFO: fact: gql (0.5.0) depends on graphql-core (<3,>=2)
INFO: fact: gql (0.5.0) depends on promise (<3,>=2.0)
INFO: fact: gql (0.5.0) depends on requests (>=2.12,<3)
INFO: fact: gql (0.5.0) depends on six (>=1.10.0)
INFO: derived: not gql (0.5.0)
INFO: discovering gql==0.4.0
INFO: fact: gql (0.4.0) depends on graphql-core (<3,>=2)
INFO: fact: gql (0.4.0) depends on promise (<3,>=2.0)
INFO: fact: gql (0.4.0) depends on requests (>=2.12,<3)
INFO: fact: gql (0.4.0) depends on six (>=1.10.0)
INFO: derived: not gql (0.4.0)
INFO: discovering gql==0.3.0
INFO: fact: gql (0.3.0) depends on graphql-core (<3,>=2)
INFO: fact: gql (0.3.0) depends on promise (<3,>=2.0)
INFO: fact: gql (0.3.0) depends on requests (>=2.12,<3)
INFO: fact: gql (0.3.0) depends on six (>=1.10.0)
INFO: derived: not gql (0.3.0)
INFO: discovering gql==0.2.0
INFO: fact: gql (0.2.0) depends on graphql-core (<2,>=0.5.0)
INFO: fact: gql (0.2.0) depends on promise (<3,>=2.0)
INFO: fact: gql (0.2.0) depends on requests (>=2.12,<3)
INFO: fact: gql (0.2.0) depends on six (>=1.10.0)
INFO: derived: not gql (0.2.0)
INFO: discovering gql==0.1.0
INFO: fact: gql (0.1.0) depends on graphql-core (>=0.5.0)
INFO: fact: gql (0.1.0) depends on promise (>=0.4.0)
INFO: fact: gql (0.1.0) depends on six (>=1.10.0)
INFO: selecting gql (0.1.0)
INFO: derived: six (>=1.10.0)
INFO: derived: promise (>=0.4.0)
INFO: discovering six>=1.10.0
INFO: discovering promise>=0.4.0
INFO: selecting six (1.16.0)
INFO: fact: promise (2.3) depends on six (*)
INFO: selecting promise (2.3)
INFO: Version solving took 30.438 seconds.
INFO: Tried 1 solutions.
gql (0.1.0)
├── graphql-core>=0.5.0 (3.1.7)
├── promise>=0.4.0 (2.3)
│   └── six (1.16.0)
└── six>=1.10.0 (1.16.0)
graphene==3.0.0 (3.0)
├── aniso8601<10,>=8 (9.0.1)
├── graphql-core~=3.1.2 (3.1.7)
└── graphql-relay<4,>=3.0 (3.1.5)
    └── graphql-core<3.2,>=3.1 (3.1.7)

Workaround for now: fall back to graphene==3.0 and gql==3.0.0rc0

version tree

$ pipgrip --tree -vv --pre 'graphene>2' 'gql>2'
...
$ pipgrip --tree -vv 'graphene>2' 'gql==3.0.0rc0'
INFO: discovering graphene>2
INFO: discovering gql==3.0.0rc0
INFO: fact: _root_ is root
INFO: derived: root
INFO: fact: root depends on graphene (>2)
INFO: fact: root depends on gql (==3.0.0rc0)
INFO: selecting _root_ (0.0.0)
INFO: derived: gql (==3.0.0rc0)
INFO: derived: graphene (>2)
INFO: fact: gql (3.0.0rc0) depends on graphql-core (>=3.1.5,<3.2)
INFO: fact: gql (3.0.0rc0) depends on yarl (>=1.6,<2.0)
INFO: selecting gql (3.0.0rc0)
INFO: derived: yarl (>=1.6,<2.0)
INFO: derived: graphql-core (>=3.1.5,<3.2)
INFO: discovering yarl<2.0,>=1.6
INFO: discovering graphql-core<3.2,>=3.1.5
INFO: selecting graphql-core (3.1.7)
INFO: fact: yarl (1.7.2) depends on idna (>=2.0)
INFO: fact: yarl (1.7.2) depends on multidict (>=4.0)
INFO: selecting yarl (1.7.2)
INFO: derived: multidict (>=4.0)
INFO: derived: idna (>=2.0)
INFO: discovering multidict>=4.0
INFO: discovering idna>=2.0
INFO: fact: graphene (3.0) depends on aniso8601 (>=8,<10)
INFO: fact: graphene (3.0) depends on graphql-core (~=3.1.2)
INFO: fact: graphene (3.0) depends on graphql-relay (>=3.0,<4)
INFO: selecting graphene (3.0)
INFO: derived: graphql-relay (>=3.0,<4)
INFO: derived: aniso8601 (>=8,<10)
INFO: discovering graphql-relay<4,>=3.0
INFO: discovering aniso8601<10,>=8
INFO: selecting aniso8601 (9.0.1)
INFO: fact: graphql-relay (3.1.5) depends on graphql-core (>=3.1,<3.2)
INFO: selecting graphql-relay (3.1.5)
INFO: selecting idna (3.3)
INFO: selecting multidict (6.0.2)
INFO: Version solving took 21.993 seconds.
INFO: Tried 1 solutions.
graphene>2 (3.0)
├── aniso8601<10,>=8 (9.0.1)
├── graphql-core~=3.1.2 (3.1.7)
└── graphql-relay<4,>=3.0 (3.1.5)
    └── graphql-core<3.2,>=3.1 (3.1.7)
gql==3.0.0rc0 (3.0.0rc0)
├── graphql-core<3.2,>=3.1.5 (3.1.7)
└── yarl<2.0,>=1.6 (1.7.2)
    ├── idna>=2.0 (3.3)
    └── multidict>=4.0 (6.0.2)

Is there anything else needed here for 3.2 support? ref b6c8931

@ddelange ddelange changed the title Update graphene test for graphql 3.2.0 Add support for graphql-core 3.2.0 Apr 4, 2022
@ddelange
Copy link
Author

ddelange commented Apr 4, 2022

Closing as duplicate of #1378

@ddelange ddelange closed this Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant