2008-6-20

18:10 jacobkm
mrts: cool - can you post that to a ticket?
18:10 mrts
jacobkm: sure
18:15 mrts
jacobkm: note that e.g. Beaker creates a new key as well on clear() (that's what I was talking about previously), see http://beaker.groovie.org/beaker/browser/beaker...
18:15 mrts
I still don't see a real need for that... but please think of the implications
18:26 mrts
jacobkm: #7515
18:26 DjangoBot
18:26 jacobkm
mrts: thanks; I'll add it to my todo list
18:27 mrts
great
18:27 mrts
thanks
18:28 telenieko
that's the second time buildbot encounters problems this week :o
18:31 telenieko
Alex_Gaynor: trunk 2.4 sqlite was failling for some other reason before r7716
18:31 DjangoBot
18:32 Alex_Gaynor
Yeah thats the intermittent template cache issue
18:32 Alex_Gaynor
If you look both 2.5 and 2.4 are having this domain issue
18:32 Alex_Gaynor
2.6 psycop is still going
18:32 Alex_Gaynor
5*
18:32 telenieko
poor buildbot :o
18:33 jacobkm
seriously... it must be doing something strange because I never get these same failures locally.
18:33 telenieko
I cannot see why changing tests in auth broke the sitename :o
18:33 Alex_Gaynor
Me neither, but it did
18:36 jacobkm
it has something to do with a test not properly cleaning up after itself: running the view tests all themselves don't cause a failure, but running the whole suite does cause that failure.
18:37 telenieko
the PasswordResetTest ?
18:37 Alex_Gaynor
mrts: Typo in your docs, it says "in results" I think you meant "it results"
18:38 mrts
Alex_Gaynor: in result :), not in results... "as a result" perhaps
18:39 mrts
I'm not a native speaker, hence the somewhat inelegant phrasing... it's not an excuse though :)
18:39 mrts
Alex_Gaynor: please rephrase if you can
18:39 Alex_Gaynor
Sure
18:40 Alex_Gaynor
"This clears all session data. It results in an empty session, which is saving to the session store."
18:40 mrts
which is saved to the ...
18:41 Alex_Gaynor
saved*
18:41 Alex_Gaynor
Whoops
18:41 mrts chuckles
18:42 mrts
right, let's play it to the bone: "It results in an empty session that is saved to the session store." looks even more fluent
18:43 mrts
yes, no?
18:44 telenieko
maybe I can't see it, but isn't there any option to tell runtests to not destroy the test database?
18:44 Alex_Gaynor
No idea, grammar's not really my strong suit :D
18:44 mrts
Alex_Gaynor: ?
18:54 telenieko
dumb question: why is post_syncdb emitted at every test run?
18:54 telenieko
(I mean, before every test runs)
18:55 Alex_Gaynor
Because I think django tears down and sets the db back up
18:58 telenieko
but then the the database is correctly been teared down, the site object is created when post_syncb gets emited, so the test that is failling should have always been returning example.com except if when testing it should always return testclient
19:00 Alex_Gaynor
Err maybe not, I'm not that familiar with how the test framework works
19:02 telenieko
the trouble seems to be near fixture loading.. if you disable the added fixture nothing bad happends :)
19:02 telenieko getting closer
19:02 jacobkm
telenieko: yeah, I just hit the same thing
19:02 telenieko
is any signal emitted when fixtures get loaded ?
19:06 telenieko
jacobkm: when tests run, when a TestCase is ran, post_syncdb gets emitted, then the site object that was created, is not removed *until* the next TestCase is ran
19:06 telenieko
So, if a TestCase runs, doctests have screwed Db's
19:06 telenieko
that could explain this
19:07 telenieko is getting mad, don't listen to him
19:15 telenieko
runtests shows *all* test that failed, right?
19:17 jacobkm
yup
19:18 telenieko
jacobkm: If you make contrib.auth.PasswordResetTest.test_email_found to fail, the other one succeeds
19:18 jacobkm
crazy
19:18 telenieko
sure... found it when messing around with the fixture xD
19:19 telenieko
so, the test is teared down differently depending on the result status ?
19:20 brosner
19:35 telenieko has a clue.. checking twice
19:36 telenieko
*maybe* this helps: django/contrib/sites/models.py:23
19:36 telenieko
Is that SITE_CHACHE dict cleared on teardown ?
19:37 telenieko
commenting line 23 solved the problem
19:40 telenieko
maybe I said something really silly or you're seriously thinking about it :o
19:42 telenieko
calling Site.objects.clear_cache() on the failling test solves that, so the problem is the SITE_CACHE thing :=)
20:14 korpios
So: I'm trying to sanely solve for storing DateTimeFields with time zones -- real time zones (e.g., "Americas/Chicago"), not just offsets (meaning my foray into using Postgres's backend support didn't go anywhere useful).
20:16 korpios
My current notion is using an extra "time_zone" argument on a DateTimeField, which is a string representing a relation (which might be on another model; useful when the time zone depends on a related object) ... but this is kinda weird since DateTimeField isn't a RelatedField, and fields generally don't get to look at their parent object instances
20:16 korpios
Is anyone else interested in this problem? I could use some alternate viewpoints/input ^_^
20:53 telenieko
jacobkm: did you dig on the SITE_CACHE thing¿
20:59 telenieko
jacobkm: would it be reasonable to create a "post-flushdb" signal, and make Sites connect to it to flush the cache when the db gets flushed ?
21:00 brosner
korpios: you prefer the route where the datetime object is aware of its timezone? i tend to go the other way and normalize.
21:00 korpios
brosner: dealing with multiple time zones simultaneously in one site ... can't do that
21:01 brosner
not sure i follow?
21:01 korpios
brosner: various pages need to be aware of exactly what timezone the user is in, relative to the object's timezone, and correct
21:01 brosner
yeah i implemented that on pinax using django-timezones
21:02 korpios
brosner: does that allow saving the timezone?
21:02 brosner
i leave that up to the user, see http://code.google.com/p/django-timezones/
21:03 korpios
we can't just save an offset or save only UTC, because we lose the original timezone, and that's important to us
21:03 korpios
err ... "Initial code. Nothing is functional at this point." ^_^
21:03 brosner
it is functioning.
21:04 brosner
just light on docs
21:04 korpios
lol okay was going by the commit message
21:04 brosner
heh
21:04 brosner
yeah at *that* time it wasn't :P
21:06 korpios
brosner: yeah, this doesn't cover what we need :-/ been banging my head against this for a bit already, sigh ^_^
21:07 brosner
hmm, but surely it just missing functionality that can be added?
21:07 brosner
my code goes both ways of users entering their timezone and returning their timezone
21:07 brosner
in terms of a datetime
21:09 korpios
thing is, we need the time zone *name* stored, since that's the only thing that understands things like DST switches when we pull it later and compare it up against a view in a different time zone ... we can't rely on settings.TIME_ZONE, we set that to UTC, because it's one site with views involving many time zones
21:10 brosner
my code doesn't assume how you stored the per user timezone just provides helpers to returning the localized datetime
21:10 korpios
yeah, that's not really the issue at hand ^_^
21:11 brosner
join #django-hotclub might be best for this discussion. there are other people in their that might help
21:11 korpios
hmmm
21:16 telenieko
mm... #7514 lead to a worse bug :)
21:16 DjangoBot
21:19 Alex_Gaynor
Does that patch solve the issue?
21:19 telenieko
Alex_Gaynor: yes, all test pass
21:19 telenieko
I'll file a bug later about Site.objects.get_current() ;)
21:19 arien_
korpios: maybe I'm being dense, but couldn't you relate the user to the timezone (as a model or choice or whatever)?
21:20 korpios
arien_: it has nothing to do with the user, actually ^_^
21:20 korpios
this isn't user preference
21:21 arien_
the objects you mention aren't (and don't have to be) "timezone-aware", right? I thought the problem was with the users.
Page 3 of 4   ← Previous  Next →(333 total)