Skip to content

django-polymorphic now does support Django>3.0 #803

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

Closed
n2ygk opened this issue Aug 7, 2020 · 5 comments · Fixed by #808
Closed

django-polymorphic now does support Django>3.0 #803

n2ygk opened this issue Aug 7, 2020 · 5 comments · Fixed by #808
Assignees
Milestone

Comments

@n2ygk
Copy link
Contributor

n2ygk commented Aug 7, 2020

I don't use polymorphic but noticed that the docs build was failing with this traceback:

Traceback (most recent call last):
  File "/Users/alan/src/kezy182/.tox/docs/lib/python3.6/site-packages/sphinx/config.py", line 319, in eval_config_file
    execfile_(filename, namespace)
  File "/Users/alan/src/kezy182/.tox/docs/lib/python3.6/site-packages/sphinx/util/pycompat.py", line 88, in execfile_
    exec(code, _globals)
  File "/Users/alan/src/kezy182/docs/conf.py", line 31, in <module>
    django.setup()
  File "/Users/alan/src/kezy182/.tox/docs/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/Users/alan/src/kezy182/.tox/docs/lib/python3.6/site-packages/django/apps/registry.py", line 114, in populate
    app_config.import_models()
  File "/Users/alan/src/kezy182/.tox/docs/lib/python3.6/site-packages/django/apps/config.py", line 211, in import_models
    self.models_module = import_module(models_module_name)
  File "/Users/ac45/.pyenv/versions/3.6.10/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/alan/src/kezy182/.tox/docs/lib/python3.6/site-packages/polymorphic/models.py", line 17, in <module>
    from .base import PolymorphicModelBase
  File "/Users/alan/src/kezy182/.tox/docs/lib/python3.6/site-packages/polymorphic/base.py", line 18, in <module>
    from .managers import PolymorphicManager
  File "/Users/alan/src/kezy182/.tox/docs/lib/python3.6/site-packages/polymorphic/managers.py", line 10, in <module>
    from polymorphic.query import PolymorphicQuerySet
  File "/Users/alan/src/kezy182/.tox/docs/lib/python3.6/site-packages/polymorphic/query.py", line 11, in <module>
    from django.db.models import FieldDoesNotExist
ImportError: cannot import name 'FieldDoesNotExist'

I worked around this by forcing Django>=2.2,<3.0 to get the docs built. PR coming shortly.

@n2ygk
Copy link
Contributor Author

n2ygk commented Sep 18, 2020

Django Polymorphhic 3.0 now supports Django 3.0 but drops 1.11.

Looks like it's time to drop 1.11....

@sliverc
Copy link
Member

sliverc commented Sep 18, 2020

Dropping support for Django 1.11 is certainly good as it is end of life.

However dropping of Django 1.11 support would mean another major release as it drops backwards compatibility. That's totally fine but I would like to combine it with adding support for DRF 3.12 as well. Hope this is coming out soon but I guess we won't release before it is not released.

@n2ygk n2ygk added this to the 3.3.0 milestone Sep 18, 2020
@n2ygk
Copy link
Contributor Author

n2ygk commented Sep 18, 2020

@sliverc yep. I took the opportunity to create a 3.3.0 milestone.

@sliverc
Copy link
Member

sliverc commented Sep 18, 2020

we are following semver (unlike DRF) so it should be version 4.0.0.

@n2ygk n2ygk added enhancement and removed bug labels Sep 18, 2020
@n2ygk n2ygk changed the title django-polymorphic appears to not support Django>3.0 django-polymorphic now does support Django>3.0 Sep 18, 2020
@sliverc
Copy link
Member

sliverc commented Sep 23, 2020

As of changes made in #828 and #831 this issue is also resolved.

@sliverc sliverc closed this as completed Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment