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

Breaking change in graphql-core #51

Closed
NathanDeMaria opened this issue Dec 2, 2019 · 7 comments
Closed

Breaking change in graphql-core #51

NathanDeMaria opened this issue Dec 2, 2019 · 7 comments
Assignees

Comments

@NathanDeMaria
Copy link

There's some backward-compatibility breaks in graphql-core==3.0.0, that lead to the following import error:

from gql import Client
ImportError                               Traceback (most recent call last)
<ipython-input-1-2d34726b19bf> in <module>
----> 1 from gql import Client

~\AppData\Local\Continuum\miniconda3\lib\site-packages\gql\__init__.py in <module>
      1 from .gql import gql
----> 2 from .client import Client
      3
      4 __all__ = ['gql', 'Client']

~\AppData\Local\Continuum\miniconda3\lib\site-packages\gql\client.py in <module>
      1 import logging
      2
----> 3 from graphql import parse, introspection_query, build_ast_schema, build_client_schema
      4 from graphql.validation import validate
      5

ImportError: cannot import name 'introspection_query' from 'graphql' (C:\Users\nathan.demaria\AppData\Local\Continuum\miniconda3\lib\site-packages\graphql\__init__.py)

AFAIK the solution here is add a ceiling graphql-core<3.0.0 to the install_requires of this package, but I'm curious if somebody familiar with the plan for packages in this repo has better options/longer term recommendations - I see repos for graphql-core-next and gql-next, and it looks like the graphql-core package is now published to PyPI from the -next repo, but gql is still from this repo.

@Cito
Copy link
Member

Cito commented Dec 2, 2019

Actually, graphql-core 3.0.0 should be compatible to GraphQL.js 14 and still have introspection_query (see graphql-python/graphql-core#69), since it was only removed in GraphQL.js 15. I will fix that in 3.0.1.

This particular issue could be also fixed by using get_introspection_query instead of introspection_query, but there may be other compatibility problems with graphql-core >= 3 or maybe also with graphql-core >= 2, since the last version of gql was based on a very old version of graphql-core.

We should limit the graphql-core version in the requirements in setup.py accordingly, as you suggest and create a new release with that restriction.

That release should get a version number like 1.0 or 2.0. Then a new version compatible with graphql-core 3 should be released as 3.0.

@Cito
Copy link
Member

Cito commented Dec 2, 2019

This is actually #47. The problem is that currently nobody feels responsible for gql. We need more volunteers as maintainers to keep the various graphql-python projects alive.

artofhuman added a commit to artofhuman/gql that referenced this issue Dec 3, 2019
- freeze graphql-core version <2
- stub request in tests
- fix flake8 issues

Ref: graphql-python#51
Ref: graphql-python#47
artofhuman added a commit to artofhuman/gql that referenced this issue Dec 3, 2019
- freeze graphql-core version <2
- stub request in tests
- fix flake8 issues

Ref: graphql-python#51
Ref: graphql-python#47
@artofhuman artofhuman mentioned this issue Dec 3, 2019
@Cito
Copy link
Member

Cito commented Dec 5, 2019

This is now fixed, but we need to push a patch release to PyPI. For this to happen, @syrusakbary needs to give somebody maintainer rights on PyPI.

@Cito Cito assigned Cito, syrusakbary and mvanlonden and unassigned Cito Dec 5, 2019
matthewborden pushed a commit to seermedical/seer-py that referenced this issue Dec 6, 2019
GQL the GraphQL Implementation used within seer-py, was broken by an upgrade to the graphql-core package. This broken the interface of gql that seerpy depends on. Unfortunately `gql` is no longer mainted actively and the most active maintainer doesn't have permission to publish to PyPI, thus why this depends on the `gql` github project itself, which was fixed in graphql-python/gql#52.

graphql-python/gql#51
@Cito
Copy link
Member

Cito commented Dec 6, 2019

As a side note, graphql-core 3.0.1 is now compatible with graphql-js 14.5.8 again.

@dineshsriram
Copy link

Thanks @Cito!

@syrusakbary Can you help push out the patch release to PyPI?

@JonasVautherin
Copy link

Is it planned to deploy a new release with this fix?

@Cito
Copy link
Member

Cito commented Dec 29, 2019

Version 0.2.0 with this fix has now been released on PyPI.

@Cito Cito closed this as completed Dec 29, 2019
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

No branches or pull requests

6 participants