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

Support sqlalchemy1.4 #1

Closed
wants to merge 34 commits into from
Closed

Support sqlalchemy1.4 #1

wants to merge 34 commits into from

Conversation

colelin26
Copy link
Owner

@colelin26 colelin26 commented Sep 11, 2021

This PR builds on the previous work graphql-python#317 and supports sqlalchemy 1.4.

  • Supports for Batching:
    • When sqlalchemy version is 1.4, use Query._compile_context to create the QueryContext.
    • When sqlalchemy version is 1.4, use _load_for_path with the new signature
    • Change how echoed messages are compared in the batching test cases. When sqlalchemy version is 1.4, remove the [generated in *s] from the echoed query message, and compare the sorted values in the IN clause instead of comparing all the echoed query.
  • types.Binary cannot be imported intest_should_unknown_sqlalchemy_field_raise_exception
    • Used another type types.BINARY to raise the exception in the test. This type is available in all sqlalchemy versions

Ran test cases in #2 and passed all test cases

@colelin26 colelin26 mentioned this pull request Sep 11, 2021
@colelin26 colelin26 force-pushed the support_sqlalchemy1.4 branch 2 times, most recently from 522abeb to e34a1f8 Compare September 15, 2021 15:49
@colelin26 colelin26 changed the title Attempted to support sqlalchemy1.4 Support sqlalchemy1.4 Sep 15, 2021
mvanlonden and others added 26 commits September 15, 2021 23:36
* move from travis to github actions

* add flake8 to tox

* add flake8 as env in tox

* add flake8 to setup

* remove sqlalchemy 1.1 in tests

* fix flake8 exclude

* move coveralls to github action

* fix coverall github action config

* move coveralls to tox

* move coveralls dep to test list

* add coverage command

* move coveralls back into github action

* modify coverage output
The same has been done in graphene.
Python 3 bundles mock in stdlib.
Allow for some flexibility on version numbers.
As we're targeting Python >= 3.6, this module should always be in
stdlib.
SQLAlchemy 1.4+ does not export Binary directly. We should decide
whether to keep this test, update for another unknown type, or remove it
altogether.
ChoiceType no longer relies on EnumMeta but instead it exposes a
``type_impl`` field that we can leverage to decide whether the internal
``choices`` is a tuple of enum members or a tuple of tuples (pairs)
@colelin26
Copy link
Owner Author

colelin26 commented Sep 21, 2021

@colelin26 colelin26 closed this Sep 21, 2021
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.

5 participants