Plone 4-latest buildout

Hi,
I try to upgrade an old 4.3.10 to the latest 4 (4.3.17), but on every run buildout want to download the current Zope 4.0b5 package.
How can I prevent this?

My buildout.cfg (parts of it)

[buildout]
newest = false
allow-hosts = *
allow-picked-versions = true
prefer-final = true
show-picked-versions = true
index = https://pypi.python.org/simple/
find-links =
    https://dist.plone.org/release/4.3-latest/
    https://dist.plone.org/thirdparty/

extends =
    https://dist.plone.org/release/4.3-latest/versions.cfg

This ends in the following error:

Picked: Zope = 4.0b5
Version and requirements information containing zope.pagetemplate:
  [versions] constraint on zope.pagetemplate: 3.6.3
  Requirement of Zope2>=2.12.1: zope.pagetemplate
  Requirement of plone.app.caching: zope.pagetemplate
  Requirement of Products.CMFPlone: zope.pagetemplate
  Requirement of zope.ptresource: zope.pagetemplate
  Requirement of zope.pagetemplate: zope.traversing
  Requirement of zope.pagetemplate: zope.i18nmessageid
  Requirement of zope.pagetemplate: zope.i18n
  Requirement of zope.pagetemplate: zope.tal
  Requirement of zope.pagetemplate: zope.tales
  Requirement of zope.pagetemplate: zope.security[untrustedpython]
  Requirement of zope.pagetemplate: zope.component
  Requirement of zope.pagetemplate: zope.interface
  Requirement of zope.pagetemplate: setuptools
  Requirement of zope.browserpage: zope.pagetemplate
  Requirement of zope.browsermenu: zope.pagetemplate>=3.5
  Requirement of z3c.jbot: zope.pagetemplate
  Requirement of z3c.form: zope.pagetemplate
  Requirement of five.customerize: zope.pagetemplate
  Requirement of grokcore.view>=2.2: zope.pagetemplate
  Requirement of five.grok>=1.0b2: zope.pagetemplate
  Requirement of Zope>=4.0b5: zope.pagetemplate>=4.0.2
While:
  Installing instance1.
Error: The requirement ('zope.pagetemplate>=4.0.2') is not allowed by your [versions] constraint (3.6.3)

In your buildout.cfg there's a line 'allow-picked-versions = true' This means that when buildout needs to download a dependent package, it can pick the latest version available.

It could be that one of those 'floating' package versions that were unpinned have now been upgraded to a newer version that depends on Zope 4 and this sets of the dependency-chain where Zope4 is pulling in other newer versions that collide with pinned listings.

First try to set allow-picked-versions = false and then see which packages are pulled in without a version. Also keep 'show-picked-verisions = true'. That can give you a hint which package is starting this.

Hi,
thank you, but this (allow-picked-versions = false) leads to the next Error (https://github.com/buildout/buildout/issues/236)

Picked: plone.versioncheck = 1.6.7
While:
  Installing.
  Loading extensions.
  Getting distribution for 'plone.versioncheck'

This goes on for the next X packages....

zc.buildout==2.9.5
setuptools==36.5.0

Ok, I found the "bad guy"
Products.LDAPUserFolder >= 3 requires "Zope >= 4.0b5"

Pinned "Products.LDAPUserFolder = 2.27" and everything works fine :slight_smile:

Bingo! The errors you get after settings allow-picked-versions = false, are almost always actual problems with unpinned packages. I don't think the github issue you linked to is related, that was an actual programming error in zc.buildout 2.0 from a few years ago :slight_smile:

If you use an egg cache for multiple projects (or else the 'eggs' directory in the buildout directory itself, it contains installed python packages), you can do a:

grep -Ri --include="requires.txt" "Zope" path-to-eggs-dir/*

on unixy OS'es to quickly find which python package has a depend on this case Zope. What's in the requires.txt of an installed Python egg is distilled from the install_requires section in a setup.py. I guess this will no longer work when we move from eggs to wheels.

Setting up a default.cfg:
https://docs.plone.org/4/en/old-reference-manuals/buildout/defaults.html . (hmm, this is no longer in the Plone 5 docs as far as I can search).

How did you do it?

I just pinned Products.LDAPUserFolder in my versions.cfg

[versions]
Products.LDAPUserFolder = 2.27
2 Likes

Plone Foundation Code of Conduct