Re: Ticket #5416 -- assertNumQueries

2010-10-10 Thread Russell Keith-Magee
On Mon, Oct 11, 2010 at 6:17 AM, Alex Gaynor wrote: > Hey all, > > I've been spending some time with ticket #5416[0], which is a request > for assertNumQueries in tests.  The primary objection Russ had to the > previous patch in this vein was that It uses connection.queries as > opposed to the pro

Re: Ticket #5416 -- assertNumQueries

2010-10-10 Thread Alex Gaynor
On Mon, Oct 11, 2010 at 2:02 AM, Russell Keith-Magee wrote: > 2010/10/11 Mikhail Korobov : >> Hi all, >> >> If it will be a contextmanager then it can also be extended to perform >> like a decorator: http://gist.github.com/573536 >> I think this can be useful. > > Alex and I have spoken about this

Re: Ticket #5416 -- assertNumQueries

2010-10-10 Thread Russell Keith-Magee
2010/10/11 Mikhail Korobov : > Hi all, > > If it will be a contextmanager then it can also be extended to perform > like a decorator: http://gist.github.com/573536 > I think this can be useful. Alex and I have spoken about this (and a couple of other places that context managers would be useful, l

Re: Ticket #5416 -- assertNumQueries

2010-10-10 Thread Mikhail Korobov
Hi all, If it will be a contextmanager then it can also be extended to perform like a decorator: http://gist.github.com/573536 I think this can be useful. On 11 окт, 04:17, Alex Gaynor wrote: > Hey all, > > I've been spending some time with ticket #5416[0], which is a request > for assertNumQuer

Re: Migrating doctests to unittests

2010-10-10 Thread Russell Keith-Magee
On Mon, Oct 11, 2010 at 12:43 PM, Alex Gaynor wrote: > On Mon, Oct 11, 2010 at 12:41 AM, Henrique Bastos wrote: >> Alex, >> Is there any specific branch on unit testing migration? It would be useful >> to understand the work in progress before submitting patches. >> All the best, >> -- >> Henriqu

Re: Migrating doctests to unittests

2010-10-10 Thread Alex Gaynor
On Mon, Oct 11, 2010 at 12:41 AM, Henrique Bastos wrote: > Alex, > Is there any specific branch on unit testing migration? It would be useful > to understand the work in progress before submitting patches. > All the best, > -- > Henrique Bastos > henri...@bastos.net > http://henriquebastos.net > S

Re: Migrating doctests to unittests

2010-10-10 Thread Henrique Bastos
Alex, Is there any specific branch on unit testing migration? It would be useful to understand the work in progress before submitting patches. All the best, -- Henrique Bastos henri...@bastos.net http://henriquebastos.net Skype: henriquebastos.net Twitter: @henriquebas

#14434 - AdminSite should check self.has_permission in self.login

2010-10-10 Thread Brandon Konkle
A commenter on my blog brought up something about AdminSite that breaks permission customization if you want to remove user.is_staff. AdminSite.login explicitly checks user.is_active and user.is_staff (http://github.com/django/django/blob/master/django/contrib/admin/sites.py#L341). AdminSite.

Re: Suspected bug: testing with multiple references to same database

2010-10-10 Thread Russell Keith-Magee
2010/10/11 Filip Gruszczyński : > I am not very familiar with all this, but I took a look at the code > and have a question. Would it be enough to make a following validation > before setting up test databases: for each two connections using the > same backend names of the test databases are differ

Ticket #5416 -- assertNumQueries

2010-10-10 Thread Alex Gaynor
Hey all, I've been spending some time with ticket #5416[0], which is a request for assertNumQueries in tests. The primary objection Russ had to the previous patch in this vein was that It uses connection.queries as opposed to the proposed signal. However, Russ and I spoke last night and neither

Re: Possible thread-safety regression for sitemaps in r13980

2010-10-10 Thread Gabriel Hurley
I believe you are correct, since sitemaps are global objects, this would not be thread-safe. Fixing it should be fairly easy, however. Setting self.request was only necessary for two reasons: 1. Sitemap.get_urls() uses it, but either the request or the current_site variable could be easily be pa

Re: blog on Django

2010-10-10 Thread Jeremy Dunck
On Sun, Oct 10, 2010 at 4:41 PM, Jacob Kaplan-Moss wrote: > Hi Laurent (and everyone else paying attention) -- > > I'm currently working on redoing the community pages so that folks > like you can add their own feeds without needing to go through me or > anyone else. I should have that done here s

Re: Suspected bug: testing with multiple references to same database

2010-10-10 Thread Filip Gruszczyński
I am not very familiar with all this, but I took a look at the code and have a question. Would it be enough to make a following validation before setting up test databases: for each two connections using the same backend names of the test databases are different? -- Filip Gruszczyński -- You re

Re: blog on Django

2010-10-10 Thread Jacob Kaplan-Moss
Hi Laurent (and everyone else paying attention) -- I'm currently working on redoing the community pages so that folks like you can add their own feeds without needing to go through me or anyone else. I should have that done here shortly and I'm planning on sending an email out to the whole backlog

blog on Django

2010-10-10 Thread Laurent Luce
Hello, I have a blog on Django and Python. Can you add my blog and my RSS tag Django feed to the Django community page. blog: http://www.laurentluce.com RSS feed: http://www.laurentluce.com/?tag=django&feed=rss2 PS: I am asking here because I sent a request 2 months ago and 1 month ago to the e

Re: OneToOneField clarifications

2010-10-10 Thread George Sakkis
On Oct 9, 5:41 pm, Russell Keith-Magee wrote: > > I'll try to come up with patches+tests for #14043 and #14368 since > > they strike you as bugs. As for #10227, what do you think about my > > suggestion at the end for a new optional 'related_default' parameter ? > > I'm not sold on related_defaul

Re: OneToOneField clarifications

2010-10-10 Thread George Sakkis
On Oct 8, 2:20 pm, Russell Keith-Magee wrote: > #14043 is clearly a bug to me (hence the accepted status). If I had to > guess at a cause, I'd say it's either: >  * The OneToOneField special case not being handled by deletion traversal >  * The related object cache on the o2o field not being clea

Possible thread-safety regression for sitemaps in r13980

2010-10-10 Thread Justin Bronn
After r13980, GIS sitemaps were broken, and when attempting to fix I had questions about the underlying implementation of the changeset: http://code.djangoproject.com/changeset/13980/django/trunk/django/contrib/sitemaps/views.py In the loop iterating over the `sitemaps` argument (L12), the `site`

Re: #3400 -- ModelAdmin.list_filter improvements

2010-10-10 Thread bydesign
This feature would be so nice to have! Can't tell you how many times I've needed it to be reminded again that it doesn't work yet. Thanks, Simon! On Oct 9, 1:29 am, Russell Keith-Magee wrote: > My apologies, Simon. This has been on my list of things to look at, > but people keep putting more thi