Please run a test for me (it takes only minutes)

In my post on Python and time zones I mentioned that I hadn’t tried this on Windows yet. But now I have, and I have painstakingly and with help from several Mac OS X users come up with something that may be a way of getting the time zone information reliably on both Linux, Mac OS X and Windows. But of course, I’m not sure.

So therefore, I’d like to ask you, dear reader, to make a quick test for me. Especially if you live in a strange timezone, or have an unusual os, or weird time zone setup, or anything else.

The steps are as follows:

svn co http://www.plone4artists.org/svn/projects/Plone4ArtistsCalendar/tztest/trunk tztest
cd tztest
python tztest/__init__.py

Whatever the output is, paste it as a comment on this blog post. If you get an unexpected result, i.e. and error, or if the time zone printed is wrong, then *please* leave a correct email address when you fill in the comment.

Announcing plone.grok: Grok on Plone!

(Small note: This package may very well be renamed in the near future).

On day 2 of the Paris Sprint Godefroid and me worked on plone.grok, making specific grokkers for some Plone things. Yesterday we make a grokker for GenericSetup import steps, and today we made a grokker for portlets in Plone. Or, well, during the afternoon we did. Before lunch we mostly talked politics. Well, sprints are supposed to be fun too, right!? :-)

So did we succeed? Yes, we did, and here is the proof:

OK, it doesn’t look like much, and the Python code do do this is still a but more complicated than I think is necessary, but we need to discuss with both Grok and Plone people to figure out how it should best be done, and what simplifications we can do.

Here is the code to create the above portlet:

from plone import grok
from zope.interface import Interface
from zope.interface import implements

class IExamplePortlet(Interface):
    pass

class Renderer(grok.Renderer):
    def render(self):
        return self.data.title

class ExamplePortlet(grok.Portlet):
    implements(IExamplePortlet)
    grok.provides(IExamplePortlet)
    grok.name('ExamplePortlet')
    grok.portlet_renderer(Renderer)

    title = "This is my fantastic portlet"

As you see, it’s a simplification from the current way, and best of all: There is no ZCML needed. You still need the GenericSetup profiles portlet.xml, though. I want to get rid of that too, but I want to hear from Plone people if they want it as well.

Announcing five.grok: Grok on Zope 2!

Godefroid Chapelle and me have been working here at the Paris Sprint on getting a grok-type layer into Zope2. It’s been going very well, so far, and the amount of problems we’ve had has been smaller than expected. The result is five.grok, which you can check out with svn://svn.zope.org/repos/main/five.grok/trunk.

So far only three things work: Adapters, Global Utilities (both we got from the new grokcore.component module, which works under Zope2) and basic View support. But for one day of work that’s pretty cool! There are many things that are still needed; more security tests, support for template directories, resources and static support, etc. We need help to get all this in, it’s not too difficult, but it is a lot of work! Raise your hand if you are interested!

We are now going to concentrate on starting plone.grok; grok-support for some Plone-specific stuff like portlets. This way both projects are well on their way, so other people can help in implementing all the use-cases.

Help with recurring events in Plone

Do you want recurring events in Plone? Now you can help! Either come to the sprint in Boston or pledge money. Anything helps, ten bucks or a thousand. It’s been a never ending story for years, lets finish it now, and get recurring events done!

Zope 3 rocks and rolls

I’ve had two real-world experiences with Zope 3 recently, which is a nice change from Plone. One of the basic rules of any development is “don’t fight the framework”, because most frameworks will continue to try to trip you over if you try to go around it. But in one of the projects which I’m involved in, the main developer doesn’t want to do things the Zope way. So we are not using the ZODB, and not using an ORM, although it still is supposed to be object-oriented and hierarchical in use. Of course we end up producing LOADS of code that could be avoided by either an ORM, or even better, by using the ZODB. If we used the ZODB we could probably throw out 90% of the code. The system would probably be faster too. But the thing is, it works. It’s a lot of work and a lot of code, but Zope 3 just gently steps a side and sais “OK, fine, if you don’t want to do it my way, then that’s you problem”. Zope 3 has all the features you need, but the design with aspect-oriented components, is flexible enough to let you not use the features you don’t want. Zope 3 rocks!

So, for another project, a community site, we looked into using Zope3, rather than Plone. There wasn’t that much content management needed, and Plone 3 doesn’t have many community features, so we were looking at not using so much of Plone, and implementing a lot ourselves. Sounded like a candidate for Zope 3. But we did want some basic CMS features, and didn’t want to implement them. So we looked at z3ext, a CMS written in Zope 3.

z3ext turned out to be a bit buggy. We simply couldn’t get the buildout to work. We fixed a couple of bugs locally, but after two-three bugs fixed it still wouldn’t work, and we gave up. The bugs were fixed by the z3ext guys a couple of days later, so don’t let that stop you, from checking it out, but it stopped us…

So we then tried using just some of the (non-buggy) modules of z3ext. I of course wanted to use Grok to speed up Zope3 development. The scaffolding code needed in Zope 3 is especially problematic in the beginning of a project, to get basic things up and running. Turned out that wasn’t possible. z3ext often uses things in modules that requires you to use the latest version of all Zope 3 modules even when those features really doesn’t add any features. If you use z3ext, you have to live on the bleeding edge of Zope 3. Grok, on the other hand, prefers stability. Grok has had problems with that changes to Zope 3 modules breaks all of Grok, so Grok is based on one of the pre-releases of 3.4. Of course, this means you can’t use the z3ext modules with Grok, which is really, really bad.

This is a symptom of one of the major current issues with Zope 3. The basic problem is of course that Zope 3.4 hasn’t been released in a final version. The eggifying of Zope means that some people are basically writing Zope 3.5 before 3.4 has even been released, and that’s a really bad situation. So we gave up on z3ext. I also do not want to live on the bleeding edge where I have to constantly keep track of which exactly which version of zope.app.whatever works with my project. I want a set of modules that is a proper version of Zope, and only switch one module out if there are bugs in it.

So then we fokused on using Grok, and tried to look for useful modules. First we tried lovey.tag. It was nicely documented, with a doctest README, which I started to read, and follow. After a while I realized I should ignore the start of the doctest, and then I came as far as tagging things. But I couldn’t make the tags persistent. I couldn’t figure out how to do that, and the documentation practically avoided to mention this.

And here is another major problem in the Zope 3 world: Religious doctesting. Doctests are great. For testing documentation. They are NOT good for testing the internals of your module. Especially not in a file called README.txt. Please use README.txt (and preferably also other docests) as a documentation on how to use your module, not how it works internally.

The result? We dropped Zope 3 and switched to Plone. Zope 3 is ready for primetime of you like to write everything yourself. It’s not ready of you want to reuse other peoples modules. And that’s not a problem with Zope 3, but the Zope 3 community. We need to work more together, talk more together and figure out common ways of keeping our modules working together and useful for others. And we really need to release a 3.4 final. Now. Stop caring if there are obscure bugs. People are using Zope 3.4 eggs and have been for a long time. It’s stable enough.

Plone4ArtistsCalendar 1.1 released!

Official Zope3 support is here!

http://plone.org/products/plone4artistscalendar
http://plone4artists.org/products/plone4artistscalendar/releases/1.1/

Thanks to all who supported the effort.

Now, next step: Recurring events. A microPledge for this will appear soon.

Edit: Now it has appeared. Here: http://micropledge.com/projects/plone-recurring-events

Well, do ya? (Want to go to a Zope conference)

In my last post I asked if people wanted a Zope conference. I’ve so far gotten 43 answers, which whould be enough to get a feeling for what the community wants.

Short answer: Yes, if there is a Zope conference, people would go. Only 7 of the 43 people answered “No” or “Don’t know”. The others would go to a Zope conference. That doesn’t mean it’s a good idea, though. I’m not the only one thinking there are too many conferences and sprints to go to already. And the support for more Zope at EuroPython is also strong. Only 9 out of 43 are likely to go to EuroPython this year, but 25 out of 43 were likely to go to EuroPython if there was a dedicated Zope track.

It’s probably too late for this year (or?) but a dedicated Zope track on EuroPython would be a cheaper option, especially on manpower. Organizing one bigger conference is much less work than two smaller ones.

I the survey I also didn’t discuss location, it can be expected that most people wanting to go to EuroPython are europeans, and the ones not likely to go to EuroPython but wanting to go to a Zope conference (10-15 persons) are probably from somewhere else, mostly the states.

I’m not sure what conclusions to draw from this. Feel free to brainstorm. I’ll start:

  • Travelling globally takes time. It’s more efficient if there are local Zope/Plone symposiums that invite speakers from around the world.
  • Many of the sprints automatically turn into spontaneous mini-conferences, where people demo and make little short talks. How about organizing a massive Zope sprint/unconference once a year, with five+ days of sprinting *and* talks. At the same time. The first day is scheduled with talks, but sprinting starts if you don’t want to see the talk, the rest of the sprint talks are spontaneous when desires arrive?
  • Add your braindump here. (Or in the comments, rather).

Would you go to a Zope conference?

OK, I know, I know. I’m the one complaining that there are so many conferences and sprints to go to that you hardly have time to do any actual work. So I guess I’m not the right guy to suggest this, really. But still…

Should there be a Zope conference? Not enough Zope people go to the Python conferences. And the Plone conferences are of course about Plone. Should we have a conference focusing on Zope? A conference just about how to use the Component Architecture, why Grok is The Coolest Thing Ever, how Repoze will change the world, and a sprint following it to make all this happen? Initial pokings tell me that people in generally think it’s a good idea.

However, I’m not sure *I* think it is a good idea. :) Not only is it Yet Another Conference/Sprint to go to and not work, it also means that Zope gets it’s own conference and that Zope people do not go to the Python conferences, and that again means we isolate us from the Python Community. So it would probably be better if more Zopistas went to PyCon. But they don’t, and the question is why. Another option is to have a dedicated Zope track on the Python conferences. But then we need to make completely sure we can fill up all the slots with talks, and we need dedicated people to select the talks that get held. It basically becomes a conference within the conference, and I don’t know if the PyCon people would like that. EuroPython is smaller, so if we can increase the attendance of EuroPython with 50-100 people by also having a Zope track that would probably be more interesting.

So, I made a survey with SurveyMonkey. If you use Zope (2 or 3) or Plone, or Silva or Grok or anythong else built on Zope 3 technology, please answer the survey. There is only eight questions, it will only take you a minute!

Catching up on Teh Bloggin’.

I’ve been in Stockholm and working on a project for two weeks, and haven’t had time to blog. Here is some things that happened in the meantime:

  • YouTube rickrolling everybody was the funniest April Fools joke.
  • I discovered that nobody is buying CD’s in shops anymore, when I tried to get some Swedish artists not available in France (Bergman Rock, Detektivbyrån)
  • I started on a cool secret project with Johan Carlsson. Clue, it’s called pir3, because the volume of a sphere is 4/3 of Pi R cubed.
  • Google App Server is awesome, and again, it’s Python. Python is taking over the world. Really.
  • The course in advanced development practices didn’t gather much interest, so we are dropping it.
  • I’ve started collective.notification, a module for having user notifications on site instead of by email. Usable with all types of subscription type tools.
  • The Plone Conference will be in Washington this year. I’m not happy about that, because going to the states costs three times as much and takes three times as long as going within Europe. I’m not expecting to go, I’ve already been to the states twice this year, my allocation of money and time to go to conferences is running out. I’ll probably go to some sprint in Europe instead.

That’s it, I think.

Sprint in Boston on Recurring events

There will be a sprint in Boston focused on Calendaring. I’m hoping to work mainly on recurring events, following PLIP #158. Recurring events is a big issue. Not the actual recurring rules (there are modules for that) but to make sure that everything, everywhere that supports events also understands that they can be recurring.

Plone desperately needs recurring events. Please help us make this happen by sponsoring the sprint.

Edit: Or you can pledge at http://micropledge.com/projects/plone-recurring-events