Re: Speeding up test running

2010-01-14 Thread Russell Keith-Magee
On Fri, Jan 15, 2010 at 9:59 AM, Vitaly Babiy wrote: > I have also been thinking about this, I think there is one problem but I am > not sure. This is when you have functional test and they need talk to a > database. In most cases you will be using transactions which should be

Re: help needed: non-relational DB support

2010-01-14 Thread Russell Keith-Magee
On Fri, Jan 15, 2010 at 5:08 AM, Waldemar Kornewald wrote: > On Thu, Jan 14, 2010 at 2:42 PM, Russell Keith-Magee > wrote: >> Speaking for myself, I'm pretty busy trying to get features completed >> before the 1.2 feature deadline. At the moment,

Re: Speeding up test running

2010-01-14 Thread Alex Gaynor
On Thu, Jan 14, 2010 at 7:59 PM, Vitaly Babiy wrote: > I have also been thinking about this, I think there is one problem but I am > not sure. This is when you have functional test and they need talk to a > database. In most cases you will be using transactions which should be

Re: Speeding up test running

2010-01-14 Thread Vitaly Babiy
I have also been thinking about this, I think there is one problem but I am not sure. This is when you have functional test and they need talk to a database. In most cases you will be using transactions which should be fine, but if for some reason you can't use transaction for test this will have

Re: phone2numeric doesn't convert "Q" or "Z"

2010-01-14 Thread Gabriel Hurley
I've opened a ticket and submitted a patch that fixes this strange oversight: http://code.djangoproject.com/ticket/12613 Thanks! - Gabriel On Jan 14, 5:05 am, Harro wrote: > hmm that's indeed weird. The regex excludes those as well > specifically. > The Q and Z should be

Speeding up test running

2010-01-14 Thread ptone
This is probably just a curiosity, but I was playing with ways to test the raw power of my new 8-core mac pro and was looking at how to apply this to testing. By using multiprocessing I was able to reduce the running of the current trunk tests from 6 minutes to 3. Because a test case needs to be

Re: Porting Django to Python 3

2010-01-14 Thread Łukasz Rekucki
2010/1/14 Marty Alchin : > On Thu, Jan 14, 2010 at 2:32 PM, Karen Tracey wrote: >> Martin's approach was single codebase where the 3.x version for execution is >> generated by 2to3, not single source for execution across 2.x and 3.x.  Thus >> I'm wondering

Re: help needed: non-relational DB support

2010-01-14 Thread Waldemar Kornewald
On Thu, Jan 14, 2010 at 2:42 PM, Russell Keith-Magee wrote: > Speaking for myself, I'm pretty busy trying to get features completed > before the 1.2 feature deadline. At the moment, anything that isn't on > the 1.2 roadmap is only getting cursory attention from me. I

Re: Porting Django to Python 3

2010-01-14 Thread Marty Alchin
On Thu, Jan 14, 2010 at 2:32 PM, Karen Tracey wrote: > Martin's approach was single codebase where the 3.x version for execution is > generated by 2to3, not single source for execution across 2.x and 3.x.  Thus > I'm wondering if this difference is accounted for by 2to3?  If

Re: Porting Django to Python 3

2010-01-14 Thread Karen Tracey
On Thu, Jan 14, 2010 at 2:17 PM, Marty Alchin wrote: > 2010/1/14 Łukasz Rekucki : > > It is possible to write 3.x code that is backwards-compatible with > > python 2.6+. There are some rough edges like, names of stdlib modules, > > instance checks for

Re: Porting Django to Python 3

2010-01-14 Thread Marty Alchin
2010/1/14 Łukasz Rekucki : > It is possible to write 3.x code that is backwards-compatible with > python 2.6+. There are some rough edges like, names of stdlib modules, > instance checks for strings and some introspection details. In my > opinion, it's pretty much the same as

Re: Porting Django to Python 3

2010-01-14 Thread Łukasz Rekucki
2010/1/14 Jesus Mager : > Hi! > > I don't think we can have a library working on python 2 and at the > same time on python 3.(Dont know if 3to2 is a good solution). It is possible to write 3.x code that is backwards-compatible with python 2.6+. There are some rough edges like,

Re: Model validation incompatibility with existing Django idioms

2010-01-14 Thread Raffaele Salmaso
Raffaele Salmaso wrote: > Joseph Kocherhans wrote: >> regressions? > http://code.djangoproject.com/ticket/12577 Ok, BaseGenericInlineFormSet doesn't have save_new to save the generic fk.pk Reenabled and everything go as before. -- ()_() | That said, I didn't actually _test_ my patch. |

Re: Sessions: does set_expiry has a max value?

2010-01-14 Thread Karen Tracey
On Thu, Jan 14, 2010 at 11:07 AM, Pablo López wrote: > I know, but it looked a django bug, that is why I posted here, because > I think it makes more sense discussing about _potential_ django bugs > with their developers than doing it with their users. I'll search > better

Re: Sessions: does set_expiry has a max value?

2010-01-14 Thread Pablo López
I know, but it looked a django bug, that is why I posted here, because I think it makes more sense discussing about _potential_ django bugs with their developers than doing it with their users. I'll search better for next time. Pablo On 14 ene, 16:54, Waylan Limberg wrote: >

Re: Sessions: does set_expiry has a max value?

2010-01-14 Thread Waylan Limberg
On Thu, Jan 14, 2010 at 10:50 AM, Pablo López wrote: > I *did* search in this group... not in others :-) > > Thank you anyway > Ah, well for future reference, django-dev is specifically for the development *of* django. For help with using django you should always go to

Re: Sessions: does set_expiry has a max value?

2010-01-14 Thread Karen Tracey
On Thu, Jan 14, 2010 at 10:50 AM, Pablo López wrote: > I *did* search in this group... not in others :-) > > Note django-users is the more appropriate group for this question. Questions about using Django should go to django-users, django-developers if for discussions focused

Re: Sessions: does set_expiry has a max value?

2010-01-14 Thread Pablo López
I *did* search in this group... not in others :-) Thank you anyway On 14 ene, 16:41, Gonzalo Riestra wrote: > Hi Pablo, > > First of all, welcome to Django community. > > You should search at the forum before asking anything...Here you have > the solution: > >

Re: Sessions: does set_expiry has a max value?

2010-01-14 Thread Gonzalo Riestra
Hi Pablo, First of all, welcome to Django community. You should search at the forum before asking anything...Here you have the solution: http://groups.google.com/group/django-users/browse_thread/thread/323cdc612547709c Gonzalo Riestra On 14 ene, 12:52, Pablo López wrote:

Re: AnonymousUser has_perm/has_module_perms function check authentication backends

2010-01-14 Thread Juan Pablo Scaletti
If an AnonymousUser can do something then everybody can do that as well. So why a regular unprotected view can't do the job? On Thu, Jan 14, 2010 at 8:13 AM, Harro wrote: > I was having a look at the new 1.2 row level permission support that > got added and ran into the

Sessions: does set_expiry has a max value?

2010-01-14 Thread Pablo López
Hi everyone! In my login function in views.py I make use of set_expiry function to set the cookie expriry time depending on the selection of a "remember me" checkbox on the login form: if not form.cleaned_data["rememberme"]: request.session.set_expiry(0) else:

Re: Porting Django to Python 3

2010-01-14 Thread Josh Roesslein
>From my experience with the 2to3 tool, it's no silver bullet for porting to 3. I have had plenty of cases where manual tweeking of the code was needed. The tool does help a lot on getting trivial things changed over, but certain things it just can't do. Now this is with a very small library of

Re: M2M Column Names Changed in 1.2 - Breaks Backwards Compatibility

2010-01-14 Thread Russell Keith-Magee
On Thu, Jan 14, 2010 at 3:13 PM, simonb wrote: > I think this ticket http://code.djangoproject.com/ticket/12386 > identifies a change in the m2m code which breaks backwards > compatibility. Hi Simon, I'm aware of the ticket - there are a couple of tickets that I need to take a

Re: M2M Column Names Changed in 1.2 - Breaks Backwards Compatibility

2010-01-14 Thread Harro
Hmm where did the foreign key go on the 1.2 example? And I must say that the name for the modelc column is a bit weird. On Jan 14, 8:13 am, simonb wrote: > I think this tickethttp://code.djangoproject.com/ticket/12386 > identifies a change in the m2m code which breaks

AnonymousUser has_perm/has_module_perms function check authentication backends

2010-01-14 Thread Harro
I was having a look at the new 1.2 row level permission support that got added and ran into the problem that the AnonymousUser does not call the authentication backend functions. The default backend doesn't need this, but with a custom backend I might want to implement Guest permissions. I think

Re: phone2numeric doesn't convert "Q" or "Z"

2010-01-14 Thread Harro
hmm that's indeed weird. The regex excludes those as well specifically. The Q and Z should be added or a comment should be added to the code explaining the reason for leaving them out. On Jan 14, 11:23 am, Gabriel Hurley wrote: > 1. Is there a reason Django's phone2numeric

Re: help needed: non-relational DB support

2010-01-14 Thread Thomas Wanschik
On Jan 8, 1:10 pm, Waldemar Kornewald wrote: > Hi, > our non-relational port has come to the point where we need to > back-port the SQL layer to the query backend API (i.e., the new > query_class()). We could need some help from Django developers who > know the ORM

Re: phone2numeric doesn't convert "Q" or "Z"

2010-01-14 Thread Łukasz Rekucki
2010/1/14 Gabriel Hurley : > 2. I was also wondering if there's a reason that the dictionary of > numbers/letters used in that function is in such a seemingly random > order... is there some brilliant logic behind it? Yes, there is. Someone probably copy it from python's output,

phone2numeric doesn't convert "Q" or "Z"

2010-01-14 Thread Gabriel Hurley
1. Is there a reason Django's phone2numeric method doesn't work for the letters Q or Z? I realize that those two letters are the ones that share four letters to a number instead of the standard three, but that's no reason to leave them out. Most modern phones include the full alphabet on their