*** Lumiere has quit IRC | 00:42 | |
*** Lumiere has joined #schooltool | 00:44 | |
*** lisppaste5 has quit IRC | 00:48 | |
*** lisppaste5 has joined #schooltool | 00:49 | |
*** dlobo has joined #schooltool | 00:52 | |
*** Lumiere has quit IRC | 01:17 | |
*** alga has quit IRC | 01:26 | |
*** dlobo has quit IRC | 02:06 | |
*** menesis has quit IRC | 02:09 | |
*** dlobo has joined #schooltool | 02:19 | |
*** dlobo has quit IRC | 02:29 | |
*** pcardune has quit IRC | 03:34 | |
*** Lumiere has joined #schooltool | 03:41 | |
*** ignas has quit IRC | 03:46 | |
*** dlobo has joined #schooltool | 04:01 | |
*** pcardune has joined #schooltool | 04:15 | |
*** pcardune has quit IRC | 04:27 | |
*** jelkner has joined #schooltool | 04:36 | |
*** jelkner has quit IRC | 04:45 | |
*** dlobo has quit IRC | 04:56 | |
*** dlobo has joined #schooltool | 05:08 | |
*** dlobo has quit IRC | 05:11 | |
*** krushik has quit IRC | 05:25 | |
*** dlobo has joined #schooltool | 05:36 | |
*** dlobo has quit IRC | 05:57 | |
*** yvl has quit IRC | 09:21 | |
*** krushik has joined #schooltool | 09:59 | |
*** krushik has quit IRC | 10:05 | |
*** krushik has joined #schooltool | 10:07 | |
*** yvl has joined #schooltool | 10:32 | |
aelkner | yvl: i need your help | 10:47 |
---|---|---|
yvl | hi aelkner | 10:47 |
yvl | will be with you in a minute | 10:47 |
yvl | (coffee, as usual ;) | 10:47 |
aelkner | :) | 10:47 |
aelkner | i'll explain in the meantime | 10:48 |
yvl | please do :) | 10:48 |
aelkner | i went to install the latest version of schooltool.intervention at SLA | 10:48 |
aelkner | i have them using my december_fixes branch, so i just needed to bzr pull | 10:49 |
aelkner | i've noticed that i always need to run bin/buildout -n after changing code | 10:49 |
aelkner | because there are some hard links being used (i think?) | 10:49 |
aelkner | anyway, as i ran bin/buildout -n, it fails: | 10:50 |
aelkner | Installing schooltool. | 10:50 |
aelkner | Download error: (-2, 'Name or service not known') -- Some packages may not be found! | 10:50 |
aelkner | While: | 10:50 |
aelkner | Installing schooltool. | 10:50 |
aelkner | Error: There is a version conflict. | 10:50 |
aelkner | We already have: zope.location 3.4.0 | 10:50 |
aelkner | but zope.intid 3.7.1 requires 'zope.location>=3.5.4'. | 10:50 |
aelkner | in the process, bin/start-schooltool-instance was removed | 10:51 |
aelkner | so now, i can't start the server | 10:51 |
aelkner | this is where my hard link theory come into play | 10:51 |
aelkner | i tried copying my version of bin/start-schooltool-instance into the bin directory at SLA | 10:52 |
aelkner | but it won't run it | 10:52 |
aelkner | it's there, but is says it can't find it | 10:52 |
aelkner | aelkner@curie:/srv/schooltool/schooltool$ ls -l bin/start-schooltool-instance | 10:54 |
aelkner | -rwxr-xr-x 1 root root 9180 2009-12-14 03:17 bin/start-schooltool-instance | 10:54 |
aelkner | aelkner@curie:/srv/schooltool/schooltool$ sudo bin/start-schooltool-instance instance | 10:54 |
aelkner | [sudo] password for aelkner: | 10:54 |
aelkner | sudo: unable to execute bin/start-schooltool-instance: No such file or directory | 10:54 |
aelkner | so i'm really confused here | 10:54 |
yvl | hmm | 10:54 |
yvl | reading... | 10:55 |
yvl | as for Download error, you can ignore that | 10:55 |
yvl | it's pretty harmless | 10:55 |
aelkner | ok | 10:55 |
yvl | as for zope.intid 3.7.1... | 10:56 |
yvl | please give me a moment to look up version dependencies | 10:56 |
yvl | odd, it should use zope.intid 3.4.1 | 10:57 |
yvl | oh, wait | 10:58 |
yvl | it should not use zope.intid | 10:58 |
yvl | have you tried running `bin/buildout` without `-n`? | 11:00 |
aelkner | no, not yet | 11:01 |
aelkner | i'll try that | 11:01 |
aelkner | same error, same no start script | 11:01 |
yvl | did you set up .buildout (the egg cache) there? | 11:03 |
yvl | or are eggs checked out in schooltool_something/eggs ? | 11:03 |
yvl | we can try this: | 11:05 |
yvl | find your egg directory | 11:05 |
yvl | go to it | 11:05 |
yvl | and run grep -r zope.intid * | grep requires.txt | 11:05 |
yvl | that should be veeeery slow | 11:05 |
yvl | and give you the possible packages that require zope.intid | 11:05 |
aelkner | ok, i'll do that | 11:06 |
yvl | it seems that some packages got newer versions than we're ready for | 11:06 |
yvl | and during Zope's refactorings they were split into several | 11:06 |
yvl | so those packages got upgraded, and required zope.intid (that schooltool versions.cfg knows nothing about) | 11:06 |
yvl | and zope.intid depends on newer Zope packages than ST uses | 11:07 |
yvl | at least that's my theory | 11:07 |
aelkner | aelkner@curie:/srv/schooltool/schooltool/eggs$ grep -r zope.intid * | grep requires.txt | 11:08 |
aelkner | hurry.query-1.0.0-py2.5.egg/EGG-INFO/requires.txt:zope.intid | 11:08 |
aelkner | zope.catalog-3.8.0-py2.5.egg/EGG-INFO/requires.txt:zope.intid | 11:08 |
aelkner | zope.intid-3.7.1-py2.5.egg/EGG-INFO/SOURCES.txt:src/zope.intid.egg-info/requires.txt | 11:08 |
yvl | hmm, http://ftp.schooltool.org/schooltool/1.2/versions.cfg knows nothing about zope.catalog | 11:09 |
yvl | run `grep -r zope.catalog * | grep requires.txt` now :) | 11:09 |
aelkner | aelkner@curie:/srv/schooltool/schooltool/eggs$ grep -r zope.catalog * | grep requires.txt | 11:09 |
aelkner | hurry.query-1.0.0-py2.5.egg/EGG-INFO/requires.txt:zope.catalog | 11:09 |
aelkner | zope.catalog-3.8.0-py2.5.egg/EGG-INFO/SOURCES.txt:src/zope.catalog.egg-info/requires.txt | 11:09 |
yvl | ah | 11:11 |
yvl | it's hurry.query | 11:11 |
yvl | I think you'r deployment uses http://ftp.schooltool.org/schooltool/eggs/3.4/versions.cfg | 11:12 |
yvl | and schooltool now uses http://ftp.schooltool.org/schooltool/1.2/versions.cfg | 11:12 |
yvl | if you opened those two in the browser, you'd see that hurry.query version is not pinned in 3.4/versions.cfg | 11:12 |
yvl | that's why buildout -n got the newer version than we can handle | 11:13 |
aelkner | so if i change the extends statement...? | 11:13 |
yvl | that would work | 11:13 |
yvl | I think :) | 11:13 |
yvl | you usually run buildout and the server from /srv/schooltool/schooltool , right? | 11:14 |
aelkner | right | 11:14 |
aelkner | and i usually use -n | 11:14 |
aelkner | though i don't know when it is needed? | 11:15 |
aelkner | needed | 11:15 |
yvl | can you show me the lines `extends` and `find-links` from it's buildout.cfg | 11:15 |
aelkner | btw, it's getting further | 11:15 |
aelkner | uh oh | 11:15 |
yvl | I think you want to change `find-links` to http://ftp.schooltool.org/schooltool/1.2/ also | 11:15 |
yvl | uh oh? | 11:16 |
aelkner | well, it crashes for a different reason now | 11:16 |
aelkner | An internal error occured due to a bug in either zc.buildout or in a | 11:16 |
aelkner | recipe being used: | 11:16 |
aelkner | IOError: [Errno 28] No space left on device | 11:16 |
yvl | :D | 11:16 |
yvl | well I think that error pretty much explains itself :) | 11:17 |
aelkner | how do you tell how much space is left? | 11:17 |
yvl | df -lh | 11:17 |
aelkner | i see the usage | 11:18 |
aelkner | i can delete some large files | 11:18 |
aelkner | bin/buildout didn't fail this time | 11:20 |
aelkner | make run did, though | 11:20 |
aelkner | trying with bin/buildout -n | 11:20 |
aelkner | still get this error: | 11:20 |
aelkner | ImportError: No module named transaction | 11:20 |
aelkner | btw, that error is during make run, not bin/buildout -n | 11:21 |
yvl | hmm | 11:21 |
yvl | transaction is a python thing | 11:21 |
aelkner | when i say make run, of course i mean bin/start-schooltool-instance instance | 11:22 |
yvl | yes. transaction should be in your system python | 11:22 |
yvl | sorry, I'm away for 5-7 mins | 11:22 |
aelkner | do i need to make ubuntu-environment? | 11:22 |
aelkner | actually, isn't transaction something that could go in the eggs directory? | 11:36 |
aelkner | for instance, i found this in the eggs: | 11:37 |
aelkner | mechanize-0.1.11-py2.5.egg | 11:37 |
aelkner | no transaction, however | 11:40 |
yvl | transaction should be in system python | 11:41 |
*** menesis has joined #schooltool | 11:41 | |
aelkner | why is that? | 11:41 |
yvl | no, wait | 11:42 |
yvl | I was wrong | 11:42 |
yvl | ok | 11:43 |
yvl | back to the eggs dir | 11:43 |
yvl | `grep -r transaction * | grep requires.txt` | 11:43 |
*** alga has joined #SchoolTool | 11:43 | |
aelkner | empty results | 11:43 |
yvl | can you paste the full traceback when running `make run` | 11:45 |
aelkner | ok | 11:45 |
yvl | (transaction should be located in ZODB3 3.8.4 egg) | 11:46 |
lisppaste5 | aelkner pasted "make run traceback" at http://paste.lisp.org/display/92066 | 11:47 |
yvl | hmm | 11:48 |
yvl | can you paste contents of bin/start-schooltool-instance ? | 11:48 |
aelkner | the contents of the script? | 11:49 |
yvl | yes | 11:49 |
yvl | it should basically be a list of included eggs | 11:49 |
lisppaste5 | aelkner annotated #92066 "untitled" at http://paste.lisp.org/display/92066#1 | 11:50 |
yvl | cd srv/schooltool/schooltool/eggs/ZODB3-3.8.4-py2.5-linux-i686.egg | 11:51 |
yvl | ls | 11:51 |
yvl | cd transaction | 11:51 |
yvl | ls | 11:51 |
yvl | a list of files, including __init__.py, right? | 11:52 |
aelkner | there is no transaction directory in srv/schooltool/schooltool/eggs/ZODB3-3.8.4-py2.5-linux-i686.egg | 11:53 |
yvl | freaking buildout | 11:53 |
yvl | god, that software is broken | 11:53 |
yvl | I've seen this happening | 11:53 |
yvl | cd srv/schooltool/schooltool | 11:54 |
yvl | rm -rf eggs | 11:54 |
yvl | bin/buildout | 11:54 |
aelkner | -n? | 11:54 |
yvl | it will work this time | 11:54 |
yvl | not necessary this time | 11:54 |
yvl | -n just prefers newer packages | 11:54 |
yvl | first checkout of eggs should work the same | 11:55 |
yvl | it's just useful later on | 11:55 |
aelkner | aelkner@curie:/srv/schooltool/schooltool$ sudo rm -rf eggs/ | 11:55 |
aelkner | aelkner@curie:/srv/schooltool/schooltool$ sudo bin/buildout | 11:55 |
aelkner | Traceback (most recent call last): | 11:55 |
aelkner | File "bin/buildout", line 9, in <module> | 11:55 |
aelkner | import zc.buildout.buildout | 11:55 |
aelkner | ImportError: No module named zc.buildout.buildout | 11:55 |
yvl | make buildout ? | 11:55 |
aelkner | same | 11:56 |
yvl | I got the directory wrong? | 11:56 |
yvl | (sorry, my attention span is a bit erratic today ) | 11:57 |
aelkner | :) | 11:57 |
aelkner | mine's that way usually :) | 11:57 |
yvl | go to the directory that you run ST server from | 11:57 |
yvl | make clean | 11:57 |
yvl | make build | 11:57 |
yvl | basically, you need to wipe out your eggs cache | 11:58 |
aelkner | ah, the cache | 11:58 |
yvl | yes | 11:58 |
aelkner | ?! | 11:58 |
aelkner | :) | 11:58 |
aelkner | i won't even pretend to know what you're talking about | 11:59 |
yvl | the directory where buildout downloaded the eggs | 11:59 |
yvl | some of them are broken | 11:59 |
yvl | because when buildout fails in the middle of egg download | 11:59 |
aelkner | but i did a rm -rf eggs | 11:59 |
yvl | (not enough disk space in your scenario) | 11:59 |
yvl | it should have kept bin/buildout... | 11:59 |
yvl | no idea why it's missing\ | 12:00 |
yvl | so, when buildout fails in the middle, it pretends that everything went ok | 12:00 |
yvl | and it refuses to renew broken eggs by default | 12:00 |
yvl | genuine piece software | 12:01 |
yvl | * piece of | 12:01 |
aelkner | :) | 12:02 |
aelkner | that's too bad though | 12:02 |
yvl | recently I had to debug it | 12:02 |
aelkner | because what it contends to deliver is actually extremely useful | 12:02 |
yvl | well, there are alternatives being built | 12:03 |
yvl | we'll see how they evolve | 12:03 |
yvl | by the way, few weeks ago it failed to download a zipped egg because of broken internet connection | 12:04 |
yvl | the error it was giving in later retries: cannot untar the egg | 12:04 |
yvl | good luck figuring that error out :) | 12:04 |
aelkner | yeah, not good | 12:05 |
yvl | (I think it even broke *in* the untaring code) | 12:05 |
yvl | ok, hope it all works for you now | 12:05 |
aelkner | yvl: success! | 12:07 |
aelkner | thanks for bailing me out on this one | 12:07 |
yvl | youre welcome :) | 12:08 |
aelkner | the great part of it is: i get to tell them it's fixed before they even wake up to find it was broken :) | 12:09 |
yvl | cool :) | 12:11 |
yvl | well, sysadmins are usualy the ones doing their magic rituals at night... ;) | 12:12 |
aelkner | i just play one on tv... | 12:14 |
yvl | :) | 12:17 |
*** ignas has joined #schooltool | 12:35 | |
*** menesis has quit IRC | 13:39 | |
*** mgedmin has joined #schooltool | 14:00 | |
* Lumiere wants to shoot a buildout developer | 14:37 | |
Lumiere | how hard is it | 14:37 |
Lumiere | to add in a "get a md5sum" | 14:37 |
Lumiere | "check md5sum before untarring, if fail redownload, if fail again notify user" | 14:38 |
ignas | wrong channel ;) | 14:39 |
yvl | technically, it's not buildout, it's setuptools | 14:39 |
ignas | that too probably | 14:40 |
ignas | distribut anyone? | 14:40 |
yvl | also the easy_install part of setuptools | 14:40 |
ignas | or how was that replacement called | 14:40 |
*** menesis has joined #schooltool | 14:40 | |
yvl | ignas: waiting for it to mature | 14:40 |
yvl | then - boom chow kapow! | 14:40 |
yvl | distribute | 14:40 |
Lumiere | imo | 14:40 |
Lumiere | I'd rather them fix the one that exists | 14:41 |
Lumiere | then build 5 more cause the first is broken | 14:41 |
yvl | they kind of cannot do that | 14:41 |
Lumiere | switching between build methods is a pain | 14:41 |
yvl | that's why the fork was born | 14:41 |
Lumiere | heh | 14:41 |
yvl | read the easy_install code | 14:41 |
Lumiere | at least it isn't a sporife | 14:41 |
yvl | it's written in "kind of working, but omg what will happen if it breaks and good luck fixing that then" coding style | 14:42 |
Lumiere | sp(oon)+(f)or(k)+(kn)ife :) | 14:42 |
Lumiere | eww | 14:42 |
yvl | so I'm for the fork | 14:43 |
yvl | go, distribute, go! :) | 14:43 |
*** th1a has joined #schooltool | 15:45 | |
*** replaceafill has joined #schooltool | 16:04 | |
*** dlobo has joined #schooltool | 16:05 | |
*** ignas has quit IRC | 16:22 | |
*** alga has quit IRC | 16:22 | |
*** Lumiere has quit IRC | 16:22 | |
*** Lumiere has joined #schooltool | 16:25 | |
*** alga has joined #SchoolTool | 16:25 | |
*** ignas has joined #schooltool | 16:26 | |
th1a | hi replaceafill, aelkner, yvl, menesis, Lumiere. | 16:31 |
aelkner | morning | 16:32 |
replaceafill | good morning | 16:32 |
th1a | menesis: So just update the about page in the application from the book copy? | 16:32 |
menesis | th1a: i will | 16:32 |
menesis | good morning | 16:33 |
yvl | morning th1a | 16:33 |
* yvl remembered that yvl forgot to make some coffee in time.... again | 16:33 | |
yvl | apologies | 16:33 |
th1a | I made my coffee in a french press today, which reminded me of doing that with Ignas in the POV offices. | 16:34 |
ignas | :) | 16:36 |
th1a | Let's see... a few other pending bug discussions... | 16:36 |
th1a | aelkner: Null/ungraded activities should not be used in grade calculations. | 16:37 |
th1a | Even when imported from other sheets. | 16:37 |
th1a | That's the question, right? | 16:37 |
aelkner | right | 16:38 |
aelkner | that answers it | 16:38 |
th1a | Basically, if people want 0's by default atm they can just fill down zeros. | 16:38 |
aelkner | i had a lot to talk about today, but unfortunately, lehmann just gave me some bad news | 16:39 |
th1a | ? | 16:39 |
aelkner | you'll note the email i just sent | 16:39 |
th1a | What happened? | 16:40 |
aelkner | i don't know yet | 16:40 |
th1a | What's the error? | 16:40 |
th1a | Traceback? | 16:40 |
aelkner | here's the thing so far | 16:40 |
aelkner | installing the latest schooltool.intervention caused the evolve script to run | 16:41 |
th1a | Which evolve script again? | 16:41 |
aelkner | the one that converts dublincore to object attributes | 16:42 |
th1a | ok | 16:42 |
aelkner | i added a new attribute to each object called creation_date | 16:42 |
aelkner | and populated it from the dublincore settings | 16:42 |
aelkner | the traceback is complaining that some of the creation_date setting in a list of messages | 16:43 |
aelkner | is not comparable, i assume, set to Null | 16:43 |
Lumiere | hi all | 16:43 |
th1a | hi Lumiere. | 16:43 |
aelkner | it could be that some of the pre-evolve messages had no dublincore settings | 16:43 |
aelkner | hence, creation_date is Null | 16:44 |
th1a | Did you need to push those changes to them now? | 16:44 |
aelkner | i'll admit that i ought to have planned more carefully | 16:44 |
aelkner | overconfidence in this all working got the better of me, i'm afraid | 16:44 |
th1a | Overconfidence and live servers don't work together well. | 16:45 |
aelkner | true enough | 16:45 |
aelkner | anyway, i believe i can resolve their traceback if i make the sort treat Null creation_date settings as old dates | 16:46 |
aelkner | say jan 1, 1980 | 16:46 |
th1a | Where did the dates used to be? | 16:47 |
menesis | so you need to add a check in the code if creation_date is None and also make the evolve script handle that | 16:47 |
aelkner | that's the thing, they didn't have dublincore settings | 16:47 |
th1a | Did you try to sort them by date before? | 16:47 |
aelkner | so they didn't have a date, this is what i'm guessing | 16:47 |
aelkner | it cold be something else | 16:47 |
menesis | not 1980, but today | 16:47 |
aelkner | i need to recreate this on my local instance | 16:48 |
menesis | the date of the fix | 16:48 |
Lumiere | aelkner: make it change null to 0 or now() | 16:48 |
ignas | emm, 0 ? | 16:48 |
Lumiere | 0 -> Jan 1 1970 | 16:48 |
ignas | python does not do timestamps I think ;) | 16:48 |
Lumiere | blah :) | 16:48 |
th1a | If you sorted by date before, something must have been there. | 16:48 |
ignas | aelkner, what does the traceback look like? | 16:48 |
Lumiere | ignas: freaking non-standard date formats ;) | 16:49 |
ignas | as in - can you post it? | 16:49 |
ignas | Lumiere, hey, it's not Zope2 DateTime at least ;) | 16:49 |
Lumiere | no kidding... I had to use that | 16:49 |
Lumiere | in HS with jelkner | 16:49 |
lisppaste5 | aelkner pasted "sla traceback" at http://paste.lisp.org/display/92076 | 16:49 |
ignas | Lumiere, did they compensate you for that? | 16:50 |
Lumiere | for the work yes | 16:50 |
Lumiere | for the mental and emotional hardship | 16:50 |
Lumiere | no | 16:50 |
ignas | and medicare? :) | 16:50 |
ignas | ouch ouch ouch | 16:50 |
ignas | the traceback | 16:50 |
ignas | it's not about None | 16:50 |
Lumiere | god that is a really ugly error | 16:50 |
ignas | you are comparing a timezoned datetime | 16:51 |
ignas | with a non-timezoned datetime | 16:51 |
yvl | ooooh | 16:51 |
yvl | ouch ouch | 16:51 |
ignas | good luck | 16:51 |
Lumiere | aelkner: the obvious solution is to catch the typeerror | 16:51 |
Lumiere | and try again casting the naive one to server's TZ | 16:51 |
yvl | ignas: force UTC, I say | 16:51 |
ignas | the obvious solution is to write a comparator | 16:51 |
ignas | that converts both to utc before sorting | 16:52 |
ignas | and after that - you can do whatever you want with them | 16:52 |
th1a | Is this strictly a problem caused by migration? | 16:52 |
aelkner | i'm unable to recreate on my server, so i think it could have been my patch script that was ill-timed | 16:52 |
th1a | Er, evolution. | 16:52 |
aelkner | i need to revert their Data.fs to before the evolve | 16:52 |
aelkner | and then i will start the server again, let it evolve | 16:52 |
aelkner | and make sure that the bug is not there | 16:52 |
aelkner | then i know it was the patch | 16:52 |
* Lumiere notes that is solvable without reverting | 16:53 | |
ignas | the problem is in the ZODB really, not in the code | 16:53 |
th1a | Does the underlying interventions code need to change the way it handles dates? | 16:53 |
aelkner | i need to know wnhy the data is not a problem on my side | 16:53 |
ignas | unless | 16:53 |
aelkner | ignas: right, the ZODB | 16:53 |
ignas | 'creation_time' get's generated on request | 16:53 |
aelkner | that's why i want to revert | 16:53 |
ignas | *gets | 16:53 |
ignas | emm ? revert? | 16:53 |
ignas | why? | 16:53 |
Lumiere | yvl / th1a there should be a standard st date class | 16:53 |
aelkner | ignas: yes, that's it | 16:53 |
ignas | evolution scripts to not commit if they fail | 16:53 |
aelkner | non-visited message will have no dublincore create date/time | 16:54 |
Lumiere | ignas: didn't fail :) wasn't written to catch case | 16:54 |
ignas | you don't need to catsh | 16:54 |
ignas | if evolution script throws an exception | 16:54 |
ignas | it will not commit anything | 16:54 |
aelkner | it doesn't throw an exception | 16:54 |
Lumiere | aelkner: just write a little code bit that either converts the timestamp or allows comparison of the timestamps | 16:55 |
ignas | yvl, any place where I can see the evolution script that did this? | 16:57 |
ignas | also - no need to revert anything, I think you can just write an evolution script that fixes the database | 16:57 |
ignas | I *think* I have to see the previous script to be sure | 16:57 |
yvl | ignas: http://bazaar.launchpad.net/~aelkner/schooltool.intervention/december_fixes/annotate/head%3A/src/schooltool/intervention/generations/evolve1.py | 16:58 |
aelkner | ignas: in the meantime, i can make the sorted statements be able to handle None | 16:59 |
aelkner | and get the app back up for them | 16:59 |
ignas | it's not None | 16:59 |
ignas | it's 2 different kinds of datetime | 16:59 |
yvl | ignas: new ones have their dates assigned here: http://bazaar.launchpad.net/~aelkner/schooltool.intervention/december_fixes/annotate/head%3A/src/schooltool/intervention/intervention.py | 16:59 |
yvl | see .created = datetime.now() | 16:59 |
ignas | ow ow ow | 16:59 |
ignas | utcnow() kthxbye | 17:00 |
yvl | exactly | 17:00 |
aelkner | please explain | 17:00 |
ignas | so now you want to find all TZ unaware datetimes created by datetime.now | 17:00 |
ignas | and convert them to utc | 17:00 |
ignas | in an evolution script | 17:00 |
aelkner | ignas: just to be clear | 17:00 |
menesis | is there an utility function to do that in schooltool? | 17:00 |
aelkner | it's not that the values are None | 17:01 |
aelkner | it's that they are of this bad date type? | 17:01 |
yvl | to be more specifi c | 17:01 |
th1a | In practice, these are all EST or EDT. | 17:01 |
yvl | you should do (I think): pytz.utc.localize(datetime.utcnow()) | 17:01 |
ignas | dt = pytz.UTC.localize(dt) | 17:01 |
ignas | should work | 17:01 |
ignas | dt > pytz.UTC.localize(dt) will fail with the error we saw | 17:01 |
ignas | if dt is datetime.datetime.now() | 17:02 |
aelkner | problem is: i need to patch their data within an hour if possible | 17:02 |
aelkner | so that means | 17:02 |
*** krushik has quit IRC | 17:02 | |
aelkner | something faster than evolution with testing | 17:02 |
ignas | so write an evolution script that goes through all the objects | 17:02 |
ignas | and does the operation I just wrote | 17:02 |
ignas | on all created dates | 17:02 |
ignas | because fixing 1 place in code | 17:02 |
ignas | where dates are sorted | 17:02 |
ignas | can leave 9 places still broken | 17:02 |
aelkner | true, i'd lke the data fixed | 17:03 |
aelkner | can you explain exactly what change you meant? | 17:03 |
ignas | obj.created = pytz.UTC.localize(obj.created) | 17:03 |
ignas | will probably work | 17:03 |
aelkner | ok | 17:03 |
ignas | test it! | 17:03 |
ignas | oh, utcnow is also time agnostic | 17:04 |
ignas | so either you fix all the code | 17:04 |
ignas | to assign pytz.UTC.localize(datetime.utcnow()) | 17:04 |
ignas | instead of datetime.now() | 17:04 |
ignas | or | 17:04 |
ignas | you convert all the timezone aware .created | 17:05 |
ignas | into non-timezone aware .created | 17:05 |
yvl | ok | 17:05 |
yvl | ignas, your printing too much unsorted details here ;) | 17:05 |
yvl | aelkner: you need to do two things: | 17:05 |
yvl | 1) in the code, change .created = datetime.now() to .created = pytz.UTC.localize(datetime.utcnow()) | 17:06 |
aelkner | i'm creating evolve2.py | 17:06 |
aelkner | it's looping though all messages and goals as evolve1.py did | 17:07 |
yvl | 2) write a new evolution script, that goes through all dates that were assigned this way | 17:07 |
aelkner | and it's doing the obj.creted = ... | 17:07 |
aelkner | as ignas suggested | 17:07 |
yvl | wait | 17:07 |
aelkner | ok | 17:07 |
yvl | first check if the dates were localized | 17:07 |
yvl | try: | 17:07 |
ignas | if obj.created.tzinfo is None: obj.created = ... | 17:08 |
yvl | ok, that's even better | 17:08 |
aelkner | ok, to reitterate: | 17:08 |
yvl | if obj.created.tzinfo is None: obj.created = pytz.UTC.localize(obj.created) | 17:08 |
aelkner | ok, you beat me to it | 17:09 |
yvl | :) | 17:09 |
aelkner | that's the line of code that i'll aplly to all messages and goals | 17:09 |
ignas | just don't forget http://bazaar.launchpad.net/~aelkner/schooltool.intervention/december_fixes/annotate/head%3A/src/schooltool/intervention/intervention.py | 17:09 |
ignas | datetime.now() have to be fixed too | 17:09 |
aelkner | is it import pytz? | 17:10 |
ignas | yes | 17:10 |
aelkner | ok, i'm putting a pdb trap inside the if | 17:12 |
aelkner | it never reaches there with my zodb | 17:12 |
aelkner | that's what bothers me about this | 17:12 |
ignas | print the tzinfo bit | 17:13 |
aelkner | (Pdb) obj.created | 17:13 |
aelkner | datetime.datetime(2008, 5, 12, 16, 22, 26, 468435, tzinfo=tzinfo(0)) | 17:13 |
aelkner | all of the objects in my Data.fs have that attribute set | 17:13 |
yvl | aelkner: in your DB, did you have messages there before evolution 1 and created new ones after evolution 1 but before evolution 2? | 17:13 |
ignas | I have a theory | 17:13 |
ignas | you have to create a message | 17:14 |
aelkner | yvl: yes | 17:14 |
ignas | because new messages are broken | 17:14 |
aelkner | maybe i haven't yet | 17:14 |
yvl | you have to create a message with new code, after evolution 1 passed | 17:14 |
aelkner | i can abort the evolve2 and set the generation back to 1 for a second to make that edit | 17:15 |
yvl | and you have to have old messages that migrated *existing* messages from dublincore | 17:15 |
yvl | or you will not get the error | 17:15 |
ignas | both - old and new | 17:17 |
ignas | old have tzinfo set to tzinfo(0) <- WTF!? | 17:17 |
ignas | new ones don't have it | 17:17 |
*** dlobo has quit IRC | 17:19 | |
aelkner | yvl: excellent, i was able to recreate the bug! | 17:21 |
yvl | congratulations ;) | 17:21 |
aelkner | now i can evolve it to see if that fixes it | 17:21 |
aelkner | it worked! | 17:22 |
aelkner | ignas, yvl: many thanks for the assist | 17:22 |
aelkner | i can install this on their server pronto and get them back up | 17:22 |
aelkner | but i need to fix how i create new ones, too | 17:23 |
yvl | yes, please :) | 17:23 |
aelkner | self.created = pytz.UTC.localize(datetime.utcnow()) | 17:24 |
aelkner | in both message ad goal constructors, does that sound like everything? | 17:24 |
ignas | sound like, yes, but "gid datetime | grep now | grep schooltool" would be nice to be sure ;) | 17:25 |
yvl | did the grep | 17:26 |
yvl | those two places only, at least in interventions | 17:26 |
aelkner | that's it then | 17:26 |
ignas | good | 17:26 |
ignas | otoh - don't you have ITimeManage or whatever utility? | 17:27 |
ignas | and can't it do the "now" thing properly? | 17:27 |
ignas | though, that you can start using later ;) | 17:27 |
ignas | in an hour or so :) | 17:28 |
yvl | we have DateManagerUtility | 17:28 |
aelkner | right now i got to get this fix to them asap | 17:28 |
* Lumiere notes that there should really be a schooltool common date that everything uses | 17:28 | |
yvl | it has .today() | 17:28 |
yvl | it also does tzinfo = pytz.timezone(IApplicationPreferences(app).timezone) | 17:28 |
yvl | and returns dt.astimezone(tzinfo).date() | 17:28 |
yvl | and that kind of **** | 17:29 |
ignas | nope | 17:29 |
ignas | that's the correct way IIRC | 17:29 |
ignas | you don't want UTC today! seriously | 17:29 |
ignas | that messes up the calendar | 17:29 |
ignas | and you don't want server side today! | 17:29 |
ignas | that messes up the calendar even more ;) | 17:29 |
ignas | also - most of the time, the app pref timezone is utc | 17:30 |
yvl | .date() part | 17:31 |
ignas | yep, what's wrong with it? | 17:31 |
yvl | it's not a timestamp | 17:31 |
yvl | it's a date | 17:31 |
yvl | need to add now | 17:32 |
ignas | well - today() is a date | 17:32 |
ignas | ahh | 17:32 |
ignas | there is no now there | 17:32 |
ignas | yeah, add it | 17:32 |
yvl | need to move DateManagerUtility in sane place | 17:32 |
ignas | yes, you need yto | 17:32 |
yvl | not in term/term.py | 17:32 |
yvl | I know | 17:32 |
ignas | and separate the term getting logic from it | 17:32 |
yvl | I know | 17:32 |
ignas | and start using it :D | 17:32 |
Lumiere | that should be a mandatory utility | 17:32 |
yvl | yes it should | 17:32 |
yvl | and eventually it will | 17:33 |
ignas | Lumiere, it even has an override in functional tests | 17:33 |
ignas | so you can set the time in the tests | 17:33 |
ignas | and it mostly works | 17:33 |
Lumiere | lol | 17:33 |
ignas | unless someone uses datetime.now directly | 17:33 |
ignas | in some place | 17:33 |
yvl | or the wole pytz.UTC.localize(datetime.utcnow()) in many places | 17:34 |
ignas | would have saved a *lot* of work for us if we'd have done it 4 years ago... | 17:34 |
yvl | yep | 17:34 |
yvl | on the other hand it's on my TODO list for like half a year | 17:35 |
yvl | already | 17:35 |
yvl | priorities... | 17:35 |
ignas | noone complains about calendars anymore | 17:35 |
* Lumiere kills profiles off his palm pre to reload things and fix them | 17:35 | |
Lumiere | we have calendars? | 17:36 |
th1a | OK... | 17:38 |
th1a | yvl & menesis: How have things been in Vilnius? | 17:38 |
yvl | hmm | 17:39 |
yvl | well, I've been working to build some Zope KGS we could port to | 17:39 |
yvl | almost there | 17:39 |
yvl | Do you want details? | 17:40 |
ignas | yes! | 17:40 |
yvl | I know *you* want | 17:40 |
yvl | :)))) | 17:40 |
ignas | can I keep both pieces? | 17:40 |
aelkner | th1a: i sent lehman the all's ok email | 17:40 |
yvl | ok then | 17:41 |
yvl | no details now | 17:41 |
yvl | basically, I'll start porting ST soon | 17:41 |
yvl | don't know what problems that will cause | 17:42 |
yvl | I asked Douglas Cerna to check if zope.html 2.0.0 works with ST | 17:42 |
*** krushik has joined #schooltool | 17:42 | |
th1a | Sorry... I pacing around the room. | 17:42 |
yvl | so maybe we'll have new CKEditor | 17:42 |
th1a | Good. | 17:42 |
yvl | maybe! | 17:42 |
th1a | I'll take a couple more details and try to stay in my seat. | 17:43 |
yvl | :) | 17:43 |
yvl | Once I have the wanted KGS finished | 17:43 |
yvl | (after checks with menesis) | 17:44 |
yvl | I'll start porting, menesis will start uploading Zope packages to ST PPA with a bit of delay | 17:44 |
yvl | this gives us a chance that we'll meet the bonus goal | 17:44 |
th1a | This KGS is a super-set of what's already in Ubuntu? | 17:44 |
yvl | yes | 17:45 |
yvl | it's a snapshot of one revision of still unreleased ZTK | 17:45 |
yvl | and a tweaked snapshot, by the way | 17:45 |
yvl | so it is kind of most likely stable | 17:46 |
yvl | it's the best we can do, in my opinion | 17:46 |
th1a | ok | 17:46 |
yvl | basically that's it without going into too much detail | 17:47 |
yvl | (and bragging about the script I wrote to compare various states of Ubuntu / ppa / ZTK / schooltool KGS versions ) | 17:47 |
yvl | unless menesis has something to add :) | 17:47 |
th1a | Sounds good. Thanks. | 17:48 |
th1a | replaceafill: How are you? | 17:48 |
th1a | I assigned you a bug (feature) last night. | 17:48 |
replaceafill | yes | 17:49 |
replaceafill | question about that | 17:49 |
yvl | ah, I forgot to mention that I asked replaceafill to postpone work on lovely.remotetask usage - I don't know yet if it will work at all with our new KGS | 17:49 |
replaceafill | th1a, we're going to take the email for teacher and parent from their contact info, right? | 17:49 |
replaceafill | i was wondering what are we going to do if they don't have any? | 17:50 |
th1a | Oh, just don't display the action? | 17:50 |
th1a | Can we do that? | 17:50 |
replaceafill | ah ok | 17:50 |
th1a | yvl: That sounds like a good idea. | 17:50 |
th1a | Not the best time to add shiny new components, fun as it is. | 17:50 |
*** dlobo has joined #schooltool | 17:50 | |
replaceafill | and if they do have emails, we use those addresses as "from" and "to" right? | 17:50 |
th1a | Yes. | 17:51 |
th1a | We should probably require the sender to have one in the system. | 17:51 |
replaceafill | and don't allow the teacher to change them? | 17:51 |
th1a | No. | 17:51 |
th1a | Don't allow. | 17:51 |
replaceafill | the only editable parts are subject and body then | 17:51 |
th1a | Yes. | 17:51 |
Lumiere | imo we should require all instructors and school administrators | 17:51 |
Lumiere | to have them | 17:52 |
replaceafill | th1a, cool, i'll work on that and will set up my old testing instance for you to see it | 17:52 |
replaceafill | i'll also work on the zope.html task yvl requested | 17:52 |
th1a | Lumiere, well, I don't know exactly how we'd "require" it. | 17:52 |
replaceafill | and yvl i have a quick question | 17:52 |
yvl | go ahead | 17:52 |
replaceafill | you wrote: "XXX: SMTPDataError is not caught yet. For one, invalid recipient list may cause it (code 555)" | 17:53 |
replaceafill | I tried several approaches with the "to_addresses" attribute in order to get it, and I got the 555 code but with SMTPRecipientsRefused exceptions instead | 17:53 |
replaceafill | do you remember what values you used to the the dataerror? | 17:53 |
yvl | sadly, no | 17:53 |
yvl | I think I passed a malformed email | 17:54 |
replaceafill | i was reading the RFC for SMTP yesterday and the DATA command is more related to the body of the message | 17:54 |
replaceafill | yes :) | 17:54 |
replaceafill | well, i'll keep trying | 17:54 |
yvl | hmm | 17:54 |
yvl | I think it may implement RFC < 100% | 17:55 |
yvl | you can try reading the code | 17:55 |
yvl | and see on what conditions it raises DataError | 17:55 |
replaceafill | will do | 17:55 |
*** ignas_ has joined #schooltool | 17:56 | |
replaceafill | th1a, i guess that's it, ah and i also check the problem with "umlauts" for schoooltool lyceum | 17:56 |
replaceafill | but didnt get too far | 17:56 |
th1a | Is there some underlying Zope/ZODB problem with non-ascii user id's? | 17:57 |
th1a | Or is this our problem. | 17:57 |
th1a | ? | 17:57 |
replaceafill | i think it's our side | 17:57 |
replaceafill | yvl, ignas? | 17:57 |
yvl | it is our problem | 17:58 |
replaceafill | the thing is that for basicpersons, usernames are their __name__ attributes | 17:58 |
th1a | Well, we should get this sorted for Cambodia, etc. | 17:58 |
yvl | yes we do | 17:58 |
yvl | it did not seem very trivial though - I don't remember why | 17:58 |
yvl | I wanted to check something | 17:59 |
replaceafill | there are a lot of places where __name__ is accessed | 17:59 |
yvl | don't remember, sorry | 17:59 |
replaceafill | or person.username | 17:59 |
yvl | I decided that this task should be addressed after Christmas release | 17:59 |
yvl | yes, replaceafill, that rings a bell | 17:59 |
yvl | maybe export/import? | 18:00 |
th1a | So hold off for a closer look or let replaceafill poke around? | 18:00 |
yvl | I'd say hold off | 18:00 |
yvl | unless replaceafill is very interested in this bug :) | 18:01 |
replaceafill | will not "officially" poke around :) | 18:01 |
yvl | :D | 18:01 |
ignas_ | ahh | 18:01 |
replaceafill | just for fun ;) | 18:01 |
ignas_ | most of the time unicode problems crop up | 18:01 |
ignas_ | in javascript | 18:01 |
replaceafill | yes, i'm really interested | 18:01 |
*** ignas has quit IRC | 18:01 | |
ignas_ | when you pass __name__ as a parameter womewhere | 18:01 |
ignas_ | also - if you try concatenating urls you might get "surprised" but I am not sure about that | 18:02 |
yvl | javascript, export/import, element ids in html, something else | 18:02 |
yvl | ah, yes | 18:02 |
yvl | urls also! | 18:02 |
replaceafill | authentication | 18:02 |
replaceafill | as principal.id | 18:02 |
ignas_ | yeah, that might fail too | 18:02 |
ignas_ | otoh - you should support unicode IDs everywhere... | 18:03 |
ignas_ | because managing a cabodian school will be hell otherwise | 18:03 |
ignas_ | you can transliterate it for the ruskies | 18:03 |
ignas_ | and germans | 18:03 |
ignas_ | but not chinese *probably* | 18:03 |
replaceafill | th1a thats it | 18:04 |
th1a | What do we have to do to "support unicode ID's everywhere?" | 18:04 |
th1a | Check everywhere? | 18:05 |
replaceafill | i think so | 18:05 |
Lumiere | write a utility to handle it? :) | 18:05 |
yvl | yes and yes | 18:05 |
th1a | Write tests that use Khmer names? | 18:05 |
ignas_ | it's not about utility, it's mostly a new class of "errors" that are possible | 18:05 |
yvl | exactly | 18:05 |
ignas_ | and that were made by us | 18:06 |
ignas_ | and not checked for | 18:06 |
replaceafill | th1a, i've added names like "josé" to test some things :) | 18:06 |
ignas_ | so - zope3 can work with unicode ids pretty well, unless you mess up, and we messed up :( | 18:06 |
ignas_ | and then we covered it up by making most of the ids ascii | 18:06 |
ignas_ | and replacing non ascii characters with '-' | 18:07 |
th1a | Oh... it is partly a problem because until last month or whatever URL's had to be ascii? | 18:07 |
ignas_ | not last month, las year | 18:07 |
ignas_ | I have started allowing non-ascii names somewhere around then | 18:08 |
ignas_ | and fixing all the things that broke when they brokew | 18:08 |
th1a | Didn't ICANN just change that or something? | 18:08 |
ignas_ | there are 2 parts in the url | 18:08 |
ignas_ | the "domain name" | 18:09 |
th1a | I guess I'm thinking of domain names. | 18:09 |
th1a | Yes. | 18:09 |
ignas_ | and "the path" | 18:09 |
th1a | OK. | 18:09 |
th1a | All right. | 18:09 |
th1a | Enough jibber jabber. | 18:09 |
yvl | it's gravel time :) | 18:10 |
th1a | I'll let you know when I hear back from Mark. | 18:10 |
th1a | Have a great week gentlemen! | 18:10 |
* th1a drops the bag of gravel. | 18:10 | |
*** dlobo has quit IRC | 18:38 | |
*** pcardune has joined #schooltool | 19:04 | |
*** dlobo has joined #schooltool | 19:26 | |
*** pcardune has quit IRC | 19:37 | |
*** dlobo_ has joined #schooltool | 19:41 | |
*** dlobo has quit IRC | 19:57 | |
*** dlobo_ is now known as dlobo | 19:57 | |
*** menesis has quit IRC | 20:08 | |
*** mgedmin has quit IRC | 20:20 | |
*** pcardune has joined #schooltool | 20:58 | |
*** menesis has joined #schooltool | 21:50 | |
*** dlobo has quit IRC | 22:06 | |
*** alga has quit IRC | 22:22 | |
*** dlobo has joined #schooltool | 22:26 | |
*** alga has joined #SchoolTool | 22:28 | |
*** alga has quit IRC | 23:18 | |
*** alga has joined #SchoolTool | 23:33 | |
*** th1a has quit IRC | 23:33 | |
*** pcardune has quit IRC | 23:47 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!