-
Notifications
You must be signed in to change notification settings - Fork 102
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
Django 5.0 support #232
Comments
#233 should fix this. |
I think django 5.0.x is supported now? Maybe this can be closed? |
I have a remaining problem related to Django 5.0 for tests only when I use Here is the stack trace: test setup failed
request = <SubRequest 'django_db_setup' for <Function test_retrieve_action[Database1]>>
django_test_environment = None
django_db_blocker = <pytest_django.plugin.DjangoDbBlocker object at 0x7f80117aecf0>
django_db_use_migrations = False, django_db_keepdb = True
django_db_createdb = True, django_db_modify_db_settings = None
@pytest.fixture(scope="session")
def django_db_setup(
request: pytest.FixtureRequest,
django_test_environment: None,
django_db_blocker: DjangoDbBlocker,
django_db_use_migrations: bool,
django_db_keepdb: bool,
django_db_createdb: bool,
django_db_modify_db_settings: None,
) -> Generator[None, None, None]:
"""Top level fixture to ensure test databases are available"""
from django.test.utils import setup_databases, teardown_databases
setup_databases_args = {}
if not django_db_use_migrations:
_disable_migrations()
if django_db_keepdb and not django_db_createdb:
setup_databases_args["keepdb"] = True
with django_db_blocker.unblock():
> db_cfg = setup_databases(
verbosity=request.config.option.verbose,
interactive=False,
**setup_databases_args,
)
../../.pyenv/versions/myenv/lib/python3.12/site-packages/pytest_django/fixtures.py:139:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../.pyenv/versions/myenv/lib/python3.12/site-packages/django/test/utils.py:203: in setup_databases
connection.creation.create_test_db(
../../.pyenv/versions/myenv/lib/python3.12/site-packages/django/db/backends/base/creation.py:62: in create_test_db
self._create_test_db(verbosity, autoclobber, keepdb)
../../.pyenv/versions/myenv/lib/python3.12/site-packages/django/db/backends/base/creation.py:199: in _create_test_db
with self._nodb_cursor() as cursor:
../../.pyenv/versions/3.12.1/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
../../.pyenv/versions/myenv/lib/python3.12/site-packages/django/db/backends/postgresql/base.py:402: in _nodb_cursor
with super()._nodb_cursor() as cursor:
../../.pyenv/versions/3.12.1/lib/python3.12/contextlib.py:137: in __enter__
return next(self.gen)
../../.pyenv/versions/myenv/lib/python3.12/site-packages/django/db/backends/base/base.py:706: in _nodb_cursor
conn = self.__class__({**self.settings_dict, "NAME": None}, alias=NO_DB_ALIAS)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <DatabaseWrapper vendor='postgresql' alias='__no_db__'>
args = ({'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_HEALTH_CHECKS': False, 'CONN_MAX_AGE': 0, ...},)
kwargs = {'alias': '__no_db__'}
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# Some base back-ends such as the PostGIS back-end don't properly
# set `ops_class` and `introspection_class` and initialize these
# classes themselves.
#
# This can lead to broken functionality. We fix this automatically.
if not isinstance(self.introspection, self.introspection_class):
self.introspection = self.introspection_class(self)
if not isinstance(self.ops, self.ops_class):
self.ops = self.ops_class(self)
> for expected_compiler_class in self.ops.compiler_classes:
E AttributeError: 'DatabaseOperations' object has no attribute 'compiler_classes' |
When are we planning this release? This is blocking our efforts to migrate to Django 5. |
Guys, it has been almost 3 weeks without update on this. Is there a plan or at least some timeline would help us plan things better. |
Hello, is it supported now? |
😢 😞 |
To temporarily solve the problem I have above, I simply add from django.db.backends.postgresql.operations import DatabaseOperations
DatabaseOperations.compiler_classes = [] to my The current RC release of postgres-extra works fine outside tests (disclaimer: I do not use all the features of the library). |
When will the new release with the 5.0 support come? |
Almost 6 months since this issue was open :( |
@Photonios is there anything that should be fixed for having a release with django 5.0 support? UPD: Also it seems to me that the upper limit could be removed altogether. That way the project will probably be more likely to receive patches from the community with compatibility fixes. |
Almost a year, are we going to support Django 5? |
@sandeepbol consider submitting fixes or fork it. Many of the features here are IMO not very important with current Django. I only use partitioning. If someone wants to collaborate on a partitioning-only fork, let me know. It would be easier to maintain a smaller feature set. I use it like this for now. |
I only use it for partitioning these days as well. But aside from initial table creation managing the partitions manually (cronjob) isn't that big of a deal. It'd be nice to have a properly supported package for it, though, but I do not personally have time to commit to that. |
Hello, Django 5.0 is released. Is there anything you need help on to support it? Currently this package is marked as Django<5.0.
The text was updated successfully, but these errors were encountered: