[Zope-dev] z3c.form bug with radio widget label

2008-12-12 Thread Johannes Raggam
hey,

i guess i found a bug in z3c.form.browser.radio.

in z3c.form.browser.radio, line 49 (class RadioWidget, def update), the 
line should read

label = term.value

instead of label = term.token

we found this, while trying to display some unicode characters (umlaute) 
in radio widget labels.
this issue is still valid in current trunk (file revision 78513).

i report it here, because i could not find a bug tracker for z3c.form. is 
there any?

cheers,
hannes

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] schema upgrades with zope.formlib + FIX

2011-02-15 Thread Johannes Raggam
dear zopistas,

while trying to add a new schema field to an already registered plone
portlet, i got following traceback:

2011-02-14 23:11:55 ERROR Zope.SiteErrorLog 1297721515.110.63984381121
http://localhost:8880/info/uber-uns/geschichte/++contextportlets
++plone.rightcolumn/show-galleries-portlet/edit
Traceback (innermost last):
  Module ZPublisher.Publish, line 127, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 47, in call_object
  Module plone.app.portlets.browser.formhelper, line 123, in __call__
  Module zope.formlib.form, line 782, in __call__
  Module five.formlib.formbase, line 50, in update
  Module zope.formlib.form, line 745, in update
  Module zope.formlib.form, line 820, in setUpWidgets
  Module zope.formlib.form, line 408, in setUpEditWidgets
  Module zope.schema._bootstrapfields, line 173, in get
AttributeError: image_size

while - IMO - zope.schema throws that error justifiably, i think
zope.formlib should handle it more gracefully in setUpEditWidgets. i
think, this error comes with every schema upgrade for zope.formlib based
edit-forms. so, what do you think of following patch?


From bcf7e2b7cb94b145cd502ad57e1363f2e6b4a879 Mon Sep 17 00:00:00 2001
From: Johannes Raggam raggam...@adm.at
Date: Tue, 15 Feb 2011 12:38:50 +0100
Subject: [PATCH] after schema upgrades (e.g. for plone.app.portlets),
the edit screen cannot be rendered because there is no v
alue for the new field attribute. in this case, use the default value.

---
 zope/formlib/form.py |6 +-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/zope/formlib/form.py b/zope/formlib/form.py
index 5df88cf..0d3ade3 100755
--- a/zope/formlib/form.py
+++ b/zope/formlib/form.py
@@ -405,7 +405,11 @@ def setUpEditWidgets(form_fields, form_prefix,
context, request,
 
 if ignore_request or readonly or not widget.hasInput():
 # Get the value to render
-value = field.get(adapter)
+try:
+value = field.get(adapter)
+except AttributeError:
+# value not available after schema upgrade
+value = field.default
 widget.setRenderedValue(value)
 
 widgets.append((not readonly, widget))
-- 
1.7.1



i'm not sure if this would cause any unwanted side effects... actually i
think it won't.



regards,
johannes raggam


-- 
johannes raggam / thet
python plone zope development
http://johannes.raggam.co.at/
mailto:johan...@raggam.co.at
http://bluedynamics.com/

___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] schema upgrades with zope.formlib + FIX

2011-02-15 Thread Johannes Raggam
well, for schema upgrades, also following patch seems to be necessary:


From c11064b8d8a7607d41071250f587f097f8c130a3 Mon Sep 17 00:00:00 2001
From: Johannes Raggam raggam...@adm.at
Date: Tue, 15 Feb 2011 14:29:56 +0100
Subject: [PATCH 2/2] gracefully set newvalue for upgraded schemas, where
oldvalue isn't available.

---
 zope/formlib/form.py |8 +++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/zope/formlib/form.py b/zope/formlib/form.py
index 0d3ade3..ff10168 100755
--- a/zope/formlib/form.py
+++ b/zope/formlib/form.py
@@ -532,7 +532,13 @@ def applyData(context, form_fields, data,
adapters=None):
 
 name = form_field.__name__
 newvalue = data.get(name, form_field) # using form_field as
marker
-if (newvalue is not form_field) and (field.get(adapter) !=
newvalue):
+try:
+oldvalue = field.get(adapter)
+except AttributeError:
+# value not available after schema upgrade
+# make sure that oldvalue != newwalue
+oldvalue = not bool(newvalue)
+if (newvalue is not form_field) and (oldvalue != newvalue):
 descriptions.setdefault(interface,
[]).append(field.__name__)
 field.set(adapter, newvalue)
 
-- 
1.7.1


On Tue, 2011-02-15 at 13:25 +0100, Hanno Schlichting wrote:
 On Tue, Feb 15, 2011 at 1:21 PM, Johannes Raggam raggam...@adm.at wrote:
  while - IMO - zope.schema throws that error justifiably, i think
  zope.formlib should handle it more gracefully in setUpEditWidgets. i
  think, this error comes with every schema upgrade for zope.formlib based
  edit-forms. so, what do you think of following patch?
 
 The usual approach is to add new attributes as class attributes to the
 persistent object. Or write an actual database upgrade step, either
 via something like zope.generations or with a GenericSetup upgrade
 step.
 
 But for zope.formlib it make indeed make sense to be more lenient
 here. So +0 on your patch.
 
 Hanno

-- 
johannes raggam / thet
python plone zope development
http://johannes.raggam.co.at/
mailto:johan...@raggam.co.at
http://bluedynamics.com/

___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Anyone want to do Google Summer of code mentoring for PSF?

2011-03-20 Thread Johannes Raggam

 - The mechanism shouldn't require something to grok/analyze the
   code.  The mechanism should be explicit. This is implied by
   pythonic.  I remember Grok being more implicit than skimming the
   links above suggest. Perhaps Grok has has become more explicit than
   I remember.
+10^something

from my point of view - from one kind of developer - grok doesn't make
things easier. the implicitness of grok and it's magic black box
behavior makes things harder to understand.
that's something which should really be avoided for ZTK, if possible.
configuration should be explicit.

my 2 ¢


best,
johannes raggam


-- 
johannes raggam / thet
python plone zope development
http://johannes.raggam.co.at/
mailto:johan...@raggam.co.at
http://bluedynamics.com/

___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] versions on zope.org and launchpad.net

2011-06-28 Thread Johannes Raggam
hi all,

there is a different version set on zope.org and launchpad.

on http://www.zope.org/Products/Zope/swpackage_releases
there are zope 2.8.12, 2.9.12, 2.10.13 and 2.11.8 available, where on
launchpad they are not.

IMO it would be better to move all versions up to launchpad and drop the
download section on zope.org (and zope.org will be soon relaunched
anyways).

cheers,
johannes raggam


___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] versions on zope.org and launchpad.net

2011-06-28 Thread Johannes Raggam
On Tue, 2011-06-28 at 18:17 -0400, Tres Seaver wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On 06/28/2011 01:28 PM, Johannes Raggam wrote:
 
  there is a different version set on zope.org and launchpad.
  
  on http://www.zope.org/Products/Zope/swpackage_releases
  there are zope 2.8.12, 2.9.12, 2.10.13 and 2.11.8 available, where on
  launchpad they are not.
[...]
  - PyPI is the canonical download location for the current releases:
launchpad should just be pointing there.
thats the case since Zope 2.12. older releases aren't there.
i think that launchpad should have all releases available, which are
listed on zope.org.


hannes,

 
 
 Tres.
 - -- 
 ===
 Tres Seaver  +1 540-429-0999  tsea...@palladion.com
 Palladion Software   Excellence by Designhttp://palladion.com
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iEYEARECAAYFAk4KUxUACgkQ+gerLs4ltQ5YEACgzzpRkzcDHWUNZgqcXL1Z6uWy
 b/0AoJp3yhIooYsjXq7ajwiqggz8wtoZ
 =j2FU
 -END PGP SIGNATURE-
 
 ___
 Zope-Dev maillist  -  Zope-Dev@zope.org
 https://mail.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  https://mail.zope.org/mailman/listinfo/zope-announce
  https://mail.zope.org/mailman/listinfo/zope )


___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Join the buschenschanksprint 2012 in June!

2012-04-23 Thread Johannes Raggam
Dear people from the planet Zope!

The third Buschenschanksprint [1] is going to happen from June, 11th to
June 17th in Southern Styria, Austria. The Buschenschanksprint is a
happening to work and communicate, collaborate and learn and also to
have fun. We are focusing on Plone, Zope and Python related web
technologies, including Pyramid. As always, the participants are
contributing the topics.

We are sprinting in the midst of the famos Südsteirische
Weinstraße (South-Styrian Wine Street), aka the Austrian Tuscany. There
are lots of possibilities to hike, many fine local specialties offered
as cold plates at the nearby Buschenschänken and we have nearly an
unlimited source of wine directly on-place. Bedrooms are also directly
at the sprint location.

If you are interested, join the team until May, 27th at:

[1] http://www.coactivate.org/projects/buschenschanksprint-2012


Looking forward to see you there!
Johannes Raggam / thet


-- 
programmatic  web development
di(fh) johannes raggam / thet
python plone zope development
mail: off...@programmatic.pro
web:  http://programmatic.pro
  http://bluedynamics.com



signature.asc
Description: This is a digitally signed message part
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] unofficial svn mirror on github

2012-10-05 Thread johannes raggam
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dear Zope Devs,

because I want to do some research on the Zope source base (following
commits, researching about the state of WSGI and the DateTime removal
attempt in different branches, etc), I created a git clone of the
Zope2 repository from svn.zope.org:

$ git svn clone -s svn://svn.zope.org/repos/main/Zope

It's really nice to browse through the commits, until the first one
from 1996-06-17 by Jim Fulton Almost initial version., where Zope
was only two modules:
lib/python/ZPublisher/Publish.py and
lib/python/ZPublisher/Response.py

I uploaded it to github, so that others can also use it (The branches
and tags have not been pushed yet):

https://github.com/thet/Zope

(See: https://github.com/thet/Zope/commits/master?page=342 for the
beginning of History)

I placed a note in the description, that the github repository is a
unofficial mirror from svn.zope.org.

I think about cloning even more relevant repositories from
svn.zope.org, create a script to automatically sync it once per day
and move it over to github, maybe a organisation called

github.com/ZopeMirror


What do you think about this?

I know there is an ongoing discussion about moving to another SCM
system or even using a SCM provider like github, bitbucket, gitorious,
launchpad, ... I don't want to create any facts by creating a mirror -
in fact, I'm not authorized to do anything without approval from the
Zope Foundation. But I think a mirror on github would be just a nice
thing to have, since their web interface is awesome.

Best,
Johannes Raggam



- -- 
programmatic  web development
di(fh) johannes raggam / thet
python plone zope development
mail: off...@programmatic.pro
web:  http://programmatic.pro
  http://bluedynamics.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBumHUACgkQW4mNMQxDgAfdZwCgoIs4zYD1zhWUGeOpMRdasigt
VFEAoLDVVYvjOtE1/mncwF7VlKywIwZk
=3YCS
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] unofficial svn mirror on github

2012-10-05 Thread johannes raggam
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 10/05/2012 10:39 AM, Jens Vagelpohl wrote:
 On Oct 5, 2012, at 10:21 , johannes raggam raggam...@adm.at
 wrote:
 I placed a note in the description, that the github repository is
 a unofficial mirror from svn.zope.org.
 
 I think about cloning even more relevant repositories from 
 svn.zope.org, create a script to automatically sync it once per
 day and move it over to github, maybe a organisation called
 
 github.com/ZopeMirror
 
 
 What do you think about this?
 
 Hi Johannes,
 
 The board has decided to allow GitHub hosting for Zope Foundation
 projects at the last board meeting, the minutes are still in the
 approval process. We are working on the implementation. Please
 don't create anything that will confuse people looking for
 canonical Zope Foundation repositories. There's no need to
 duplicate an effort that is progressing already.

Thanks, this are good news.
There is some experience with moving the SVN repository from the Plone
community (http://collective.github.com/). Let me know if I can help here.

Johannes


 
 Thanks!
 
 jens
 
 
 ___ Zope-Dev maillist
 -  Zope-Dev@zope.org 
 https://mail.zope.org/mailman/listinfo/zope-dev **  No cross posts
 or HTML encoding!  ** (Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce 
 https://mail.zope.org/mailman/listinfo/zope )
 


- -- 
programmatic  web development
di(fh) johannes raggam / thet
python plone zope development
mail: off...@programmatic.pro
web:  http://programmatic.pro
  http://bluedynamics.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBunp0ACgkQW4mNMQxDgAfXaACgs9YuiSw9+yS2hKBUvteOoFXD
CL8An3oEEVC5zak9u28vk0VOk+zhCc9f
=loJm
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] unofficial svn mirror on github

2012-10-05 Thread johannes raggam
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 10/05/2012 04:06 PM, Alex Clark wrote:
 - $ git push -u origin master# track the remote repo locally
Thanks! That was the missing bit to properly get branches and tags on
to github.

 - $ git push --all# push all the branches - $ git push --tags
 # push all the tags


- -- 
programmatic  web development
di(fh) johannes raggam / thet
python plone zope development
mail: off...@programmatic.pro
web:  http://programmatic.pro
  http://bluedynamics.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBvCVAACgkQW4mNMQxDgAeLlACgs0cuJgQ1PzdENozscFVAKRla
ni0Aniu35qGAfUHgc1tX6IT314mv9vQx
=rBPg
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] zope.org upgraded

2012-11-10 Thread johannes raggam
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,,,

with the help of Jens Vagelpohl i upgraded zope.org to the newest
Plone 4.2.2 patched with the Plone Hotfix 20121106 security update
released this week. http://www.zope.org/

I also restructured the World of Zope section for better relevance
and extended it a bit (added Pyramid and some more descriptions). The
links to planetzope.org are also removed, since it's down since some
time (if we want it back online, someone has to take the initiative).

If you have some comments and suggestions regarding zope.org, drop me
a mail.

Your Mister Webmaster.

Johannes

- -- 
programmatic  web development
di(fh) johannes raggam / thet
python plone zope development
mail: off...@programmatic.pro
web:  http://programmatic.pro
  http://bluedynamics.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlCesOMACgkQW4mNMQxDgAfTfQCdFPLpEDDy6B+Cq5m4zkCTazfk
f2EAoJfucplFY8A73d3uVjuyljyod1K0
=GtGH
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] zcml layer argument removed zope.component 4.0?

2012-11-21 Thread johannes raggam
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hey,

Why was the 'layer' ZCML argument removed in zope.component 4.0?
Until now, I didn't recognize that it was long deprecated.

Here ist the CHANGES.txt entry from pypi:
http://pypi.python.org/pypi/zope.component

Removed the long-deprecated layer argument to the
zope.component.zcml.view and zope.component.zcml.resource ZCML directives.


Looking at zope.component.zcml.py in 3.12.1, it says:

The 'layer' argument of the 'view' directive has been deprecated.  Use
the 'type' argument instead. If you have an existing 'type' argument
IBrowserRequest, replace it with the 'layer' argument (the layer
subclasses IBrowserRequest). which subclasses BrowserRequest.


The statement, that we should use the 'type' argument instead should
go into zope.component - otherwise, this helpful info is lost, since
it's removed in 4.0.

Looking at zope.component.zcml, the 'type' argument seems to define an
Interface type. So, can it be used just like the 'layer' argument?

Plone and lots of it's addons make heavy use of the 'layer' argument
in view and resource definitions.

Best,
Johannes Raggam

- -- 
programmatic  web development
di(fh) johannes raggam / thet
python plone zope development
mail: off...@programmatic.pro
web:  http://programmatic.pro
  http://bluedynamics.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlCssQ0ACgkQW4mNMQxDgAcgIQCfcI1XDEZe4TuE4CouNXHZ+6of
7vAAnRK7RKxkoctsslym82PEMttet+LK
=6pX8
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Buildout - including per-user site-packages dir.

2013-06-25 Thread Johannes Raggam
AFAIK, you just need to create a .buildout directory in your home
directory, put the file default.cfg in it with this content:

[buildout]
eggs-directory = /home/YOURS/.buildout/eggs
download-cache = /home/YOURS/.buildout/downloads
extends-cache = /home/YOURS/.buildout/extends

and create the directories referenced here.

cheers,
johannes


On Die, 2013-06-25 at 18:06 +0100, Alex Leach wrote:
 Hi,
 
 I'm trying to configure buildout.cfg so that paster looks for eggs in my
 home folder's site packages directory, as per PEP 370[1].
 
 In buildout.cfg, I have the line:
 
   include-site-packages = true
 
 But packages I've installed in my home folder aren't found when my app is
 run (with paster). Is there an extra buildout option, which will allow
 searching of home folders?
 
 Alternatively, I just noticed I have an empty sitecustomize.py file in
 parts/etc/, but I have no 'sitecustomize.py.in' file in etc/. If I do add
 a 'sitecustomize.py.in' file to etc/, what extra steps will be required,
 for 'sitecustomize.py.in' to get copied over to 'parts/etc/'?
 
 Cheers,
 Alex
 
 
 
 [1]: http://www.python.org/dev/peps/pep-0370/
 
 p.s. versions.cfg in use:
 http://grok.zope.org/releaseinfo/1.5.5/versions.cfg
 ___
 Zope-Dev maillist  -  Zope-Dev@zope.org
 https://mail.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  https://mail.zope.org/mailman/listinfo/zope-announce
  https://mail.zope.org/mailman/listinfo/zope )

-- 
programmatic  web development
di(fh) johannes raggam / thet
python plone zope development
mail: off...@programmatic.pro
web:  http://programmatic.pro
  http://bluedynamics.com


signature.asc
Description: This is a digitally signed message part
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )