Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.

Bug 1287269

Summary: Add python-sqlparse as a package requirement
Product: [Fedora] Fedora Reporter: fedora.dm0
Component: python-django-debug-toolbarAssignee: Matthias Runge <mrunge>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: bkabrda, mrunge
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-10 03:07:55 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description fedora.dm0 2015-12-01 15:57:26 EST
Description of problem:
This module fails with a traceback when sqlparse is not installed.  Add "Requires: python-sqlparse" to the spec file.  (It is currently only a BuildRequires.)

Version-Release number of selected component (if applicable):
1.3.0-2 (current HEAD)

How reproducible:
Always

Steps to Reproduce:
1. Install python-django-debug-toolbar
2. Remove python-sqlparse, if it's installed already
3. Put 'debug_toolbar.middleware.DebugToolbarMiddleware' in your MIDDLEWARE_CLASSES
4. Attempt to view your Django website

Alternatively:
1. PYTHONPATH=/path/to/your/django/project DJANGO_SETTINGS_MODULE=app.settings python -m debug_toolbar.middleware

Actual results:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.7/site-packages/debug_toolbar/middleware.py", line 14, in <module>
    from debug_toolbar.toolbar import DebugToolbar
  File "/usr/lib/python2.7/site-packages/debug_toolbar/toolbar.py", line 160, in <module>
    urlpatterns = DebugToolbar.get_urls()
  File "/usr/lib/python2.7/site-packages/debug_toolbar/toolbar.py", line 154, in get_urls
    for panel_class in cls.get_panel_classes():
  File "/usr/lib/python2.7/site-packages/debug_toolbar/toolbar.py", line 131, in get_panel_classes
    (panel_module, e))
django.core.exceptions.ImproperlyConfigured: Error importing debug panel debug_toolbar.panels.sql: "No module named sqlparse"

Expected results:
It should run without tracebacks.

Additional info:
If you directly install the debug_toolbar module with setuptools, it installs sqlparse as a requirement.
Comment 1 Matthias Runge 2015-12-10 03:07:55 EST
fixed and pushed to rawhide. thanks for the heads-up here.