-
Notifications
You must be signed in to change notification settings - Fork 75
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 SqlAlchemy 1.4 and Python 3.9 #81
Support SqlAlchemy 1.4 and Python 3.9 #81
Conversation
…tatables usecase)
and add sqlalchemy 1.4
setup.py
Outdated
# for sqlalchemy1.4 >= 0.37 is required | ||
'sqlalchemy-utils>=0.36.3', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
>= 3.7
!= >-0.36.3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was intended. py27 wasn't compatible with 0.36.3
, so that customisation was done in tox.ini
. Anyway, I've removed py27 support now.
sqlalchemy_filters/models.py
Outdated
models.extend(mapper.class_ for mapper in query._join_entities) | ||
|
||
# account joined entities | ||
if sqlalchemy_version_lt('1.4'): # pragma: nocover |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be worth using this https://github.com/wemake-services/coverage-conditional-plugin instead of just pragma: nocover
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR builds on the good work in #69 and expands Github Actions for new versions.
Changes:
pragma: nocover
labels, this is because any one test run with particular versions isn't comprehensive, but overall, all branches are coveredFurther changes after review:
coverage-conditional-plugin
(requires Python>3.7) to ensure we have overall 100% coveragepython_requires='>=3.7'
which means this release is still backwards compatible, as old Pythons can't install it by mistake