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

Add Django 4.0 support, drop official Django 3.1 support #236

Merged
merged 2 commits into from Jan 3, 2022
Merged

Conversation

amureki
Copy link
Collaborator

@amureki amureki commented Sep 28, 2021

Official Django 3.1 support stopped a couple of weeks ago.
I think, it is time to drop it from test matrix.
Having 2.2 and 3.2 LTS releases implies that 3.1 would work fine.
I also dropped main Django branch from test matrix as I don't see much value for us here at this moment.

@amureki amureki self-assigned this Sep 28, 2021
@amureki
Copy link
Collaborator Author

amureki commented Sep 29, 2021

There is an issue with multidatabase tests:

 _ ERROR at setup of TestBakerAllowsSaveParameters.test_allow_user_to_specify_database_via_save_kwargs_for_retro_compatibility _
  .tox/py38-django40-postgresql/lib/python3.8/site-packages/django/test/testcases.py:1208: in setUpClass
      cls.cls_atomics = cls._enter_atomics()
  .tox/py38-django40-postgresql/lib/python3.8/site-packages/django/test/testcases.py:1185: in _enter_atomics
      atomics[db_name].__enter__()
  .tox/py38-django40-postgresql/lib/python3.8/site-packages/django/db/transaction.py:189: in __enter__
      if not connection.get_autocommit():
  .tox/py38-django40-postgresql/lib/python3.8/site-packages/django/db/backends/base/base.py:400: in get_autocommit
      self.ensure_connection()
  .tox/py38-django40-postgresql/lib/python3.8/site-packages/django/utils/asyncio.py:25: in inner
      return func(*args, **kwargs)
  .tox/py38-django40-postgresql/lib/python3.8/site-packages/django/db/backends/base/base.py:230: in ensure_connection
      self.connect()
  .tox/py38-django40-postgresql/lib/python3.8/site-packages/django/test/testcases.py:150: in __call__
      raise AssertionError(self.message)
  E   AssertionError: Database connections to 'extra' are not allowed in this test. Add 'extra' to pytest_django.fixtures._django_db_fixture_helper.<locals>.PytestDjangoTestCase.databases to ensure proper test isolation and silence this failure.

Related issues:

@berinhard
Copy link
Member

Thanks for setting this up @amureki. Once Django 4.0 is ready, we'll be able to fix this, merge and release a new version.

@amureki
Copy link
Collaborator Author

amureki commented Oct 6, 2021

@berinhard I am not sure that final Django release will solve this issue. The problem is in multi-db setup here and our mix of pytest (which has not 100% support of such thing yet) and usual Django test suite. I need a bit more dedication to attempt to solve it.

But any help appreciated. :)

@berinhard
Copy link
Member

Got it @amureki! I'll try to investigate this issue before django 4.0 release, if possible

tests/generic/models.py Outdated Show resolved Hide resolved
@berinhard
Copy link
Member

Hey @amureki the fixes on CI also solved the issue we're having with this PR. Now it's actually failing due to the tests on django 4.0 =)

@amureki amureki force-pushed the django40 branch 2 times, most recently from 2a91b29 to eb64f61 Compare December 13, 2021 20:21
@amureki amureki changed the title Add Django 4.0 support Add Django 4.0 support, drop official Django 3.1 support Dec 13, 2021
https://docs.djangoproject.com/en/4.0/releases/4.0/

Official Django 3.1 support stopped a couple of weeks ago.
I think, it is time to drop it from test matrix.
Having 2.2 and 3.2 LTS releases implies that 3.1 would work fine.
I also dropped main Django branch from test matrix as I don't see much value for us here at this moment.
@amureki amureki marked this pull request as ready for review December 13, 2021 20:33
@amureki
Copy link
Collaborator Author

amureki commented Dec 13, 2021

@berinhard it is finally green. 🤩

requirements.txt Outdated Show resolved Hide resolved
@amureki amureki merged commit 0c00715 into main Jan 3, 2022
@amureki amureki deleted the django40 branch January 3, 2022 08:14
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.

None yet

3 participants