[Zope] MailingLogger 3.8.0 Released!

2014-01-28 Thread Chris Withers

I'm pleased to announce a new release of Mailinglogger.

Mailinglogger provides two handlers for the standard python
logging framework that enable log entries to be emailed either as the
entries are logged or as a summary at the end of the running process.

The handlers have the following features:

- customisable and dynamic subject lines for emails sent

- emails sent with a configurable headers for easy filtering

- flood protection to ensure the number of emails sent is not excessive

- support for SMTP servers that require authentication

- fully documented and tested

This release adds flood limiting to the SummarisingLogger, ensuring that 
emails it sends aren't bigger than MTAs are prepared to handle.


Full docs can be found here:

http://packages.python.org/mailinglogger/

For more information, please see:
http://www.simplistix.co.uk/software/python/mailinglogger
or
http://pypi.python.org/pypi/mailinglogger

cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk



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


Re: [Zope-dev] Location of RelStorage

2013-04-12 Thread Chris Withers

On 14/03/2013 08:01, Marius Gedminas wrote:

What's the official location of RelStorage?  I see two source trees:

   * http://zope3.pov.lt/trac/browser/relstorage/trunk
   * https://github.com/zodb/relstorage

They have the same commits (~1 year old).


..and one more just for good measure:

https://github.com/cjw296/relstorage

Would be good to have an official git repo under Shane's care.

Shane, where are you maintaining relstorage nowadays?

cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
   - http://www.simplistix.co.uk
___
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] when did transaction lose the ability to be usable as a context manager?

2013-02-06 Thread Chris Withers

Hi All,

I used to do this:

 import transaction
 with transaction:
...   print 'hello'
...
Traceback (most recent call last):
  File console, line 1, in module
AttributeError: __exit__

When did that stop working and what should I now do instead?

cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] when did transaction lose the ability to be usable as a context manager?

2013-02-06 Thread Chris Withers

On 06/02/2013 11:47, Wichert Akkerman wrote:


You can also use the transaction manager directly instead of the bound methods 
transaction lifts out of it:

import transaction
with transaction.manager:
 pass


yeah, this is what I'll do.

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] How to signal that projects have moved to github

2013-01-11 Thread Chris Withers

On 10/01/2013 20:48, Jim Fulton wrote:

It isn't just CI:  people may have projects running from SVN checkouts,
which we break without warning (the Plone devs have been notorious for
causing such breakage for years).


I still think breakage is better.  If they're using trunk, without
pinning a revision, it must be because they want the latest code.
They won't get that from svn.  This is a case where I think it's
better to fail in an obvious way.


Yeah, +1 from me here. If people think they're using trunk, and they're 
not 'cos its moved to GitHub, that's bad.


FWIW, you may not know that GitHub really does have an svn interface to 
git repositories on GitHub. They unfortunately announced this on April 1 
one year, so I think most people (myself included, until I actually 
started using it) assume it's a joke.


So, it really is a case of CI tools changing their subversion url, and 
others doing a svn switch --relocate.


cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] [Checkins] SVN: zc.buildout/ Moved to github

2012-08-18 Thread Chris Withers

Hi Jens,

On 18/08/2012 09:39, Jens Vagelpohl wrote:

Legally this must be a fork then and I'm not sure it can be released as 
official Zope Foundation software anymore if you make releases from GitHub. 
Reason: the ZF can no longer ascertain that only official ZF contributor 
agreement signers have modified code in the package,


Actually, with the cryptographically signed nature of git commits, I'm 
not sure this is true...



which is a core requirement for software released from Zope Foundation 
repositories/under Zope Foundation auspices.


Well, I guess releases would be made outside of these auspices then, 
whatever that means... The license looks the same, the same people are 
doing the development.


Quite frankly, given the hard time we have getting people to help out, 
anything that eases that can only be a good thing. Chris McDonough and 
the rest of the Pyramid folk seem happy enough with the GitHub model, 
and I've found it's made life very much easier for the python-excel 
project and the other packages I maintain.



Apart from those legal points which are still not entirely clear, since this can only be 
a fork I would say that last checkin must still be reverted. Don't get me wrong, I'm not 
trying to be facetious, but until those legal questions are cleared up you should not 
make any checkins on svn.zope.org that basically shut down development of 
that package from there, such as deleting the trunk.


No history has been destroyed, it's just a clear marker of where active 
development is happening. That said, I don't have a strong opinion on 
this, I'd suggest Jim just makes the call...


cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
   - http://www.simplistix.co.uk
___
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] [Checkins] SVN: zc.buildout/ Moved to github

2012-08-18 Thread Chris Withers
I'm not going to dignify this with a fuller response other than to say 
that Jean-Paul Smets' entire email is nothing but bullshit written to 
try and promote an inferior competing product ;-)


Chris

On 18/08/2012 13:31, Jean-Paul Smets wrote:

Hi,

I approve your position Jens.

Moving to git can make sense. Moving to github as primary platform does
not make sense.

Github is a proprietary platform. There is really no justification in
using a proprietary platform for open source projects, especially
considering that many open source alternatives exist and that nothing
prevents from using github as a mirror (for marketing purpose for example).

It is not only depressing to see open source communities not eating
their own dog food but also irresponsible.

It is irresponsible because Cloud / SaaS is far from reliable. Please
read this to get an idea.
(http://iwgcr.org/paris-university-and-telecom-paristech-publish-availability-ranking-of-world-cloud-computing/).
Service outages are not rare.

It is irresponsible because it sends a message to the market that open
source is not competitive (else open source communities would use it for
themselves). Many open source git hosting solutions do exist (incl.
gitorious, gitlab, indefero). Why not use them ?

On a more positive side, Nexedi is currently sponsoring the port of
Gitlab (http://gitlabhq.com/) open source git platform to SlapOS (
http://www.slapos.org/) open source Cloud. This means that there will in
a few days a python based, Zope based, buildout based and fully
resilient platform to host open source projects, with the ability to
manage copies of source code on servers all around the world in a true
community fashion.

And after reading today's message, I got so upset that I decided that
Nexedi will use SlapOS to offer hosting to any open source Zope
community project which believes enough in open source values to use
open source tools rather than proprietary ones. This will include free
support to any open source Zope project willing to manage its own SlapOS
platform rather rely on ours. Let us see if Zope community will be the
first or the last to eat its own dog food ;-).

Regards,

JPS.
Nexedi CEO

PS. I do not mind behind hated for using the word irresponsible,
whooever took the decision to use github. I do mean it.

Le 18/08/2012 09:49, Jens Vagelpohl a écrit :

Hi Alex,

Please revert this checkin. You can't just take core software pieces from Zope 
Foundation-hosted repositories and move them somewhere else.

Thanks!

jens



On Aug 18, 2012, at 3:09 , J. Alexander Clarkcvs-ad...@zope.org  wrote:


Log message for revision 127519:
  Moved to github


Changed:
  A   zc.buildout/README_MOVED_TO_GITHUB.txt
  D   zc.buildout/trunk/

-=-
Added: zc.buildout/README_MOVED_TO_GITHUB.txt
===
--- zc.buildout/README_MOVED_TO_GITHUB.txt  (rev 0)
+++ zc.buildout/README_MOVED_TO_GITHUB.txt  2012-08-18 01:09:06 UTC (rev 
127519)
@@ -0,0 +1 @@
+https://github.com/buildout/buildout/tree/1.6.x

___
checkins mailing list
check...@zope.org
https://mail.zope.org/mailman/listinfo/checkins

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




__
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.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 )



--
Simplistix - Content Management, Batch Processing  Python Consulting
   - http://www.simplistix.co.uk
___
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] Can't compile zope.interface 4.0.1 extensions on Mac OS with Py2.7

2012-07-01 Thread Chris Withers

Hi All,

Got this:

Getting distribution for 'zope.interface'.
In file included from 
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:4,
 from 
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:85,
 from 
src/zope/interface/_zope_interface_coptimizations.c:15:
/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: 
stdarg.h: No such file or directory
In file included from 
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:4,
 from 
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:85,
 from 
src/zope/interface/_zope_interface_coptimizations.c:15:
/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: 
stdarg.h: No such file or directory
lipo: can't figure out the architecture type of: 
/var/folders/m6/tsd59qsj7pd_lldh4mhwh6khgn/T//cc4KmKtY.out


WARNING:

An optional code optimization (C extension) could not be compiled.

Optimizations for this package will not be available!
()
command 'gcc-4.2' failed with exit status 1

Got zope.interface 4.0.1.

Anyone seen that before?

cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
   - http://www.simplistix.co.uk

___
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] working with different requirements depending on python version

2012-07-01 Thread Chris Withers

On 30/06/2012 18:12, Tres Seaver wrote:

How have other people solved this?


For repoze.sendmail, I did two fixups for Python 2.5:

- - I changed 'install_requires' in setup.py based on sys.version_info

   https://github.com/repoze/repoze.sendmail/blob/master/setup.py

- - I pinned the verstion in tox.ini:

   https://github.com/repoze/repoze.sendmail/blob/master/tox.ini


Thanks, that worked for me:

https://github.com/Simplistix/testfixtures/commit/d56035510f7a63793a82b966b8c8c273b379c7a1

https://github.com/Simplistix/checker/commit/a5f8d089a3af7da1f1e8a5dc3182ea5b5345dcf5

cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
   - http://www.simplistix.co.uk


___
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] working with different requirements depending on python version

2012-06-30 Thread Chris Withers

Hi All,

While trying to debug another problem, I re-ran some Jenkins jobs for 
two of my packages, which promptly failed under Python 2.5:


http://jenkins.simplistix.co.uk/job/testfixtures-buildout/
http://jenkins.simplistix.co.uk/job/checker-buildout/

Now, the issue here is that zope.interface 4.0 and above no longer 
supports Python 2.5:


http://jenkins.simplistix.co.uk/job/checker-buildout/PYTHON=2.5,label=linux/15/console
http://pypi.python.org/pypi/zope.interface/4.0.0

That's fine, but I'd like the above projects to continue 2.5 support for 
the time being.


The simple solution would be to add a versions section to the buildout here:

https://github.com/Simplistix/checker/blob/master/buildout.cfg

...and pin the versions in the tox.ini here:

https://github.com/Simplistix/checker/blob/master/tox.ini

...however, that doesn't give the correct result. The version 
requirement is use the latest version of all packages that work with 
the Python version under test and the changes I've suggested would mean 
that on Python 2.6 and 2.7, the latest version of zope.interface 
wouldn't be used.


What makes this even more interesting is that zope.interface isn't a 
direct requirement of either of these projects, it's a dependency of a 
dependency in both cases.


How have other people solved this?

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
   - http://www.simplistix.co.uk

___
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] CookieCrumbler, any new versions or replacement?

2012-02-10 Thread Chris Withers

On 03/02/2012 19:20, Tres Seaver wrote:

What is the main advantage of PAS over cookie crumbler over SSL out
of interest?


It's even more complicated and maintained just as little ;-)


I'll grant the complicated, as PAS is a framework which makes pretty much
evey part of the authentication process pluggable.  However, the most
recent release of PAS was four days ago, which hardly makes for
unmaintained.


I'm still all about Products.SimpleUserFolder coupled with 
CookieCrumbler, never had any bug reports ;-)


Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] CookieCrumbler, any new versions or replacement?

2012-02-03 Thread Chris Withers

On 02/02/2012 22:57, Richard Harley wrote:

What is the main advantage of PAS over cookie crumbler over SSL out of interest?


It's even more complicated and maintained just as little ;-)

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] MailingLogger 3.7.0 Released!

2012-01-18 Thread Chris Withers

I'm pleased to announce a new release of Mailinglogger.

Mailinglogger provides two handlers for the standard python
logging framework that enable log entries to be emailed either as the
entries are logged or as a summary at the end of the running process.

The handlers have the following features:

- customisable and dynamic subject lines for emails sent

- emails sent with a configurable headers for easy filtering

- flood protection to ensure the number of emails sent is not excessive

- support for SMTP servers that require authentication

- fully documented and tested

This release fixes a long standing bug that occurred when logging 
unicode messages.


It also provides support for sending colourised HTML emails:

http://packages.python.org/mailinglogger/html.html

Full docs can be found here:

http://packages.python.org/mailinglogger/

For more information, please see:
http://www.simplistix.co.uk/software/python/mailinglogger
or
http://pypi.python.org/pypi/mailinglogger

cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk



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


Re: [Zope-dev] zope.server still used?

2012-01-07 Thread Chris Withers

On 20/12/2011 10:44, Jim Fulton wrote:

What's wrong with mod_wsgi?


Debugging with it seems to be a pain, so you end up using different
servers in development and production.


I'm pretty sure if you ask Graham there'll be a simple way to run Apache 
 mod_wsgi in a way that lets you debug in much the same way as running 
ZServer or Paste.


cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
   - http://www.simplistix.co.uk
___
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] ZConfig: multi-line values

2012-01-06 Thread Chris Withers

On 05/01/2012 21:07, Fred Drake wrote:

On Thu, Jan 5, 2012 at 1:47 PM, Chris Withersch...@simplistix.co.uk  wrote:

Is there any way in ZConfig to allow a file that looks like this:

...

...or some other way of spelling multi-line values for a key?


Nope, sorry.  I played with adding that at one point, but didn't have
enough time or motivation.  There are a lot of limitations in the current
syntax.


Meh, I find it covers all things that should be covered pretty well :-)

Out of interest, if I implemented support for filters inside handler 
sections, would you crank out a release?


Would Zope's schema need to change to get that or does Zope 2 use 
ZConfig's logger schema for handlers?


cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] ZConfig: multi-line values

2012-01-05 Thread Chris Withers

Hi Fred,

Is there any way in ZConfig to allow a file that looks like this:

somesection
key1 value1
key2
multi
line
value
/key2
/somesection

...or some other way of spelling multi-line values for a key?

If so, how do I phrase it in the schema?

cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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.server still used?

2011-12-19 Thread Chris Withers

On 20/12/2011 07:08, Wolfgang Schnerring wrote:

as advanced as we've come to know. What do people use here, what are
your experiences and ideas?


What's wrong with mod_wsgi?

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] MailingLogger 3.6.0 Released!

2011-11-25 Thread Chris Withers
I'm pleased to announce a new release of Mailinglogger.

Mailinglogger provides two handlers for the standard python
logging framework that enable log entries to be emailed either as the
entries are logged or as a summary at the end of the running process.

The handlers have the following features:

- customisable and dynamic subject lines for emails sent

- emails sent with a configurable headers for easy filtering

- flood protection to ensure the number of emails sent is not excessive

- support for SMTP servers that require authentication

- fully documented and tested

The only change for this release is to allow summaries sent by 
SummarisingLogger to contain messages logged at a lower level than those 
which triggered the summary to be emailed.

Full docs can be found here:

http://packages.python.org/mailinglogger/

For more information, please see:
http://www.simplistix.co.uk/software/python/mailinglogger
or
http://pypi.python.org/pypi/mailinglogger

cheers,

Chris

-- 
Simplistix - Content Management, Zope  Python Consulting
- http://www.simplistix.co.uk



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


Re: [Zope-dev] Zope 4 release management

2011-11-17 Thread Chris Withers
On 17/11/2011 16:32, Tres Seaver wrote:
 Note that this question is *not* suitable for loudest voice on zope-dev
 wins ressolution.  The software belongs to the Zope Foundation, which
 will make any such decision.

Small point: the software is open source and anyone who wants can 
maintain it anywhere they want ;-)

If the energy of the people doing the current round of development is 
focused on Git, I say let them use Git. Provided they keep the svn 
markers in (and there's no reason not to!) then a git svn dcommit from 
someome authorized will bring all the work back to wherever the Zope 
Foundation wants it...

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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] [TIP] zope.testrunner and nose count doctests differently

2011-11-12 Thread Chris Withers
On 09/11/2011 13:17, Benji York wrote:
 If this is the case, perhaps Manuel shouldn't do anything with
 countTestCases? (I know it would drop the test count, but that's not
 *that* important, right? ;-) - and at least all the test runners would
 agree...)

 Meh.  Having a good count in complaint test runners is more important to
 me than having all test runners agree.  Especially since the lowest
 common denominator seems to be counting the entire file as one test.

Right, but can Manuel do the right thing by influencing testsRun 
rather than countTestCases?

 PS: When are you going to move source control for Manuel over to GitHub?

 I have no plans to move the source.  If I did I'd probably move it to
 launchpad.net because most of the other things I work on are there
 (including work things).

Booo, the least favourite dvcs ;-)

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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] [TIP] zope.testrunner and nose count doctests differently

2011-11-09 Thread Chris Withers
Hi Benji,

On 08/11/2011 11:10, Jonathan Lange wrote:
 Mark has somewhat misdirected the thread here, either that or I've got in a
 muddle, anyway, the issue at hand is that nose ignores
 TestCase.countTestCases(). Any nose people know what that is?

 Not a nose person, but it's usual to report on TestResult.testsRun
 rather than TestSuite.countTestCases. The numbers can be different
 because one test might run multiple times or report multiple results,
 or tests might be generated during the run that weren't available for
 countTestCases to count.

If this is the case, perhaps Manuel shouldn't do anything with 
countTestCases? (I know it would drop the test count, but that's not 
*that* important, right? ;-) - and at least all the test runners would 
agree...)

cheers,

Chris

PS: When are you going to move source control for Manuel over to GitHub?

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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] Undelivered Mail Returned to Sender

2011-11-09 Thread Chris Withers

Any idea what mx1.emailsrvr.com doesn't like?
Is it Bejni's address, the email in question or that isn't coming from 
server1.simplistix.co.uk?


cheers,

Chris

(trying again to get around the crazy zope.org obsession with banning 
.eml attachments - ie: Thunderbird and others forwarded messages)


--

This is the mail system at host server1.simplistix.co.uk.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The mail system

be...@zope.com: host mx1.emailsrvr.com[98.129.184.3] said: 550 5.7.1
 be...@zope.com: Relay access denied. (in reply to RCPT TO command)


Reporting-MTA: dns; server1.simplistix.co.uk
X-Postfix-Queue-ID: E45074F8100
X-Postfix-Sender: rfc822; chris@simplistix.co.uk
Arrival-Date: Wed,  9 Nov 2011 08:49:13 + (GMT)

Final-Recipient: rfc822; benji@zope.com
Original-Recipient: rfc822;benji@zope.com
Action: failed
Status: 5.7.1
Remote-MTA: dns; mx1.emailsrvr.com
Diagnostic-Code: smtp; 550 5.7.1 benji@zope.com: Relay access denied.
___
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] [TIP] zope.testrunner and nose count doctests differently

2011-11-08 Thread Chris Withers
Hi All,

On 07/11/2011 22:25, Michael Foord wrote:
 On 07/11/2011 19:51, Mark Sienkiewicz wrote:
 On 11/07/11 12:53, Chris Withers wrote:
 The only hiccup is that nose doesn't respect a test_suite function by
 default, so I wrote a plugin to make it do the right thing:

 Nose people: any idea *why* nose doesn't respect this method?

Mark has somewhat misdirected the thread here, either that or I've got 
in a muddle, anyway, the issue at hand is that nose ignores 
TestCase.countTestCases(). Any nose people know what that is?


 unittest doesn't *require* you to write a test_suite either - the point
 of test_suite is to allow you to *customize* the set of tests that are
 collected automatically when a test module is loaded. So if you are
 providing a test_suite it is because the default automatic collection
 strategy isn't enough for you.

This is true now, but I'm pretty sure when unittest was introduced, you 
had to provide a test_suite function for test discovery to work.

Of course, that's the dim and distant past and so doesn't really matter. 
However, the fact that nose ignores a test_suite method is a bug, plain 
and simple ;-)

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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.testrunner and nose count doctests differently

2011-11-07 Thread Chris Withers
Hi Benji,

On 03/11/2011 12:31, Benji York wrote:

 If you will tell me how you wired up Manuel and nose, I'd love to add a
 how-to section to the Manuel docs.

The only hiccup is that nose doesn't respect a test_suite function by 
default, so I wrote a plugin to make it do the right thing:

http://pypi.python.org/pypi/nose_fixes/1.0

 On Thu, Nov 3, 2011 at 7:13 AM, Chris Withersch...@simplistix.co.uk  wrote:
 The code uses Manuel, under both nose and zope.testrunner:

 Manuel will report the same test count under both nose and
 zope.testrunner but I don't know if nose respects the count provided.

 You could put a breakpoint in TestCase.countTestCases() of
 manuel/testing.py and see if it gets called by nose and what it does
 with the result.

Well, grepping through the nose source returns no matches for 
countTestCases, so I'm guessing it doesn't respect this.

Nose people: any idea *why* nose doesn't respect this method?

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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.testrunner and nose count doctests differently

2011-11-03 Thread Chris Withers
Hi All,

I'm experimenting with using nose as an alternative to zope.testrunner 
so I can take advantage of the junit and cobertura compatible xml output 
offered.

However, it appears that doctest counting is different between the two:

$  bin/test -m testfixtures.tests.test_docs
Running zope.testrunner.layer.UnitTests tests:
   Set up zope.testrunner.layer.UnitTests in 0.000 seconds.
   Ran 316 tests with 0 failures and 0 errors in 0.136 seconds.
Tearing down left over layers:
   Tear down zope.testrunner.layer.UnitTests in 0.000 seconds.

$ bin/nosetests testfixtures/tests/test_docs.py

--
Ran 16 tests in 0.134s

Does anyone knows why this count is different? What code is counting 
differently?

I'm paranoid that nose might not be running some tests that 
zope.testrunner is.

If you want to take a look at the code, it's here:

https://github.com/Simplistix/testfixtures

zope.testrunner is used on the master branch, nose on the nose branch.

Any help gratefully received!

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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.testrunner and nose count doctests differently

2011-11-03 Thread Chris Withers
Hi Michael,

On 03/11/2011 09:12, Michael Howitz wrote:
 Run both test runners with the option -vv to see which tests are run.
 (I did this for your code and the list of tests seems to be equal.)

Cool, I'd done this already, but it's good to have someone else verify 
this :-)

 Though this is no answer to the question which code does the counting.

Indeed, so I guess that becomes the real question!

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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.testrunner and nose count doctests differently

2011-11-03 Thread Chris Withers
On 03/11/2011 10:54, Matthew Wilkes wrote:

 On 2011-11-03, at 0025, Chris Withers wrote:

 I'm experimenting with using nose as an alternative to zope.testrunner
 so I can take advantage of the junit and cobertura compatible xml output
 offered.

 Using http://pypi.python.org/pypi/collective.xmltestreport might be easier? 
 Not sure if it gives you everything you need, but works well for us Plonies.

I'm interested in nose for other reasons too ;-)

The question I'm looking to get answered is what is counting the 
doctests and why is it different between nose and zope.testrunner?

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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.testrunner and nose count doctests differently

2011-11-03 Thread Chris Withers
On 03/11/2011 11:05, Jim Fulton wrote:
 On Thu, Nov 3, 2011 at 5:14 AM, Chris Withersch...@simplistix.co.uk  wrote:
 Hi Michael,

 On 03/11/2011 09:12, Michael Howitz wrote:
 Run both test runners with the option -vv to see which tests are run.
 (I did this for your code and the list of tests seems to be equal.)

 It would be interesting for the rest of us to know the length of that list.

$ bin/test -m testfixtures.tests.test_docs -vv
Running tests at level 1
Running zope.testrunner.layer.UnitTests tests:
   Set up zope.testrunner.layer.UnitTests in 0.000 seconds.
   Running:
  testfixtures/docs/api.txt
  testfixtures/docs/changes.txt
  testfixtures/docs/comparing.txt
  testfixtures/docs/components.txt
  testfixtures/docs/datetime.txt
  testfixtures/docs/description.txt
  testfixtures/docs/development.txt
  testfixtures/docs/exceptions.txt
  testfixtures/docs/files.txt
  testfixtures/docs/index.txt
  testfixtures/docs/installation.txt
  testfixtures/docs/license.txt
  testfixtures/docs/logging.txt
  testfixtures/docs/mocking.txt
  testfixtures/docs/streams.txt
  testfixtures/docs/utilities.txt
   Ran 316 tests with 0 failures and 0 errors in 0.150 seconds.
Tearing down left over layers:
   Tear down zope.testrunner.layer.UnitTests in 0.000 seconds.

$ bin/nosetests testfixtures/tests/test_docs.py -vv
nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
testfixtures_nose/docs/api.txt ... ok
testfixtures_nose/docs/changes.txt ... ok
testfixtures_nose/docs/comparing.txt ... ok
testfixtures_nose/docs/components.txt ... ok
testfixtures_nose/docs/datetime.txt ... ok
testfixtures_nose/docs/description.txt ... ok
testfixtures_nose/docs/development.txt ... ok
testfixtures_nose/docs/exceptions.txt ... ok
testfixtures_nose/docs/files.txt ... ok
testfixtures_nose/docs/index.txt ... ok
testfixtures_nose/docs/installation.txt ... ok
testfixtures_nose/docs/license.txt ... ok
testfixtures_nose/docs/logging.txt ... ok
testfixtures_nose/docs/mocking.txt ... ok
testfixtures_nose/docs/streams.txt ... ok
testfixtures_nose/docs/utilities.txt ... ok

--
Ran 16 tests in 0.141s

 My guess is that when you're using the zope testruner, you're somehow
 picking up zope.testing.doctest, which counts each doctest example as
 a  test.

The code uses Manuel, under both nose and zope.testrunner:

from doctest import REPORT_NDIFF,ELLIPSIS
from glob import glob
from manuel import doctest,codeblock,capture
from manuel.testing import TestSuite
from os.path import dirname,join,pardir

def test_suite():
 m =  doctest.Manuel(optionflags=REPORT_NDIFF|ELLIPSIS)
 m += codeblock.Manuel()
 m += capture.Manuel()
 return TestSuite(
 m,
 *glob(join(dirname(__file__),pardir,pardir,'docs','*.txt'))
 )

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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] Database Authentication

2011-11-02 Thread Chris Withers
On 02/11/2011 09:34, John Harrow wrote:
 What's the best way to authenticate against a database in Zope 2 these
 days? SUF and XUF are the two I've briefly looked at. I'm coming back to
 an old project so bit out of the Zope loop!

What version of Zope are you using or migrating to?

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Database Authentication

2011-11-02 Thread Chris Withers
Nah, 2.10 is fine. SUF will do what you want.

cheers,

Chris

On 02/11/2011 14:43, John Harrow wrote:
 2.10 at the moment - wasn't really looking at newer Zope, just wanted to
 investigate managing users via a db ( unless latest zope would help with
 this a lot).
 Thanks
 John

 On Wed, Nov 2, 2011 at 9:49 AM, Chris Withers ch...@simplistix.co.uk
 mailto:ch...@simplistix.co.uk wrote:

 On 02/11/2011 09:34, John Harrow wrote:
   What's the best way to authenticate against a database in Zope 2
 these
   days? SUF and XUF are the two I've briefly looked at. I'm coming
 back to
   an old project so bit out of the Zope loop!

 What version of Zope are you using or migrating to?

 cheers,

 Chris

 --
 Simplistix - Content Management, Batch Processing  Python Consulting
  - http://www.simplistix.co.uk
 ___
 Zope maillist  - Zope@zope.org mailto:Zope@zope.org
 https://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )



 __
 This email has been scanned by the MessageLabs Email Security System.
 For more information please visit http://www.messagelabs.com/email
 __

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope-dev] Zope 4 publisher/traversal, sprint topic

2011-10-28 Thread Chris Withers
On 28/10/2011 08:46, yuppie wrote:
 Is that the fault of the publisher? AFAICT the biggest security problem
 of Zope2 is this line in OFS.SimpleItem.Item:

   # Allow (reluctantly) access to unprotected attributes
   __allow_access_to_unprotected_subobjects__=1

 I'm not familiar with the details of the first hotfix, but the second
 one wouldn't have been necessary without that line.

Yep, that's what should have been done in the first place.

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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] Urgent:utilsation of paybox with fora zope application

2011-10-20 Thread Chris Withers
On 20/10/2011 16:36, Diana Lenar wrote:

 pls respond me quickly its very urgent

Not to us it isn't.

http://catb.org/~esr/faqs/smart-questions.html#urgent

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope-dev] zope.sqlalchemy+py3 test failures.

2011-09-29 Thread Chris Withers
On 29/09/2011 15:22, Laurence Rowe wrote:
 On 29 September 2011 10:33, Chris McDonoughchr...@plope.com  wrote:
 On Tue, 2011-09-27 at 12:40 -0400, Tres Seaver wrote:
 This bootstrap is from Jim's '2' branch of zc.buildout:

   
 http://svn.zope.org/zc.buildout/branches/2/bootstrap/bootstrap.py?rev=121484view=auto

 It is designed to work with Py3k.

 I've replaced the bootstrap.py in the chrism-py3 branch of both the
 transaction package and the zope.sqlalchemy packages with that one, and
 everything looks good!

 I think we can probably merge both of these branches to their respective
 trunks and make releases.  I have the necessary powers to do it for
 transaction; I'll try to track down elro to see if he's willing to do it
 for zope.sqlalchemy.

 I've added chrism as an owner. Before we make a final release I'd like
 to revisit the savepoint release branches of transaction /
 zope.sqlalchemy. I'll bring this up in another mail.

It'd also be great if we could get support for SA 0.7+'s new events 
system...

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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] access to create z.i and z.c releases

2011-09-27 Thread Chris Withers
On 23/09/2011 19:16, Charlie Clark wrote:
 Am 23.09.2011, 09:36 Uhr, schrieb Chris Withersch...@simplistix.co.uk:

 t tried zope.interface 3.8.0 on MacOS X Lion and got:

 Oh you brave boy! Given what Apple managed with Snow Leopard I've held off
 Lion so far and I always use the MacPorts toolchain.

I tend to avoid MacPorts/Portage/whatever...

 Works fine on Snow Leopard and builds with gcc-4.2 here. Maybe your Python
 was built with 4.0 or has some unrecognisable architecture flags?

Nah, the migration assistant did a pretty good job, but in the end I 
needed to rebuild my source install of Python2.6, after some bashing to 
get rid of the zope.interface that ships with Mac OS X, I was able to 
get everything working as normal...

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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.sqlalchemy+py3 test failures.

2011-09-27 Thread Chris Withers
On 27/09/2011 02:47, Chris McDonough wrote:
 In case anyone is interested, I've made a stab at porting
 zope.sqlalchemy to Python 3 at
 http://svn.zope.org/zope.sqlalchemy/branches/chrism-py3/ .  Several
 tests still fail.  I could use some help fixing them.

Have you tried running the tests by building the buildout instead?
(that's making a huge assumption that zc.buildout and zope.testing work 
on Py3, which I guess isn't the case...)

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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] MailingLogger 3.5.0 Released!

2011-09-24 Thread Chris Withers
I'm pleased to announce a new release of Mailinglogger.

Mailinglogger provides two handlers for the standard python
logging framework that enable log entries to be emailed either as the
entries are logged or as a summary at the end of the running process.

The handlers have the following features:

- customisable and dynamic subject lines for emails sent

- emails sent with a configurable headers for easy filtering

- flood protection to ensure the number of emails sent is not excessive

- support for SMTP servers that require authentication

- fully documented and tested

The only change for this release was to add an X-Log-Level header to 
emails sent. For MailingLogger, this is the level of the log message 
being emailed. For SummarisingLogger this is the highest level of any of 
the messages handled.

Full docs can be found here:

http://packages.python.org/mailinglogger/

For more information, please see:
http://www.simplistix.co.uk/software/python/mailinglogger
or
http://pypi.python.org/pypi/mailinglogger

cheers,

Chris

-- 
Simplistix - Content Management, Zope  Python Consulting
- http://www.simplistix.co.uk



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


Re: [Zope-dev] access to create z.i and z.c releases

2011-09-23 Thread Chris Withers
On 22/09/2011 10:10, Chris McDonough wrote:
 On Thu, 2011-09-22 at 10:10 +0200, Hanno Schlichting wrote:
 On Thu, Sep 22, 2011 at 9:03 AM, Chris McDonoughchr...@plope.com  wrote:
 I've made tags for zope.interface 3.8.0 and zope.component 3.11.0, as
 described in a recent thread to this list, but I don't have PyPI owner
 rights to publish them.  Can someone add me to the owners list for those
 packages (my pypi user name is chrism)?

 Added, release away!

 Eggcellent, they are both now released.

I just tried zope.interface 3.8.0 on MacOS X Lion and got:

Getting distribution for 'zope.interface'.
unable to execute gcc-4.0: No such file or directory

WARNING:

 An optional code optimization (C extension) could not be compiled.

 Optimizations for this package will not be available!

command 'gcc-4.0' failed with exit status 1


Not seen that before, definitely got gcc:

$ which gcc
/usr/bin/gcc

$ gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 
5658) (LLVM build 2335.15.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

...not sure why it wants gcc-4.0 specifically, any ideas?

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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] RFC: Proposal for merging jbohman-zope.registry branch of zope.component

2011-09-16 Thread Chris Withers
On 15/09/2011 07:11, Chris McDonough wrote:
 zope.registry also currently provides a minor API in the way of an
 adapts decorator.  This could (and should) be moved back into
 zope.component; it's actually not used internally by zope.registry now
 (although some decoy imports would make you think so if you look at
 zope.registry.__init__).

 First cuts of this at:

 http://svn.zope.org/zope.component/branches/chrism-zope.interface-componentregistry/

 http://svn.zope.org/zope.interface/branches/chrism-componentregistry/

 I have merged these two branches to their respective trunks:

 z.i: https://mail.zope.org/pipermail/checkins/2011-September/057121.html

 z.c: https://mail.zope.org/pipermail/checkins/2011-September/057124.html

A big enough change to warrant a second point bump rather than just 
third point, certainly for z.i, surely?

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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] threadlock module import error

2011-08-28 Thread Chris Withers
On 26/08/2011 14:32, Henk wrote:
 I have a zope server 2.10.2 running. After upgrading to a 2.13.4 version
 of Zope and importing a .zexp folder from the old version I get the
 import error: No module named ThreadLock.
 In version 2.13 the module ThreadLock was removed it states in the
 changes description.
 What can I do to make it work again?

A good start would be to post the full traceback relating to the error 
to this list.

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope-dev] RFC: Proposal for merging jbohman-zope.registry branch of zope.component

2011-08-26 Thread Chris Withers
On 26/08/2011 02:17, Charlie Clark wrote:
 Regarding Withers suggestion - should we be looking to move these
 libraries to the WSGI namespace? Or are there real use cases outside the
 web world?

As with Tim, I use both of these libraries plenty of the time outside of 
web work...

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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] RFC: Proposal for merging jbohman-zope.registry branch of zope.component

2011-08-25 Thread Chris Withers
On 25/08/2011 06:24, Jim Fulton wrote:
 Maybe something like zope.plugins would be better.  When I try
 to explain zope.component to people, I often explain it as a good
 generic plugin mechanism.

If we're renaming, we could also consider dropping the zope bit.

I never will understand the irrational fear and hatred of the zope 
name but it's still there and I reckon we'd get a much more sensible 
reception in the rest of the python world if we dropped it.

cheers,

Chris

PS: In passing, and for similar reasons, along with ease of 
pronunciation and lack of package namespacing, it'd be great if buildout 
2.0 could be just buildout rather than zc.buildout.

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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] MailingLogger 3.4.0 Released!

2011-08-22 Thread Chris Withers
Heh, of course, I forgot the setuptools-git extension to make 
include_package_data=True work, so this release was pretty useless, 
other than the docs on packages.python.org/testfixtures ;-)

Anyway, 3.4.1 has now been released which fixes this!

cheers,

Chris

On 17/08/2011 23:37, Chris Withers wrote:
 I'm pleased to announce a new release of Mailinglogger.

 Mailinglogger provides two handlers for the standard python
 logging framework that enable log entries to be emailed either as the
 entries are logged or as a summary at the end of the running process.

 The handlers have the following features:

 - customisable and dynamic subject lines for emails sent

 - emails sent with a configurable headers for easy filtering

 - flood protection to ensure the number of emails sent is not excessive

 - support for SMTP servers that require authentication

 - fully documented and tested

 This release has no functional changes but finally ships with a full new
 set of Sphinx docs:

 http://packages.python.org/mailinglogger/

 For more information, please see:
 http://www.simplistix.co.uk/software/python/mailinglogger
 or
 http://pypi.python.org/pypi/mailinglogger

 cheers,

 Chris


-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] MailingLogger 3.4.0 Released!

2011-08-18 Thread Chris Withers
I'm pleased to announce a new release of Mailinglogger.

Mailinglogger provides two handlers for the standard python
logging framework that enable log entries to be emailed either as the
entries are logged or as a summary at the end of the running process.

The handlers have the following features:

- customisable and dynamic subject lines for emails sent

- emails sent with a configurable headers for easy filtering

- flood protection to ensure the number of emails sent is not excessive

- support for SMTP servers that require authentication

- fully documented and tested

This release has no functional changes but finally ships with a full new 
set of Sphinx docs:

http://packages.python.org/mailinglogger/

For more information, please see:
http://www.simplistix.co.uk/software/python/mailinglogger
or
http://pypi.python.org/pypi/mailinglogger

cheers,

Chris

-- 
Simplistix - Content Management, Zope  Python Consulting
- http://www.simplistix.co.uk



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


[Zope-dev] TestFixtures 1.10.0 Released!

2011-07-19 Thread Chris Withers
Hi All,

I'm happy to announce a new release of TestFixtures with the following 
changes:

- Removed the dependency on zope.dottedname.

- Implement the ability to mock out dict and list
   items using testfixtures.Replacer and
   testfixtures.replace.

- Implement the ability to remove attributes and dict
   items using testfixtures.Replacer and
   testfixtures.replace.

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:

http://www.simplistix.co.uk/software/python/testfixtures

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] TestFixtures 1.10.0 Released!

2011-07-19 Thread Chris Withers
Hmm, might have been helpful to include docs for these new bits:

On 19/07/2011 09:36, Chris Withers wrote:
 - Implement the ability to mock out dict and list
 items using testfixtures.Replacer and
 testfixtures.replace.

 - Implement the ability to remove attributes and dict
 items using testfixtures.Replacer and
 testfixtures.replace.

So, here they are:


http://packages.python.org/testfixtures/mocking.html#replacing-items-in-dictionaries-and-lists

http://packages.python.org/testfixtures/mocking.html#removing-attributes-and-dictionary-items

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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] Unused options for buildout: 'eggs'.

2011-07-15 Thread Chris Withers
On 09/07/2011 00:21, Fernando Martins wrote:
 I installed zope 2.13.8 per instructions on
 http://docs.zope.org/zope2/releases/2.13/INSTALL-buildout.html

Which bit?

I'd recommend:

http://docs.zope.org/zope2/releases/2.13/INSTALL-buildout.html#creating-a-buildout-based-zope-instance

...or indeed:

http://pypi.python.org/pypi/zope2instance


 Egg-based packages are very simple to install with Buildout.

 [buildout]
 ...
 eggs =
   Products.ZSQLMethods

 and run bin/buildout.

 I get the message:

 Unused options for buildout: 'eggs'.

eggs is a key of the [instance] section, not the [buildout] section.

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


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

2011-06-28 Thread Chris Withers
On 28/06/2011 18:28, Johannes Raggam wrote:
 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.

Not to mention that http://www.zope.org/Products/ is out of date and 
lists Zope 2.11.4 as the latest 2.11 release, for example...

 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).

Yeah yeah, we'll see ;-)

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] weird intermittent error with apache2 and mod_wsgi

2011-06-27 Thread Chris Withers
Hi All,

Apologies for the cross post, but this problem is occurring with a 
repoze.bfg app running on apache using mod_wsgi, and the exception is 
suggesting something zope.interface related...

So, firstly, it only happens intermittently, and I haven't been able to 
figure out any pattern to the exceptions. It didn't used to happen at 
all (this app has been happily running for a year or so now) but I can't 
think of anything that's changed on the machine in question that might 
cause this. Restarting Apache does appear to cure it for a bit...

The exception is as follows:

File aircon/bin/mod_wsgi, line 34, in module
   from aircon.web import make_app
File aircon/aircon/web.py, line 2, in module
   from aircon.config import system,Session
File aircon/aircon/config.py, line 1, in module
   from gb50 import System
File aircon/aircon/gb50.py, line 33, in module
   class System:
File 
zope.interface-3.6.1-py2.6-linux-i686.egg/zope/interface/advice.py, 
line 141, in advise
   return callback(newClass)
File 
zope.interface-3.6.1-py2.6-linux-i686.egg/zope/interface/declarations.py, 
line 471, in _implements_advice
   classImplements(cls, *interfaces)
File 
zope.interface-3.6.1-py2.6-linux-i686.egg/zope/interface/declarations.py, 
line 447, in classImplements
   spec = implementedBy(cls)
File 
zope.interface-3.6.1-py2.6-linux-i686.egg/zope/interface/declarations.py, 
line 287, in implementedByFallback
   spec = cls.__dict__.get('__implemented__')
  2011] [error] [client 93.89.128.162] RuntimeError: class.__dict__ not 
accessible in restricted mode

the section of gb50.py looks like:

from aircon.interfaces import ISystem,IUnit
from zope.interface import implements

class System:

 implements(ISystem)

...

The interface is:

from zope.interface import Interface,Attribute

class ISystem(Interface):
...

Anyone seen anything like this before or have any ideas?

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] component registry navelgazing

2011-06-13 Thread Chris Withers
On 12/06/2011 21:48, Chris McDonough wrote:
 Currently if you ask a registry to singly-adapt an object to an
 interface, and the object you're trying to adapt implements that
 interface, here's what happens:

 from zope.component.registry import Components
 c = Components()
 from zope.interface import Interface, implements
 class IFoo(Interface): pass
 ...
 class Foo(object):
 ... implements(IFoo)
 ...
 foo = Foo()
 c.queryAdapter(IFoo, foo)
 None

Looking back in history:

https://mail.zope.org/pipermail/zope-dev/2008-August/032902.html

I guess one or other of us has the parameter order wrong, probably me.

Much thread ensued:
https://mail.zope.org/pipermail/zope-dev/2008-August/thread.html#32902
https://mail.zope.org/pipermail/zope-dev/2008-September/thread.html#33174

Some justification for keeping the status quo from Fred:

https://mail.zope.org/pipermail/zope-dev/2008-September/033172.html

I stand by my resultant request here:

https://mail.zope.org/pipermail/zope-dev/2008-September/033170.html

Maybe less people care about ZCA now and so we might actually get 
sensible changes made.

Maybe forking would be easier...

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] component registry navelgazing

2011-06-13 Thread Chris Withers
On 13/06/2011 15:26, Charlie Clark wrote:
 In order to get the object itself back from such an adaptation, you need
 to use the default= argument.

 I know that the question has been answered but your question makes me ask
 another: why would you want to adapt an object with itself?

I have something, I want something that implements IWhatever.

Now, it may well be that something implements IWhatever, but it may also 
not. As the author of the code in question, I don't want to have to care.

Other authors can plug in adapters for the cases where something doesn't 
implement IWhatever ;-)

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] 2.13 upgrade problems

2011-06-03 Thread Chris Withers
On 03/06/2011 15:25, Martijn Pieters wrote:
 On Fri, Jun 3, 2011 at 12:42, Peter Bengtssonm...@peterbe.com  wrote:
 I'm getting the error below when trying to boot up a zope 2.13.7 using
 a Data.fs I took from a zope 2.8.12 instance.

 You may want to try to boot up the instance on intermediary Zope
 versions first, it may well update the pickles for you along the way.

Not quite.

I hit this problem going from Zope 2.9 to 2.12.

The answer was to load up on 2.9, save all the affected objects 
(_p_changed = 1 or some such) and then try moving to 2.12 again...

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] SSO

2011-05-17 Thread Chris Withers
Hi Sabine,

On 17/05/2011 07:07, Sabine Grabner wrote:
 I try to set up Zope with Shibboleth SSO.

What are you using to do the Shibboleth auth?

 Therefore I need to delegate
 authentication to Apache which should then pass the REMOTE_USER
 environment variable to Zope. Am I understanding right, that for this
 purpose I have to use the not so recommended fastcgi configuration?

No, I think, you're fine using the normal ZServer way of running Zope.
You just need to get Zope into remote user mode, from looking at the 
source, it appears you need to create a file called access in your 
INSTANCE_HOME and put the following in it:

superuser:

 REMOTE_USER environment variable. However, going this route would mean
 messing with the existing code, which uses REMOTE_USER currently set by
 Zope.

What existing code?

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope-dev] beta.zope.org (www.zope.org relaunch project)

2011-05-10 Thread Chris Withers
Hi All,

I found a link off the new site (which looks great, btw) to:

http://zodb.zope.org/

...but this name doesn't resolve for me, does it for other people?

Chris

On 10/05/2011 05:55, Andreas Jung wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi there,

 I am happy to announce that we have made progress
 with the zope.org relaunch project. The first public
 version of the new site is now available under

 http://beta.zope.org

 The basic idea behind the project is:

   - a minimalistic www.zope.org site giving a short
 overview about what Zope is - including all
 related app servers, CMSes, frameworks etc.
 which links to the related project sites (micro-site
 approach)

   - no more member contents on www.zope.org

   - the current www.zope.org will be stripped down
 to the current member contents and stuff that
 has to be preserved. www.zope.org will be
 renamed to old.zope.org later

 Constructive criticism and feedback is welcome _now_.

 I hope that we can fix the outstanding issues and integrate
 further feedback over the next few week in order to roll
 out the new site in the first half of June (2011 of course).

 Many thanks to my team (doing the real work):

 - - Michael Haubenwaller
 - - Kai Mertens
 - - Johannes Raggam

 Andreas Jung
 Zope Foundation

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.11 (Darwin)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iQGUBAEBAgAGBQJNyMVOAAoJEADcfz7u4AZjTgoLvigFQqPKlnn9J97+wrQRJkdr
 8ErOiV6LCmpQeNLGDVodq0Y4JGnfQELu0ByzRz+xdig3NDAY9WyKTcxjJqu7DJ4H
 NnZ49dK47uvZaYbfq0kKjzIw9/FX092t5+lyVdiYst1d3JGEphz1iDsl+rySu4m1
 xf3Zq5/+HH0xl2NPQ391dqPuoka+93ydygBfqR7TbBxr4t1GcbFs6vMhN5/13I7c
 g/Q6CWCKlBOfdSnof+p1M/EHtLelst7LPHXluB5tLSQcbpbhd3vtV2x19+InNBWs
 3vbaWz9EFPQVdgrAc8f3Npw6+t1tn2JMBlLEJtwLmaErqjgDA4MMEmOmJPqNDqYo
 7fyVWy0+OFeJdrGtO6MOZvmkgTxp+DBYjCOqzhzBijoHGaBQz1RsfH8IrWqhI+Av
 PRihsjM6ZBEhVcHyW/FIQfSvsYJCsim+xxcfkmUhUjXSD6j2h4BBjNnnyI2JRHkq
 iu0A27ANzqZrHx8rRipFcU9gJqLtBfA=
 =8/ed
 -END PGP SIGNATURE-


 __
 This email has been scanned by the MessageLabs Email Security System.
 For more information please visit http://www.messagelabs.com/email
 __



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

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] beta.zope.org (www.zope.org relaunch project)

2011-05-10 Thread Chris Withers
On 10/05/2011 22:31, Jens Vagelpohl wrote:
 ...but this name doesn't resolve for me, does it for other people?

 The link is incorrect. It should point to www.zodb.org.

Where would I got to fix it?

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] beta.zope.org (www.zope.org relaunch project)

2011-05-10 Thread Chris Withers
On 11/05/2011 06:45, Andreas Jung wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Chris Withers wrote:
 On 10/05/2011 22:31, Jens Vagelpohl wrote:
 ...but this name doesn't resolve for me, does it for other people?
 The link is incorrect. It should point to www.zodb.org.

 Where would I got to fix it?

 This is our task.

That sounds like a very closed answer :-(

Where's the site in svn?
How do existing Zope contributors help out?

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] beta.zope.org (www.zope.org relaunch project)

2011-05-10 Thread Chris Withers
On 11/05/2011 06:52, Andreas Jung wrote:
 How do existing Zope contributors help out?

 Please make your notes. We will pick them up and incorporate
 for the final version. Further changes should be made by the webmaster
 which is currently Michael Haubenwaller.

This sounds a lot like we don't want your help, kindly go away.
(Where your is existing Zope contibutors)

Good luck with that...

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] TestFixtures 1.9.2 Released!

2011-04-20 Thread Chris Withers
Hi All,

I'm happy to announce a new release of TestFixtures.

This release adds a utcnow method to test_datetime that behaves 
identically to the now method:

http://packages.python.org/testfixtures/api.html#testfixtures.tdatetime.utcnow

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:

http://www.simplistix.co.uk/software/python/testfixtures

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] private releases

2011-03-30 Thread Chris Withers
On 30/03/2011 12:29, Wolfgang Schnerring wrote:
 (Shameless plug: ;-) gocept.zestreleaser.customupload is a plugin for
 zest.releaser that allows uploading the created egg via scp. We use this
 to put our non-public eggs into a folder that's served (and htpasswd
 protected) by an Apache or somesuch, no complicated egg server
 business required.

 So those solutions then require you to put the password for accessing it
 somewhere during deployment ... where is that for you?

 We put the password into the buildout.cfg.

lovely.buildouthttp keeps the passwords in a seperate file in yoru 
.buildout directory...

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] private releases

2011-03-25 Thread Chris Withers
Hi Christian,

On 25/03/2011 16:49, Christian Theune wrote:
 the German speaking Zope Users Group (DZUG e.V.) organizes a series of 4
 sprints this year to support feature development within the proximity of
 the ZTK and solve problems encountered by Zope, Plone and Python developers.

snip
 Topics
 ==

 * Discussing how to deal with private releases

FWIW, I've had no problems with this, here's a sample buildout.cfg:

[buildout]
extensions = lovely.buildouthttp
find-links = https://example.com/password/protected/folder

...and just dump the .tgz sdists in that folder.

Of course, if you don't need password protection such as when you have 
your egg server on a private network, you just need the find-links.

I'm not really sure why people have written a complicated array of egg 
servers and the like when a simple http or file system served folder is 
just fine ;-)

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] can't register adapters for classes with metaclasses

2011-02-27 Thread Chris Withers

Hi All,

This is particularly problematic when using the common case of 
SQLAlchemy declaratively mapped model classes.


The attached unit test when run will fail with:

Error in test test_provideAdapter (test_sa.TestAdapter)
Traceback (most recent call last):
  File /usr/local/lib/python2.6/unittest.py, line 279, in run
testMethod()
  File test_sa.py, line 25, in test_provideAdapter
provideAdapter(MyAdapter,Model)
  File 
zope.component-3.10.0-py2.6.egg/zope/component/globalregistry.py, line 
72, in provideAdapter

base.registerAdapter(factory, adapts, provides, name, event=False)
  File zope.component-3.10.0-py2.6.egg/zope/component/registry.py, 
line 182, in registerAdapter

required = _getAdapterRequired(factory, required)
  File zope.component-3.10.0-py2.6.egg/zope/component/registry.py, 
line 414, in _getAdapterRequired

for r in required:
TypeError: 'DeclarativeMeta' object is not iterable

Why is that and how should I register an adapter against such a class?

cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
   - http://www.simplistix.co.uk
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.schema import Column
from sqlalchemy.types import Integer
from unittest import TestCase
from zope.component import provideAdapter
from zope.interface import implements,Interface


class TestAdapter(TestCase):

def test_provideAdapter(self):
# setup
Base = declarative_base()
class Model(Base):
__tablename__='model'
id = Column('id', Integer, primary_key=True)

class IMyInterface(Interface):
pass

class MyAdapter:
implements(IMyInterface)

provideAdapter(MyAdapter,Model)
___
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] can't register adapters for classes with metaclasses

2011-02-27 Thread Chris Withers
On 27/02/2011 17:22, Tres Seaver wrote:
 TypeError: 'DeclarativeMeta' object is not iterable

 Why is that and how should I register an adapter against such a class?

 UTSL:  the 'required' argument passed to 'registerAdapter' is supposed
 to be a sequence of interfaces or classes, not a single interface or
 class.  If a class, then it must be something which can be passed to
 'implementedBy'.

Thanks. I blame mcdonc, got used to having actual docs for everything ;-)

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] transaction as context manager, exception during commit

2011-02-24 Thread Chris Withers
Hi Jim,

The current __exit__ for transaction managers looks like this:

 def __exit__(self, t, v, tb):
 if v is None:
 self.commit()
 else:
 self.abort()

..which means that if you're using the transaction package as a context 
manager and, say, a relational database integrity constraint is 
violated, then you're left with a hosed transaction that still needs 
aborting.

How would you feel about the above changing to:

 def __exit__(self, t, v, tb):
 if v is None:
 try:
 self.commit()
 except:
 self.abort()
 raise
 else:
 self.abort()

If this is okay, I'll be happy to write the tests and make the changes 
provided someone does a release when I have...

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] [ZODB-Dev] transaction as context manager, exception during commit

2011-02-24 Thread Chris Withers
On 24/02/2011 11:38, Laurence Rowe wrote:
 Hi Jim,

 The current __exit__ for transaction managers looks like this:

  def __exit__(self, t, v, tb):
  if v is None:
  self.commit()
  else:
  self.abort()

 ..which means that if you're using the transaction package as a context
 manager and, say, a relational database integrity constraint is
 violated, then you're left with a hosed transaction that still needs
 aborting.

 How would you feel about the above changing to:

  def __exit__(self, t, v, tb):
  if v is None:
  try:
  self.commit()
  except:
  self.abort()
  raise
  else:
  self.abort()

 If this is okay, I'll be happy to write the tests and make the changes
 provided someone does a release when I have...

 Looking at the way ZPublisher handles this, I think you're right.

Cool, I'll wait for Jim's verdict (and some time to implement it ;-)) 
before diving in...

 I
 think you might also need to modify the __exit__ in Attempt, which
 additionally handles retrying transactions that fail.

Yeah, I see a bug relating to this was reported yesterday:

https://bugs.launchpad.net/bugs/724332

I know it's a different problem, but sounds like the code for attempt 
needs some love...

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] TestFixtures 1.9.0 Released!

2011-02-11 Thread Chris Withers
Hi All,

I'm happy to announce a new release of TestFixtures.

This release adds a helper for tests of code using zope.component:

http://packages.python.org/testfixtures/components.html

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:

http://www.simplistix.co.uk/software/python/testfixtures

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] Manuel and TestFixtures

2011-01-14 Thread Chris Withers
On 08/09/2009 18:04, Chris Withers wrote:
 Coming back to this ancient thread...

...and once more, only a year and a half later ;-)

 What I'd really like to do is write a Manuel plugin that will be part of
 testfixtures' TempDirectory and would handle the following:

 .. topic:: some/dir/myfile.py
 :class: file

  ::

   class MyClass:
  def something(self):
 pass

 ...to write the file.

 ...and:

 .. topic:: some/dir/myfile.py
 :class: expected-file

  ::

   class MyClass:
  def something(self):
 pass

 ...to check it exists and matches what should be there, emitting
 meaningful error messages if things are wrong.

...this is now a reality:

http://packages.python.org/testfixtures/files.html#using-with-manuel

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] Forum

2011-01-06 Thread Chris Withers
On 06/01/2011 11:09, Richard Harley wrote:
 Are there any current forums which integrate into Zope nicely? I have
 tried Zforum and Squishdot in the past but I don't think either of these
 two have been updated in quite a while?

What version of Zope are you using?

I still run plenty of Squishdot instances on Zope 2.9.8.

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope-dev] Context priority as an alternative to configuration directive overrides

2010-12-03 Thread Chris Withers
On 02/12/2010 08:15, Malthe Borch wrote:
 I always found configuration overrides (e.g. ZCML'sincludeOverrides
 directive) to be difficult to manage and hard to get right.

 How about an alternative where you can put a priority on a
 configuration context like so:

adapter zcml:priority=100 ... /

I'm -sys.maxint on priorities.

 Default priority would be 0, traditional overrides get the maximum
 priority. ZTK components might then all be at the default priority,
 making it trivial to add a preferred component in a custom setup.

I'd much prefer it to just be an order of execution thing, the nyou 
have total and flexible control. Combined with some logging about why 
something is as it is and you have your solution.

The current includeOverrides stuff is a bit of a hack...

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] logrotation/logreopening in ZTK-based applications

2010-11-29 Thread Chris Withers
On 10/11/2010 14:23, Christian Theune wrote:
 I'd like to keep this out of the server: rotation is a system
 administration task where I'd like to rely on the policies and tools
 provided by the system environment.

I just use logrotate's copytruncate option :-)

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] problem installing Openflow product of zope on LINUX

2010-11-28 Thread Chris Withers
On 28/11/2010 10:24, Riccardo Lemmi wrote:
 If you need a workflow engine modern and up-to-date I counsel to integrate
 openwfe (now 'route': http://ruote.rubyforge.org/)

...which is Ruby, right?

How do you get that to work with Zope?

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


[Zope-dev] The mysterious origins of a temp_folder

2010-11-04 Thread Chris Withers
Switching to zope-dev as this has become a Zope question:

On 04/11/2010 14:17, Shane Hathaway wrote:
 On 11/04/2010 06:32 AM, Chris Withers wrote:
 I have the following config for the temp_folders of my ZODB instances:

  zodb_db temporary
  relstorage destination
  mysql
host   dr2.private
user   zope
 ..
  /mysql
keep-history false
  /relstorage
mount-point /temp_folder
container-class Products.TemporaryFolder.TemporaryContainer
  /zodb_db

 However, even after exercising the site that uses this temp_folder and
 verifying that there are objects containing within it using the ZMI, I
 still see the database as totally empty when using MySQL's gui
 administrator.

 Any idea what's going on here? Where is the data actually being stored?

 If there are no tables at all, then nothing has ever tried to open the
 storage.

Curiouser and curiouser. So, I just checked again and the tables are now 
there but there's precisely 1 row in object_state, which isn't enough.

A zopectl debug creates further confusion:

  app._p_jar.db().storage
relstorage.storage.RelStorage instance at 0xb6dd96ec
  app.temp_folder._p_jar.db().storage
tempstorage.TemporaryStorage.TemporaryStorage instance at 0xb6de6e8c

To try and figure out what was going on, I removed the whole
zodb_db temporary section. I restarted the zope instance, but still 
got the same end result:

  app.temp_folder._p_jar.db().storage
tempstorage.TemporaryStorage.TemporaryStorage instance at 0xb6d7824c

Now I'm really confused. I did try and dig into the startup code and 
found the `install_tempfolder_and_sdc` method of 
OFS.Application.AppInitializer. But, putting a pdb.set_trace() in there 
reveals that the temp folder already exists in the Application by that 
point.

Does anyone know where this is actually coming from or how it's mounted up?

Should we remove the red herring zodb_db temporary section in 
zope.conf.in?

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] Asynchronous triggering of events

2010-10-22 Thread Chris Withers
On 19/10/2010 19:44, Jeff Peterson wrote:
 Nope, Bluebream (formerly known as Zope3) is the new Zope, though Zope2 is 
 alive and very well.  Might consider peeking at Grok as well. Though I don't 
 know if either of those will help you.

I wouldn't recommend anything other than repoze.bfg myself!

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Asynchronous triggering of events

2010-10-18 Thread Chris Withers
On 18/10/2010 20:51, Brian Sullivan wrote:
 I am back working with Zope 2.9.1 (yes I know it is long in the tooth
 but I am trying to avoid adding the pain of upgrading, having products
 fail and all the usually comes with upgrading if I can). I

I would just use zopectl run and a script of your choice triggered by cron.

Stepper provides a nice set of utils for working in this pattern...

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Asynchronous triggering of events

2010-10-18 Thread Chris Withers
On 18/10/2010 22:25, Brian Sullivan wrote:
 zopetcl -- is that a unix program? I am using Windows unfortunately.

It might well be on your version of Zope, it works fine in later 
versions, though...

That said, if you take a look at Stepper, you'll see that I documented 
how to get it all to work on Windows (use Scheduled Tasks to drive it)

cheers,

Chris

PS: But seriously, how much of a masochist are you? Zope 2.9 on 
Windows?! ;-)

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


[Zope-dev] Yet more unicode and page template weirdness

2010-10-13 Thread Chris Withers
Hi All,

In Zope 2.12, try putting the following in a TTW ZPT:

tal:c content=#8250;/

...nothing more, nothing less.

On save, I get:

Compilation failed
type 'exceptions.UnicodeEncodeError': 'ascii' codec can't encode 
character u'\u203a' in position 0: ordinal not in range(128)

If I try and view the template, unsurprisingly, I get:

Module ZPublisher.Publish, line 127, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 47, in call_object
Module Shared.DC.Scripts.Bindings, line 324, in __call__
Module Shared.DC.Scripts.Bindings, line 361, in _bindAndExec
Module Products.PageTemplates.ZopePageTemplate, line 335, in _exec
Module Products.PageTemplates.ZopePageTemplate, line 432, in pt_render
Module Products.PageTemplates.PageTemplate, line 80, in pt_render
Module zope.pagetemplate.pagetemplate, line 109, in pt_render
Warning: Compilation failed
Warning: type 'exceptions.UnicodeEncodeError': 'ascii' codec can't 
encode character u'\u203a' in position 0: ordinal not in range(128)
PTRuntimeError: ['Compilation failed', type 
'exceptions.UnicodeEncodeError': 'ascii' codec can't encode character 
u'\\u203a' in position 0: ordinal not in range(128)]

Any ideas where the non-ascii character is in the above?

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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 2.12 20% slower than Zope 2.9?!

2010-10-13 Thread Chris Withers
On 11/10/2010 19:00, Alan Runyan wrote:
 Try with a smaller batch (whatever you are doing) and profile it.

 I 100% agree with what ajung says.  post a profile of your batch run
 that takes ~30 minutes.

Related to this, what http load testing tools do people around here 
recommend?

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] Another weird unicode error from Zope 2

2010-10-13 Thread Chris Withers
On 12/10/2010 16:00, Charlie Clark wrote:
 Traceback (most recent call last):
 File stdin, line 1, inmodule
 UnicodeEncodeError: 'latin-1' codec can't encode character u'\u203a' in
 position 0: ordinal not in range(256)

 ISO-8859-15 is, of course, Latin-1 + the €

Yes, but I don't see why that is being used...

Some bits from the error_log entry for this request:

HTTP_USER_AGENT 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; 
WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; 
MDDC; .NET CLR 3.5.30729; .NET CLR 3.0.30729; MS-RTC LM 8; .NET4.0C)'

HTTP_ACCEPT '*/*'

HTTP_ACCEPT_LANGUAGE'en-us'

So why on earth is iso8859_15 being picked instead of utf-8?

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] Another weird unicode error from Zope 2

2010-10-13 Thread Chris Withers
On 13/10/2010 11:10, Charlie Clark wrote:
 Am 13.10.2010, 12:06 Uhr, schrieb Chris Withersch...@simplistix.co.uk:

 So why on earth is iso8859_15 being picked instead of utf-8?

 I would guess this is the default-publisher-encoding of your system.

I don't have one set.

So, is iso-8859-15 the default in Zope 2.12? If so, why on earth that 
rather than utf-8?

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] Yet more unicode and page template weirdness

2010-10-13 Thread Chris Withers
On 13/10/2010 11:19, Charlie Clark wrote:
 Maybe your question is actually why is the XML entity being converted to
 character data at all?

I guess so...

My naive experience is that this just works in Zope 2.9 and just 
breaks in 2.12.

 Maybe your question is actually why is the XML entity being converted to
 character data at all?

Yes, absolutely :-)

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] Yet more unicode and page template weirdness

2010-10-13 Thread Chris Withers
On 13/10/2010 13:47, Marius Gedminas wrote:
 On Wed, Oct 13, 2010 at 08:53:08AM +0100, Chris Withers wrote:
 Hi All,

 In Zope 2.12, try putting the following in a TTW ZPT:

 tal:c content=#8250;/

 Are you sure you didn't mean

tal:c content=string:#8250;/

Ah, d'oh! Thanks for the catch!

 The way XML works, all entities in an attribute value are decoded before
 being interpreted, so your TALES interpreter gets an expression
 u'\u203a' which it then fails to interpret.

Makes sense, thanks! What about entities outside of attributes?

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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] Another weird unicode error from Zope 2

2010-10-12 Thread Chris Withers
Anyone seen this or know what it means?

Traceback (innermost last):
  Module ZPublisher.Publish, line 130, in publish
  Module ZServer.HTTPResponse, line 266, in setBody
  Module ZPublisher.HTTPResponse, line 330, in setBody
  Module ZPublisher.HTTPResponse, line 485, in _encode_unicode
  Module encodings.iso8859_15, line 12, in encode
UnicodeEncodeError: 'charmap' codec can't encode character u'\u203a' in 
position 2439: character maps to undefined

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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 2.12 20% slower than Zope 2.9?!

2010-10-11 Thread Chris Withers
Hi All,

Just finished upgrading a medium sized project from Zope 2.9 to 2.12.
One part of that does a batch of static copies of a Zope-served site.

I guess I was hoping for a bit of a speed up, so was slightly horrified 
to see the batch, which used to take 11hrs, now takes 13 hrs. This has 
been the same for 2 or 3 days since I did the upgrade so I don't think 
it's a freak occurrence.

The site is classic Zope 2: zodb-based python scripts and page templates 
building the UI from Product-based content objects.

Have others shared this experience?

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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 2.12 20% slower than Zope 2.9?!

2010-10-11 Thread Chris Withers
On 11/10/2010 13:32, Hanno Schlichting wrote:
 My only guess here is that you are calling a lot of page templates and
 those have gotten slower. When we switched to Unicode based templates
 in Zope 2.10, that move has of course cost some performance. Dealing
 with Unicode instead of bytes is always slower.

 If you want to improve rendering times and your analysis shows page
 templates to be the problem, try Chameleon.

Yes, this is my guess too.

Are there any docs on how to get Chameleon to work with classic, 
ZODB-based page templates?

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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 2.12 20% slower than Zope 2.9?!

2010-10-11 Thread Chris Withers
On 11/10/2010 16:53, David Glick wrote:
 Are there any docs on how to get Chameleon to work with classic,
 ZODB-based page templates?
 Just use cmf.pt: http://pypi.python.org/pypi/cmf.pt

Ah, okay, well, I'm not using anything CMF, so I opted for just five.pt.

Unfortunately, this hits a unicode problem. The unicode problem I solved 
with an IUnicodeEncodingConflictResolver using the normal page template 
engine:

class Resolver:

 implements(IUnicodeEncodingConflictResolver)

 def resolve(self, context, text, expression):
 return unicode(text,'latin-1')

chameleon doesn't appear to use this, so I get:

   File five.pt-1.3.3-py2.6.egg/five/pt/patches.py, line 90, in 
call_template_and_wrap
 return template(self, *args, **kw)
   File z3c.pt-1.2.1-py2.6.egg/z3c/pt/pagetemplate.py, line 145, in 
__call__
 return bound_pt(*args, **kwargs)
   File z3c.pt-1.2.1-py2.6.egg/z3c/pt/pagetemplate.py, line 262, in 
__call__
 return self.im_func(**kw)
   File z3c.pt-1.2.1-py2.6.egg/z3c/pt/pagetemplate.py, line 136, in render
 return self.render(**context)
   File Chameleon-1.2.13-py2.6.egg/chameleon/zpt/template.py, line 17, 
in render
 return super(PageTemplate, self).render(*args, **kwargs)
   File Chameleon-1.2.13-py2.6.egg/chameleon/core/template.py, line 
221, in render
 return self.cook_and_render(kwargs, utils.emptydict, None, True)
   File Chameleon-1.2.13-py2.6.egg/chameleon/core/template.py, line 
205, in cook_and_render
 return func(econtext, rcontext)
- __traceback_info__: (BaseTemplate ,)
   File string, line 79, in render
UnicodeDecodeError: 'utf8' codec can't decode byte 0xa3 in position 0: 
unexpected code byte

What's the chameleon or z3c.pt way of dealing with this*?

Chris

*'this' is stacks of ZODB-based page templates whose source may well be 
latin-1 encoded but, moreover, which are operating on a bunch of content 
that's *definitely* latin-1 encoded...
-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] ZSyncer 1.0.3 Released!

2010-10-07 Thread Chris Withers
Hi All,

This is purely a bug fix release for problems I experienced when 
replacing local objects by absolute path.

Installable from:
http://pypi.python.org/pypi/Products.ZSyncer

Subversion source repository:
https://secure.simplistix.co.uk/svn/ZSyncer/

Documentation:
http://packages.python.org/Products.ZSyncer/

Full change log:
http://packages.python.org/Products.ZSyncer/changes.html

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk

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


Re: [Zope] Need some newbie tal help

2010-10-05 Thread Chris Withers
On 05/10/2010 18:20, Mark Phillips wrote:
 I have a table and I am putting data into the cells using tal. I want to
 bold the data under a certain condition. I tried this, but it didn't work:

 td tal:content=string:${player/name}b
 tal:condition=python:str(player['name']) == 'Team'name/b/td

 The data (player/name) appears correctly, but when player/name='Team',
 the text is not bold. After some reading, I believe what is happening is
 that the tal:content tag is replacing everything between the td and
 the /td tags. Is this correct? I tried this, and no bold either:

 td tal:content=string:${player/GP}bGP/b/td

tdb tal:content=player/GP
tal:omit-tag=python:str(player['name']) != 'Team'GP/b/td

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


[Zope-dev] encoding ignored for PageTemplate file uploads

2010-09-30 Thread Chris Withers
Hi All,

Unless I'm missing something, the encoding text field that forms part of 
the file upload form on page template instances is completely ignored 
since it's not used in the pt_upload method of ZopePageTemplate instances.

Am I missing anything?

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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] ZODB history problem with Zope 2.12.7

2010-09-28 Thread Chris Withers
On 28/09/2010 12:55, Tres Seaver wrote:
 On 09/28/2010 03:36 AM, Chris Withers wrote:
 On 28/09/2010 00:12, Marius Gedminas wrote:
 --- ./OFS/History.py.orig   2010-09-28 02:11:56.535745440 +0300
 +++ ./OFS/History.py2010-09-28 02:12:00.043764683 +0300
 @@ -151,6 +151,9 @@
base = aq_base(self)
base._p_activate()   # make sure we're not a ghost
base.__setstate__(state) # change the state
 +for attr in dir(base):
 +if attr.startswith('_v_'):
 +delattr(base, attr)
base._p_changed = True   # marke object as dirty
self.manage_afterHistoryCopy()

 Thanks, I guess I'll monkey patch for now, here's the bug:

 https://bugs.launchpad.net/zope2/+bug/649605

 However, I'm curious, so the above will fix the object in the current
 thread, but what about objects in other threads?

 (or do _v_ attributes get killed off at the start of each transaction?)

 Only when objects are ghostified (due to an invalidation from another
 thread or process) or evicted from the cache.  I'm not quite sure how
 the case you are triggering occurs, but if that code saves the new-old
 version of the template to the ZODB, then any instances in other
 threads' connection caches should be invalidated.

Feel free to repeat the steps I originally posted and are in the bug 
description ;-)

Looks like the History.py code isn't doing something it should, but I 
don't know when or what changed to make this so. I'll CC zodb-dev in 
case Jim knows of any changes in ZODB (I'm using 3.9.6) that might be 
relevant...

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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] weird Page Template / ZODB history problem with Zope 2.12.7

2010-09-27 Thread Chris Withers
Hi All,

Try this:

- edit a page template

- edit it again

- go to the history tab, and use the Copy to present button to bring 
back your first edit.

On the edit tab, you will correctly see the text you brought back.
However, if you render the template, the old text will be used.

It's only if you Save changes that the copied-to-present text will 
actually be used.

Anyone got any ideas why and how to fix this?

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] Zope 2 Instance 1.1 Released!

2010-09-23 Thread Chris Withers
Hi All,

New release out, this one brings compatability with zc.recipe.rhrc...

This package provides a buildout recipe for creating a Zope 2 instance 
based around a deployment. The deployment concept originates from 
zc.recipe.deployment and allows the deployment to control where 
resources of a particular type are created. While zc.recipe.deployment 
is suited to production use, you will likely find that 
gocept.recipe.deploymentsandbox is more useful for development.

This recipe is only compatible with Zope 2.12+.

Full information can be found here:
http://www.simplistix.co.uk/software/zope/zope2instance

Lemme know if you have any problems, comments or suggestions...

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk

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


Re: [Zope-dev] IUnicodeEncodingConflictResolver moronosity

2010-09-22 Thread Chris Withers
On 21/09/2010 23:59, Marius Gedminas wrote:
 On Tue, Sep 21, 2010 at 07:39:46PM +0100, Chris Withers wrote:
 So, would anyone object if I change the default, on both trunk and the
 2.12 branch to some variant of:

 class BasicEncodingConflictResolver(object):
implements(IUnicodeEncodingConflictResolver)

def resolve(self, context, text, expression):
logging.warn('You should register an '
 'IUnicodeEncodingConflictResolver that matches '
 'your content')
return text.decode('ascii','replace')

 ...and delete that devil spawn turd that is PreferredCharsetResolver?

 If this means Zope2-the-application becomes unusable out of the box if
 you've non-ASCII data in your database, then I'm -1.

I'd call having the odd '?' shown in pages and a warning in your logs 
telling you about the problem in clear terms versus sporadic total 
failures by way of unicode exceptions a lot more usable, rather than the 
current situation, which is conceptually insane *and* unusable ;-)

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] IUnicodeEncodingConflictResolver moronosity

2010-09-22 Thread Chris Withers
On 22/09/2010 03:50, Andreas Jung wrote:
 I also strongly object such a change in the default behavior.

I'm sorry, but WHAT?

 I did a
 lot of testing of the current implementation and configuration with
 various browsers and Zope applications and add-ons in order to make the
 Zope 3 ZPT engine in Zope 2 work out-of-the-box for most applications.

Er, you can't be serious...

The idea of asking the user agent what encoding is used to encode data 
in the database is like telling an obese person they can have their foot 
amputated in order to lose weight.

A less insane version of that default would be:

class BasicEncodingConflictResolver(object):
   implements(IUnicodeEncodingConflictResolver)

   def resolve(self, context, text, expression):
   logging.warn('You should register an '
'IUnicodeEncodingConflictResolver that matches '
'your content')
   encodings = ['utf-8','latin-1']
   mpc =  getattr(context,'management_page_charset',None)
   if mpc:
   encodings.insert(0,mpc)
   for enc in encodings:
   try:
   return unicode(text,enc)
   except UnicodeDecorError:
   pass
   return unicode(text,sys.getdefaultencoding(),'replace')


 However with the given constraints there will be always applications or
 bad written code

PreferredCharsetResolver *is* bad code.

I'll say it again, 'cos the message doesn't seem to be getting through:

What on earth do the character sets accepted by the browser have to do 
with the python string encoding used in the data on the server, which up 
until that request, most likely has never been anywhere near that 
browser before?!

 resolver. That's why it is pluggable.

Yes, and well documented and advertised too... not!

 existing resolver smarter and more efficient: +1 for tuning the
 implementation but the proposed solution above does not solve anything
 and will break a bunch of apps.

bull crap.

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] IUnicodeEncodingConflictResolver moronosity

2010-09-22 Thread Chris Withers
On 21/09/2010 21:18, Andreas Jung wrote:
 I can not recall all details but at the time of the integration of the
 Zope 3 ZPT engine the unicode resolver approach was the best thinkable
 solution for dealing all possible edgecase where encoding issues may pop
 *for the sake of backwards compatibility*

...where it miserably failed. The projects I've hit this on have all 
been running flawlessly on Zope 2.1(ish) through to Zope 2.9.
Zope 2.11 onwards, in my experience, phail, spectacularly...

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] IUnicodeEncodingConflictResolver moronosity

2010-09-22 Thread Chris Withers
On 22/09/2010 09:58, Andreas Jung wrote:
 If you think it is crap then I cam happy to accept that (and I don't
 mind much because Zope 2 is not my radar right now). You are committer
 and you can fix my crap. Blame me for having written this crap but you
 could also blame me for having on this whole Zope 3 ZPT engine
 integration :-)

Can you please answer me one thing though: in what way could it ever be 
a good idea to consult the browser's list of acceptable character sets 
to decide how to decode python strings into python unicode objects in a 
database that the browser has never had anything to do with?

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] ZSyncer 1.0.2 Released!

2010-09-22 Thread Chris Withers
Hi All,

Another new release...

Small fixes this time:

- Add warning about use relative paths mode

- Change default back to not using relative paths

- Fix icons for remote objects

Installable from:
http://pypi.python.org/pypi/Products.ZSyncer

Subversion source repository:
https://secure.simplistix.co.uk/svn/ZSyncer/

Documentation:
http://packages.python.org/Products.ZSyncer/

Full change log:
http://packages.python.org/Products.ZSyncer/changes.html

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk

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


[Zope-dev] IUnicodeEncodingConflictResolver moronosity

2010-09-21 Thread Chris Withers
Hi All,

It's been a a while since I had a good rant on a Zope list, but this 
really takes the biscuit.

Andreas, what on *earth* were you thinking with PreferredCharsetResolver?!

I like the idea of IUnicodeEncodingConflictResolver, but 
PreferredCharsetResolver is in the realms of totally batshit crazy.

Why? well, because what *on earth* have the character sets accepted by 
the user agent got to do with how strings are encoded in *my database*?!

Nevermind the logic holes of the following:

- reverting to management_page_charset *only* if there's no REQUEST 
(there's always a REQUEST, this is Zope 2, the world collapses if there 
isn't!)

- returning the original text if the bizarre dance fails, violating the 
contract of IUnicodeEncodingConflictResolver to *return unicode*

How about the *insane performance overhead* of doing two utility lookups 
*and* iterating over a load of encodings trying to find one that works 
for *every single string substituition* done by a ZPT?!

Why has no-one noticed this? Well, my guess is because when browsers are 
explicitly supplying headers, as quite a few do (IE and Safari excepted, 
who are legitimately going we can handle anything you can throw at 
us), this moronic piece of code happily loops through them all, and no 
doubt gets a hit on either utf-8 or latin-1, or, if you're really lucky, 
ascii.

To boot, when things go wrong, nobody suspects this miserable little 
turd because it's hides itself nicely by just returning the original 
text, leaving the bemused reader to wonder why some UA's fail and some 
succeed, pointing the finger in totally the wrong direction (hence 
Charlie's hacked up getPreferredCharsets and poor Vlad's desperate 
attempts).

Thankfully, I guess I can register an override that doesn't bark at the 
moon and froth at the mouth... Here, have an invoice for the hours of my 
life you've needlessly wasted...

Farq,

Chris ;-)

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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] IUnicodeEncodingConflictResolver moronosity

2010-09-21 Thread Chris Withers
On 21/09/2010 19:32, Hanno Schlichting wrote:
 Because there's not all that many people left using plain Zope 2 and
 upgrading to new versions.

Well, or they assume they must be doing something wrong because of this 
default.

 The rest is using Plone, which has its own version of this:

 def _unicode_replace(structure):
  if isinstance(structure, str):
  text = structure.decode('utf-8', 'replace')
  else:
  text = unicode(structure)
  return text

 class UTF8EncodingConflictResolver(object):
  implements(IUnicodeEncodingConflictResolver)

  def resolve(self, context, text, expression):
  return _unicode_replace(text)

Right, although the 'replace' is a lame cop out too ;-)

 We can do this, as we force manage_page_charset and
 default-zpublisher-encoding to be utf-8 and only support utf-8 and
 Unicode in the database.

Fundamentally, the developer must know what encoding is being used in 
their data. So, they should be able to register an appropriate decoder 
BUT...

 Zope 2 itself tries to support arbitrary encodings, at which point it
 can only guess badly or fail.

...having this default, which makes ABSOLUTELY NO SENSE in this 
universe, or likely any other, is fucking crazy.

So, would anyone object if I change the default, on both trunk and the 
2.12 branch to some variant of:

class BasicEncodingConflictResolver(object):
  implements(IUnicodeEncodingConflictResolver)

  def resolve(self, context, text, expression):
  logging.warn('You should register an '
   'IUnicodeEncodingConflictResolver that matches '
   'your content')
  return text.decode('ascii','replace')

...and delete that devil spawn turd that is PreferredCharsetResolver?

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] Extending Zope2 bin/instance run

2010-09-20 Thread Chris Withers
On 05/09/2010 15:03, Wichert Akkerman wrote:
 On 2010-9-4 00:43, Chris Withers wrote:
 On 03/09/2010 17:21, Tres Seaver wrote:
 I am not sure if this is best done in plone.recipe.zope2instance or
 Zope2.Startup.zopectl. They have differing versions of ZopeCmd. Perhaps
 the plone.recipe.zope2instance code should be merged into Zope2's
 original as well?

 I don't know anything about the code in plone.recipe.zope2instance.

 Yes, and please remember that Plone is not the only consumer of Zope 2,
 and neither is plone.recipe.zope2instance the only way to deploy Zope...

 there is absolutely nothing Plone-specific about plone, and people are
 using it for non-Plone systems as well.

It's an overly verbose throwback to before Zope2 was a properly packaged 
package ;-)

I prefer zope2instance, or just using a raw buildout with one of the 
templating recipes for your zope.conf, but then I would say that...

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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] [ZODB-Dev] attempting to undo an un-undoable transaction gives NotImplementedError with ZODB 3.9.5

2010-09-10 Thread Chris Withers
On 09/09/2010 21:47, Jim Fulton wrote:
 2010-08-26 22:49:01 ERROR txn.-1338986496 Failed to abort resource
 manager:MultiObjectResourceAdapter forZODB.DB.TransactionalUndo
 object at 0x2d509f0  at 47516176
 Traceback (most recent call last):
File transaction-1.1.0-py2.6.egg/transaction/_transaction.py, line
 475, in abort
  rm.abort(self)
File transaction-1.1.0-py2.6.egg/transaction/_transaction.py, line
 548, in abort
  self.manager.abort(o, txn)
File ZODB3-3.9.5-py2.6-macosx-10.3-fat.egg/ZODB/DB.py, line 985, in
 abort
  raise NotImplementedError
 NotImplementedError

 This used to give a meaningful error message.

 In 3.7 and earlier.


 Anyone know why it no longer does?

 The resource manager abort method used to be a pass. In 3.9 in raises
 an exception, which hides the undo exception.

That's bad, right?

 An app should capture
 the undo exception information before calling abort.

the app here is Zope 2's publisher process, right?

 My guess is that this works much better in ZODB 3.10.

Any particular reason?

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] Extending Zope2 bin/instance run

2010-09-03 Thread Chris Withers
On 03/09/2010 17:21, Tres Seaver wrote:
 I am not sure if this is best done in plone.recipe.zope2instance or
 Zope2.Startup.zopectl. They have differing versions of ZopeCmd. Perhaps
 the plone.recipe.zope2instance code should be merged into Zope2's
 original as well?

 I don't know anything about the code in plone.recipe.zope2instance.

Yes, and please remember that Plone is not the only consumer of Zope 2, 
and neither is plone.recipe.zope2instance the only way to deploy Zope...

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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] UnicodeDecodeError from PageTemplate rendering after upgrading to Zope 2.12.7

2010-08-31 Thread Chris Withers
Hi All,

After a recent upgraded to Zope 2.12, I'm now seeing errors like the 
following when using IE (version 8) or Safari (version 4.0.3) to view 
page templates. Chrome and Firefox work fine.

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
snip
   Module Shared.DC.Scripts.Bindings, line 324, in __call__
   Module Shared.DC.Scripts.Bindings, line 361, in _bindAndExec
   Module Products.PageTemplates.ZopePageTemplate, line 335, in _exec
   Module Products.PageTemplates.ZopePageTemplate, line 432, in pt_render
   Module Products.PageTemplates.PageTemplate, line 80, in pt_render
   Module zope.pagetemplate.pagetemplate, line 115, in pt_render
   Module zope.tal.talinterpreter, line 271, in __call__
snip
   Module zope.tal.talinterpreter, line 343, in interpret
   Module zope.tal.talinterpreter, line 751, in do_insertStructure_tal
UnicodeDecodeError: 'ascii' codec can't decode byte 0xa0 in position 
366: ordinal not in range(128)

Has anyone seen this or anything similar before?
Any solutions spring to mind?

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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 )


  1   2   3   4   5   6   7   8   9   10   >