Re: [Django] #12717: query.as_sql crashes with multi-db and master/slave routing

2010-01-30 Thread Django
#12717: query.as_sql crashes with multi-db and master/slave routing
---+
  Reporter:  jbalogh   | Owner:  nobody   
Status:  new   | Milestone:  1.2  
 Component:  Database layer (models, ORM)  |   Version:  1.2-alpha
Resolution:|  Keywords:   
 Stage:  Accepted  | Has_patch:  0
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Changes (by russellm):

  * needs_better_patch:  => 0
  * needs_docs:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * milestone:  => 1.2

Comment:

 The specific use case you mention is definitely a problem, but I think
 there is might be something slightly deeper going on here - cross-database
 joins should be using the allow_relation check; if a relation isn't
 allowed, then the inner query should be rolled out to a result set, rather
 than trying to do an inner query in SQL.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #12739: Inconsistent sorting behavior in mult-table inheritance query for different database backends

2010-01-30 Thread Django
#12739: Inconsistent sorting behavior in mult-table inheritance query for 
different
database backends
--+-
 Reporter:  gsong |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  1.1   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 Given the following models:
 {{{
 #!python
 from django.db import models

 class A(models.Model):
 name = models.CharField(max_length=50)

 class B(A):
pass

 class C(A):
pass
 }}}

 The following query returns different queryset order for `sqlite3` vs.
 `postgresql_psycopg2`:
 {{{
 #!python
 A.objects.order_by('b', 'name')
 }}}

 SQLite will sort B objects, followed by C objects. PostgreSQL will sort C
 objects, followed by B objects.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Changeset] r12360 - django/trunk/django/views

2010-01-30 Thread noreply
Author: russellm
Date: 2010-01-30 20:30:02 -0600 (Sat, 30 Jan 2010)
New Revision: 12360

Modified:
   django/trunk/django/views/debug.py
Log:
Fixed #12736 -- Fixed the debug page to hide passwords when they are in 
dictionary structures (like the new DATABASES setting). Thanks to Karen for the 
report.

Modified: django/trunk/django/views/debug.py
===
--- django/trunk/django/views/debug.py  2010-01-30 02:25:33 UTC (rev 12359)
+++ django/trunk/django/views/debug.py  2010-01-31 02:30:02 UTC (rev 12360)
@@ -20,15 +20,27 @@
 p = template_source.find('\n', p+1)
 yield len(template_source) + 1
 
+def cleanse_setting(key, value):
+"""Cleanse an individual setting key/value of sensitive content.
+
+If the value is a dictionary, recursively cleanse the keys in
+that dictionary.
+"""
+if HIDDEN_SETTINGS.search(key):
+cleansed = ''
+else:
+if isinstance(value, dict):
+cleansed = dict((k, cleanse_setting(k, v)) for k,v in 
value.items())
+else:
+cleansed = value
+return cleansed
+
 def get_safe_settings():
 "Returns a dictionary of the settings module, with sensitive settings 
blurred out."
 settings_dict = {}
 for k in dir(settings):
 if k.isupper():
-if HIDDEN_SETTINGS.search(k):
-settings_dict[k] = ''
-else:
-settings_dict[k] = getattr(settings, k)
+settings_dict[k] = cleanse_setting(k, getattr(settings, k))
 return settings_dict
 
 def technical_500_response(request, exc_type, exc_value, tb):

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12691: ModelForms documentation missing versionadded tag for 'widgets'

2010-01-30 Thread Django
#12691: ModelForms documentation missing versionadded tag for 'widgets'
+---
  Reporter:  danielr| Owner:  nobody
Status:  new| Milestone:
 Component:  Documentation  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by timo):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Ready for checkin
  * needs_tests:  => 0
  * needs_docs:  => 0

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12665: get_or_create fails with self as a parameter

2010-01-30 Thread Django
#12665: get_or_create fails with self as a parameter
-+--
  Reporter:  timo| Owner:  nobody   
   
Status:  closed  | Milestone:   
   
 Component:  Core framework  |   Version:  SVN  
   
Resolution:  invalid |  Keywords:  get_or_create deepcopy 
TypeError
 Stage:  Unreviewed  | Has_patch:  0
   
Needs_docs:  0   |   Needs_tests:  0
   
Needs_better_patch:  0   |  
-+--
Changes (by timo):

  * status:  new => closed
  * resolution:  => invalid

Comment:

 looks to be caused by some hackish code in the app I'm working on.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12738: CSRF token name should be a configurable setting

2010-01-30 Thread Django
#12738: CSRF token name should be a configurable setting
+---
  Reporter:  Kronuz | Owner:  nobody
Status:  new| Milestone:  1.2   
 Component:  Uncategorized  |   Version:
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by lukeplant):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 I don't understand why that would improve security.  The security lies in
 the value of the token, not the name.  Most CSRF attacks are going to be
 per-site, and a setting would be per-site.  Also, if an attacker was using
 a more generic attack against all Django-powered sites, it would be easy
 to find out what the name of the token is for a specific site - one
 request to a page that contains a POST form, and you are done, since a
 simple regex will in most cases find which field 'looks like' a Django
 CSRF token.

 Do you have an actual use case where you need this?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #5350: urlresolvers: Fallback, if urls.py don't have handle404 and friends

2010-01-30 Thread Django
#5350: urlresolvers: Fallback, if urls.py don't have handle404 and friends
---+
  Reporter:  Thomas Güttler   | Owner:  
nobody
Status:  reopened  | Milestone:
 Component:  Core framework|   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Design decision needed| Has_patch:  1 
Needs_docs:  1 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by eigenhombre):

 +1, I've just been bitten as well.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #12738: CSRF token name should be a configurable setting

2010-01-30 Thread Django
#12738: CSRF token name should be a configurable setting
---+
 Reporter:  Kronuz |   Owner:  nobody
   Status:  new|   Milestone:  1.2   
Component:  Uncategorized  | Version:
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 The CSRF token name ('csrfmiddlewaretoken') should perhaps be
 configurable, for security reasons if not anything else...

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #12737: Thread local settings

2010-01-30 Thread Django
#12737: Thread local settings
---+
 Reporter:  Kronuz |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  SVN   
 Keywords: |   Stage:  Unreviewed
Has_patch:  1  |  
---+
 Many times I'm in the need of modify (perhaps wrongly) the settings in
 django.conf.settings... assuming the setting being modified is set up on
 every request (such as it could be the LANGUAGE_CODE, from the session,
 the URL or a cookie... or the SITE_ID fro the URL, for dynamic hosting) in
 some middleware perhaps... then it shouldn't be as "bad" to do so... or
 could it? (or so I thought) when I started using django, something that
 was not obvious for me was that settings where shared among threads too...
 and after testing everything locally it worked fine, but when I tried my
 project in a system with Apache and multiprocess/multithreaded environment
 it had weird things happening some times...

 After some time I realized settings where being modified by different
 threads during the same request, making my dynamic sites behave
 erratically and my languages change from here to there in mysterious ways.

 The attached patch allows settings to be local to the threads, making it
 safe to modify of certain settings in a per request basis.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10164: AutoField is broken for sqlite backend [patch included]

2010-01-30 Thread Django
#10164: AutoField is broken for sqlite backend [patch included]
---+
  Reporter:  malte | Owner:  nobody 
 
Status:  new   | Milestone: 
 
 Component:  Database layer (models, ORM)  |   Version:  1.0
 
Resolution:|  Keywords:  sqlite 
autoincrement
 Stage:  Design decision needed| Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Comment (by fwenzel):

 This should be included. The patch looks like a good solution for it.

 Rationale:
 In spots where database IDs are exposed publicly, for example as paths:
 /item/1, deleting the latest item and adding a new one will result in the
 same ID (and thus, path) being reassigned in SQLite only, and only because
 Django is not using the auto_increment feature SQLite provides.

 For the sake of consistency between DB backends, I suggest accepting the
 patch.

 If needed, I could add a test ensuring the PKs Django generates increase
 monotonously.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #11538: Documentation links wrong

2010-01-30 Thread Django
#11538: Documentation links wrong
+---
  Reporter:  Ianr   | Owner:  dwillis
Status:  assigned   | Milestone: 
 Component:  Documentation  |   Version:  1.0
Resolution: |  Keywords: 
 Stage:  Accepted   | Has_patch:  1  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by dwillis):

  * has_patch:  0 => 1

Comment:

 forgot to set has_patch

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12692: Wrong interpretation of extra clause in ModelAdmin with new admin UI

2010-01-30 Thread Django
#12692: Wrong interpretation of extra clause in ModelAdmin with new admin UI
---+
  Reporter:  apollo13  | Owner:  jezdez
Status:  assigned  | Milestone:  1.2   
 Component:  Contrib apps  |   Version:  SVN   
Resolution:|  Keywords:  admin, js, inlines
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by jezdez):

  * owner:  nobody => jezdez
  * status:  new => assigned

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12692: Wrong interpretation of extra clause in ModelAdmin with new admin UI

2010-01-30 Thread Django
#12692: Wrong interpretation of extra clause in ModelAdmin with new admin UI
---+
  Reporter:  apollo13  | Owner:  nobody
Status:  new   | Milestone:  1.2   
 Component:  Contrib apps  |   Version:  SVN   
Resolution:|  Keywords:  admin, js, inlines
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by jezdez):

  * stage:  Design decision needed => Accepted

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12736: Database passwords visible on debug page with new-style database config

2010-01-30 Thread Django
#12736: Database passwords visible on debug page with new-style database config
+---
  Reporter:  kmtracey   | Owner:  nobody
Status:  new| Milestone:  1.2   
 Component:  Uncategorized  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by jezdez):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * needs_docs:  => 0

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12707: admin actions display a warning when using list_editable (introduced in r11837)

2010-01-30 Thread Django
#12707: admin actions display a warning when using list_editable (introduced in
r11837)
---+
  Reporter:  arne  | Owner:  nobody
Status:  new   | Milestone:  1.2   
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by jezdez):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * needs_docs:  => 0

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #12736: Database passwords visible on debug page with new-style database config

2010-01-30 Thread Django
#12736: Database passwords visible on debug page with new-style database config
---+
 Reporter:  kmtracey   |   Owner:  nobody
   Status:  new|   Milestone:  1.2   
Component:  Uncategorized  | Version:  SVN   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 The debug page settings display suppresses display of the values for any
 settings that contain 'PASSWORD' or 'SECRET' in their name. With the new
 dictionary style of database configuration, the database password becomes
 just a value for a key in a setting that is a dictionary, and the value is
 shown.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12694: Adding an object-tool requires template code duplication

2010-01-30 Thread Django
#12694: Adding an object-tool requires template code duplication
---+
  Reporter:  andybak   | Owner:  nobody 
  
Status:  new   | Milestone: 
  
 Component:  django.contrib.admin  |   Version:  1.1
  
Resolution:|  Keywords:  admin, blocks, 
template, object-tools
 Stage:  Accepted  | Has_patch:  0  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Changes (by jezdez):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * needs_docs:  => 0

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12595: Localflavor bad arguments handling

2010-01-30 Thread Django
#12595: Localflavor bad arguments handling
-+--
  Reporter:  sayane  | Owner:  jezdez
Status:  new | Milestone:  1.2   
 Component:  django.contrib.localflavor  |   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Accepted| Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by jezdez):

  * owner:  nobody => jezdez

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #6380: make-messages.py don't follow symlinks

2010-01-30 Thread Django
#6380: make-messages.py don't follow symlinks
+---
  Reporter:  Adrian   | Owner:  nobody
  
Status:  new| Milestone:
  
 Component:  Internationalization   |   Version:  SVN   
  
Resolution: |  Keywords:  make-messages 
symlinks follow symbolic links
 Stage:  Accepted   | Has_patch:  1 
  
Needs_docs:  0  |   Needs_tests:  0 
  
Needs_better_patch:  1  |  
+---
Comment (by ramiro):

 The ''followlinks'' parameter of `os.walk()` was added in Python 2.6.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #6073: compile-messages.py parse error for utf-8 files with signature

2010-01-30 Thread Django
#6073: compile-messages.py parse error for utf-8 files with signature
-+--
  Reporter:  Wonlay  | Owner:  ramiro 
Status:  new | Milestone: 
 Component:  Internationalization|   Version:  SVN
Resolution:  |  Keywords:  msgfmt, BOM
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Changes (by ramiro):

  * owner:  Wonlay => ramiro
  * needs_better_patch:  1 => 0
  * status:  assigned => new

Comment:

 I've just uplaoded a patch that implements rejection of .po files that
 contain a BOM and adds a note documenting that behavior to the relevant
 section of i18n docs.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12695: 'Add another' button disappears when refreshing page with admin form in Firefox

2010-01-30 Thread Django
#12695: 'Add another' button disappears when refreshing page with admin form in
Firefox
---+
  Reporter:  jbronn| Owner:  jezdez   
Status:  new   | Milestone:   
 Component:  django.contrib.admin  |   Version:  SVN  
Resolution:|  Keywords:  admin inlines add
 Stage:  Accepted  | Has_patch:  0
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Changes (by jezdez):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * needs_docs:  => 0

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12735: django shell is broken with IPython 0.11.x (bzr.r1219)

2010-01-30 Thread Django
#12735: django shell is broken with IPython 0.11.x (bzr.r1219)
--+-
  Reporter:  alperkanat   | Owner:  nobody
Status:  new  | Milestone:
 Component:  django-admin.py  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by ramiro):

  * needs_better_patch:  => 0
  * component:  Core framework => django-admin.py
  * needs_tests:  => 0
  * needs_docs:  => 0

Old description:

> [15:33] (tu...@penguix raptiye)$ ./manage.py shell
> Traceback (most recent call last):
>   File "./manage.py", line 14, in 
> execute_manager(settings)
>   File "/Users/tunix/Projects/django/core/management/__init__.py", line
> 438, in execute_manager
> utility.execute()
>   File "/Users/tunix/Projects/django/core/management/__init__.py", line
> 379, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File "/Users/tunix/Projects/django/core/management/base.py", line 195,
> in run_from_argv
> self.execute(*args, **options.__dict__)
>   File "/Users/tunix/Projects/django/core/management/base.py", line 222,
> in execute
> output = self.handle(*args, **options)
>   File "/Users/tunix/Projects/django/core/management/base.py", line 351,
> in handle
> return self.handle_noargs(**options)
>   File "/Users/tunix/Projects/django/core/management/commands/shell.py",
> line 29, in handle_noargs
> shell = IPython.Shell.IPShell(argv=[])
> AttributeError: 'module' object has no attribute 'Shell'
>

> It seems that Shell module is deprecated:
>
> In [1]: from IPython import Shell
> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
> packages/IPython/Shell.py:31: DeprecationWarning:
> This module (IPython.Shell) is deprecated.  The classes that were in this
> module have been replaced by:
>
> IPShell->IPython.core.iplib.InteractiveShell
> IPShellEmbed->IPython.core.embed.InteractiveShellEmbed
>
> Please migrate your code to use these classes instead.
>
>   warn(msg, category=DeprecationWarning, stacklevel=1)

New description:

 {{{
 [15:33] (tu...@penguix raptiye)$ ./manage.py shell
 Traceback (most recent call last):
   File "./manage.py", line 14, in 
 execute_manager(settings)
   File "/Users/tunix/Projects/django/core/management/__init__.py", line
 438, in execute_manager
 utility.execute()
   File "/Users/tunix/Projects/django/core/management/__init__.py", line
 379, in execute
 self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/Users/tunix/Projects/django/core/management/base.py", line 195,
 in run_from_argv
 self.execute(*args, **options.__dict__)
   File "/Users/tunix/Projects/django/core/management/base.py", line 222,
 in execute
 output = self.handle(*args, **options)
   File "/Users/tunix/Projects/django/core/management/base.py", line 351,
 in handle
 return self.handle_noargs(**options)
   File "/Users/tunix/Projects/django/core/management/commands/shell.py",
 line 29, in handle_noargs
 shell = IPython.Shell.IPShell(argv=[])
 AttributeError: 'module' object has no attribute 'Shell'
 }}}

 It seems that Shell module is deprecated:

 {{{
 In [1]: from IPython import Shell
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
 packages/IPython/Shell.py:31: DeprecationWarning:
 This module (IPython.Shell) is deprecated.  The classes that were in this
 module have been replaced by:

 IPShell->IPython.core.iplib.InteractiveShell
 IPShellEmbed->IPython.core.embed.InteractiveShellEmbed

 Please migrate your code to use these classes instead.

   warn(msg, category=DeprecationWarning, stacklevel=1)
 }}}

Comment:

 (reformatted description)

 no 0.11 version of ipython has been released yet, should we wait for a
 stable release before thinking about adding compatibility code to Django?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #12735: django shell is broken with IPython 0.11.x (bzr.r1219)

2010-01-30 Thread Django
#12735: django shell is broken with IPython 0.11.x (bzr.r1219)
+---
 Reporter:  alperkanat  |   Owner:  nobody
   Status:  new |   Milestone:
Component:  Core framework  | Version:  SVN   
 Keywords:  |   Stage:  Unreviewed
Has_patch:  0   |  
+---
 [15:33] (tu...@penguix raptiye)$ ./manage.py shell
 Traceback (most recent call last):
   File "./manage.py", line 14, in 
 execute_manager(settings)
   File "/Users/tunix/Projects/django/core/management/__init__.py", line
 438, in execute_manager
 utility.execute()
   File "/Users/tunix/Projects/django/core/management/__init__.py", line
 379, in execute
 self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/Users/tunix/Projects/django/core/management/base.py", line 195,
 in run_from_argv
 self.execute(*args, **options.__dict__)
   File "/Users/tunix/Projects/django/core/management/base.py", line 222,
 in execute
 output = self.handle(*args, **options)
   File "/Users/tunix/Projects/django/core/management/base.py", line 351,
 in handle
 return self.handle_noargs(**options)
   File "/Users/tunix/Projects/django/core/management/commands/shell.py",
 line 29, in handle_noargs
 shell = IPython.Shell.IPShell(argv=[])
 AttributeError: 'module' object has no attribute 'Shell'


 It seems that Shell module is deprecated:

 In [1]: from IPython import Shell
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
 packages/IPython/Shell.py:31: DeprecationWarning:
 This module (IPython.Shell) is deprecated.  The classes that were in this
 module have been replaced by:

 IPShell->IPython.core.iplib.InteractiveShell
 IPShellEmbed->IPython.core.embed.InteractiveShellEmbed

 Please migrate your code to use these classes instead.

   warn(msg, category=DeprecationWarning, stacklevel=1)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #6609: pysco clears the stack - causes delayed_loader to fail

2010-01-30 Thread Django
#6609: pysco clears the stack - causes delayed_loader to fail
---+
  Reporter:  pco...@mit.edu| Owner:  nobody 
 
Status:  closed| Milestone: 
 
 Component:  Internationalization  |   Version:  SVN
 
Resolution:  wontfix   |  Keywords:  psyco, 
delayed_loader, stack
 Stage:  Accepted  | Has_patch:  0  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Changes (by ramiro):

  * status:  new => closed
  * resolution:  => wontfix

Comment:

 It seems (as per the multiple problems documented PsycoMiddleware and the
 Psyco [http://psyco.sourceforge.net/psycoguide/bugs.html#bugs
 documentation] itself) the first thing a (experienced, that's a
 requiremente for using Psyco in the first place) developer should do when
 seeing weird problems is to deactivate it to see if it is the piece that
 is introducing them.

 Django itself dropped support for Psyco on r3877.

 Because of this I don't think the Django documentation is the place where
 a note about this should be added. Closing the ticket as wontfix.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10270: module dependency checks of syncdb are not translatable nor catchable

2010-01-30 Thread Django
#10270: module dependency checks of syncdb are not translatable nor catchable
---+
  Reporter:  Alper KANAT   | Owner:  
nobody
Status:  closed| Milestone: 
   
 Component:  Internationalization  |   Version:  
SVN   
Resolution:  wontfix   |  Keywords: 
   
 Stage:  Design decision needed| Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by ramiro):

  * status:  new => closed
  * resolution:  => wontfix

Comment:

 Closing wontfix as eleven months have passed without the OP answering the
 question Malcolm posted.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #12734: defer() then save() of model with custom field results in data corruption

2010-01-30 Thread Django
#12734: defer() then save() of model with custom field results in data 
corruption
---+
 Reporter:  sachmonkey |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  1.1   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 I have a custom field in a model (in this case JSONField, but I also
 reproduced this with PickledObjectField). If I run a query on that model
 in which I defer() the custom field and then save() that model, the custom
 field value gets corrupted. The models.py and tests.py code below
 reproduces this issue.

 When the save() is called, Django retrieves the deferred field through a
 select statement. But when it executes the update statement, it
 incorrectly stores that field back into the database. If you look at the
 value of the data column, it goes from [1,2,3] to "[1,2,3]" (yes, the
 change is the quotes).

 {{{
 #models.py
 from django.db import models
 from django.utils import simplejson

 class JSONField(models.TextField):
 __metaclass__ = models.SubfieldBase

 description = "JSONField automatically serializes\deserializes values
 to\from JSON."

 def to_python(self, value):
 if value == "":
 return None

 if isinstance(value, basestring):
 value = simplejson.loads(value)
 return value

 def get_db_prep_save(self, value):
 if value is None: return
 return simplejson.dumps(value)

 def value_to_string(self, obj):
 value = self._get_val_from_obj(obj)
 return self.get_db_prep_value(value)

 class CustomFieldModel(models.Model):
 name = models.CharField(max_length=100)
 data = JSONField()

 #tests.py
 from django.test import TestCase
 from models import CustomFieldModel

 class DeferRegressionTest(TestCase):
 def test_defer_then_save_custom_field(self):
 #store a simple list in the basic JSON field
 test_model = CustomFieldModel()
 test_model.name = "test"
 test_model.data = [1, 2, 3]
 test_model.save()

 #at this point, data is of list type
 self.assertEqual(type(test_model.data), type(list()))

 #defer the custom JSON field
 retrieved_model =
 CustomFieldModel.objects.defer("data").get(name="test")

 #on save, django runs a select to get the deferred field and then
 updates it, but messes up the update statement for the deferred field
 retrieved_model.save()

 #now let's retrieve the whole model again
 retrieved_again_model = CustomFieldModel.objects.get(name="test")

 #when we get the value of the JSON field, it is no longer a list!
 it's been corrupted!
 self.assertEqual(type(retrieved_again_model.data), type(list()))
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.