Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

fixes infinate recursion on django 1.6 #96

Merged
merged 7 commits into from

6 participants

@fadur

Issue #92 made devserver unusable for anyone on 1.6

@dcramer
Owner

I don't want to merge this until I understand the behavior, but it's been a while since I've touched any of this code.

Will this not break behavior on older versions of Django?

@fadur

Fair enough.
Yes, you're right. I've submitted a quick patch.
Let me know how you wish to proceed.

@dcramer
Owner

I think this is good. Could you remove the print/extra spacing around the if statement?

Thanks!

@fadur

Should be fixed now.

@beaugunderson

There are still three extra empty lines (60-62); would love to see this merged though as I'm waiting to upgrade to 1.6.x for this. :)

@beaugunderson

@dcramer Any news on merging this?

@dcramer dcramer merged commit b65bee8 into dcramer:master
@nealtodd

Hi @dcramer - do you know when you'd be able to get this fix onto PyPI as a new release?

Just in the processing of upgrading to Django 1.6 right now and have hit this. I'd ideally like to continue to install django-devserver from PyPI, rather than the github master branch, in my pip requirements.txt.

Cheers, Neal

@heloisafspagnoli

@nealtodd :+1: that would help as well

@foxx

Any update on getting this PR into pip?? Would a bounty help?

@dcramer
Owner

Pushed 0.8.0

@foxx

Confirmed working in pip install django-devserver==0.8.0. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 20, 2013
  1. @fadur
  2. @fadur

    cleaned up

    fadur authored
Commits on Dec 21, 2013
  1. @fadur

    fix

    fadur authored
Commits on Dec 24, 2013
  1. @fadur

    fix backwards incompatibility

    fadur authored
  2. @fadur

    check for version

    fadur authored
  3. @fadur

    removed extra spacing

    fadur authored
Commits on Jan 4, 2014
  1. @fadur

    removed empty lines

    fadur authored
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 1 deletion.
  1. +6 −1 devserver/modules/sql.py
View
7 devserver/modules/sql.py
@@ -49,7 +49,12 @@ def truncate_sql(sql, aggregates=True):
debug_toolbar = True
except ImportError:
debug_toolbar = False
- DatabaseStatTracker = util.CursorDebugWrapper
+ import django
+ version = float('.'.join([str(x) for x in django.VERSION[:2]]))
+ if version >= 1.6:
+ DatabaseStatTracker = util.CursorWrapper
+ else:
+ DatabaseStatTracker = util.CursorDebugWrapper
class DatabaseStatTracker(DatabaseStatTracker):
Something went wrong with that request. Please try again.