[Zope-dev] z3c.formjs widgetselector customization

2011-02-14 Thread Simon Elbaz
Hi all,
I use z3c.formjs in a project and would like to customize the selector id
used into jsaction.handler for form field.
Why ? because the z3c.formui templates add "-row" suffix to the widget id
and I need also to add the "-row" suffix to the selector id in the event
handler.

I have attached a patch for the jsaction.py file that use the default
WidgetSelector class if no IWidgetSelector component is locally registered.

If it is a good idea, how could I apply it to svn repository ?

regards,
Simon


jsaction.py.patch
Description: Binary data
___
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] z3c.formjs widgetselector customization

2011-02-15 Thread Simon Elbaz
Hi,
I use z3c.formjs in a project and would like to customize the selector id
used into jsaction.handler for form field.
Since the z3c.formui templates add "-row" suffix to the widget id, I need
also to add the "-row" suffix to the selector id in the event handler.

Here is the code in jsaction.py:

  # Step 1: Get the handler.
  handlers = widget.form.jshandlers.getHandlers(widget.field)
  # Step 2: Create a selector.
  selector_cls = queryUtility(interfaces.IWidgetSelector)
  if selector_cls is None:
  selector = WidgetSelector(widget)
  else:
  selector = selector_cls(widget)

If it is a good idea, how could I apply it to svn repository ?

Thx,
Simon
___
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] Zope Tests: 72 OK, 15 Failed

2011-02-17 Thread Simon Elbaz
Hi,
I have tried this code on Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46)
[MSC v.1500 32 bit (Intel)] on win32. It seems that it is possible to have
no milliseconds returned by datetime.now.

>>> while 1:
... datetime.now(pytz.utc)
datetime.datetime(2011, 2, 17, 23, 48, 17, 984000, tzinfo=)
datetime.datetime(2011, 2, 17, 23, 48, 17, 984000, tzinfo=)
datetime.datetime(2011, 2, 17, 23, 48, 18, tzinfo=)
datetime.datetime(2011, 2, 17, 23, 48, 18, tzinfo=)
datetime.datetime(2011, 2, 17, 23, 48, 18, tzinfo=)
...
datetime.datetime(2011, 2, 17, 23, 48, 18, tzinfo=)
datetime.datetime(2011, 2, 17, 23, 48, 18, tzinfo=)
...
datetime.datetime(2011, 2, 17, 23, 48, 18, 15000, tzinfo=)
datetime.datetime(2011, 2, 17, 23, 48, 18, 15000, tzinfo=)
datetime.datetime(2011, 2, 17, 23, 48, 18, 15000, tzinfo=)
datetime.datetime(2011, 2, 17, 23, 48, 18, 125000, tzinfo=)
Traceback (most recent call last):
  File "", line 2, in 
  File
"C:\Python27\lib\site-packages\pytz-2011b-py2.7.egg\pytz\__init__.py", li
ne 186, in utcoffset
KeyboardInterrupt
>>>

Simon

On Thu, Feb 17, 2011 at 4:58 PM, Tres Seaver  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 02/17/2011 06:58 AM, Zope Tests Summarizer wrote:
>
> > Subject: FAILED : Zope Buildbot / zopetoolkit-1.1_win-py2.5 slave-win
> > From: jdriessen at thehealthagency.com
> > Date: Wed Feb 16 15:03:12 EST 2011
> > URL: http://mail.zope.org/pipermail/zope-tests/2011-February/032218.html
> >
> > Subject: FAILED : Zope Buildbot / zopetoolkit_win-py2.5 slave-win
> > From: jdriessen at thehealthagency.com
> > Date: Wed Feb 16 15:18:08 EST 2011
> > URL: http://mail.zope.org/pipermail/zope-tests/2011-February/032223.html
> >
> > Subject: FAILED : Zope Buildbot / zopetoolkit_win-py2.6 slave-win
> > From: jdriessen at thehealthagency.com
> > Date: Wed Feb 16 15:25:31 EST 2011
> > URL: http://mail.zope.org/pipermail/zope-tests/2011-February/032226.html
>
> These three failures are due to a quirk in how datetime.datetime repr
> works:  if the 'microseconds' field happens to be zero, it isn't
> printed, e.g.:
>
> Expected:
>datetime.datetime(, tzinfo=)
> Got:
>datetime.datetime(2011, 2, 16, 20, 0, 43, tzinfo=)
>
> The regex (in zope.dublincore.tests.test_timeannotators), expects the
> microseconds value to be present:
>
>  datetime_re = (
> '[0-9]{4}, [0-9]{1,2}, [0-9]{1,2}, [0-9]{1,2}, [0-9]{1,2}, \
> [0-9]{1,2}, '
>'[0-9]{1,6}')
>
>
> I have no idea why that value is suddenly exactly zero for the THA box.
>
>
> Tres.
> - --
> ===
> Tres Seaver  +1 540-429-0999  tsea...@palladion.com
> Palladion Software   "Excellence by Design"http://palladion.com
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk1dRasACgkQ+gerLs4ltQ4R6ACfTV1r4oXAPee23hIDnA5GEaqQ
> pX8AoJLVWCq35GWNDCxxqeDmyfezzg9U
> =Lnxh
> -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 )


Re: [Zope-dev] Zope Tests: 71 OK, 16 Failed

2011-02-28 Thread Simon Elbaz
On windows, after installing python 2.6.6 (
http://www.python.org/ftp/python/2.6.6/python-2.6.6.msi), the compilation
ends ok with the following dos commands:

set PATH=c:\Python26;%PATH%
cd /path/to/z3c.form-2.4.2
python.exe bootstrap.py
bin\buildout.exe

After that, running bin\test.exe ends with:

  Ran 75 tests with 1 failures and 19 errors in 30.907 seconds.
Tearing down left over layers:
  Tear down zope.testrunner.layer.UnitTests in 0.000 seconds.

Simon

On Mon, Feb 28, 2011 at 8:08 PM, Stephan Richter <
srich...@cosmos.phy.tufts.edu> wrote:

> On Monday, February 28, 2011, Tres Seaver wrote:
> > I also suggest dropping the test reports for the z3c.* packages:  they
> > have been broken since the day they were added, AFAICT, which is a
> > strong signal that they are not being maintained.
>
> The problem is merely that lxml cannot be installed. This is more a winbot
> setup problem than a package one. And the reason lxml cannot be built is
> because libxml is missing.
>
> This is really strange, since there are binaries available for lxml-2.3 for
> Python 2.6.
>
> http://pypi.python.org/pypi/lxml/2.3
>
> Does anyone with Windows Foo have any idea?
>
> Regards,
> Stephan
> --
> Entrepreneur and Software Geek
> Google me. "Zope Stephan Richter"
> ___
> 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 )


Re: [Zope-dev] Zope Tests: 71 OK, 16 Failed

2011-03-01 Thread Simon Elbaz
On Tue, Mar 1, 2011 at 10:27 AM, Adam GROSZER  wrote:

> Hello,
>
> On Mon, 28 Feb 2011 14:08:29 -0500 you wrote:
> >
> > On Monday, February 28, 2011, Tres Seaver wrote:
> >> I also suggest dropping the test reports for the z3c.* packages:  they
> >> have been broken since the day they were added, AFAICT, which is a
> >> strong signal that they are not being maintained.
> >
> > The problem is merely that lxml cannot be installed. This is more a
> winbot
> > setup problem than a package one. And the reason lxml cannot be built is
> > because libxml is missing.
> >
> > This is really strange, since there are binaries available for lxml-2.3
> for
> > Python 2.6.
> >
> > http://pypi.python.org/pypi/lxml/2.3
> >
> > Does anyone with Windows Foo have any idea?
>
> Those seem to be 32bit only, weird is that only 32bit bots fail.
> Let it have one more day to clear up, maybe those eggs got released just
> after the bots ran.
>
> OTOH, I definitely do *not* want to enable winbot to be able to compile
> lxml.
>
> --
> Best regards,
>  Adam GROSZER
> --
> Quote of the day:
> Fall seven times, stand up eight.
> - Japanese Proverb
> ___
> 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 )
>

The build of z3c.* packages on winbot could be tested like
http://dev.thehealthagency.com/buildbot/builders/zope2.13_win-py2.6%20slave-win/builds/161
build<http://dev.thehealthagency.com/buildbot/builders/zope2.13_win-py2.6%20slave-win/builds/161>

Regards
Simon Elbaz
___
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] Zope Tests: 71 OK, 16 Failed

2011-03-01 Thread Simon Elbaz
On Tue, Mar 1, 2011 at 11:42 AM, Adam GROSZER  wrote:

> Hello,
>
> On Tue, 1 Mar 2011 11:04:30 +0100 you wrote:
> >
> > The build of z3c.* packages on winbot could be tested like
> >
> http://dev.thehealthagency.com/buildbot/builders/zope2.13_win-py2.6%20slave-win/builds/161
> > build
> > <
> http://dev.thehealthagency.com/buildbot/builders/zope2.13_win-py2.6%20slave-win/builds/161
> >
>
> hm, that does not seem to have lxml as dependency
>
> --
> Best regards,
>  Adam GROSZER
> --
> Quote of the day:
> Defeat may serve as well as victory to shake the soul and let the glory
> out.
> - Edwin Markham
> ___
> 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 )
>

Hello,
Sorry, I didn't expressed myself well.

I mean building the test with the same steps as in
http://dev.thehealthagency.com/buildbot/builders/zope2.13_win-py2.6%20slave-win/builds/161
:
- svn update
- svn info
- python.exe bootstrap.py
- bin\buildout.exe
- bin\test.exe

Regards
Simon
___
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 )