Bug 1287269 - Add python-sqlparse as a package requirement
Summary: Add python-sqlparse as a package requirement
Alias: None
Product: Fedora
Classification: Fedora
Component: python-django-debug-toolbar   
(Show other bugs)
Version: rawhide
Hardware: All
OS: All
Target Milestone: ---
Assignee: Matthias Runge
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2015-12-01 20:57 UTC by fedora.dm0
Modified: 2015-12-10 08:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-12-10 08:07:55 UTC
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description fedora.dm0 2015-12-01 20:57:26 UTC
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:

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

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 08:07:55 UTC
fixed and pushed to rawhide. thanks for the heads-up here.

Note You need to log in before you can comment on or make changes to this bug.