[Zope-Checkins] SVN: Zope/branches/tim-2.9-windows-installer/ Zope 2.9 went out without working code to build a Windows installer.
Log message for revision 41263: Zope 2.9 went out without working code to build a Windows installer. This is a branch from the 2.9 tag to try to repair that. Changes here will be limited to the WinBuilder stuff. Changed: A Zope/branches/tim-2.9-windows-installer/ -=- Copied: Zope/branches/tim-2.9-windows-installer (from rev 41262, Zope/tags/2.9.0) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/zope.mk For whatever reason, the tarball for 2.9.0 dropped -final from its name.
Log message for revision 41268: For whatever reason, the tarball for 2.9.0 dropped -final from its name. The makefile has to know the actual name. Changed: U Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/zope.mk -=- Modified: Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/zope.mk === --- Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/zope.mk 2006-01-11 16:42:09 UTC (rev 41267) +++ Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/zope.mk 2006-01-11 16:47:01 UTC (rev 41268) @@ -3,7 +3,7 @@ REQUIRED_FILES=$(PYTHON_REQUIRED_FILES)\ $(ZOPE_REQUIRED_FILES) -ZOPEVERSION=2.9.0-final +ZOPEVERSION=2.9.0 ZOPEDIRNAME=Zope-$(ZOPEVERSION) MAKEZOPE=$(MAKEFILEDIR)/bin/makezope.bat $(WIN_BUILD_DIR) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/python.mk Python 2.4.2 is needed now.
Log message for revision 41277: Python 2.4.2 is needed now. Changed: U Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/python.mk -=- Modified: Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/python.mk === --- Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/python.mk 2006-01-11 19:13:44 UTC (rev 41276) +++ Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/python.mk 2006-01-11 19:20:13 UTC (rev 41277) @@ -1,10 +1,10 @@ # The Python and pywin32 versions. For Python, both the source tarball -# and the Windows installer must be in tmp/. For pywin32 (previously known +# and the Windows installer must be in tmp/. For pywin32 (previously known # as win32all), the Windows installer must be in tmp/. Nothing beyond those # is required to build Python, and you don't even need a compiler. PYVERSION_MAJOR=2 -PYVERSION_MINOR=3 -PYVERSION_PATCH=5 +PYVERSION_MINOR=4 +PYVERSION_PATCH=2 PYVERSION=$(PYVERSION_MAJOR).$(PYVERSION_MINOR).$(PYVERSION_PATCH) W32ALLVERSION=205 ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/python.mk Untested first stab at moving to Python 2.4.2.
Log message for revision 41278: Untested first stab at moving to Python 2.4.2. Changed: U Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/python.mk -=- Modified: Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/python.mk === --- Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/python.mk 2006-01-11 19:20:13 UTC (rev 41277) +++ Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/python.mk 2006-01-11 19:56:27 UTC (rev 41278) @@ -1,65 +1,60 @@ -# The Python and pywin32 versions. For Python, both the source tarball -# and the Windows installer must be in tmp/. For pywin32 (previously known -# as win32all), the Windows installer must be in tmp/. Nothing beyond those -# is required to build Python, and you don't even need a compiler. -PYVERSION_MAJOR=2 -PYVERSION_MINOR=4 -PYVERSION_PATCH=2 -PYVERSION=$(PYVERSION_MAJOR).$(PYVERSION_MINOR).$(PYVERSION_PATCH) -W32ALLVERSION=205 - -# CAUTION: Extracting files from Wise installers doesn't really do what -# you expect. While a Wise installer is a zip file, the zip file -# structure is flat (Wise reconstructs the intended directory structure -# from metadata stored in proprietary FILE.DAT files also in the -# zip file). Consequently, the package structure of Python packages is -# lost, and if there's more than one file with the same name, you only -# get the last one to be extracted (all files are extracted to the -# same directory). +# The Python and pywin32 versions. # -# For Python, this doesn't matter, because we're only sucking out the -# precompiled .pyd and .exe files from the Python installer -- there -# are no name clashes in that set, and it's a pretty safe bet there never -# will be (else Python wouldn't be able to decide which to use!). We -# use the Python source tarball to get all the non-executable parts we -# need. +# For Python, the source tarball must be in tmp/. You must also install the +# appropriate Python on Windows, and set WIN_PYINSTALLEDDIR here to its root +# directory. A copy of the main Python DLL must also be in the root (you +# may need to copy it from your Windows system directory). Earlier versions +# of this extracted .dll, .exe, and .pyd files from Python's Wise installer, +# but Python 2.4 uses an .msi installer, and there doesn't appear to be a +# way to _just_ extract files from one of those. # -# pywin32 doesn't have this problem as it now uses -# a standard distutils 'bdist_wininst' installation .exe. These executables are -# valid .zip files with a PLATLIB directory being the complete directory -# structure as installed into site-packages. These recent pywin32 builds have -# no dependencies on registry settings etc so will work directly as copied out of -# the .exe. The only concerns are the pywintypes/pythoncom dlls, which is -# handled by the Inno installer +# For pywin32 (previously known as win32all), the Windows installer must be +# in tmp/. +# +# Nothing beyond those is required to build Python, and you don't even need +# a compiler. +PYVERSION_MAJOR := 2 +PYVERSION_MINOR := 4 +PYVERSION_PATCH := 2 +W32ALLVERSION := 205 -PYDIRNAME=Python-$(PYVERSION) -# Standard bdist_wininst name - eg: pywin32-203.win32-py2.3[.exe] -W32ALLDIRNAME=pywin32-$(W32ALLVERSION).win32-py$(PYVERSION_MAJOR).$(PYVERSION_MINOR) -W32EXCLUDE=*.chm +PYVERSION := $(PYVERSION_MAJOR).$(PYVERSION_MINOR).$(PYVERSION_PATCH) +PYMAJORMINOR := python$(PYVERSION_MAJOR)$(PYVERSION_MINOR) + +# This is the default directory into which a Python installs. +WIN_PYINSTALLEDDIR := \$(PYMAJORMINOR) + +# pywin32 now uses a standard distutils 'bdist_wininst' installation .exe. +# These executables are valid .zip files with a PLATLIB directory being +# the complete directory structure as installed into site-packages. These +# recent pywin32 builds have no dependencies on registry settings etc so +# will work directly as copied out of the .exe. The only concerns are the +# pywintypes/pythoncom dlls, which are handled by the Inno installer. + +PYDIRNAME := Python-$(PYVERSION) +# Standard bdist_wininst name - eg: pywin32-203.win32-py2.3 +W32ALLDIRNAME := pywin32-$(W32ALLVERSION).win32-py$(PYVERSION_MAJOR).$(PYVERSION_MINOR) +W32EXCLUDE := *.chm + # The Python tarball is extracted to PYSRCDIR. -# The contents of the Python installer get extracted to PYEXTRACTDIR. -# The win32all W32EXTRACTDIR. -PYSRCDIR=$(BASE_DIR)/src/$(PYDIRNAME) -PYEXTRACTDIR=$(BASE_DIR)/src/$(PYDIRNAME)-extract -W32EXTRACTDIR=$(BASE_DIR)/src/$(W32ALLDIRNAME) +# pywin32 is extracted to W32EXTRACTDIR. +PYSRCDIR := $(BASE_DIR)/src/$(PYDIRNAME) +W32EXTRACTDIR := $(BASE_DIR)/src/$(W32ALLDIRNAME) -WIN_PYSRCDIR=$(shell cygpath -w $(PYSRCDIR)) -WIN_PYEXTRACTDIR=$(shell cygpath -w $(PYEXTRACTDIR)) -WIN_W32EXTRACTDIR=$(shell cygpath -w $(W32EXTRACTDIR)) +WIN_PYSRCDIR := $(shell cygpath -w $(PYSRCDIR)) +WIN_W32EXTRACTDIR :=
[Zope-Checkins] SVN: Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/common.mk Use immediate assignment to (greatly) speed the
Log message for revision 41282: Use immediate assignment to (greatly) speed the heavily used utility variables that call out to a shell. Changed: U Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/common.mk -=- Modified: Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/common.mk === --- Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/common.mk 2006-01-11 20:17:37 UTC (rev 41281) +++ Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/common.mk 2006-01-11 20:24:37 UTC (rev 41282) @@ -1,12 +1,13 @@ -BASE_DIR=$(shell pwd) -WIN_BASE_DIR=$(shell cygpath -w $(BASE_DIR)) -BUILD_DIR=$(BASE_DIR)/build -WIN_BUILD_DIR=$(shell cygpath -w $(BUILD_DIR)) -SRC_DIR=$(BASE_DIR)/src -WIN_SRC_DIR=$(shell cygpath -w $(SRC_DIR)) -TMP_DIR=$(BASE_DIR)/tmp -WIN_TMP_DIR=$(shell cygpath -w $(TMP_DIR)) -WIN_MAKEFILEDIR=$(shell cygpath -w $(MAKEFILEDIR)) +# Use immediate assignment to avoid calling out to the shell a zillion times. +BASE_DIR := $(shell pwd) +WIN_BASE_DIR := $(shell cygpath -w $(BASE_DIR)) +BUILD_DIR := $(BASE_DIR)/build +WIN_BUILD_DIR := $(shell cygpath -w $(BUILD_DIR)) +SRC_DIR := $(BASE_DIR)/src +WIN_SRC_DIR := $(shell cygpath -w $(SRC_DIR)) +TMP_DIR := $(BASE_DIR)/tmp +WIN_TMP_DIR := $(shell cygpath -w $(TMP_DIR)) +WIN_MAKEFILEDIR := $(shell cygpath -w $(MAKEFILEDIR)) # Root of the Windows drive you're working on. The setting here is for # the C: drive and using a default out-of-the-box Cygwin. @@ -63,4 +64,4 @@ $(CP) $ $@ unix2dos $@ $(TOUCH) $@ -endef \ No newline at end of file +endef ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/zope.mk Moved version number to top of file.
Log message for revision 41284: Moved version number to top of file. Changed: U Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/zope.mk -=- Modified: Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/zope.mk === --- Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/zope.mk 2006-01-11 20:29:07 UTC (rev 41283) +++ Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/zope.mk 2006-01-11 21:02:46 UTC (rev 41284) @@ -1,3 +1,6 @@ +ZOPEVERSION := 2.9.0 +ZOPEDIRNAME := Zope-$(ZOPEVERSION) + ZOPE_REQUIRED_FILES=tmp/$(ZOPEDIRNAME).tgz REQUIRED_FILES=$(PYTHON_REQUIRED_FILES)\ @@ -3,7 +6,4 @@ $(ZOPE_REQUIRED_FILES) -ZOPEVERSION=2.9.0 -ZOPEDIRNAME=Zope-$(ZOPEVERSION) - MAKEZOPE=$(MAKEFILEDIR)/bin/makezope.bat $(WIN_BUILD_DIR) # run the Zope tests ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-dev] Zope tests: 8 OK
Summary of messages to the zope-tests list. Period Tue Jan 10 12:01:01 2006 UTC to Wed Jan 11 12:01:01 2006 UTC. There were 8 messages: 8 from Zope Unit Tests. Tests passed OK --- Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux From: Zope Unit Tests Date: Tue Jan 10 21:02:46 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-January/003978.html Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Tue Jan 10 21:04:16 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-January/003979.html Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Tue Jan 10 21:05:46 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-January/003980.html Subject: OK : Zope-2_7-branch Python-2.4.2 : Linux From: Zope Unit Tests Date: Tue Jan 10 21:07:16 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-January/003981.html Subject: OK : Zope-2_8-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Tue Jan 10 21:08:46 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-January/003982.html Subject: OK : Zope-2_8-branch Python-2.4.2 : Linux From: Zope Unit Tests Date: Tue Jan 10 21:10:17 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-January/003983.html Subject: OK : Zope-2_9-branch Python-2.4.2 : Linux From: Zope Unit Tests Date: Tue Jan 10 21:11:47 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-January/003984.html Subject: OK : Zope-trunk Python-2.4.2 : Linux From: Zope Unit Tests Date: Tue Jan 10 21:13:17 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-January/003985.html ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] BTreeFolder2.objectIds() - accessing _tree.keys() slow
I have very large BTreeFolder2 (CMFMember via BaseBTreeFolder in Archetypes) - has about 260k items in _tree - objectIds() is painfully slow, as is self._tree.keys() - I've casually observed using the meta type index to get the object ids is many orders of magnitude faster. Hacking objectIds() as follows (diff against trunk pasted inline) - gettting ids off of the meta type index for all used meta types - seems to make things much quicker. Two questions: 1. Can this be considered safe in all cases (I'll code this behavior on a Subclass or in a monkey patch)? 2. If yes to #1, is there an appropriate place to lobby for this to be changed, perhaps in BTreeFolder2 product itself? Index: BTreeFolder2.py === --- BTreeFolder2.py (revision 41285) +++ BTreeFolder2.py (working copy) @@ -341,10 +341,14 @@ # Returns a list of subobject ids of the current object. # If 'spec' is specified, returns objects whose meta_type # matches 'spec'. + +mti = self._mt_index +if spec is None: +spec = mti.keys() + if spec is not None: if isinstance(spec, StringType): spec = [spec] -mti = self._mt_index set = None for meta_type in spec: ids = mti.get(meta_type, None) Thanks, Sean +--+ Sean Upton SignOnSanDiego.com Site Technology Supervisor The San Diego Union-Tribune 619.718.5241 [EMAIL PROTECTED] 350 Camino De La Reina San Diego, CA 92108 Plone Powered! plone.org ++ python.org ++ zope.org +--+ ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] BTreeFolder2.objectIds() - accessing _tree.keys() slow
[EMAIL PROTECTED] wrote: I have very large BTreeFolder2 (CMFMember via BaseBTreeFolder in Archetypes) - has about 260k items in _tree - objectIds() is painfully slow, as is self._tree.keys() - I've casually observed using the meta type index to get the object ids is many orders of magnitude faster. Hacking objectIds() as follows (diff against trunk pasted inline) - gettting ids off of the meta type index for all used meta types - seems to make things much quicker. Two questions: Are you sure this actually works? _mt_index.keys() is supposed to provide a list of all meta_types used in the folder. To get the object ids from it, you'd need something like this: ids = [] for d in self._mt_index.values(): ids.extend(d.keys()) The structure of _mt_index is documented in a comment: _mt_index = None # OOBTree: { meta_type - OIBTree: { id - 1 } } (It's strange that I chose to use an OIBTree instead of an OOTreeSet. Maybe I didn't know about the set support in the BTree module at the time.) Shane ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope] cannot create an external method with zope-2.9.0
when I try to create an external method under 2.9.0 this fails with This is an install method in the Extension directory of the product WAeUP. The product is not broken, and this works under Zope-2.8.2. Traceback (innermost last): Module ZPublisher.Publish, line 113, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 40, in call_object Module Products.ExternalMethod.ExternalMethod, line 59, in manage_addExternalMethod Module Products.ExternalMethod.ExternalMethod, line 111, in __init__ Module Products.ExternalMethod.ExternalMethod, line 134, in manage_edit Module Products.ExternalMethod.ExternalMethod, line 141, in getFunction Module App.Extensions, line 120, in getObject NotFound: The specified module, emWAeUP.install/em, couldn't be found. -- Mit freundlichen GrüßenJoachim Schmitz .. AixtraWare eK ..Joachim Schmitz ..www.aixtraware.de ..t: +49-2464-8851 Hüsgenstr. 33a .d-52457 Aldenhoven .f: +49-2464-905163 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] cannot create an external method with zope-2.9.0
Hi, I have no problems creating external methods in Zope 2.9.0. Can you please confirm that your extensions directory is named Extensions and not Extension? Regards, Patrick. On 1/11/06, Joachim Schmitz [EMAIL PROTECTED] wrote: when I try to create an external method under 2.9.0 this fails with This is an install method in the Extension directory of the product WAeUP. The product is not broken, and this works under Zope-2.8.2. Traceback (innermost last): Module ZPublisher.Publish, line 113, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 40, in call_object Module Products.ExternalMethod.ExternalMethod, line 59, in manage_addExternalMethod Module Products.ExternalMethod.ExternalMethod, line 111, in __init__ Module Products.ExternalMethod.ExternalMethod, line 134, in manage_edit Module Products.ExternalMethod.ExternalMethod, line 141, in getFunction Module App.Extensions, line 120, in getObject NotFound: The specified module, emWAeUP.install/em, couldn't be found. -- Mit freundlichen GrüßenJoachim Schmitz .. AixtraWare eK ..Joachim Schmitz ..www.aixtraware.de ..t: +49-2464-8851 Hüsgenstr. 33a .d-52457 Aldenhoven .f: +49-2464-905163 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] cannot create an external method with zope-2.9.0
Patrick Decat wrote: Hi, I have no problems creating external methods in Zope 2.9.0. Can you please confirm that your extensions directory is named Extensions and not Extension? Yes it is called Extensions, but is in the Product. As I said, the same works with the same Product on the same machine under Zope-2.8.2. Regards, Patrick. On 1/11/06, Joachim Schmitz [EMAIL PROTECTED] wrote: when I try to create an external method under 2.9.0 this fails with This is an install method in the Extension directory of the product WAeUP. The product is not broken, and this works under Zope-2.8.2. Traceback (innermost last): Module ZPublisher.Publish, line 113, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 40, in call_object Module Products.ExternalMethod.ExternalMethod, line 59, in manage_addExternalMethod Module Products.ExternalMethod.ExternalMethod, line 111, in __init__ Module Products.ExternalMethod.ExternalMethod, line 134, in manage_edit Module Products.ExternalMethod.ExternalMethod, line 141, in getFunction Module App.Extensions, line 120, in getObject NotFound: The specified module, emWAeUP.install/em, couldn't be found. -- Mit freundlichen GrüßenJoachim Schmitz .. AixtraWare eK ..Joachim Schmitz ..www.aixtraware.de ..t: +49-2464-8851 Hüsgenstr. 33a .d-52457 Aldenhoven .f: +49-2464-905163 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Mit freundlichen GrüßenJoachim Schmitz .. AixtraWare eK ..Joachim Schmitz ..www.aixtraware.de ..t: +49-2464-8851 Hüsgenstr. 33a .d-52457 Aldenhoven .f: +49-2464-905163 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] cannot create an external method with zope-2.9.0
On 1/11/06, joachim [EMAIL PROTECTED] wrote: Yes it is called Extensions, but is in the Product. As I said, the same works with the same Product on the same machine under Zope-2.8.2. Like you, I put my extensions in my product rather than in the global Extensions directory. Can't see what going on with yours, sorry. Regards, Patrick. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Handling login failures
Hi everyone. I want to be able to block a user from logging in if he fails to give the right login/password three times in a row. The problem is that I don't know how to do this. First, I need to know if an attempt failed. This, I have no idea how to do. Second, I need to block the user without deleting him. One problem here is that the user can write different login names for the different login attempts. We have been thinking about blocking the offender's IP for 30 minutes or so and leave it at that. It seems to me that SiteAccess.AccessRule could be used for that, but I haven't looked much into it yet. The documentation is extremely light. I have a very clean Zope 2.8.4 installation on a SuSE linux machine. Logins are handled in the standard Zope way, nothing special added. The Zope is running as a stand alone server, i.e. no Apache at all. Another thing: How do I get Zope to log failed authentication attempts? Neither event.log or Z2.log shows anything. As Z2.log is the access log, I would have guessed that such things should be logged there. If not, where and how? ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] cannot create an external method with zope-2.9.0
On 1/11/06, Patrick Decat [EMAIL PROTECTED] wrote: Can't see what going on with yours, sorry. Perhaps the external method or the Product itself no longer works on Zope 2.9.0 due to some dependency problem. Did you test a simple hello world style EM on an otherwise empty Product? -- Martijn Pieters ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Handling login failures
Håkan Johansson schrieb: Hi everyone. I want to be able to block a user from logging in if he fails to give the right login/password three times in a row. The problem is that I don't know how to do this. Because it isnt really possible/practicable at all with HTTP. First, I need to know if an attempt failed. This, I have no idea how to do. Second, I need to block the user without deleting him. One problem here is that the user can write different login names for the different login attempts. We have been thinking about blocking the offender's IP for 30 minutes or so and leave it at that. It seems to me that SiteAccess.AccessRule could be used for that, but I haven't looked much into it yet. The documentation is extremely light. And if the offender uses a proxy where your true user is also coming from? I have a very clean Zope 2.8.4 installation on a SuSE linux machine. Logins are handled in the standard Zope way, nothing special added. The Zope is running as a stand alone server, i.e. no Apache at all. Another thing: How do I get Zope to log failed authentication attempts? Neither event.log or Z2.log shows anything. As Z2.log is the access log, I would have guessed that such things should be logged there. If not, where and how? You could log the Unauthorized - but this does not really help. You better use one of the pluggable auth folders (PAS, ExuserFolder etc.) and bend them to your needs - maybe with a small memory pool for the counter/queue of failed login attempts. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] import error
Will attempting to import a zexp file (and exported plone site) I get the following error: 2006-01-11T09:44:03 ERROR(200) SiteError http://127.0.0.1:8180/do2/manage_importObject Traceback (most recent call last): File /home/webenv/zope/lib/python/ZPublisher/Publish.py, line 101, in publish request, bind=1) File /home/webenv/zope/lib/python/ZPublisher/mapply.py, line 88, in mapply if debug is not None: return debug(object,args,context) File /home/webenv/zope/lib/python/ZPublisher/Publish.py, line 39, in call_object result=apply(object,args) # Type scr to step into published object. File /home/webenv/zope/lib/python/OFS/ObjectManager.py, line 532, in manage_importObject raise BadRequest, 'Invalid file name %s' % escape(file) BadRequest: Invalid file name InfoTechnical.zexp Either I'm missing something very simple, or something is very wrong. Any idea what the problem might be? -- David BearWhat's the difference between private knowledge and public knowledge? ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope, Apache, REMOTE_USER
Don't know if this will work for you but since I put Apache in front of Zope I've had to change all REMOTE_USER to HTTP_X_FORWARDED_FOR for use in scripts that used the REMOTE_USER value before. Thomas On Monday 19 December 2005 15:12, Robert Boyd wrote: I'm using Apache 2.0, and I cannot find a solution to passing the value of REMOTE_USER from Apache to Zope when using a rewrite rule. I have Apache rewriting requests for Zope, and hooked into Tomcat with mod_jk. My users login through a servlet, and Apache has REMOTE_USER available to it. But any subsequent request to Zope loses this value. I used to have this all working when using FastCGI, but I'm hoping to use only mod_rewrite. Is it possible? Thanks, Rob -- Thomas McMillan Grant Bennett Appalachian State University Computer Consultant III P O Box University Library Boone, North Carolina 28608 Please use the Systems Help Desk at http://linux.library.appstate.edu/help All in Systems receive an email with each submission. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] import error
David Bear wrote: Will attempting to import a zexp file (and exported plone site) I get the following error: result=apply(object,args) # Type scr to step into published object. File /home/webenv/zope/lib/python/OFS/ObjectManager.py, line 532, in manage_importObject raise BadRequest, 'Invalid file name %s' % escape(file) BadRequest: Invalid file name InfoTechnical.zexp Acording to ObjectManager source this exception is raised because you're suplying a path with a directory component (some/dir/InfoTechnical.zexp) def manage_importObject(self, file, REQUEST=None, set_owner=1): Import an object from a file dirname, file=os.path.split(file) if dirname: raise BadRequestException, 'Invalid file name %s' % escape(file) HTH -- (@ @) oOO(_)OOo-- Ojo por ojo y el mundo acabara ciego /\ Alexis Roda - Universitat Rovira i Virgili - Reus, Tarragona (Spain) --- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie dtml-in question objectValues
Alric Aneron wrote: Hello, I am trying to find how to get the relative path of an object. If i do: dtml-in objectValues('DTML Document') dtml-var URLPATH0 /dtml-in URLPATH0 does not give me the relative path of the objects interated, but rather the path of the object doing the iterating (my method). I want the path of every DTML Document the loop encounters. absolute_url works, but it puts in the undesired filename and http://; in front etc. Ask yourself: where does URLPATH0 come from? When you know that, you will answer your own question. --jcc -- Building Websites with Plone http://plonebook.packtpub.com/ Enfold Systems, LLC http://www.enfoldsystems.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] CPU architecture and Zope
Just reading along... At the OS view, would dual cores balance the Linux overhead on one CPU and python/zope on the other, based on resources required. In other words, would the second core allow python to go faster, not having to deal with the various OS and distro tools (apache, squid, pound, mailman, etc.) overhead items. Does the mechanism governing multiple cores separate/allocate processes by resources needed? ... and does a python/zope process get evaluated as a "heavyweight" process, maybe getting allocated the lion's share of a single core. It seems that the whole world of multiple cores CPUs will be upon us very quickly now. The ZEO Server on one, ZEO Client on the other is a good answer. Just wondering if there are any other advantages of python being the way it is, in the mix. Great discussion for me, thanks, -Jon Alec Mitchell wrote: On 1/9/06, Andreas Jung [EMAIL PROTECTED] wrote: --On 9. Januar 2006 21:38:15 -0800 David H [EMAIL PROTECTED] wrote: Hi list, Im just wondering what the wisdom is about Zope performance and various CPU types. I'm running Zope on Linux (Ubuntu). I notice that Dell is selling a "dual-core" Pentium unit. But I have no idea if something like "dual core" is advantegous to Zope, python execution or one's favorite RDMS. A single Python process also a multi-threaded Python application can never run on multiple CPUs. Multiple CPUs, cores etc. together with Python make only sense when you run multiple Python processes e.g. multiple ZEO clients or ZEO client + ZEO server. For standalone Zope instance dual-core CPU give you nothing. I'm probably stating the obvious here, but a ZEO server + at least one ZEO client is generally advisable at the very least for debugging purposes, in which case dual CPUs/cores can be somewhat helpful (though the zeo server is not terribly processor intesive in my experience). Even with a non-ZEO setup, dual cores could obviously be helpful if you were running other cpu intensive processes like an RDBMS on the same system. Alec ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Jonathan Cyr http://www.cyr.info http://www.weddingweblog.com [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Multiple CookieCrumblers
I am using CookieCrumbler as an authentication method on a Zope site. I am looking at the feasibility of putting multi CookieCrumbler objects (all with the same settings -- except for the cache setting) on a site in order to allow some parts of the site to be cached in an upstream proxy and forbidding others. Is this a reasonable thing to do? Will it achieve the result I am looking for? ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Where oh where is Repozo
Um, Where is the latest version of Repozo, the backup tool, kept? Is there a reason, that it's not included with the Zope install/utilities (at least the 2.7.x I'm using). I confess, I've been stopping my zope, and tar'ing the directories so now I want to clean up my act and use Repozo... and I'm having difficulty finding it in Google, Zope.org. BTW, there is an excellent explanation of Repozo in two places, http://www.zope.org/Wikis/ZODB/FileStorageBackup http://www.plope.com/Members/chrism/repozo but neither have links to a source/repository. It also says here, that repozo is included with Plone, but not with Zope... h I find Zope to be super stable, with zero corruptions of any kind, and no need to ever restore a backup... but lightning may strike, and I've gotten away with poor backup disciplines long enough. A URL would be much appreciated. -Jon -- Jonathan Cyr http://www.cyr.info http://www.weddingweblog.com [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Where oh where is Repozo
And then I found it, and felt really dumb... Many apologies. under ZopeInstallationDirectory/utilities/ZODBTools/reposo.py Many apologies, -Jon Jonathan Cyr wrote: Um, Where is the latest version of Repozo, the backup tool, kept? Is there a reason, that it's not included with the Zope install/utilities (at least the 2.7.x I'm using). I confess, I've been stopping my zope, and tar'ing the directories so now I want to clean up my act and use Repozo... and I'm having difficulty finding it in Google, Zope.org. BTW, there is an excellent explanation of Repozo in two places, http://www.zope.org/Wikis/ZODB/FileStorageBackup http://www.plope.com/Members/chrism/repozo but neither have links to a source/repository. It also says here, that repozo is included with Plone, but not with Zope... h I find Zope to be super stable, with zero corruptions of any kind, and no need to ever restore a backup... but lightning may strike, and I've gotten away with poor backup disciplines long enough. A URL would be much appreciated. -Jon -- Jonathan Cyr http://www.cyr.info http://www.weddingweblog.com [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Where oh where is Repozo
Jonathan Cyr wrote: Um, Where is the latest version of Repozo, the backup tool, kept? Is there a reason, that it's not included with the Zope install/utilities (at least the 2.7.x I'm using). I confess, I've been stopping my zope, and tar'ing the directories so now I want to clean up my act and use Repozo... and I'm having difficulty finding it in Google, Zope.org. BTW, there is an excellent explanation of Repozo in two places, http://www.zope.org/Wikis/ZODB/FileStorageBackup http://www.plope.com/Members/chrism/repozo but neither have links to a source/repository. It also says here, that repozo is included with Plone, but not with Zope... h I find Zope to be super stable, with zero corruptions of any kind, and no need to ever restore a backup... but lightning may strike, and I've gotten away with poor backup disciplines long enough. A URL would be much appreciated. $ locate repozo /home/jccooper/zope/Zope27/bin/repozo.py /home/jccooper/zope/Zope-2.8.3-final/utilities/ZODBTools/manual_tests/testrepozo.py /home/jccooper/zope/Zope-2.8.3-final/utilities/ZODBTools/repozo.py /home/jccooper/zope/Zope-2.8.3-final/build-base/python-2.3/build-scripts/repozo.py /home/jccooper/zope/Zope283/bin/repozo.py Also: http://svn.zope.org/ZODB/trunk/src/scripts/repozo.py?view=log --jcc -- Building Websites with Plone http://plonebook.packtpub.com/ Enfold Systems, LLC http://www.enfoldsystems.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: CPU architecture and Zope
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jonathan Cyr wrote: Just reading along... At the OS view, would dual cores balance the Linux overhead on one CPU and python/zope on the other, based on resources required. In other words, would the second core allow python to go faster, not having to deal with the various OS and distro tools (apache, squid, pound, mailman, etc.) overhead items. Does the mechanism governing multiple cores separate/allocate processes by resources needed? ... and does a python/zope process get evaluated as a heavyweight process, maybe getting allocated the lion's share of a single core. It seems that the whole world of multiple cores CPUs will be upon us very quickly now. The ZEO Server on one, ZEO Client on the other is a good answer. Just wondering if there are any other advantages of python being the way it is, in the mix. Great discussion for me, thanks, The general thumb rule is one appserver process per CPU; running the storage server on the same machine should't increase the CPU load significantly (the storage server is I/O bound, not CPU bound). Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDxZHt+gerLs4ltQ4RAgSrAKDAKMF/nDmWHilYB+cqtX/g12eHFQCgyDUP cDs45Zp3G2m1vNDIZfTN2V4= =qiau -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Where oh where is Repozo
Thanks for the quick response, I noticed that the my WinXP Zope (sandbox) doesn't have it, but my production SuSE Linux does. So the URL is very helpful. Thanks, -Jon J Cameron Cooper wrote: Jonathan Cyr wrote: Um, Where is the latest version of Repozo, the backup tool, kept? Is there a reason, that it's not included with the Zope install/utilities (at least the 2.7.x I'm using). I confess, I've been stopping my zope, and tar'ing the directories so now I want to clean up my act and use Repozo... and I'm having difficulty finding it in Google, Zope.org. BTW, there is an excellent explanation of Repozo in two places, http://www.zope.org/Wikis/ZODB/FileStorageBackup http://www.plope.com/Members/chrism/repozo but neither have links to a source/repository. It also says here, that repozo is included with Plone, but not with Zope... h I find Zope to be super stable, with zero corruptions of any kind, and no need to ever restore a backup... but lightning may strike, and I've gotten away with poor backup disciplines long enough. A URL would be much appreciated. $ locate repozo /home/jccooper/zope/Zope27/bin/repozo.py /home/jccooper/zope/Zope-2.8.3-final/utilities/ZODBTools/manual_tests/testrepozo.py /home/jccooper/zope/Zope-2.8.3-final/utilities/ZODBTools/repozo.py /home/jccooper/zope/Zope-2.8.3-final/build-base/python-2.3/build-scripts/repozo.py /home/jccooper/zope/Zope283/bin/repozo.py Also: http://svn.zope.org/ZODB/trunk/src/scripts/repozo.py?view=log --jcc -- Jonathan Cyr http://www.cyr.info http://www.weddingweblog.com [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Multiple CookieCrumblers
On 11 Jan 2006, at 21:46, Brian Sullivan wrote: I am using CookieCrumbler as an authentication method on a Zope site. I am looking at the feasibility of putting multi CookieCrumbler objects (all with the same settings -- except for the cache setting) on a site in order to allow some parts of the site to be cached in an upstream proxy and forbidding others. Is this a reasonable thing to do? Will it achieve the result I am looking for? I will not do what you expect to do. The first cookie crumbler to do authentication sets the cookie and even if other cookie crumblers get involved they will not just overwrite that cookie because the lifetime setting on their cookie is different. jens ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie dtml-in question objectValues
thats exactly what I need, thank you!David H [EMAIL PROTECTED] wrote:Alric Aneron wrote:Hello, I am trying to find how to get the relative path of an object. If i do: dtml-in "objectValues('DTML Document')" dtml-var URLPATH0 /dtml-inURLPATH0 does not give me the relative path of the objects interated, but rather the path of the object doing the iterating (my method). I want the path of every DTML Document the loop encounters. absolute_url works, but it puts in the undesired filename and "http://" in front etc. Thanks in advance! Al Alric, This is a python example. I dont want to convert to dtml but maybe you do. for o in container.objectValues('DTML Method'): print o.virtual_url_path() return printed Yahoo! Photos Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Multiple CookieCrumblers
On 1/11/06, Jens Vagelpohl [EMAIL PROTECTED] wrote: On 11 Jan 2006, at 21:46, Brian Sullivan wrote: I am using CookieCrumbler as an authentication method on a Zope site. I am looking at the feasibility of putting multi CookieCrumbler objects (all with the same settings -- except for the cache setting) on a site in order to allow some parts of the site to be cached in an upstream proxy and forbidding others. Is this a reasonable thing to do? Will it achieve the result I am looking for? I will not do what you expect to do. The first cookie crumbler to do authentication sets the cookie and even if other cookie crumblers get involved they will not just overwrite that cookie because the lifetime setting on their cookie is different. In some testing I found that the headers (at least the upstream cache setting which is what I was interested in) does seem to be different depending on the first CookieCrumbler to handle the content (I set one in a subdirectory to cache setting 'public' and the main system level one to 'private')- which would seem to imply that higher placed ones recognize the cache header setting and avoid changing it? This seemed to do what I want. If this isn't a strategy for doing what I want to do can anybody thing of one? I have a site that is authenticated using CookieCrumbler. I have a whole bunch of static files/objects, some fairly large isolated in a subfolder on the site. I want the static objects to be cached by upstream proxies, but all other parts of the site not cacheable. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Multiple CookieCrumblers
Brian Sullivan wrote: On 1/11/06, Jens Vagelpohl [EMAIL PROTECTED] wrote: On 11 Jan 2006, at 21:46, Brian Sullivan wrote: I am using CookieCrumbler as an authentication method on a Zope site. I am looking at the feasibility of putting multi CookieCrumbler objects (all with the same settings -- except for the cache setting) on a site in order to allow some parts of the site to be cached in an upstream proxy and forbidding others. Is this a reasonable thing to do? Will it achieve the result I am looking for? I will not do what you expect to do. The first cookie crumbler to do authentication sets the cookie and even if other cookie crumblers get involved they will not just overwrite that cookie because the lifetime setting on their cookie is different. In some testing I found that the headers (at least the upstream cache setting which is what I was interested in) does seem to be different depending on the first CookieCrumbler to handle the content (I set one in a subdirectory to cache setting 'public' and the main system level one to 'private')- which would seem to imply that higher placed ones recognize the cache header setting and avoid changing it? This seemed to do what I want. If this isn't a strategy for doing what I want to do can anybody thing of one? I have a site that is authenticated using CookieCrumbler. I have a whole bunch of static files/objects, some fairly large isolated in a subfolder on the site. I want the static objects to be cached by upstream proxies, but all other parts of the site not cacheable. ___ Brian, Can you explain how you are using this? Does cookie crumbler's cache-control apply to *all* authenticated responses? If so, I didnt realize it was so sweeping (I admit i had assumed it applied to the authentication cookie). Have you, for example, considerered branching to different folders (one with all object caches set to no-cache) based on a user role? Can you give more detail? David Good luck! David Its an interesting idea, to cascade cookie crumblers - you might be able to fake the login_screen ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )