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

Test failure with recent requirements #733

Open
fabaff opened this issue Nov 5, 2023 · 1 comment
Open

Test failure with recent requirements #733

fabaff opened this issue Nov 5, 2023 · 1 comment

Comments

@fabaff
Copy link

fabaff commented Nov 5, 2023

============================= test session starts ==============================
platform linux -- Python 3.11.5, pytest-7.4.2, pluggy-1.2.0
django: settings: django_q.tests.settings (from ini)
rootdir: /build/source
configfile: pytest.ini
plugins: django-4.5.2, mock-3.11.1
collected 44 items / 2 deselected / 42 selected                                

django_q/tests/test_admin.py .                                           [  2%]
django_q/tests/test_brokers.py .                                         [  4%]
django_q/tests/test_cached.py EEEE                                       [ 14%]
django_q/tests/test_cluster.py EEEFEEEEEEEEEEEEEE.                       [ 59%]
django_q/tests/test_commands.py FFFF                                     [ 69%]
django_q/tests/test_monitor.py FF                                        [ 73%]
django_q/tests/test_scheduler.py E...                                    [ 83%]
django_q/tests/test_brokers.py F.Fs                                      [ 92%]
django_q/tests/test_cluster.py E                                         [ 95%]
django_q/tests/test_scheduler.py ..                                      [100%]

==================================== ERRORS ====================================
________________________ ERROR at setup of test_cached _________________________

dotted_path = 'redis.connection.HiredisParser'

    def import_string(dotted_path):
        """
        Import a dotted module path and return the attribute/class designated by the
        last name in the path. Raise ImportError if the import failed.
        """
        try:
            module_path, class_name = dotted_path.rsplit(".", 1)
        except ValueError as err:
            raise ImportError("%s doesn't look like a module path" % dotted_path) from err
    
        try:
>           return cached_import(module_path, class_name)

/nix/store/1np01pzgh345r4j350fxp53gb4im07zx-python3.11-Django-4.2.6/lib/python3.11/site-packages/django/utils/module_loading.py:30: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

module_path = 'redis.connection', class_name = 'HiredisParser'

    def cached_import(module_path, class_name):
        # Check whether module is loaded and fully initialized.
        if not (
            (module := sys.modules.get(module_path))
            and (spec := getattr(module, "__spec__", None))
            and getattr(spec, "_initializing", False) is False
        ):
            module = import_module(module_path)
>       return getattr(module, class_name)
E       AttributeError: module 'redis.connection' has no attribute 'HiredisParser'
[...]
@GDay
Copy link
Collaborator

GDay commented Nov 6, 2023

This repo is not maintained anymore and that's why you are likely getting that error. You can use the django-q2 version instead which has up to date requirements. https://github.com/django-q2/django-q2

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

No branches or pull requests

2 participants