Upgrade django-debug-toolbar to 3.3.0+ #6524

Closed
opened 2025-12-29 19:41:58 +01:00 by adam · 2 comments
Owner

Originally created by @jeremystretch on GitHub (May 31, 2022).

Originally assigned to: @jeremystretch on GitHub.

Proposed Changes

Upgrade django-debug-toolbar to the most recent stable release. I've held back on this because upgrading to v3.3.0 or later results in very noisy test output, and I'm not sure why. Need to dig into this some.

Justification

Keeps the dependency current

Originally created by @jeremystretch on GitHub (May 31, 2022). Originally assigned to: @jeremystretch on GitHub. ### Proposed Changes Upgrade `django-debug-toolbar` to the most recent stable release. I've held back on this because upgrading to v3.3.0 or later results in very noisy test output, and I'm not sure why. Need to dig into this some. ### Justification Keeps the dependency current
adam added the status: acceptedtype: housekeeping labels 2025-12-29 19:41:58 +01:00
adam closed this issue 2025-12-29 19:41:58 +01:00
Author
Owner

@kkthxbye-code commented on GitHub (Jun 1, 2022):

The change responsible:

https://github.com/jazzband/django-debug-toolbar/pull/1603/files#diff-e3e1201763719bc0636597a8ff2b6bf5c2bac11431ea8b59929bf885a2737357R48-R65

When there's no logging handler set, django-debug-toolbar adds one.

Adding something like this:

LOGGING = {
    'version': 1,
    'disable_existing_loggers': True
}

Or this:

LOGGING = {
    'version': 1,
    'disable_existing_loggers': True,
    'handlers': {
        'console': {
            'class': 'logging.StreamHandler',
        },
    },
    'loggers': {
        'django': {
            'handlers': ['console'],
            'level': 'DEBUG',
        },
    },
}

To the logging config prevents the log spam. Not sure if we want any logging in the tests.

We could also just not load django-debug-toolbar when testing, not sure if its useful to load it.

@kkthxbye-code commented on GitHub (Jun 1, 2022): The change responsible: https://github.com/jazzband/django-debug-toolbar/pull/1603/files#diff-e3e1201763719bc0636597a8ff2b6bf5c2bac11431ea8b59929bf885a2737357R48-R65 When there's no logging handler set, django-debug-toolbar adds one. Adding something like this: ``` LOGGING = { 'version': 1, 'disable_existing_loggers': True } ``` Or this: ``` LOGGING = { 'version': 1, 'disable_existing_loggers': True, 'handlers': { 'console': { 'class': 'logging.StreamHandler', }, }, 'loggers': { 'django': { 'handlers': ['console'], 'level': 'DEBUG', }, }, } ``` To the logging config prevents the log spam. Not sure if we want any logging in the tests. We could also just not load django-debug-toolbar when testing, not sure if its useful to load it.
Author
Owner

@jeremystretch commented on GitHub (Jun 1, 2022):

When there's no logging handler set, django-debug-toolbar adds one.

Thanks @kkthxbye-code! This was starting to bug me.

@jeremystretch commented on GitHub (Jun 1, 2022): > When there's no logging handler set, django-debug-toolbar adds one. Thanks @kkthxbye-code! This was starting to bug me.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6524