[Zope3-dev] annoying exception - amateur mistake

2006-03-07 Thread Adam Groszer
Hi there,

I had a nicely working app with

interfaces.py::
class IVersion(IVersionable, INonVersionedData, IPhysicallyLocatable):
...
orig_file_ref = Attribute(u"original file")
pdf_file_ref = Attribute(u"PDF file")

configure.zcml::
  
...

  

I changed the intefaces.py into::
class IVersion(IVersionable, INonVersionedData, IPhysicallyLocatable):
...
orig_file_ref = MyBytes(
title=u"original file",
description=u"original file",
default='',
missing_value='',
required=False)
pdf_file_ref = MyBytes(
title=u"PDF file",
description=u"PDF file",
default='',
missing_value='',
required=False)

Of course I forgot to modify the zcml (remove the set_attributes=),
so I got the following exception which is not quite useful:

Traceback (most recent call last):
  File "\bin\runzope", line 48, in ?
run()
  File "\bin\runzope", line 44, in run
main(["-C", CONFIG_FILE] + sys.argv[1:])
  File "Y:\zope\svn_zope3\src\zope\app\twisted\main.py", line 74, in main
service = setup(load_options(args))
  File "Y:\zope\svn_zope3\src\zope\app\twisted\main.py", line 139, in setup
zope.app.appsetup.config(options.site_definition, features=features)
  File "Y:\zope\svn_zope3\src\zope\app\appsetup\appsetup.py", line 110, in 
config
context = xmlconfig.file(file, context=context, execute=execute)
  File "Y:\zope\svn_zope3\src\zope\configuration\xmlconfig.py", line 556, in 
file
context.execute_actions()
  File "Y:\zope\svn_zope3\src\zope\configuration\config.py", line 606, in 
execute_actions
for action in resolveConflicts(self.actions):
  File "Y:\zope\svn_zope3\src\zope\configuration\config.py", line 1511, in 
resolveConflicts
raise ConfigurationConflictError(conflicts)
zope.configuration.config.ConfigurationConflictError  

Any arguments? Or just put it straight into the collector?

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]
--
Quote of the day:
Every evil comes to us on wings and goes away limping.
- French Proverb 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re[2]: SVN: Zope3/trunk/src/zope/wfmc/ Preparations for persistent WFMC,

2006-04-29 Thread Adam Groszer
Hello Florent,

The changes in the two files are only to be able to more easily
subclass the TransitionDefinition and ProcessDefinition which aren't
yet persistent. I changed only the hardcoded references to class properties.
No API changes, every test passes unchanged of course.

The goal is (was) to be able to keep the workflow definition
persistent in a local utility.

The persistent WFMC support is going to be implemented in a completely
_different_ package, it might _not_ be even part of the release.
In fact it is working for me, I just have to make a package or
something publishable out of it.

Saturday, April 29, 2006, 5:52:39 PM, you wrote:

> Adam Groszer wrote:
>> Log message for revision 67734:
>>   Preparations for persistent WFMC,
>>   as discussed at the SwissSprint
>> 
>> Changed:
>>   U   Zope3/trunk/src/zope/wfmc/process.py
>>   U   Zope3/trunk/src/zope/wfmc/xpdl.py
>> 

> Hi Adam,

> Please keep in mind that discussion at a sprint does not replace 
> discussion in the list, and that changes to Zope need to follow a 
> proposal-based model. Could you detail what your plan is?

> Florent



-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]
--
Quote of the day:
As far as we know, our computer has never had an undetected error.  

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Google SoC Project

2006-05-07 Thread Adam Groszer
Hey Stephan,

I'd have there one idea that may be not so easy to implement, but
would help a lot for developers of Z3 and even python.
The idea is to dynamically reload modules while running the app.
The most beautiful solution would do this by looking at the last
modified date of the .py file. If it changed since the last load,
reload it again, run the current code.
I personally am tired of restarting z3 each time I made an error even
if it is just one char mistype. I'm doing now a wx based app, and the
problem is the same... made an error, restart, click 10 times...
It would be also a way to have a developer version which might run
slower.

I found some related solutions (ideas, snippets)on the net, but none
of them seem to fit the picture _perfectly_.
Have a look at pythomnic, it is doing a kind of fault tolerant system
with python. With a sideeffect that for application code upgrade or
modifications you don't have to shut the app down. I can't imagine how
the folks at Google are dealing with system updates, but this module
makes some efforts in this direction. Just the usage is not so friendly.

http://www.pythomnic.org/
http://pyunit.sourceforge.net/notes/reloading.html
http://www.ece.arizona.edu/~edatools/Python/Reload.htm

Saturday, May 6, 2006, 9:10:45 PM, you wrote:

SR> Hey everyone,

SR> Nate sent just a message that I am interested in a SoC project with the 
Plone
SR> Foundation. Okay, let me write something too.

[snip]

-- 
Best regards,
 Groszer Adam
--
Quote of the day:
The heart of a fool is in his mouth, but the mouth of the wise


___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] Re: Google SoC Project

2006-05-09 Thread Adam Groszer
Hello Jim,

Tuesday, May 9, 2006, 1:22:30 PM, you wrote:

[snip]
JF> Python simply does not support a general robust reload, other than
JF> restart.
[snip]

What about pushing the problem then to the lower level, to Python
itself. I think all developers are fighting the same problem, so all
Python developers would benefit from the solution. As I know (that may
be wrong) not many even if any language supports that, so that would
make one big plus point on the Python side also.

As I don't have really deep knowledge of the Python interpreter
itself, I cannot imagine how weird is the idea. Maybe we should ask
Guido to have some thoughts about that.

-- 
Best regards,
 Groszer Adam
--
Quote of the day:
Many are called, few volunteer.

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: reloading modules (was Re: [Zope3-dev] Re: Google SoC Project)

2006-05-10 Thread Adam Groszer
Hi Shane,

Please have a look at http://www.pythomnic.org/.
As I get it, it puts proxies around 'imported' modules.

My idea would be, without thinking it any further/deeper is what
about putting proxies before any imported stuff. Modules, callables,
variables, everything and evaluate the referenced thing at the right
time, against the right sourcecode. Something like the zope
securityproxy works.

[snip]

-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]
--
Quote of the day:
Nothing is so good as it seems beforehand. 
- George Eliot 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] BBB

2006-05-15 Thread Adam Groszer
Hi there,

I'm working on removing BBB warnings of our current app for 3.3.
For the  directive it was possible to give the factory some
parameters like this:



Now, with the  directive that's not possible.

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]
--
Quote of the day:
God's gifts put man's best dreams to shame. 
- Elizabeth Barrett Browning 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] [ANN] win32-trunk-pyds

2006-05-18 Thread Adam Groszer
Hello *,

I just put the compiled pyd's for win32 users to
http://www.zope.org/Products/Zope3/, into a relase called 'Trunk'.

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]
--
Quote of the day:
I pronounce it as certain that there was never a truly great man that was not 
at the same time truly virtuous.
- Benjamin Franklin 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] [ANN] win32-trunk-pyds

2006-05-20 Thread Adam Groszer
Hi Tim,

Sorry for this small confusion. If you don't mind, I'll do it.
(The thing started as I became the compiler of the win32 release and
the pyd's are just a by-product of the release.)

I'll do my best to keep it up to date, but if I should miss something,
please drop a mail.


Friday, May 19, 2006, 9:11:35 PM, you wrote:

> [Stephan Richter]
>>> Tim has not been updating them recently. After Jim updated the C code in the
>>> adapter lookup code, they were invalid. Adam has picked up Tim's work there.

> [Benji York]
>> As of 5/1 Tim was still willing to build them (as stated in a message to
>> zope3-dev).  I don't think that's changed.  If he happened to miss a
>> change requiring a recompile, just drop him a line and I'm sure he'll
>> update them.

> I'm no longer routinely building, or running, Zope3 on Windows, so
> I'll indeed only update Zope3 .pyds if/when someone emails me saying
> that's needed.  And right, I'm happy to do so.

> If Adam is paying more attention to Zope3, and especially if has an
> automated way to keep his Windows "Trunk" zipfile release up to date,
> that's probably better all around.  If that is the case, then I should
> remove the old pyd .zip files from my member page, and plant a link
> there to Adam's gimmick instead.

> Adam, do you intend to keep Trunk up to date now?


-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]
--
Quote of the day:
Mistakes are a fact of life. It is the response to the error that counts. 
- Nikki Giovanni 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] weird problem with pytz+DC

2006-05-25 Thread Adam Groszer
Hi there,

I've run into the following problem when trying to use zc.datetimewidget
in my app: IZopeDublinCore.modified value is a datetime, but it is
having a tzinfo(0) as I check it, instead of pytz.utc. That's weird,
because timeannotators.py sets it as
dc.modified = datetime.now(pytz.utc)
But somehow it gets unpickled again as with tzinfo(0). That's not bad,
but comparing tzinfo(0) with pytz.utc fails.

Am I doing something wrong? Anybody noticed that already?

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]
--
Quote of the day:
To believe with certainty, we must begin with doubting. 
- Stanislaus I 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] SVN: Zope3/branches/3.3/ Fixed issues 648 and 593: uploading files with non-ASCII filenames now works.

2006-06-19 Thread Adam Groszer
Hi Marius,

Your fix of browser.py causes problems for me using hurry.file when
running functional test with zope.testbrowser.
The problem is that aFieldStorage.filename is already unicode and it
cannot be decoded again.

Do you mind if I add an
if isinstance(aFieldStorage.filename, unicode):
construct?

Modified: Zope3/trunk/src/zope/publisher/browser.py
===
--- Zope3/trunk/src/zope/publisher/browser.py2006-06-13 22:00:47 UTC (rev 68625)
+++ Zope3/trunk/src/zope/publisher/browser.py2006-06-14 12:25:49 UTC (rev 68626)
@@ -596,7 +596,7 @@
 d[m] = getattr(file,m)
 
 self.headers = aFieldStorage.headers
-self.filename = aFieldStorage.filename
+self.filename = unicode(aFieldStorage.filename, 'UTF-8')
 
 class RedirectingBrowserRequest(BrowserRequest):
 """Browser requests that redirect when the actual and effective URLs 
differ  

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]
--
Quote of the day:
We are all dangerous folk without God's controlling hand. 
- William Ward Ayer 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] Re: SVN: Zope3/branches/3.3/ Fixed issues 648 and 593: uploading files with non-ASCII filenames now works.

2006-06-19 Thread Adam Groszer
Hello Benji, Marius,

Sorry, "entwarnung"
It is hurry.file causing the the problem, it is doing

def _toFormValue(self, value):
if value == self.context.missing_value:
return self._missing
return FileUpload(FakeFieldStorage(value.filename, value.data))

and this FileUpload is trying to do the unicode translation again,
that is causing my problems.

If I do a
return FileUpload(FakeFieldStorage(value.filename.encode('utf-8'), value.data))
my ftests pass again.

Monday, June 19, 2006, 7:21:11 PM, you wrote:

BY> Marius Gedminas wrote:
>> I don't mind, but I think it would be better if testbrowser was changed
>> to match what real browsers do instead.

BY> +1

BY> However, we'd have to decide who is creating the unicode string: 
BY> testbrowser, mechanize, or the publishing framework.


-- 
Best regards,
 Groszer Adam
--
Quote of the day:
Justice is truth in action. 
- Joseph Joubert 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] zc.datetimewidget+UTC exception

2006-07-17 Thread Adam Groszer
Hi there,

Anybody tried to use the above?
For me it raises

  Module zope.app.form.utility, line 348, in getWidgetsData
  Module zope.app.form.browser.widget, line 295, in getInputValue
  Module zc.datetimewidget.datetimewidget, line 123, in _toFieldValue
res = normalizeDateTime(res, self.request)
  Module zc.datetimewidget.datetimewidget, line 48, in normalizeDateTime
dt = zc.i18n.date.normalize(request, dt)
  Module zc.i18n.date, line 74, in normalize
tzu = tzinfo.fromutc(dt).tzinfo
ValueError: fromutc: dt.tzinfo is not self

Seems like that happens when in zc.i18n.date tzinfo == UTC

def normalize(request, dt):
if dt.tzinfo is None:
tzinfo = ITZInfo(request)
else:
tzinfo = dt.tzinfo

tzu = tzinfo.fromutc(dt).tzinfo

Anyway normalizing an UTC datetime to UTC is useless?!?!?
So if nobody goes against I'll correct that.

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]
--
Quote of the day:
Opinions are flexible prejudices. 
- Gerald Horton Bath 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] zc.datetimewidget+UTC exception

2006-07-17 Thread Adam Groszer
Hello Gary,

Sorry for the confusion, just managed it, the last one should fail.

"""this method normalizes datetime instances by converting them to
utc, daylight saving times are also taken into account. This
method requires an adapter to get the tzinfo from the request.

>>> from zope import component, interface
>>> import pytz
>>> requestTZ = pytz.timezone('Europe/Vienna')
>>> from zope.interface.common.idatetime import ITZInfo
>>> from zope.publisher.interfaces.browser import IBrowserRequest
>>> from zope.publisher.browser import TestRequest
>>> @interface.implementer(ITZInfo)
... @component.adapter(IBrowserRequest)
... def tzinfo(request):
... return requestTZ
>>> component.provideAdapter(tzinfo)
>>> dt = datetime.datetime(2006,5,1,12)
>>> request = TestRequest()

The Vienna timezone has a 2 hour offset to utc at this date.
>>> normalize(request,dt)
datetime.datetime(2006, 5, 1, 10, 0, tzinfo=)

At this date the timezone has only a one hour offset.
>>> dt = datetime.datetime(2006,2,1,12)
>>> normalize(request,dt)
datetime.datetime(2006, 2, 1, 11, 0, tzinfo=)

Normalizing UTC to UTC should work also
>>> dt = datetime.datetime(2006,5,1,12,tzinfo=pytz.UTC)
>>> normalize(request,dt)
datetime.datetime(2006, 5, 1, 12, 0, tzinfo=)

This way too UTC to UTC
>>> requestTZ = pytz.UTC
>>> dt = datetime.datetime(2006,5,1,12)
>>> normalize(request,dt)
datetime.datetime(2006, 5, 1, 12, 0, tzinfo=)
"""


Monday, July 17, 2006, 7:55:02 PM, you wrote:

GP> On Jul 17, 2006, at 12:53 PM, Adam Groszer wrote:

>> Hi there,
>>
>> Anybody tried to use the above?
>> For me it raises
>>
>>   Module zope.app.form.utility, line 348, in getWidgetsData
>>   Module zope.app.form.browser.widget, line 295, in getInputValue
>>   Module zc.datetimewidget.datetimewidget, line 123, in _toFieldValue
>> res = normalizeDateTime(res, self.request)
>>   Module zc.datetimewidget.datetimewidget, line 48, in  
>> normalizeDateTime
>> dt = zc.i18n.date.normalize(request, dt)
>>   Module zc.i18n.date, line 74, in normalize
>> tzu = tzinfo.fromutc(dt).tzinfo
>> ValueError: fromutc: dt.tzinfo is not self
>>
>> Seems like that happens when in zc.i18n.date tzinfo == UTC
>>
>> def normalize(request, dt):
>> if dt.tzinfo is None:
>> tzinfo = ITZInfo(request)
>> else:
>> tzinfo = dt.tzinfo
>>
>> tzu = tzinfo.fromutc(dt).tzinfo
>>
>> Anyway normalizing an UTC datetime to UTC is useless?!?!?
>> So if nobody goes against I'll correct that.

GP> Hi Adam.  I'm trying to follow, and having a bit of a hard time,  
GP> perhaps because I'm trying to work too quickly. :-)

GP> I thought you meant that the following test of zc.i18n.date.normalize
GP> would fail:

GP>  >>> dt = datetime.datetime(2006, 5, 1, 10, tzinfo=pytz.UTC)
GP>  >>> normalize(request, dt)
GP>  datetime.datetime(2006, 5, 1, 10, 0, tzinfo=)

GP> However, I actually added this test to zc.i18n.date and it passed.  I
GP> checked it in (revision 69155), but I assume that means that I still  
GP> don't understand what the problem you identified is.  Could you maybe
GP> post a doctest that fails?

GP> Thanks

GP> Gary

-- 
Best regards,
 Groszer Adam
--
Quote of the day:
A thing moderately good is not so good as it ought to be. Moderation in temper 
is always a virtue; but moderation in principle is always a vice. 
- Thomas Paine 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] SVN weirdness

2006-08-10 Thread Adam Groszer
Hello,

Seems like the svn:external behaves wrong on my win2K box,
using TortoiseSVN 1.3.5, Build 6804 - 32 Bit:

If I update
/src/zope
using
svn+ssh://svnzope/repos/main/Zope3/trunk/src/zope
-- or --
/src/zope/testing (that's an svn:external in the above tree)
using
svn://svn.zope.org/repos/main/zope.testing/trunk/src/zope/testing

I get a different file and version of
/src/zope/testing/testrunner.py

Does just my box behave brain-damaged or was this noticed by somebody
else also?

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]
--
Quote of the day:
If there were no hell, no one would worry about heaven. 
- Welsh Proverb 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re: Tim, new pyd zip file needed

2006-08-21 Thread Adam Groszer
Hello Roger,

Just uploaded to http://www.zope.org/Products/Zope3/Trunk
Hope that the 3.3.0b2 pyds are OK for you.

Monday, August 21, 2006, 12:08:15 PM, you wrote:

RI> Hi Tim or Adam

RI> Can you generate a new *.pyd zip download?

RI> Regards
RI> Roger Ineichen
RI> _
RI> Projekt01 GmbH
RI> www.projekt01.ch
RI> Boesch 65
RI> 6331 Hünenberg
RI> phone +41 (0)41 781 01 78
RI> mobile+41 (0)79 340 52 32
RI> fax   +41 (0)41 781 00 78
RI> email [EMAIL PROTECTED]
RI> _
RI> END OF MESSAGE


-- 
Best regards,
 Groszer Adammailto:[EMAIL PROTECTED]
--
Quote of the day:
Liar:  One who tells an unpleasant truth.

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] possible bug in zope.wfmc

2006-09-10 Thread Adam Groszer
Hello,

I think I found a bug in zope.wfmc.
Let's say the Review>Publish and Review>Reject transitions are guarded
by conditions.
  ---
   -->| Publish |
  --   -- /   ---
  | Author |-->| Review |---
  --   -- \-->| Reject |
  --

If at Review.workItemFinished() both conditions are still _FALSE_ the
wfmc package finishes the whole process.
I think the correct behaviour should be to not to allow to finish the
workitem.
Maybe an exception should be raised?
No, an exception _must_ be raised that rolls the transaction back,
because before I call workItemFinished I add a whole lot of stuff to
the DB.
  

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]
--
Quote of the day:
LISP:  To call a spade a thpade.

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com




Re[2]: [Zope3-dev] possible bug in zope.wfmc

2006-09-11 Thread Adam Groszer
Hello Jim,

My specific usecase is:

-
  ->| Final |
  -- /  -
...-->| Update |-   -
  -- \->| Issue |-->...
  ^   \ -
  |\--
  | \-->| Review |
  | --
  |  |
  +--+
  
Update -> Final is guarded by "review_result == 'accepted'"
Update -> Issue is guarded by "transitionName == 'update_issue'"
Update -> Review is guarded by "transitionName == 'update_review'"
On the UI I put up every possible transition. Now if my crazy user
chooses Final if review_result != 'accepted' then bang, the
process gets finished. No errors, no messages, no exceptions.
I already thought of filtering the possible transitions on the UI, but
how? transitionName still forces the other conditions to false. A kind
of transition-precondition is not available as I know.
In this usecase raising an exception and thus not letting any
transition to fire fits me perfectly.

XPDL would give the options
- exception
- default exception
- otherwise
but none of these are implemented in zope.wfmc.

I think finishing the whole process is definitely bad behaviour.
But what's correct? Please give a hint what should be done.

Monday, September 11, 2006, 4:00:01 PM, you wrote:

JF> On Sep 10, 2006, at 9:00 AM, Adam Groszer wrote:

>> Hello,
>>
>> I think I found a bug in zope.wfmc.
>> Let's say the Review>Publish and Review>Reject transitions are guarded
>> by conditions.
>>   ---
>>-->| Publish |
>>   --   -- /   ---
>>   | Author |-->| Review |---
>>   --   -- \-->| Reject |
>>   --
>>
>> If at Review.workItemFinished() both conditions are still _FALSE_ the
>> wfmc package finishes the whole process.
>> I think the correct behaviour should be to not to allow to finish the
>> workitem.

JF> I don't think that would be correct.


>> Maybe an exception should be raised?

JF> You can actually model that in xpdl using an exception, although I  
JF> don't reflect off-hand  if that is supported in zope.wfmc.

JF> Jim

JF> --
JF> Jim Fulton  mailto:[EMAIL PROTECTED] Python 
Powered!
JF> CTO (540) 361-1714  
http://www.python.org
JF> Zope Corporationhttp://www.zope.com http://www.zope.org




-- 
Best regards,
 Groszer Adam
--
Quote of the day:
Money, not morality, is the principle commerce of civilized nations.  -  Thomas 
Jefferson -

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] how to provide z.a.s.LogoutSupported for different applications in one instance

2006-09-11 Thread Adam Groszer
Hi,

It's piece of cake making the [Logout] to appear with
  
How do I do this if I have several different applications in one
instance? They start to complain about conflicting configuration.

The same goes with
  
where the factory should get the current TZ from the principal's
preferences. Of course the two app's principals aren't the same.

The solution might be simple, but at this late time I don't see it.
Any help is welcome.

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]
--
Quote of the day:
Abstainer: A weak person who yields to the temptation of denying himself a 
pleasure.

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[3]: [Zope3-dev] possible bug in zope.wfmc

2006-09-12 Thread Adam Groszer
Hello Jim,

As I think it further, even if I would implement the exception and so
transitions, there might still be a chance that an activity does not
have a valid outgoing transition. These transitions can also have
conditions.
Still I have to read through the WFMC specifications.

Monday, September 11, 2006, 4:27:26 PM, I wrote:

AG> Hello Jim,

AG> My specific usecase is:

AG> -
AG>   ->| Final |
AG>   -- /  -
AG>...-->>| Update |-   -
AG>   -- \->| Issue |-->...
AG>   ^   \ -
AG>   |\--
AG>   | \-->| Review |
AG>   | --
AG>   |  |
AG>   +--+
AG>   
Update ->> Final is guarded by "review_result == 'accepted'"
Update ->> Issue is guarded by "transitionName == 'update_issue'"
Update ->> Review is guarded by "transitionName == 'update_review'"
AG> On the UI I put up every possible transition. Now if my crazy user
AG> chooses Final if review_result != 'accepted' then bang, the
AG> process gets finished. No errors, no messages, no exceptions.
AG> I already thought of filtering the possible transitions on the UI, but
AG> how? transitionName still forces the other conditions to false. A kind
AG> of transition-precondition is not available as I know.
AG> In this usecase raising an exception and thus not letting any
AG> transition to fire fits me perfectly.

AG> XPDL would give the options
AG> - exception
AG> - default exception
AG> - otherwise
AG> but none of these are implemented in zope.wfmc.

AG> I think finishing the whole process is definitely bad behaviour.
AG> But what's correct? Please give a hint what should be done.

AG> Monday, September 11, 2006, 4:00:01 PM, you wrote:

JF>> On Sep 10, 2006, at 9:00 AM, Adam Groszer wrote:

>>> Hello,
>>>
>>> I think I found a bug in zope.wfmc.
>>> Let's say the Review>Publish and Review>Reject transitions are guarded
>>> by conditions.
>>>   ---
>>>-->| Publish |
>>>   --   -- /   ---
>>>   | Author |-->| Review |---
>>>   --   -- \-->| Reject |
>>>   --
>>>
>>> If at Review.workItemFinished() both conditions are still _FALSE_ the
>>> wfmc package finishes the whole process.
>>> I think the correct behaviour should be to not to allow to finish the
>>> workitem.

JF>> I don't think that would be correct.


>>> Maybe an exception should be raised?

JF>> You can actually model that in xpdl using an exception, although I  
JF>> don't reflect off-hand  if that is supported in zope.wfmc.

JF>> Jim

JF>> --
JF>> Jim Fulton  mailto:[EMAIL PROTECTED] 
Python Powered!
JF>> CTO (540) 361-1714  
http://www.python.org
JF>> Zope Corporationhttp://www.zope.com http://www.zope.org






-- 
Best regards,
 Groszer Adam
--
Quote of the day:
Many would be scantily clad if clothed in their humility. 
- Anonymous 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] how to provide z.a.s.LogoutSupported for different applications in one instance

2006-09-13 Thread Adam Groszer
Hello Stephan,

Simple, effective, great. Thanks.

Monday, September 11, 2006, 7:45:42 PM, you wrote:

> On Monday 11 September 2006 13:23, Adam Groszer wrote:
>> The solution might be simple, but at this late time I don't see it.
>> Any help is welcome.

> No, the solution was not even possible (easily) till recently. For exactly
> this use case I developed z3c.baseregistry, which allows you to make 
> registrations selectively. Basically, create a components registry for each
> application and only register applicable pieces in each. Then use those
> registries as base registries in your local site.

> Regards,
> Stephan


-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]
--
Quote of the day:
Absence sharpens love, presence strengthens it. 
- Anonymous 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] schema woes, sort-of

2006-09-14 Thread Adam Groszer
Hi,

I'm starting to have lots of schemas around. They are mostly for
view/add/edit forms, based on the entity (content object's) schema.
That means they mostly have the same fields with mostly the same
properties.
Adding field to a schema is piece of cake. Subclass the original, add
the field, but... field order breaks.
Modifying a field's property by subclassing does not work, changing
some property of the derived schema's field changes the original
too.
Deleting a field does not work.
Renaming a field...

To still be able to use the widget&form framwork I keep adding a hell
lot of redundant information. E.g. to make a field readonly, I have to
copy the schema, change that only one field's property. I hope I won't
miss the copy next time.

So the big question is: how to solve the above things? Anybody done
that already? Any ideas? Any pointers?

PS: sorry of the mail without subject gets through, the network here
is breaking down

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]
--
Quote of the day:
I must have slipped a disk; my pack hurts.

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[4]: [Zope3-dev] possible bug in zope.wfmc

2006-09-19 Thread Adam Groszer
Hi Roger,

Tuesday, September 19, 2006, 12:08:20 PM, you wrote:

>> Update -> Final is guarded by "review_result == 'accepted'"
>> Update -> Issue is guarded by "transitionName == 'update_issue'"
>> Update -> Review is guarded by "transitionName == 'update_review'"

RI> Is this (Update ->> Final) not a end transaction?
RI> Do you mean that the end transaction concept istn't correct
RI> working?

Taken the above example,
if review_result == 'rejected' and
transitionName == 'final'
when I fire workItemFinished in the workflow application neither
condition is true. That makes zope.wfmc think that there are no
outgoing transitions and proceeds to the finishes the process.

The example is bad for this, because if there would be some activities
after "Final" they would be skipped and the whole process would be
finished.

Hope that makes the picture clear.

RI> Sorry, I don't know. but I agree that it should be a difference
RI> if we finsih a transaction with a Fslse or True guard.

I'm trying to get some answers at
http://www.workflow-research.de/Forums , which should be an official
forum for WFMC.

-- 
Best regards,
 Groszer Adam
--
Quote of the day:
Criticism, like rain, should be gentle enough to nourish a man's growth without 
destroying his roots. 
- Frank A. Clark 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Heads up: Zope 3.2.2 on Saturday

2006-09-28 Thread Adam Groszer
Hello Philipp,

Thursday, September 28, 2006, 3:48:34 PM, you wrote:


> By the way, it'd be cool if someone could do the Windows release. See
> http://dev.zope.org/Zope3/ZopeWindowsRelease for more info.

I'm raising my hand. Doing it is OK, Updating the wiki page will take
some time.

-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]
--
Quote of the day:
Every word is like an unnecessary stain on silence and nothingness.Everyone 
will experience the consequences of his own acts.  If his acts are right, he'll 
get good consequences; if they're not, he'll suffer for it. (Harry Browne)

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Heads up: Zope 3.2.2 on Saturday

2006-09-28 Thread Adam Groszer
Hello Philipp,

BTW, correct me if I'm wrong, bugfixes go into:
/repos/main/Zope3/branches/3.2
and
/repos/main/Zope3/branches/3.3

Releases get built from:
/repos/main/Zope3/tags/Zope-3.2.2
and
/repos/main/Zope3/tags/Zope-3.3.1

-- 
Best regards,
 Groszer Adam
--
Quote of the day:
Feast, and your halls are crowded; fast, and the world goes by. 
- Ella Wheeler Wilcox 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] help, Z3.2.2 build fails on win32 with ZConfig

2006-10-05 Thread Adam Groszer
Hello,

I built Z3.2.2 on win32, but after installing the result and creating
an instance it fails.

I don't have a clou where and what to look for.

C:\zopeinst>bin\runzope
Error: 'formatter' is not a known key name
(line 103 in file:/C|/zopeinst/etc/zope.conf)
For help, use c:\zopeinst\bin\runzope -h

zope.conf is:
...

  # This sets up logging to both a file and to standard output
  # (STDOUT).  The "path" setting can be a relative or absolute
  # filesystem path or the tokens STDOUT or STDERR.

  
path $LOGDIR/z3.log
formatter zope.exceptions.log.Formatter
  

  
path STDOUT
formatter zope.exceptions.log.Formatter
  

...

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]
--
Quote of the day:
God runs electro-magnetics by wave theory on Monday, Wednesday and Friday, and 
the Devil runs them by quantum theory on Tuesday, Thursday, and Saturday.  -  
William Bragg

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] help, Z3.2.2 build fails on win32 with ZConfig

2006-10-05 Thread Adam Groszer
Hello Martijn,

Thursday, October 5, 2006, 6:34:11 PM, you wrote:

> I actually reported this issue for Zope 3.2.1 earlier this week. It's
> very unfortunate that Zope 3.2.2 went out of the door shortly afterward
> without a fix for this. :( I see you found the issue too:

The 3.2.2 win32 isn't there yet just the tgz. I'm scratching my head, what to 
do.
After Baiju and
http://mail.zope.org/pipermail/zope3-users/2006-September/004415.html
I can comment out the formatter line.
That would solve it. But is it the right solution?

-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]
--


___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re[2]: help, Z3.2.2 build fails on win32 with ZConfig

2006-10-06 Thread Adam Groszer
Hello Philipp,

Friday, October 6, 2006, 9:06:39 AM, you wrote:

> I'm suspecting that Adam, who built the 3.2.x releases, was executing 
> the wrong command when building the tarball, because zope.conf.in on the
> 3.2.x branch doesn't contain the formatter line. It's zope.conf.in on 
> the 3.3.x branch that does.

Yeah, now I'm even more puzzled. Indeed there is nowhere a formatter line
in any zope.conf.in, but in the
\svn_zope_322\Zope-win-3.2.2\Dependencies\Zope-src-Zope-win-3.2.2\Zope-src\zopeskel\etc\zope.conf.in
(after the build)
I'm still trying to figure out how it comes.

> http://dev.zope.org/Zope3/MakingARelease says you should be making a 
> tarball with

>  ../../zpkgtools/bin/zpkg -r Zope-3.3.0b1 -C Zope.cfg Zope


> but of course you need to replace Zope-3.3.0b1 with the current tag 
> (which is 3.2.2). My suspicion is that Adam forgot to do that and so he
> built a tarball of 3.2.2, but with zopeskel from 3.3.x.

I'm sorry, but I did it. But the required command is not exactly the
same.
http://www.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/ZopeWindowsRelease
says that I should run

python ..\zpkg\bin\zpkg -C releases\Zope.cfg -v 3.1.0c1 -t Zope-win

I'll investigate further as soon as I have time.

-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]
--
Quote of the day:
According to my best recollection, I don't remember.

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re[2]: help, Z3.2.2 build fails on win32 with ZConfig

2006-10-06 Thread Adam Groszer
Hello Philipp,

Thanks Baiju.

> It looks like the instructions aren't complete here. You should be 
> specifying -r 3.2.2 here so that it looks at the tag.

Lot better :-) now it works. Now I start the upload.

-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]
--
Quote of the day:
A psychiatrist is a fellow who asks you a lot of expensive questions your wife 
asks for nothing.  -  Joey Adams

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re[4]: help, Z3.2.2 build fails on win32 with ZConfig

2006-10-06 Thread Adam Groszer
Hello Baiju,

done

Friday, October 6, 2006, 12:38:59 PM, you wrote:

> Can you update ZopeWindowsRelease wiki page also?

-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]
--
Quote of the day:
There is no better or more blessed bondage than to be a prisoner of hope. 
- Roy Z. Kemp 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] zope.testbrowser + unicode URL

2006-10-09 Thread Adam Groszer
Hello,

Happened to pass a unicode instead of str URL to browser.open().
That caused a nasty exception in Cookie.py.
Might be worth an assert()?

-- 
Best regards,
 Adam
--
Quote of the day:
Look and you will find it-what is unsought will go undetected.
- Sophocles 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] how to override zope.app.securitypolicy sanely

2006-10-11 Thread Adam Groszer
Hi,

For our application the standard securitypolicy was fine.
Until today. Now a requirement came up that the object permissions
have to depend _also_ on an object state (the object's property).
As I checked my friend is the zope.app.securitypolicy.zopepolicy.py.
Securitypolicy gets set in the instance/etc/securitypolicy.zcml:


So I'll have to write a custom securitypolicy based on the zopepolicy.
Modify the securitypolicy.zcml.
But that will override the policy for the whole instance.

My concern is how to override the policy just for a sub-folder/site?
The _defaultPolicy seems to be very-very global.
Any ideas?

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]
--
Quote of the day:
Many people today don't want honest answers insofar as honest means
unpleasant or disturbing. They want a soft answer that turneth away
anxiety.
- Louis Kronenberger 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] Opaque error, help

2006-11-09 Thread Adam Groszer
Hello Shane,

SH> For me, the value is in the comfort of a transparent database.  I want
SH> to know exactly what Zope is storing.  FileStorage makes that fairly hard.

There is half-baked solution at z3c.zodbbrowser.
Without knowing your exact requirements, I suggest you take a look.

-- 
Best regards,
 Groszer Adam
--
Quote of the day:
Actors will happen in the best-regulated families.

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] z3c.widget.flashupload and compression? [bit OT]

2006-11-14 Thread Adam Groszer
Hello,

I'm a little bit offtopic with my question here.

We had here the idea to implement a compression algorhitm in the above
package to save some precious upload bandwith.

I'm not a flash professional, google did not spit out straightforward
solutions.

Any ideas, pointers, help is appreciated.

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]
--
Quote of the day:
Some are atheists by neglect; others are so by affectation; they that think 
there is no God at some times do not think so at all times. 
- Benjamin Whichcote 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Heads up: bugs in zope.app.catalog?

2006-11-17 Thread Adam Groszer
Hello,

I found that z.a.catalog, AttributeIndex fails to remove the previous
value/object from the index IF the new value is None.

The next thing is if the index contains the object, but the value
somehow dropped out of the forward index, the unindex breaks.

Anybody noticed these already?
I have the fixes that work in my project.
If nobody argues, I'll commit them.

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]
--
Quote of the day:
Humility is strong, not bold; quiet, not speechless; sure, not arrogant. 
- Estelle Smith 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] Heads up: bugs in zope.app.catalog?

2006-11-17 Thread Adam Groszer
Hello Christian,

Working on them.

Friday, November 17, 2006, 12:39:37 PM, you wrote:

> Got any tests?




-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]
--
Quote of the day:
He became what we are that He might make us what He is. 
- Athanasius (speaking of Jesus of Nazareth) 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] Heads up: bugs in zope.app.catalog?

2006-11-17 Thread Adam Groszer
Hello Christian,

Yep, but...
What is the `good` behaviour regarding None values?
Do we need to catalog them or skip them?

Example:
If the object is (user.title == None)
Shall it be kept in the catalog or not?
In case it is not in the catalog I won't be able to search for users
with no title. Suggestions?
At the moment the AttributeIndex works like this.

Friday, November 17, 2006, 12:46:29 PM, you wrote:

CT> Hi Adam,

CT> Adam Groszer wrote:
>> Working on them.

CT> That's great! I'd be happy to see your checkins then. It would be good
CT> if you took the time to backport this to 3.3 and 3.2 branches.

CT> Christian



-- 
Best regards,
 Groszer Adam
--
Quote of the day:
Faith is not a stained-glass word reserved only for religious use, though it is 
essential to life. It is not something we can see on every streetcorner, but we 
dare not cross the street without it. 
- V. Carney Hargroves 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] Heads up: bugs in zope.app.catalog?

2006-11-17 Thread Adam Groszer
Hello Christian,

Yep, I also vote for indexing None.
Seems like somebody wanted to avoid the `None object is not callable`
exception.

Friday, November 17, 2006, 1:22:42 PM, you wrote:

> Hi,

> Adam Groszer wrote:
>> Hello Christian,
>> 
>> Yep, but...
>> What is the `good` behaviour regarding None values?
>> Do we need to catalog them or skip them?
>> 
>> Example:
>> If the object is (user.title == None)
>> Shall it be kept in the catalog or not?
>> In case it is not in the catalog I won't be able to search for users
>> with no title. Suggestions?
>> At the moment the AttributeIndex works like this.

> Ah, I didn't see that question in your original mail, so you said:

>   I found that z.a.catalog, AttributeIndex fails to remove the previous
>   value/object from the index IF the new value is None.

> From this I derived that removing the value would be the right thing to
> do. I didn't see the question about whether to index None or not.

> IIRC the FieldIndex in Zope 2 uses None as a valid value to index and to
> search for.

> If I read the source and tests correctly, it's just an implementation
> accident, because someone used None as a getattr() marker instead of
> using a unique marker like object().

> At least there is no test and no interface description that says that
> None should not be indexed.

> Christian



-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]
--
Quote of the day:
Shared joy is double joy and shared sorrow is half-sorrow. 
- Swedish Proverb 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] RFC: should z.a.c.attribute.AttributeIndex index None values?

2006-11-17 Thread Adam Groszer
Hello,

Solutions:

a: No, do not keep None values in the catalog
   the current implementation works like this
   you are unable to ask the catalog for objects having None
   properties
b: Yes, keep None values in the catalog
   you can ask the catalog for objects having None properties
c: Let's keep the existing one that does not index None and have an
   AttributeIndexAlsoNone class which will index None values

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]
--
Quote of the day:
Always borrow money from a pessimist; he doesn't expect to be paid back.

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] z3c.widget.flashupload and compression? [bit OT]

2006-11-17 Thread Adam Groszer
Hello Christian,

Meanwhile Manfred dropped me an answer:

>  From my perspective there is now way for implementing an compression
> inside the widget because it is built in Flash / Actionscript and for  
> security issues, you are not allowed to access the file on the  
> filesystem. You only get an FileReferenceObject which you can control  
> to post your data to the server. It is the same issue as with  
> JavaScript.
> 
> So unfortunatly, I believe that your goal can not be reached inside  
> Flash - you would need a Java Applet for doing such stuff.

We are making a document management system, our users usually should
be concerned with .doc, .xls and so on filetypes. They compress well.
Main goal is to reduce waiting time on submitting the form.
First step is to have the uploads compressed, second step is to
transfer only the differences as subversion does it.

So it won't work with Flash. I already found an open source java
applet which could be extended.

Friday, November 17, 2006, 12:47:11 PM, you wrote:

> Hi,

> Adam Groszer wrote:
>> Hello,
>> 
>> I'm a little bit offtopic with my question here.
>> 
>> We had here the idea to implement a compression algorhitm in the above
>> package to save some precious upload bandwith.
>> 
>> I'm not a flash professional, google did not spit out straightforward
>> solutions.
>> 
>> Any ideas, pointers, help is appreciated.

> I'm not sure whether that would help you at all. What kind of data do
> your users upload?

> Christian



-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]
--
Quote of the day:
Worrying can help you to prepare

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] RFC: should z.a.c.attribute.AttributeIndex index None values?

2006-11-17 Thread Adam Groszer
Hello Gary,

OK, my mistake.
Then I'll do like a).

Friday, November 17, 2006, 4:46:09 PM, you wrote:

GP> On Nov 17, 2006, at 10:23 AM, Adam Groszer wrote:

>> Hello,
>>
>> Solutions:
>>
>> a: No, do not keep None values in the catalog
>>the current implementation works like this
>>you are unable to ask the catalog for objects having None
>>properties
>> b: Yes, keep None values in the catalog
>>you can ask the catalog for objects having None properties
>> c: Let's keep the existing one that does not index None and have an
>>AttributeIndexAlsoNone class which will index None values

GP> Did you see my reply in the other thread?

GP> If you make indexes keep track of None, it will need to be done in a  
GP> separate data structure because of the key homogeneity issues.  This  
GP> is a less efficient approach than the zc.catalog approach.  It can be
GP> done either way.

GP> I recommend that you use zc.catalog, rather than reinventing  
GP> something that solves your problem.

GP> I suppose I don't care much, since we don't use the standard zope  
GP> value and keyword indexes anyway; if you must add the None feature,  
GP> then I only care, from a "let's not screw up our community software"  
GP> perspective, that it be implemented in a safe way.  Keep your BTree  
GP> keys homogenous.

GP> Gary


-- 
Best regards,
 Groszer Adam
--
Quote of the day:
I just need enough to tide me over until I need more.  -  Bill Hoest

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[3]: [Zope3-dev] RFC: should z.a.c.attribute.AttributeIndex index None values?

2006-11-17 Thread Adam Groszer
Hello,

Two more questions remain open, but I think they are easy to answer.

In case the field is callable but the method to be called is None
OR
The method is not None but raises an exception while getting the value

In both cases the previous value should be removed from the index?
I think yes.

-- 
Best regards,
 Groszer Adam
--
Quote of the day:
We desire most what we ought not to have 
- Publilius Syrus 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[5]: [Zope3-dev] RFC: should z.a.c.attribute.AttributeIndex index None values?

2006-11-17 Thread Adam Groszer
Hello Gary,

At the moment it is
try:
value = value()
except:
return None

So that will eat the exception without any signs.
That makes me also glum when I have to dig deep to discover that
something ate an exception.

I propose to remove the try/except.
Is that OK?

Friday, November 17, 2006, 5:20:19 PM, you wrote:

> On Nov 17, 2006, at 11:13 AM, Adam Groszer wrote:

>> Hello,
>>
>> Two more questions remain open, but I think they are easy to answer.
>>
>> In case the field is callable but the method to be called is None

> Yes, remove from index.

>> OR
>> The method is not None but raises an exception while getting the value

> I think the exception should be raised.  What to do here is a policy  
> decision that shouldn't be controlled at the index level IMO.   
> Generally I'd prefer a transaction abort, a system exception, and a  
> log entry, for instance.  When that's not acceptable, it's usually  
> within a part of a transaction that I again can control with a  
> savepoint, so that I revert to before the change that caused the  
> reindex, log the error, and proceed.

> I think and hope that what I'm describing for both situations is the  
> status quo.

> Gary

-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]
--
Quote of the day:
It is astonishing how little one feels poverty when one loves. 
- John Bulwer 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] OrderedMultiSelectWidget problem reloaded

2006-11-23 Thread Adam Groszer
Hi Dominik,

Thursday, November 23, 2006, 11:53:42 PM, you wrote:

That was quite a long time ago, I'm trying to dig the pieces together.

> Afterwards I have seen that Adam reported already
> OrderedMultiSelectWidget problems
> (http://www.zope.org/Collectors/Zope3-dev/451).
> This issue was deferred by Jim. I spent a few hour to track down the
> problems on Zope 3.3.0 and produced the attached patch.

That was deferred, because I told that I can live with that current
problem:
"""
On 2005-12-02, we agreed on IRC to make this a low priority issue as
it was not that easy to solve and Gary came up with the following:

(crystalBall == me)
http://zope3.pov.lt/irclogs/%23zope3-dev.2005-12-02.log.html

crystalBall Theuni, several people say that the widget framework
needs some refactoring [19:08]
...
GaryPoster  crystalBall: definitely.  I've started a new one and
need time to return to it.  I've gotten permission to spend just a bit
of time on it in December, and hopefully will have it as an alternate
choice ready in 2006.  Getting by is the thing to do now. [19:10]
GaryPoster  crystalBall: 'definitely': needs refactoring (or
redoing IMO)   [19:10]

I don't think that anybody solved the problem, but I can live with
that.
"""

> Are people interested to resume this issue or not? Are there any
> objections in relation to the proposed patch?

I'll say if it breaks no existing code, I'll vote for put them into the
trunk.

-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]
--
Quote of the day:
Infidelity is seated in the heart; its origin is not in the head. It is the 
wish that Christianity might not be true, that leads to an argument to prove it.
- Charles Simmons 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] WFMC in core?

2006-12-14 Thread Adam Groszer
Hello Christian,

It seems that the activity has the attribute, but it's not declared
in the interface. z.wfmc interface was/is quite out of sync with the
implementation I think. I already fixed some, but looks like there are
still some lurking.

Thursday, December 14, 2006, 12:09:21 AM, you wrote:

> Hi,

> what is our desire to keep WFMC workflow support in the core? I just
> stumbled over issue 701 and wondered why it's declared as a core issue,
> and well, wfmc seems to be zope.wfmc and a core component.

> I propose that this is beyond a core component of Zope 3.

> Christian

> PS: I know that we don't have a clear definition of things that should
> be / shouldn't be in the core. But my personal feeling is that a
> workflow engine isn't.



-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]
--
Quote of the day:
Science without religion is lame, religion without science is blind.
- Albert Einstein 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] RE: [SpringCleaning07]

2006-12-19 Thread Adam Groszer
Hello Stephan,

Tuesday, December 19, 2006, 2:53:33 PM, you wrote:

>> > zope.wfmc

SR> +1, but please make it very easily available. People do use this code in
SR> production; Zope Corp. and Adam Groszer come to mind. 

Yes, here :-)

If it would be moved out of the "feature-freeze-on-the-trunk" jail I
would say +100.
If my project continues, I might be able to contribute some code into
it.

-- 
Best regards,
 Groszer Adam
--
Quote of the day:
Ignore previous fortune.

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] z3+squid+Unauthorized = weirdness

2006-12-20 Thread Adam Groszer
Hello,

Just happened the following:

   zope3
  server
 |
 |
squid proxy
/ \
   /   \
  / \
userA userB

Both my users are sitting behind a squid proxy/firewall.
That is a usual out-of-the-box SuSe linux firewall/proxy config.
Each request goes through the squid proxy.
userA does NOT have permission to http://zope3/ap_test/folder1.
userB has permission to everything, including http://zope3/ap_test/folder1,
he might even be a zope.manager.

1. userA accesses http://zope3/ap_test/folder1
2. userA gets the usual "Unauthorized, You are not authorized" message
3. userB accesses http://zope3/ap_test/folder1
4. BANG!, userB gets also the "Unauthorized, You are not authorized" message

Investigating further, the request at 3. does not get to the zope3
server. It got served by squid.

Adding the "no-store, no-cache, must-revalidate" etc. headers to the
Unauthorized page solves the problem.

Any opinions about that? Is it my mistake, a squid bug, a Z3 bug?

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]
--
Quote of the day:
Reality is for people who can't cope with fantasy.

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] z3+squid+Unauthorized = weirdness

2007-01-02 Thread Adam Groszer
Happy New Year Everyone!

As nobody objected until today, I will go on and do the fix on the
trunk

--- U:/zope/svn_zope33/src/zope/app/exception/browser/unauthorized.py   
(revision 71143)
+++ U:/zope/svn_zope33/src/zope/app/exception/browser/unauthorized.py   
(working copy)
@@ -29,6 +29,11 @@
 # Set the error status to 403 (Forbidden) in the case when we don't
 # challenge the user
 self.request.response.setStatus(403)
+
+self.request.response.setHeader('Expires', 'Mon, 26 Jul 1997 05:00:00 
GMT')
+self.request.response.setHeader('Cache-Control', 'no-store, no-cache, 
must-revalidate')
+self.request.response.setHeader('Pragma', 'no-cache')
+
 principal = self.request.principal
 auth = zapi.principals()
 auth.unauthorized(principal.id, self.request)

and backport it also to 3.3 and 3.2

Wednesday, December 20, 2006, 3:05:10 PM, you wrote:

> On Wed, Dec 20, 2006 at 02:36:59PM +0100, Adam Groszer wrote:
>> Hello,
>> 
>> Just happened the following:
>> 
>>zope3
>>   server
>>  |
>>  |
>> squid proxy
>> / \
>>/   \
>>   / \
>> userA userB
>> 
>> Both my users are sitting behind a squid proxy/firewall.
>> That is a usual out-of-the-box SuSe linux firewall/proxy config.
>> Each request goes through the squid proxy.
>> userA does NOT have permission to http://zope3/ap_test/folder1.
>> userB has permission to everything, including http://zope3/ap_test/folder1,
>> he might even be a zope.manager.
>> 
>> 1. userA accesses http://zope3/ap_test/folder1
>> 2. userA gets the usual "Unauthorized, You are not authorized" message
>> 3. userB accesses http://zope3/ap_test/folder1
>> 4. BANG!, userB gets also the "Unauthorized, You are not authorized" message
>> 
>> Investigating further, the request at 3. does not get to the zope3
>> server. It got served by squid.
>> 
>> Adding the "no-store, no-cache, must-revalidate" etc. headers to the
>> Unauthorized page solves the problem.
>> 
>> Any opinions about that? Is it my mistake, a squid bug, a Z3 bug?

> Er, more like a squid feature, see negative_ttl. Not sure what the best
> way is to get around this though, "no-cache" is probably reasonable.



-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]
--
Quote of the day:
Avoid reality at all costs.

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] RFC on wfmc issue 699, 700, 701

2007-01-02 Thread Adam Groszer
Hello,

In short: I would classify 699 and 700 as new features, 701 as bugfix.
For more details read on.


Issue 699

I hope if I change the event classes, by adding the interfaces existing
code won't break.
As stated by philikon this is not a show stopper so I would classify
it as a feature, not bugfix and not backport it to 3.3 and 3.2.


= Comment - Entry #3 by mj on Aug 28, 2006 10:16 am

> However, it's not true that you can't subscribe to them. You just have to 
> directly subscribe to the event class instead of its interface. Adapters 
> (and that includes subscription adapters) can be registered for classes 
> and for interfaces. 

Ah! I stand corrected, I didn't know that.

= Comment - Entry #2 by philikon on Aug 28, 2006 10:05 am

I agree that they should have interfaces if they're lacking some.
However, it's not true that you can't subscribe to them. You just have
to directly subscribe to the event class instead of its interface.
Adapters (and that includes subscription adapters) can be registered
for classes and for interfaces. 

= Request - Entry #1 by mj on Aug 28, 2006 10:03 am

The activity, workitem and transition events defined by zope.wfmc lack
interfaces, and thus cannot specifically be subscribed to. Interfaces
should be defined for these events.


Issue 700

z3.ecm solves that by overriding the default integration to it's own
utility that creates the workitems.
So the question is that add this _feature_ or not?
When yes, an event for a new participant created should be added also?

= Request - Entry #1 by mj on Aug 28, 2006 10:07 am

When a zope.wfmc process creates a workitem, it does not emit an
event, even though it does emit events at the start and end of all
other process-related objects (process, activities, transitions) and
when a workitem is finished. 


Issue 701

I think quite some interfaces are missing, so I'll check and add them
the best I can. Despite the missing interfaces the package is working
fine.


= Request - Entry #1 by mj on Aug 28, 2006 10:13 am

Sometimes workitems in a wfmc process need to consult
application-specific data on the process object. When created,
workitems can keep a reference to the activity they are part of, and
activities have a process attribute, allowing workitems to refer to
the process instance. 

However, the IActivity interface does not define a process attribute,
so future implementations would miss this important attribute. It
should be added. 

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]
--
Quote of the day:
The great advantage of telling the truth is that one is so much more likely to 
sound convincing. 
- Susan Howatch 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] Builbot mail not working ?

2007-01-10 Thread Adam Groszer
Hello Christian,

Yay, shame on me.
I was the one who added the "no cache" stuff to
/src/zope/app/exception/browser/unauthorized.py.

I'm crippled here until tomorrow without SVN access, so somebody
please fix it or revert my changes.

Wednesday, January 10, 2007, 11:00:35 AM, you wrote:

CT> Hi,

CT> that one fails for me as well.

CT> I don't remember who checked this in, but I saw somebody talk about this
CT> change lately.

CT> Christian

CT> Am Mittwoch, den 10.01.2007, 10:31 +0530 schrieb Baiju M:
>> Baiju M wrote:
>> >  Hi, Can anyone verify that buildbot [1] send test failure error mails
>> >  to list? There is one test failure in Zope 3 trunk now [2]. But it's
>> >  not in Zope3-dev list archive [3].
>> >
>> >  [1] http://buildbot.zope.org [2]
>> > 
>> http://buildbot.zope.org/Zope3%20trunk%202.4%20Linux%20zc-buildbot/builds/832/test_2/0
>> >  [3] http://mail.zope.org/pipermail/zope3-dev/
>> 
>> I am still getting this error in trunk, see the traceback:
>> 
>> Failure in test 
>> /var/tmp/zopy/pkgs/Zope3trunk/src/zope/app/ftests/doctest.txt
>> Failed doctest test for doctest.txt
>>   File "/var/tmp/zopy/pkgs/Zope3trunk/src/zope/app/ftests/doctest.txt", 
>> line 0
>> 
>> --
>> File "/var/tmp/zopy/pkgs/Zope3trunk/src/zope/app/ftests/doctest.txt", 
>> line 20, in doctest.txt
>> Failed example:
>> print http(r"""
>> GET /@@contents.html HTTP/1.1
>> """)
>> Differences (ndiff with -expected +actual):
>>   HTTP/1.1 401 Unauthorized
>> + Cache-Control: no-store, no-cache, must-revalidate
>> - Content-Length: ...
>> ? ^^^
>> + Content-Length: 3987
>> ? 
>>   Content-Type: text/html;charset=utf-8
>> + Expires: Mon, 26 Jul 1997 05:00:00 GMT
>> + Pragma: no-cache
>>   WWW-Authenticate: basic realm="Zope"
>>   
>> - > + > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>> + 
>> + http://www.w3.org/1999/xhtml"; xml:lang="en"
>> +   lang="en">
>> + 
>> +   
>> + Z3: 
>> + 
>> + @import 
>> url(http://localhost/@@/zope3_tablelayout.css);
>> + 
>> + 
>> + 
>> + > content="text/html;charset=utf-8" />
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + > + src="http://localhost/@@/zope3.js";>
>> + 
>> + 
>> + 
>> + 
>> + > + src="http://localhost/@@/xmltree.js";>
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + > +   href="http://localhost/@@/favicon.png"; />
>> +   
>> + 
>> +   http://localhost/', 'http://localhost/'); ">
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + User:
>> + Unauthenticated User
>> + 
>> + 
>> + 
>> + > href="@@login.html?nextURL=http%3A//localhost/%40%40contents.html">[Login]
>> + 
>> + 
>> + 
>> + 
>> + > + href="http://localhost/@@SelectedManagementView.html";
>> + name="top">http://localhost/@@/zope3logo.gif"; />
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + Location: > + href="http://localhost/@@SelectedManagementView.html";>[top]
>> +  /
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> +   
>> + Navigation
>> + http://www.zope.org/zope3xmltree";
>> +  id="navtreecontents" class="body"
>> +  onclick="treeclicked(event);">Loading...
>> +   
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + 
>> + Unauthorized
>> + 
>> + You are not authorized
>> + 
>> + 
>> + 
>> +  

Re: [Zope3-dev] Tests failing

2007-01-11 Thread Adam Groszer
Hello Benji,

Shame on me, I was that.
I'm working on it now.

I have the problem on Win32, when running test.py -vf:
IOError: [Errno 2] No such file or directory: 
'U:\\zope\\svn_zope33\\zopeskel\\etc\\securitypolicy.zcml'
It's not there. Am I doing something wrong?

Wednesday, January 10, 2007, 9:07:26 PM, you wrote:

BY> The tests are failing on the trunk, 3.2, and 3.3 branches.  Apparently
BY> because of the recent addition of a "Cache-Control" header.  See the 
BY> buildbot for details: http://buildbot.zope.org


-- 
Best regards,
 Groszer Adam
--
Quote of the day:
Philosophy:  unintelligible answers to insoluble problems.

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] help with test.py -vf

2007-01-11 Thread Adam Groszer
Hello,

I have the problem on Win32, when running test.py -vf:
IOError: [Errno 2] No such file or directory:
'U:\\zope\\svn_zope33\\zopeskel\\etc\\securitypolicy.zcml'
It's not there. Am I doing something wrong?
  

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]
--
Quote of the day:
While Thee I seek, protecting Power, Be my vain wishes stilled; And may this 
consecrated hour, With better hopes be filled. 
- Helen Maria Williams 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re[2]: help with test.py -vf

2007-01-11 Thread Adam Groszer
Hello Philipp,

It's not there. In the SVN repo also not. That's why I'm puzzled.

Thursday, January 11, 2007, 4:43:17 PM, you wrote:

> Adam Groszer wrote:
>> Hello,
>> 
>> I have the problem on Win32, when running test.py -vf:
>> IOError: [Errno 2] No such file or directory:
>> 'U:\\zope\\svn_zope33\\zopeskel\\etc\\securitypolicy.zcml'
>> It's not there. Am I doing something wrong?

> You deleted it? Dunno, do an "svn up" and an "svn st". If it's reported
> missing, do an "svn revert securitypolicy.zcml" to get it back.




-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]
--
Quote of the day:
"As long as you can laugh at yourself you will never cease to be amused." 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re[4]: help with test.py -vf

2007-01-11 Thread Adam Groszer
Hello Philipp,

Works, thanks.

Thursday, January 11, 2007, 4:56:18 PM, you wrote:

PvW> On 11 Jan 2007, at 16:51 , Adam Groszer wrote:
>> It's not there. In the SVN repo also not. That's why I'm puzzled.

PvW> Right, now I remember. You need to execute "python setup.py  
PvW> install_data --install-dir ." to get all the ZCML slugs installed.


___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re[2]: Zope 3.3.1

2007-01-14 Thread Adam Groszer
Hello Philipp,

Let's try.
Hope that .../repos/main/Zope3/tags/3.3.1 is the right one.

Sunday, January 14, 2007, 3:24:45 PM, you wrote:

PvW> Philipp von Weitershausen wrote:
>> Christian Theune wrote:
>>> after the initial Zope 3.3 release, we fixed quite a few bugs. I think
>>> it's time for a 3.3.1 release now, which would also help the upcoming
>>> Zope 2.10.2 release.
>>>
>>> If anybody has time to do the 3.3.1 release, that would be very welcome!
>> 
>> I'll make a 3.3.1 today.

PvW> Done. Can somebody please make a Windows installer? Adam?




-- 
Best regards,
 Groszer Adam
--
Quote of the day:
I wish you humans would leave me alone.

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re[4]: Zope 3.3.1

2007-01-15 Thread Adam Groszer
Hello Philipp,

.../repos/main/Zope3/branches/3.3
fails too on the same test.
Buildbot seems to sleep these days. I ran into that with one of by
fixes too.

Monday, January 15, 2007, 10:37:52 AM, you wrote:

> On 15 Jan 2007, at 09:47 , Groszer Adam wrote:
>> Hello Philipp,
>>
>> I have one failure here:
>>testPORTCannotConnect  
>> (zope.app.twisted.ftp.tests.test_zope_ftp.FTPServerPort
>> DataConnectionTestCaes)
>> What about that? ignore?

> Shrug. Not good. Does that happen with the Zope 3.3 branch checkout  
> as well? Why haven't we caught this problem earlier?


-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]
--
Quote of the day:
The only thing worse than an alarm going off is one that doesn't. 
- Unknown 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re[2]: Zope 3.3.1

2007-01-15 Thread Adam Groszer
Hello Michael,

Win32, looking into that...

Monday, January 15, 2007, 3:15:25 PM, you wrote:

> On Monday 15 January 2007 13:23, Philipp von Weitershausen wrote:
>> On 15 Jan 2007, at 11:02 , Adam Groszer wrote:
>> > Hello Philipp,
>> >
>> > .../repos/main/Zope3/branches/3.3
>> > fails too on the same test.
>> > Buildbot seems to sleep these days. I ran into that with one of by
>> > fixes too.
>> >
>> > Monday, January 15, 2007, 10:37:52 AM, you wrote:
>> >> On 15 Jan 2007, at 09:47 , Groszer Adam wrote:
>> >>> Hello Philipp,
>> >>>
>> >>> I have one failure here:
>> >>>testPORTCannotConnect
>> >>> (zope.app.twisted.ftp.tests.test_zope_ftp.FTPServerPort
>> >>> DataConnectionTestCaes)
>> >>> What about that? ignore?
>> >>
>> >> Shrug. Not good. Does that happen with the Zope 3.3 branch checkout
>> >> as well? Why haven't we caught this problem earlier?
>>
>> Michael, can you say anything about that zope.app.twisted.ftp
>> failure? We'd really like to get a 3.3.1 release out.

> I just ran all the tests on the 3.3 branch and on the 3.3.1 tag and I am not
> seeing this problem.

> Adam - what platform are you running these tests on - Windows / Linux / Mac,
> and also do you have a traceback of some sort that I can look at?

> Another thing to try is running the twisted ftp tests like so (in the same
> directory as test.py file)

>   ./trial.py twisted.test.test_ftp

> which should run the same test you reported but using the twisted trial test
> runner instead of the zope testrunner. I am just curious to see if you get
> the same problem here also - and if so then the traceback might be a bit more
> informative.

> Michael



-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]
--
Quote of the day:
The man who speaks positive convictions is worth a regiment of men who are 
always proclaiming their doubts and suspicions. 
- Anonymous 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] attribute index indexing None if returned from callable

2007-01-17 Thread Adam Groszer
Hello Jürgen,

Yep, +1.
Did some changes around the subject but seems like it was not enough.
The outcome of the story was the same: None should not get indexed.

Wednesday, January 17, 2007, 1:35:04 PM, you wrote:

> If a callable is used to provide the value for an attribute index in 
> zope.app.catalog value None is indexed. If the value is directly 
> provided by an attribute None is never indexed.

> I would like to see the same behavior for both cases, that means None is
> not indexed in either ways.

> If no one complains I will check in the necessary changes.

> Jürgen

> ___
> Zope3-dev mailing list
> Zope3-dev@zope.org
> Unsub: http://mail.zope.org/mailman/options/zope3-dev/adamg%40fw.hu


-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]
--
Quote of the day:
Epochs of faith are epochs of fruitfulness; but epochs of unbelief, however 
glittering, are barren of all permanent good. 
- Johann Wolfgang von Goethe 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re[2]: Zope 3.3.1

2007-02-13 Thread Adam Groszer
Hello Philipp,

Tuesday, February 13, 2007, 11:00:35 AM, you wrote:

PvW> Adam, can you make the installer for 3.3.1 again, upload it (w/o
PvW> publishing it) so that we can try to reproduce it on our machines?

I have the one from jan 15. at hand. Is it OK? I can start uploading
now.
Otherwise I can compile an up to date one maybe until tomorrow
morning, worst case thursday morning.

PvW> How did you compile Zope on Windows? I assume you used some version
PvW> of Visual Studio?

I did that with the free version of the MS compiler tools.
This is the same compiler as the one included in VS, also the
optimizing compiler.
(((
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
)))
How to setup the tools is here:
http://www.vrplumber.com/programming/mstoolkit/


-- 
Best regards,
 Groszer Adam
--
Quote of the day:
The opposite of a correct statement is a false statement.  But the opposite of 
a profound truth may well be another profound truth.  -  Niels Bohr

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Zope3 C++

2007-03-08 Thread Adam Groszer
Hello Roger,

It's done.
http://www.zope.org/Products/Zope3/Trunk/swrelease_contents

Friday, March 9, 2007, 1:56:54 AM, you wrote:

> Hi Adam

> Can you build new *.pyd files and zip them?

> Regards
> Roger Ineichen
> _
> Projekt01 GmbH
> www.projekt01.ch
> Boesch 65
> 6331 Hünenberg
> phone +41 (0)41 781 01 78
> mobile+41 (0)79 340 52 32
> fax   +41 (0)41 781 00 78
> email [EMAIL PROTECTED]
> _
> END OF MESSAGE

> ___
> Zope3-dev mailing list
> Zope3-dev@zope.org
> Unsub:
> http://mail.zope.org/mailman/options/zope3-dev/agroszer%40gmail.com




-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Community opinion about workflow engine

2007-03-13 Thread Adam Groszer
Hello Godefroid,

I'm having a bit biased view, because I know just zope.wfmc and have
the luck developing a pure Z3 application.

I think with zope.wfmc you have
- WFMC/XPDL support, you can shine with standards and big companies
love standards
- because it's XPDL support there's a graphical process editor jpEd
- the core itself is quite sophisticated, but still misses some things
for complete WFMC coverage (the WFMC spec is rather huge)
- you can/should add some layers on top of it:
  - z3c.wfmcpersistent to store the processes in ZODB
  - ecm.workflow to have a higher level of APIs and functions
(That was written by Roger Ineichen, but as nuxeo moved to jboss
it was not maintained by them. Therefore I intend to move that
code to z3c.wfmc, when I have some time to breathe.
I have some improvements to the code. We even have plans to
implement time management or scheduling with the package)

All in all we're quite comfortable with zope.wfmc in our project.
The project is about document management, also a bit of administrative
thing.

Monday, March 12, 2007, 4:48:24 PM, you wrote:

> Hi all,

> We have the opportunity to bid for a project concerning
> the automation of administrative processes.
> The client currently has software in Python and Zope/Plone.

> They are quite explicit that they want their new applications to be
> built as much as possible with a mix of generic shareable modules and of
> custom modules.

> This is a quite big project that, among others, includes the aspects of
> collaboration with / support of the community.

> One of the questions we are exploring is : "which workflow engine should
> we use/expand on ?"

> In order to help us make a proposal, we would be very interested to hear
> your comments both

> - about the existing workflows (DCWorkflow, Zope3.wfmc, AlphaFlow,
> OpenFlow...)

> - or about the directions that you would suggest in order to help you
> use a given engine (missing features, simplification,...) and join the
> effort to improve one of the existing engines.

> Thanks



-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re[2]: [Zope3-Users] correct display of Text field in a view

2007-03-14 Thread Adam Groszer
Hello Ivan,

I don't think that you'll need IMultiLineText and MultiLineText.
That's why IText and Text are there for. You'll have to register the
widget for IText or use it directly in your view with
CustomWidgetFactory.

In fact it's a good question why Z3 doesn't provide such a widget for
Text. The current widget is just Displaywidget which eats the
newlines.

BTW: "" should be ""

Wednesday, March 14, 2007, 9:30:19 AM, you wrote:

> Darryl, Frank,

> thank you your answers, but finally i keep the widget solution
> instead of TextAreaWidget i inherited my widget from DisplayWidget, and
> of course used your replace solution.

> class IMultiLineText(IText):
> """this field will be used for the comment because of the correct 
> display of html tags"""
>   
> pass

> class MultiLineText(Text):
> """the field implementation"""
> implements(IMultiLineText)
>
> class MultiLineTextWidget(DisplayWidget):
> """the widget to display the description"""

> def __call__(self):
> return super(MultiLineTextWidget, 
> self).__call__().replace("\n","")



> Darryl Cousins wrote:
>> On Fri, 2007-03-09 at 10:06 +0100, Ivan Horvath wrote:
>>   
>>> - modify the description widget data with 
>>> PlainTextToHTMLRenderer.render(), but then in the browser i can see
>>> only 
>>> encoded chars instead of  
>>> 
>>
>> Hi,
>>
>> As for Frank's suggestion try:
>>
>> 
>>
>> when rendering the text2html content. That should allow the html tags
>> through.
>>
>> Regards,
>> Darryl
>>
>>
>>
>>   




-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Community opinion about search+filter

2007-03-14 Thread Adam Groszer
Hello,

I'd like to ask your opinion, your experiences about searching and
filtering in quite large object DBs.
We need to add search and filter functions to our current app, where
the user might be able to create quite _sophisticated_ filter criterias.
(The app is a pure Z3 app, subject is document management)

Currently we're looking at something based on catalog/indexes.
As I checked the most comfortable solution would be based on
hurry.query.
Some questions arose:
- Is it necessary/worth adding indexes on all attributes?
- How does the index perform on modification and retrieval?

The biggest problem is that this will be our first try, so we're
missing experiences and are a bit puzzled about the right solution.
Certain is that moving to RDB is not an option.

Thanks,

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: Community opinion about search+filter

2007-03-24 Thread Adam Groszer
Hello Martijn,

I think that would give a great GSOC project.
The subject is well contained, knownledge might be ported from RDB
and/or AdvancedQuery.

Thursday, March 15, 2007, 7:04:03 PM, you wrote:

MF> Hello,

MF> Adam Groszer wrote:
>> I'd like to ask your opinion, your experiences about searching and
>> filtering in quite large object DBs.
>> We need to add search and filter functions to our current app, where
>> the user might be able to create quite _sophisticated_ filter criterias.
>> (The app is a pure Z3 app, subject is document management)
>> 
>> Currently we're looking at something based on catalog/indexes.
>> As I checked the most comfortable solution would be based on
>> hurry.query.
>> Some questions arose:
>> - Is it necessary/worth adding indexes on all attributes?
>> - How does the index perform on modification and retrieval?
>> 
>> The biggest problem is that this will be our first try, so we're
>> missing experiences and are a bit puzzled about the right solution.
>> Certain is that moving to RDB is not an option.

MF> I think one of the main limitations of the current catalog (and 
MF> hurry.query) is efficient support for sorting and batching the query 
MF> results. The Zope 3 catalog returns all matching results, which can then
MF> be sorted and batched. This will stop being scalable for large 
MF> collections. A relational database is able to do this internally, and is
MF> potentially able to use optimizations there.

MF> It would be very nice if someone could look into expanding hurry.query
MF> and/or the catalog to support these cases. It would be interesting to 
MF> look at what Dieter Maurer has done with AdvancedQuery in Zope 2 in this
MF> regard as well.

MF> Regards,

MF> Martijn


MF> ___
MF> Zope3-dev mailing list
MF> Zope3-dev@zope.org
MF> Unsub:
MF> http://mail.zope.org/mailman/options/zope3-dev/agroszer%40gmail.com



-- 
Best regards,
 Groszer Adam
--
Quote of the day:
Evil is only good perverted. 
- Henry Wadsworth Longfellow 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: SVN: Zope3/branches/3.2/src/zope/app/ftests/doctest.txt Fix of broken test by my change at rev 71681

2007-03-25 Thread Adam Groszer
Hello Philipp,

Sorry, I fixed that now hopefully.
Now I get
 Ran 532 tests with 0 failures and 0 errors in ...
What mislead me was that in 3.3 the realm is "Zope" instead of zope.

Sunday, March 25, 2007, 5:41:03 PM, you wrote:

PvW> Adam Groszer wrote:
>> Log message for revision 71926:
>>   Fix of broken test by my change at rev 71681

PvW> Hi Adam, apparently that fix breaks tests on Windows:
PvW> 
http://buildbot.zope.org/Zope3%20branches%203.2%202.4%20Windows%202000%20zc-bbwin/builds/163/test_2/0

>> Changed:
>>   U   Zope3/branches/3.2/src/zope/app/ftests/doctest.txt
>> 
>> -=-
>> Modified: Zope3/branches/3.2/src/zope/app/ftests/doctest.txt
>> ===
>> --- Zope3/branches/3.2/src/zope/app/ftests/doctest.txt2007-01-11 
>> 17:11:51 UTC (rev 71925)
>> +++ Zope3/branches/3.2/src/zope/app/ftests/doctest.txt2007-01-11 
>> 17:12:29 UTC (rev 71926)
>> @@ -21,9 +21,12 @@
>>... GET /@@contents.html HTTP/1.1
>>... """)
>>HTTP/1.1 401 Unauthorized
>> +  Cache-Control: no-store, no-cache, must-revalidate
>>Content-Length: ...
>>Content-Type: text/html;charset=utf-8
>> -  WWW-Authenticate: basic realm=zope
>> +  Expires: Mon, 26 Jul 1997 05:00:00 GMT
>> +  Pragma: no-cache
>> +  WWW-Authenticate: basic realm="Zope"
>>
>>>  
>> @@ -32,6 +35,7 @@
>>- A 404 response,
>>- A WWW-Authenticate header, and
>>- An html body with an error message
>> +  - Some technical headers to keep squid happy
>>  
>>  Note that we used ellipeses to indicate ininteresting details.




-- 
Best regards,
 Groszer Adam
--
Quote of the day:
"Friends don't let friends drive drunk". I think we could adopt something like 
"friends don't want friends to go to hell. 
- Chuck Gallini 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [ZODB-Dev] Re: [Zope3-dev] Re: Community opinion about search+filter

2007-03-25 Thread Adam Groszer
Hello Martijn,

MF> I would like some system that helps me reduce some of these costs, using
MF> the approaches you list, or at least some caching somewhere. I would 
MF> imagine a relational database for instance can employ caching of result
MF> sets, so that if no writes occurred, a second LIMIT query asking for a
MF> different range will return results a lot faster.

That's even not a bad idea for the catalog/index approach as it's
update is based on events. So I can know if anything was changed in
the DB or even whether the changed object is in the query results.
The next question is how long to cache the results :-)

IMHO looking at the optimization of the
catalog/index/query/batching is worth a project, worst case the
outcome is that it's not so easy to optimize.
Anyway Oracle and MS already fought the optimization battle for RDB,
there are PGSQL, MYSQL sources to look at.
Google does somehow also the batching hellfast.

-- 
Best regards,
 Groszer Adam
--
Quote of the day:
The question is not whether we will die, but how we will live.
- Borysenko, Joan 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: Community opinion about search+filter

2007-03-27 Thread Adam Groszer
Hello,

Somehow relevant to the subject I just found an article on Wickert's
site:

http://www.wiggy.net/ , "Using a seperate Data.fs for the catalog"


-- 
Best regards,
 Groszer Adam
--
Quote of the day:
Keep your fears for yourself, but share your courage with others.
- Robert Louis Stevenson 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] bit puzzled with directDelivery+smtpMailer

2007-03-29 Thread Adam Groszer
Hello,

I'm trying to catch somehow the exception that's coming when the SMTP
server IP address is misconfigured or the SMTP server is not
responding.

My problem is that the sending works using the transaction manager.
That means the exception comes after
  File "U:\zope\svn_zope33\src\zope\publisher\publish.py", line 138, in publish
publication.afterCall(request, obj)
  File "U:\zope\svn_zope33\src\zope\app\publication\browser.py", line 78, in 
afterCall
super(BrowserPublication, self).afterCall(request, ob)
  File "U:\zope\svn_zope33\src\zope\app\publication\zopepublication.py", line 
167, in afterCall
txn.commit()
That means I don't have a big chance to catch it in my app.

Using queuedDelivery might be a solution, but I still don't have too
many chances to give feedback of the error.

There is a IMailErrorEvent, and IMailSentEvent but they don't seem to
be used. Obviously they would be fired in the middle of tpc_finish.

Any ideas, pointers?

-- 
Best regards,
 Groszer Adam
--
Quote of the day:
The reports of my death are greatly exaggerated.  -  Mark Twain

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] z3c.baseregistry weirdness

2007-04-04 Thread Adam Groszer
Hello Stephan,

We're having here a problem with our app that uses z3c.baseregistry.
The app used to live at something like http://localhost:8080/ap_test/...
That's an ISite. Somebody managed to rename ap_test to ap_test2 (but
anything works) and the app lost it's declarations that use the
registerIn directive. The rename was done through the ZMI.
By debugging it seems like the local sitemanager lost it's magic.
That means it's no more subclassed from z3c.baseregistry.BaseComponents.

I intend to dig deeper, but right now I'm a bit puzzled where to dig.

-- 
Best regards,
 Groszer Adam
--
Quote of the day:
Problems are only opportunities in work clothes. (Henry J. Kaiser)

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] possible bug in z.a.password?

2007-04-20 Thread Adam Groszer
Hello,

Using the current trunk I experienced that using the PAU with a user
folder and users passwords stored with MD5, entering accented
characters as passwords causes an exception. That happens either at
adding the principal or at Z3's stock login form.

I think this is not my fault, but could somebody crosscheck that please?

Traceback from the login form, I entered "éá" as password:
  File "U:\zope\svn_zope34\src\zope\publisher\publish.py", line 130, in publish
obj = request.traverse(obj)
  File "U:\zope\svn_zope34\src\zope\publisher\browser.py", line 513, in traverse

ob = super(BrowserRequest, self).traverse(obj)
  File "U:\zope\svn_zope34\src\zope\publisher\http.py", line 448, in traverse
ob = super(HTTPRequest, self).traverse(obj)
  File "U:\zope\svn_zope34\src\zope\publisher\base.py", line 252, in traverse
publication.callTraversalHooks(self, obj)
  File "U:\zope\svn_zope34\src\zope\app\publication\zopepublication.py", line 12
3, in callTraversalHooks
self._maybePlacefullyAuthenticate(request, ob)
  File "U:\zope\svn_zope34\src\zope\app\publication\zopepublication.py", line 11
0, in _maybePlacefullyAuthenticate
principal = auth.authenticate(request)
  File "U:\zope\svn_zope34\src\zope\app\authentication\authentication.py", line
76, in authenticate
info = authplugin.authenticateCredentials(credentials)
  File "U:\zope\svn_zope34\src\zope\app\authentication\principalfolder.py", line
 280, in authenticateCredentials
if not internal.checkPassword(credentials["password"]):
  File "U:\zope\svn_zope34\src\zope\app\authentication\principalfolder.py", line
 150, in checkPassword
return passwordManager.checkPassword(self.password, password)
  File "U:\zope\svn_zope34\src\zope\app\authentication\password.py", line 54, in
 checkPassword
return storedPassword == self.encodePassword(password)
  File "U:\zope\svn_zope34\src\zope\app\authentication\password.py", line 77, in
 encodePassword
return md5.new(password).hexdigest()
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordin
al not in range(128)

-- 
Best regards,
 Groszer Adam
--
Quote of the day:
Top ten things you'll never hear in an internet chat room: 5. Well... gotta go. 
It's almost time to pick up my date.

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] possible bug in z.a.password?

2007-04-21 Thread Adam Groszer
Hello Dmitry,

Saturday, April 21, 2007, 10:57:07 AM, you wrote:

> Ugh, my bad I didn't notice that passwords may be Unicode strings. I
> think password should be encoded to UTF-8 before processing but I don't
> know that to do with backward compatibility. As an option we can 
> introduce new Unicode-aware password managers. Opinions?

Thinking it further, I think that nobody was able to enter accented
passwords until today :-) and UTF-8 is encoding ASCII to ASCII (does
it change anything???).
IMHO it would not hurt adding an UTF-8 encoding to the current
password manager.
Anybody against that?

-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] zc.zope3recipes not working on Windows

2007-06-01 Thread Adam Groszer
Hello Stephan,

There is a zopeservice.py that should have the same functionality on
win32 as zdaemon as far as I know. It will install zope as a windows
service, then it can be controlled by 'regular' win commands, the win
service manager does the recovery, restart and stuff.

Thursday, May 31, 2007, 7:59:58 AM, you wrote:

SR> Hi Jim and other zc.zope3recipes experts,

SR> I have had some reports from Windows users that the z3c.formdemo -- which is
SR> built with zc.zope3recipes -- is not working on Windows. The reported error
SR> was as follows:

E:\formdemo>>.\bin\demo fg
SR> Traceback (most recent call last):
SR>   File "E:\formdemo\bin\demo-script.py", line 14, in ?
SR> zc.zope3recipes.ctl.main([
SR>   File 
SR> "e:\formdemo\eggs\zc.zope3recipes-0.5.1-py2.4.egg\zc\zope3recipes\ctl.py",
SR> line 47, in main
SR> zdaemon.zdctl.main(args, None, Cmd)
SR>   File 
SR> "e:\formdemo\eggs\tmp9ghl8n\zdaemon-2.0a6-py2.4.egg\zdaemon\zdctl.py",
SR> line 626, in main
SR>   File 
SR> "e:\formdemo\eggs\tmp9ghl8n\zdaemon-2.0a6-py2.4.egg\zdaemon\zdctl.py",
SR> line 125, in __init__
SR>   File 
SR> "e:\formdemo\eggs\tmp9ghl8n\zdaemon-2.0a6-py2.4.egg\zdaemon\zdctl.py",
SR> line 185, in get_status
SR>   File 
SR> "e:\formdemo\eggs\tmp9ghl8n\zdaemon-2.0a6-py2.4.egg\zdaemon\zdctl.py",
SR> line 165, in send_action
SR> AttributeError: 'module' object has no attribute 'AF_UNIX'

SR> Is there any chance we can fix that?

SR> Regards,
SR> Stephan


-- 
Best regards,
 Groszer Adam
--
Quote of the day:
What is fanaticism today is fashionable creed tomorrow, and trite as the 
multiplication table tomorrow. 
- Wendell Phillips 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] problem with zope.testbrowser

2007-07-10 Thread Adam Groszer
Hello,

Have a resourceDirectory here, that contains a bunch of files for the
app's help. The app determines which html to open including an anchor
and does a HTML redirect.
(http://localhost:8080/ap_test/@@/dkr-help/index.html#Documents)
That works fine using a browser, but fails with the testbrowser:

  File 
"U:\zope\svn_zope33\src\zope\app\publisher\browser\directoryresource.py", line 
68, in publishTraverse
return self.get(name)
  File 
"U:\zope\svn_zope33\src\zope\app\publisher\browser\directoryresource.py", line 
88, in get
raise NotFound(None, name)
NotFound: Object: None, name: u'index.html#Documents'

Apparently the anchor is to blame.
Anybody noticed that already?

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] problem with zope.testbrowser

2007-07-11 Thread Adam Groszer
Hi Benji,

The problem is deep in mechanize.
Updating mechanize+Clientform to the current versions (locally)
helped. Some patching in testbrowser is necessary.

Any advices for/against doing that on the trunk?

Wednesday, July 11, 2007, 2:50:49 PM, you wrote:

> Adam Groszer wrote:
>> (http://localhost:8080/ap_test/@@/dkr-help/index.html#Documents)
>> That works fine using a browser, but fails with the testbrowser:
>> 
>>   File 
>> "U:\zope\svn_zope33\src\zope\app\publisher\browser\directoryresource.py", 
>> line 68, in
>> publishTraverse
>> return self.get(name)
>>   File 
>> "U:\zope\svn_zope33\src\zope\app\publisher\browser\directoryresource.py", 
>> line 88, in get
>> raise NotFound(None, name)
>> NotFound: Object: None, name: u'index.html#Documents'
>> 
>> Apparently the anchor is to blame.
>> Anybody noticed that already?

> Testbrowser should remove the fragment identifier before sending the 
> request on to the publisher.  That's how "real" browsers behave. 
> Patches accepted .



-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] problem with zope.testbrowser

2007-07-13 Thread Adam Groszer
Hello Benji,

Did something at /repos/Zope3/branches/adamg-mechanize-update/,
the biggest problems seems to be now, that ClientForm won't work in a
subfolder.

Any objections against putting it back to /src?

Wednesday, July 11, 2007, 7:32:06 PM, you wrote:

> Adam Groszer wrote:
>> The problem is deep in mechanize.
>> Updating mechanize+Clientform to the current versions (locally)
>> helped. Some patching in testbrowser is necessary.

> Cool!  Glad you're looking into this.

>> Any advices for/against doing that on the trunk?

> I would prefer a branch, that way we can collaborate on it before 
> merging it to the trunk.



-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] Windows eggs

2007-07-13 Thread Adam Groszer
Hello Philipp,

Friday, July 13, 2007, 12:18:27 PM, you wrote:

> Adam Groszer wrote:
>> Tried it with zope.proxy. Updated to the latest distutils.

> I trust you're also using setuptools?

Now yes, was a clean VM
:-S

distutils is 1.0.2
setuptools is 0.6c6

Anything else I need?

> What happens with other packages?

> What happens with packages that don't have C extensions?

The exception changed a bit, but still all packages have the same
regardless of C extensions:

Traceback (most recent call last):
  File "U:\1\zope.viewlet-3.4.0a1\setup.py", line 57, in ?
zip_safe = False,
  File "C:\Python24\distutils\core.py", line 101, in setup
  File "C:\Python24\Lib\site-packages\setuptools\dist.py", line 223, in __init__

_Distribution.__init__(self,attrs)
  File "C:\Python24\distutils\dist.py", line 130, in __init__
AttributeError: DistributionMetadata instance has no attribute 'get___doc__'



___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Windows eggs

2007-07-13 Thread Adam Groszer
Hello Philipp,

Tried it with zope.proxy. Updated to the latest distutils.
Have the following exception:

Traceback (most recent call last):
  File "U:\1\zope.proxy-3.4.0a1\setup.py", line 54, in ?
zip_safe = False,
  File "C:\Python24\distutils\core.py", line 101, in setup
  File "C:\Python24\distutils\dist.py", line 130, in __init__
AttributeError: DistributionMetadata instance has no attribute 'get___doc__'

what am I missing?


Friday, July 13, 2007, 11:08:36 AM, you wrote:

PvW> Hi Jim, Adam,

PvW> can we take you up your offers to build Windows stuff? It would be 
PvW> *extremely* great to have Windows eggs of the latest

PvW> * zope.interface
PvW> * zope.security
PvW> * zope.app.container
PvW> * zope.hookable
PvW> * zope.i18nmessageid
PvW> * zope.proxy
PvW> * zope.thread

PvW> Adam: Simply getting the latest tarball from 
PvW> http://download.zope.org/distribution/. Running

PvW>python setup.py bdist_egg

PvW> should do it. You can then scp the resulting .egg file in the 'dist' 
PvW> directory to [EMAIL PROTECTED]:/distribution (you'll have to do
PvW> it one by one).

PvW> Thanks!

PvW> Philipp


PvW> P.S.: I've tried doing it myself by following the instructions on 
PvW> http://www.vrplumber.com/programming/mstoolkit/, but without success.
PvW> ___
PvW> Zope3-dev mailing list
PvW> Zope3-dev@zope.org
PvW> Unsub:
PvW> http://mail.zope.org/mailman/options/zope3-dev/agroszer%40gmail.com




___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re[2]: problem with zope.testbrowser

2007-07-15 Thread Adam Groszer
Hello Philipp,

Yep, had the same idea just yesterday. But how to keep the trunk also
in a good-consistent shape (if it needs to be kept in a good shape)?

Sunday, July 15, 2007, 3:07:17 PM, you wrote:

> Adam Groszer wrote:
>> Did something at /repos/Zope3/branches/adamg-mechanize-update/,
>> the biggest problems seems to be now, that ClientForm won't work in a
>> subfolder.
>> 
>> Any objections against putting it back to /src?

> It won't really matter much, I think, because the trunk of the Zope3 
> tree will unlikely see another release.

> You really want to branch the zope.testbrowser trunk and work there. 
> Unfortunately, I've just seen that we don't pull in ClientForm and 
> mechanize as eggs. They're actually included in the zope.testbrowser 
> egg. That sucks. It'd be great if you could change that while you're at it.

-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] zc.table.column.GetterColumn does not encode &<>

2007-07-18 Thread Adam Groszer
Hello,

Seems like zc.table.column.GetterColumn does not encode the characters
"&<>" to the usual &, <, >.
Is that OK this way?
I usually insert the result of the Formatter() with
. That breaks havoc if a
table cell's data contains any "&<>".
Am I missing something?

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re: zc.table.column.GetterColumn does not encode &<>

2007-07-19 Thread Adam Groszer
Wednesday, July 18, 2007, 6:55:50 PM, I wrote:

> Hello,

> Seems like zc.table.column.GetterColumn does not encode the characters
> "&<>" to the usual &, <, >.
> Is that OK this way?
> I usually insert the result of the Formatter() with
> . That breaks havoc if a
> table cell's data contains any "&<>".
> Am I missing something?

OK, silence is consent. I'll go ahead write a test and the fix and
commit tomorrow.


-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re[2]: problem with zope.testbrowser

2007-07-19 Thread Adam Groszer
Hello Philipp,

I decided to keep the trunk consistent this time as I'm still not
using the eggs.
I'll wait for you (and Jim) to decide how to deal with the externals
at the satellites.

Monday, July 16, 2007, 10:49:38 PM, you wrote:

> On 16 Jul 2007, at 08:59 , Adam Groszer wrote:
>> Yep, had the same idea just yesterday. But how to keep the trunk also
>> in a good-consistent shape (if it needs to be kept in a good shape)?

> Well, that's a good question. If you'd like to update  
> zope.testbrowser on the trunk, I suppose you'd have to do vendor  
> imports of ClientForm and mechanize again. I think we'll pretty soon  
> realize that the Zope3 trunk will become irrelevant, if not even a  
> hindrance like in this case with vendor imports...

-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re[2]: problem with zope.testbrowser

2007-07-19 Thread Adam Groszer
Hello Philipp,

Just realized that the mechanize and Clientform of the _satellite_ is
pointing as external to the trunk...
That looks not so good, does it?

Monday, July 16, 2007, 10:49:38 PM, you wrote:

> On 16 Jul 2007, at 08:59 , Adam Groszer wrote:
>> Yep, had the same idea just yesterday. But how to keep the trunk also
>> in a good-consistent shape (if it needs to be kept in a good shape)?

> Well, that's a good question. If you'd like to update  
> zope.testbrowser on the trunk, I suppose you'd have to do vendor  
> imports of ClientForm and mechanize again. I think we'll pretty soon  
> realize that the Zope3 trunk will become irrelevant, if not even a  
> hindrance like in this case with vendor imports...

-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] help with doctests

2007-07-20 Thread Adam Groszer
Hello,

In z.a.apidoc.browser.README.txt I can write
"""
  >>> browser.open('http://localhost/++apidoc++/non-existent/')
  Traceback (most recent call last):
  ...
  httperror_seek_wrapper: HTTP Error 404: Not Found
"""
(test passes)

but I can't write
"""
  >>> browser.open('http://localhost/++apidoc++/non-existent/')
  Traceback (most recent call last):
  ...
  ...HTTP Error 404: Not Found
"""
it throws:
"""
Failed example:
browser.open('http://localhost/++apidoc++/non-existent/')
Exception raised:
Traceback (most recent call last):
  File "U:\zope\svn_zope34\src\zope\testing\doctest.py", line 1348, in __run

compileflags, 1) in test.globs
  File "", line 1, in ?
browser.open('http://localhost/++apidoc++/non-existent/')
  File "U:\zope\svn_zope34\src\zope\testbrowser\browser.py", line 224, in 
open
self.mech_browser.open(url, data)
  File "U:\zope\svn_zope34\src\mechanize\_mechanize.py", line 203, in open
return self._mech_open(url, data)
  File "U:\zope\svn_zope34\src\mechanize\_mechanize.py", line 254, in 
_mech_open
raise response
httperror_seek_wrapper: HTTP Error 404: Not Found
"""

what do I miss?

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: AW: [Zope3-dev] help with doctests

2007-07-20 Thread Adam Groszer
Hi Roger!

Yes, it's the same :-(

Friday, July 20, 2007, 9:59:48 AM, you wrote:

RI> Hi Adam

>> Auftrag von Adam Groszer
>> Gesendet: Freitag, 20. Juli 2007 09:49
>> An: zope3-dev
>> Betreff: [Zope3-dev] help with doctests
>> 
>> Hello,
>> 
>> In z.a.apidoc.browser.README.txt I can write """
>>   >>> browser.open('http://localhost/++apidoc++/non-existent/')
>>   Traceback (most recent call last):
>>   ...
>>   httperror_seek_wrapper: HTTP Error 404: Not Found """
>> (test passes)
>> 
>> but I can't write
>> """
>>   >>> browser.open('http://localhost/++apidoc++/non-existent/')
>>   Traceback (most recent call last):
>>   ...
>>   ...HTTP Error 404: Not Found

RI> Did you try:

RI> ...HTTP Error 404: Not Found...

RI> Regards
RI> Roger Ineichen
RI> _
RI> END OF MESSAGE


___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] doctest prb again

2007-07-20 Thread Adam Groszer
Hello,

How to solve the \r\n and \n mismatch between win32 and *nix in the
doctests?

doctest is:
"""
>>> ctrl.value
'Text inside\narea!\n  '
"""

fails with (on win32):
"""
Failed example:
ctrl.value
Expected:
'Text inside\narea!\n  '
Got:
'  Text inside\r\n  area!\r\n'
"""

ctrl.value comes from a html file in zope.testbrowser.ftests
-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] doctest prb again

2007-07-20 Thread Adam Groszer
Hello Stefan,

It seems to be already enabled:
flags = doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS
readme = FunctionalDocFileSuite('README.txt', optionflags=flags,
checker=checker)


Friday, July 20, 2007, 10:18:30 AM, you wrote:

> Doesn't NORMALIZE_WHITESPACE help here?

> Stefan


> On 20. Jul 2007, at 10:09, Adam Groszer wrote:

>> How to solve the \r\n and \n mismatch between win32 and *nix in the
>> doctests?

> --
> Anything that happens, happens.  --Douglas Adams

-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] doctest prb again

2007-07-20 Thread Adam Groszer
Hello Marius,

Great, that works ;-)
Thought that there is some more genreic-sane way.

Friday, July 20, 2007, 10:25:02 AM, you wrote:

> On Fri, Jul 20, 2007 at 10:09:18AM +0200, Adam Groszer wrote:
>> Hello,
>> 
>> How to solve the \r\n and \n mismatch between win32 and *nix in the
>> doctests?
>> 
>> doctest is:
>> """
>> >>> ctrl.value
>> 'Text inside\narea!\n  '
>> """
>> 
>> fails with (on win32):
>> """
>> Failed example:
>> ctrl.value
>> Expected:
>> 'Text inside\narea!\n  '
>> Got:
>> '  Text inside\r\n  area!\r\n'
>> """
>> 
>> ctrl.value comes from a html file in zope.testbrowser.ftests

> You could do

> >>> ctrl.value.replace('\r', '')

> or strip the \r's in the place where you're reading that html file.

> Marius Gedminas

-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: help with doctests

2007-07-20 Thread Adam Groszer
Hello Philipp,

Great, that would solve also the \r\n substitution also (I hope).

Friday, July 20, 2007, 11:27:52 AM, you wrote:

> Marius Gedminas wrote:
>> doctests have special rules for exceptions that are different from the
>> rules of normal output matching.
>> 
>> If a statement raises an exception, the output part must be of the form
>> 
>>   Traceback (most recent call last):
>> ...
>>   : 
>> 
>> You can use ellipsis in the exception value part, IIRC.

> But I wouldn't recommend using them. Sometimes, using ellipses are fine,
> but generally they obfuscate the doctest when you're reading it. I 
> suggesting using the regex-normalizer [1]. There are many packages out
> there that use it if you're looking for examples.


> http://svn.zope.org/zope.testing/trunk/src/zope/testing/renormalizing.py?rev=66267&view=auto

-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] problem with zope.testbrowser

2007-07-21 Thread Adam Groszer
Hi,

Seems like it's ready. Apidoc had to be modified too.
The egg seems to be built OK. Installs OK with dependecies.
Tests on the trunk pass when the satellite's branches are linked in as
externals.
As I'm not yet a pro regarding eggs, please have a look.

-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[4]: [Zope3-dev] problem with zope.testbrowser

2007-08-09 Thread Adam Groszer
Hello Fred,

I'll say silence is consent.
I'll need some time to merge. Might be I should write a test before.

Wednesday, August 8, 2007, 5:48:11 AM, you wrote:

> On 7/21/07, Adam Groszer <[EMAIL PROTECTED]> wrote:
>> Seems like it's ready. Apidoc had to be modified too.
>> The egg seems to be built OK. Installs OK with dependecies.
>> Tests on the trunk pass when the satellite's branches are linked in as
>> externals.
>> As I'm not yet a pro regarding eggs, please have a look.

> Has anyone had a chance to act on this?  What's needed to make Adam's
> branch become trunk and released?


>   -Fred


-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] how-to dig SVN log of the satellites

2007-08-09 Thread Adam Groszer
Hello,

Seems like it's not so easy to get a complete history log of the
satellites. (e.g. zope\app\authentication\principalfolder.py).

Where shall I look for it?

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] LocationProxy+None

2007-08-14 Thread Adam Groszer
Hello,

A strange thing happened today:
>>> x = LocationProxy(None, "foo", "bar")
>>> x is None
False
>>> x == None
True

Is this OK or I'm just missing something?

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] LocationProxy+None

2007-08-14 Thread Adam Groszer
Thank you Jeff for the clarification.
Thought so that could be something like this, but was not so clear on
spot.


Tuesday, August 14, 2007, 4:15:48 PM, you wrote:

JS> On 8/14/07, Adam Groszer <[EMAIL PROTECTED]> wrote:
>> A strange thing happened today:
>> >>> x = LocationProxy(None, "foo", "bar")
>> >>> x is None
>> False
>> >>> x == None
>> True
>>
>> Is this OK or I'm just missing something?

JS> You have to understand how Python's ``is`` differs from ``==``. An
JS> `is` check is an identity check, not an equality check. It's generally
JS> faster than comparing equality. It's basically like this::

JS>a is b if id(a) == id(b)

JS> The Python `id` function is basically a memory address of that
JS> specific instance. None, True, and False are all basically constants
JS> that have the same identity unless that name is overridden in a local
JS> namespace.

JS> When proxies enter the picture, you're wrapping the object with a
JS> proxy, so it's no longer the same by identity.

JS> >>> from zope.location import LocationProxy
JS> >>> located_none = LocationProxy(None, "foo", "bar")
JS> >>> id(None)
JS> 3120456
JS> >>> id(located_none)
JS> 404616
JS> >>> id(None) == id(located_none)
JS> False
JS> >>> located_none is None
JS> False

JS> Since the proxy object is masquerading as its wrapped object, equality
JS> checks works. But identity doesn't. The `zope.proxy` package includes
JS> some functions that you can use for help.

JS> >>> from zope.proxy import removeAllProxies, sameProxiedObjects, isProxy
JS> >>> isProxy(None)
JS> False
JS> >>> isProxy(located_none)
JS> True

JS> You have the option of removing all proxies, which would return the
JS> object wrapped up by the proxy. Since we wrapped up None, it would
JS> return the actual None object and identity checks would pass:

JS> >>> removeAllProxies(located_none) is None
JS> True

JS> Or you can use `sameProxiedObjects`, which does the identity check on
JS> the internal objects of one or two proxies:

JS> >>> sameProxiedObjects(located_none, None)
JS> True

JS> You can see this when wrapping another instance of None with a location 
proxy.

JS> >>> singing_nun = LocationProxy(None, 'austria', 'jane')
JS> >>> id(singing_nun)
JS> 7378424
JS> >>> singing_nun is located_none
JS> False
JS> >>> sameProxiedObjects(singing_nun, located_none)
JS> True



-- 
Best regards,
 Groszer Adam
--
Quote of the day:
Doubters invert the metaphor and insist that they need faith as big as
a mountain in order to move a mustard seed. 
- Anonymous

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] problem with zope.testbrowser

2007-08-16 Thread Adam Groszer
Hello Benji,

Had some time to merge it to the trunk.
I would say it's time now to kill/remove/delete the ClientForm and
mechanize stored on the trunk. Any objections?

Thursday, August 9, 2007, 2:20:27 PM, you wrote:

> Adam Groszer wrote:
>> Hello Fred,
>> 
>> I'll say silence is consent.
>> I'll need some time to merge. Might be I should write a test before.

> I'll try to take a look at the branch in the next couple of days and 
> give you some feedback.

-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: AW: [Zope3-dev] Re: AW: relying on win32api in windows supportofzc.zope3recipes

2007-08-20 Thread Adam Groszer
Monday, August 20, 2007, 3:05:45 PM, Stephan Richter wrote:

> Windows is pretty different in this respect. You really want to use an
> installer, which means you get a wizard. People in Windows expect this
> behavior and want it. It is quiet ignorant to ask them to use eggs instead.

Hackers on win32 can live with eggs, but beginners surely not.
The wizard might be a simple wrapper around the scenes behind.
Ask some parameters/path/anything, start the install script with
python, provide some progress feedback.

-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] how-to stop permission propagation to sublocations

2007-08-22 Thread Adam Groszer
Hello,

Is there a sane way to stop permission propagation to sublocations?
Let's say I have a site, and somewhere below there is a folder as a
trashcan, unneeded objects get moved to here. Users must not modify
objects in the trash. Users usually will get ModifyContent permission
at the site level.
The easiest way seems to stop propagation of the permission
ModifyContent at the trashcan level. But how? Anybody done something
like this already?

-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] how-to stop permission propagation to sublocations

2007-08-22 Thread Adam Groszer
Hello Christian,

Thanks, tried that. The problem is when new users "arrive", they get
ModifyContent permission in the site root. Now I shall add a
subscriber for the new_user event or denying ModifyContent from
Authenticated users should be enough? I am still a bit puzzled.

Thursday, August 23, 2007, 7:12:12 AM, you wrote:

> Am Mittwoch, den 22.08.2007, 21:00 +0200 schrieb Adam Groszer:
>> Hello,
>> 
>> Is there a sane way to stop permission propagation to sublocations?
>> Let's say I have a site, and somewhere below there is a folder as a
>> trashcan, unneeded objects get moved to here. Users must not modify
>> objects in the trash. Users usually will get ModifyContent permission
>> at the site level.
>> The easiest way seems to stop propagation of the permission
>> ModifyContent at the trashcan level. But how? Anybody done something
>> like this already?

> Permissions can be set to 'yes' or 'no' or be 'unset'. Using those three
> states in combination with the default 'propagation' should give you
> what you want. If you set 'ModifyContent' to 'No' on the trash and the
> content's permission is not explicitly set then that should fit your
> situation.

> Christian


-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[4]: [Zope3-dev] how-to stop permission propagation to sublocations

2007-08-23 Thread Adam Groszer
Hi,

I ended up in overriding the permission storage map. This might not be
so conservative, but seems to work. Kills any not ALLOWED permission
and stops propagation.

ALLOWED = ['zope.View', 'zope.app.dublincore.view', ...]

class trashPermManager(AnnotationPrincipalPermissionManager):
def getSetting(self, permission_id, principal_id, default=Unset):
if permission_id in ALLOWED:
return AnnotationPrincipalPermissionManager.getSetting(
self, permission_id, principal_id, default)
else:
return Deny


  


> In a similar use-case, yes, I set up all relevant permissions for a `new
> arrival` using a subscriber - including denying permissions on
> sub-objects. I felt that being explicit about my security design was a
> good decision.

> Hope that helps.
> Darryl


-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: zope.testbrowser 3.4.1

2007-09-13 Thread Adam Groszer
Hello Philipp,

Thursday, September 13, 2007, 1:34:02 PM, you wrote:

> Benji York wrote:
>> zope.testrowser 3.4.1 generates non-backward-compatible tracebacks for 
>> HTTP errors.  3.4.2 will be released soon(-ish) to fix this, in the mean 
>> time please continue to use 3.4.0.  Thanks.

> I guess I'm to blame here since I released 3.4.1. In my defence, it 
> seems that the new mechanize version actually introduced the 
> incompatibility and the rest of the Zope 3 tests were silently updated
> with renormalizers during the mechanize upgrade.

> Thanks for looking into this, Benji.

I was the one who did it with the renormalizers. Sorry.

-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re: Proposal, free views

2007-09-23 Thread Adam Groszer
Hi Roger,

Big +1,
That would separate the browser part from the component part.
Who knows what UI I want for a reused component, might even be that none!


On 9/23/07, Roger Ineichen <[EMAIL PROTECTED]> wrote:
> Heads up,
>
> Please review this proposal. I'll implement it
> shortly if nobody has objections. We need it for
> our work here at the Foliage sprint.
>
> If you have objections, please tell me what
> you think is not well done and tell me your
> ideas to solve the problem in another way.
>
> http://wiki.zope.org/zope3/FreeViews
>
> btw,
> the proposed implementation does not affect existing
> projects and their setup. It also does not affect
> egg based projects. It only offers us a additional hook
> which allows us to load component configuration from
> packages without the built in views.
>
> Thanks
> Roger Ineichen
> _
> Projekt01 GmbH
> www.projekt01.ch
> Boesch 65
> 6331 Hünenberg
> phone +41 (0)41 781 01 78
> mobile+41 (0)79 340 52 32
> fax   +41 (0)41 781 00 78
> email [EMAIL PROTECTED]
> _
> END OF MESSAGE
>
>
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



zope3-dev@zope.org

2005-04-06 Thread Adam Groszer
I'm trying to build & install the Zope 3 trunk on Win2K.
I'm having some problems with it.

May I post them here or is it too early for the upcoming release?

Adam

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



  1   2   >