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

feat: support django >= 2.2.17 < 3 #21

Closed
wants to merge 9 commits into from

Conversation

thibaut-lo
Copy link
Collaborator

@thibaut-lo thibaut-lo commented Dec 20, 2022

Main change

Add support to django 2.2

Loft Internal: pre-requisite for migration of django 2 services to graphene v3

Other changes

I had to batch replace py.test by pytest for make tests to pass locally. :

  • Main reason is

those libraries (here: Graphene-django) use the py library but they do not explicitly have py listed in their dependencies, relying on the fact that pytest itself depended on py until 7.2. This is not a good practice, as libraries should explicitly list all the dependencies that they use directly, and not rely on transitive dependencies from other packages.

There are two possible fixes to be done on those libraries:

  • This has also been applied in the main graphene-django repo last month. Ref: graphene-django commit: graphql-python@86c5309

@thibaut-lo thibaut-lo changed the base branch from main to loft-main December 20, 2022 10:36
@thibaut-lo thibaut-lo self-assigned this Dec 20, 2022
setup.py Outdated
@@ -10,7 +10,7 @@
ast.literal_eval(_version_re.search(f.read().decode("utf-8")).group(1))
)

rest_framework_require = ["djangorestframework>=3.6.3"]
rest_framework_require = ["djangorestframework == 3.13.1"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi - only version supporting both 2.2 and 4,x

@@ -20,7 +20,7 @@
"coveralls",
"mock",
"pytz",
"django-filter>=22.1",
"django-filter>=2.3.0",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi - support from 2.2 to 4 django

@thibaut-lo thibaut-lo changed the title Feat/support django 2 feat: support django >= 2.2.17 < 3 Dec 20, 2022
@@ -26,6 +28,7 @@ setenv =
deps =
-e.[test]
psycopg2-binary
django22: Django>=2.2.17,<3.0
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi - doesn't support python 3.9 below 2.2.17 and both GSC and SO are above that one.

@thibaut-lo
Copy link
Collaborator Author

I wasn't successful in debugging that failed test. It was passing before without much change to the branch.

@thibaut-lo
Copy link
Collaborator Author

On hold because the end use case in my organization (upgrade of a micro-service to graphene v3) with django 2 is on hold.

@superlevure superlevure closed this Sep 6, 2023
@tcleonard tcleonard deleted the feat/support-django-2 branch January 30, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants