#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.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018e5200803a-a3c9f6fd-74d2-44aa-a683-448b32ebaad5-000000%40eu-central-1.amazonses.com.

Reply via email to