Bug 1287269 - Add python-sqlparse as a package requirement
Add python-sqlparse as a package requirement
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: python-django-debug-toolbar (Show other bugs)
rawhide
All All
unspecified Severity medium
: ---
: ---
Assigned To: Matthias Runge
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-01 15:57 EST by fedora.dm0
Modified: 2015-12-10 03:07 EST (History)
2 users (show)

See Also:
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: ---


Attachments (Terms of Use)

  None (edit)
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.

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