[Django] #35315: 5.0.3: pytest fails with tons of ImportErrors

4 views
Skip to first unread message

Django

unread,
Mar 18, 2024, 10:39:12 AM3/18/24
to django-...@googlegroups.com
#35315: 5.0.3: pytest fails with tons of ImportErrors
------------------------------------------+------------------------
Reporter: Tomasz Kłoczko | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 5.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------+------------------------
On testing I'm using python 3.9.18 and pytest 8.1.1.
Looks like on scanning units pytest fails +500 errors like below

{{{
==================================== ERRORS
====================================
________ ERROR collecting tests/admin_changelist/test_date_hierarchy.py
________
ImportError while importing test module
'/home/tkloczko/rpmbuild/BUILD/django-5.0.3/tests/admin_changelist/test_date_hierarchy.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/admin_changelist/test_date_hierarchy.py:3: in <module>
from django.contrib.admin.options import IncorrectLookupParameters
../../BUILDROOT/python-django-5.0.3-4.fc36.x86_64/usr/lib/python3.9/site-
packages/django/contrib/admin/__init__.py:2: in <module>
from django.contrib.admin.filters import (
../../BUILDROOT/python-django-5.0.3-4.fc36.x86_64/usr/lib/python3.9/site-
packages/django/contrib/admin/filters.py:12: in <module>
from django.contrib.admin.options import IncorrectLookupParameters
../../BUILDROOT/python-django-5.0.3-4.fc36.x86_64/usr/lib/python3.9/site-
packages/django/contrib/admin/options.py:10: in <module>
from django import forms
../../BUILDROOT/python-django-5.0.3-4.fc36.x86_64/usr/lib/python3.9/site-
packages/django/forms/__init__.py:6: in <module>
from django.forms.boundfield import * # NOQA
../../BUILDROOT/python-django-5.0.3-4.fc36.x86_64/usr/lib/python3.9/site-
packages/django/forms/boundfield.py:4: in <module>
from django.forms.utils import RenderableFieldMixin, pretty_name
../../BUILDROOT/python-django-5.0.3-4.fc36.x86_64/usr/lib/python3.9/site-
packages/django/forms/utils.py:6: in <module>
from django.forms.renderers import get_default_renderer
../../BUILDROOT/python-django-5.0.3-4.fc36.x86_64/usr/lib/python3.9/site-
packages/django/forms/renderers.py:6: in <module>
from django.template.backends.django import DjangoTemplates
../../BUILDROOT/python-django-5.0.3-4.fc36.x86_64/usr/lib/python3.9/site-
packages/django/template/__init__.py:44: in <module>
from .engine import Engine
../../BUILDROOT/python-django-5.0.3-4.fc36.x86_64/usr/lib/python3.9/site-
packages/django/template/engine.py:7: in <module>
from .base import Template
../../BUILDROOT/python-django-5.0.3-4.fc36.x86_64/usr/lib/python3.9/site-
packages/django/template/base.py:60: in <module>
from django.utils.html import conditional_escape, escape
../../BUILDROOT/python-django-5.0.3-4.fc36.x86_64/usr/lib/python3.9/site-
packages/django/utils/html.py:11: in <module>
from django.utils.encoding import punycode
../../BUILDROOT/python-django-5.0.3-4.fc36.x86_64/usr/lib/python3.9/site-
packages/django/utils/encoding.py:5: in <module>
from types import NoneType
E ImportError: cannot import name 'NoneType' from 'types'
(/usr/lib64/python3.9/types.py)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35315>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Mar 18, 2024, 10:45:26 AM3/18/24
to django-...@googlegroups.com
#35315: 5.0.3: pytest fails with tons of ImportErrors
--------------------------------+--------------------------------------
Reporter: Tomasz Kłoczko | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 5.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Changes (by Tomasz Kłoczko):

* Attachment "python-django.FAIL.txt.gz" added.

Full pytest log

Django

unread,
Mar 18, 2024, 10:53:40 AM3/18/24
to django-...@googlegroups.com
#35315: 5.0.3: pytest fails with tons of ImportErrors
--------------------------------+--------------------------------------
Reporter: Tomasz Kłoczko | Owner: nobody
Type: Bug | Status: closed
Component: Uncategorized | Version: 5.0
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Changes (by Jacob Walls):

* resolution: => invalid
* status: new => closed

Comment:

Django 5.0 [https://docs.djangoproject.com/en/5.0/releases/5.0/ does not
support python 3.9].
--
Ticket URL: <https://code.djangoproject.com/ticket/35315#comment:1>
Reply all
Reply to author
Forward
0 new messages