Plone 4.3.18 + collective.cookiecuttr: install a strange UNKNOWN 1.5.1 egg


this is more a bug report than a question.

With a fresh Plone 4.3.18 install, with just collective.cookiecuttr as new egg in buildout.cfg:

eggs =

running ./bin/buildout leads to:

Getting distribution for 'collective.cookiecuttr'.
warning: no previously-included files matching '*.pyc' found anywhere in distribution
Got collective.cookiecuttr 0.7.6.
Getting distribution for 'collective.z3cform.datagridfield'.
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: install_lib: 'build/lib' does not exist -- no Python modules to install

zip_safe flag not set; analyzing archive contents...
Installing collective.z3cform.datagridfield 1.5.1
Caused installation of a distribution:
with a different project name.
Got None.
Version and requirements information containing collective.z3cform.datagridfield:
  Requirement of collective.cookiecuttr: collective.z3cform.datagridfield
  Installing instance.
Error: There is a version conflict.
We already have: UNKNOWN 1.5.1
but collective.cookiecuttr 0.7.6 requires 'collective.z3cform.datagridfield'.

And indeed a strange UNKNOWN-1.5.1-py2.7.egg is installed.

As a workaround, it is enough to install collective.z3cform.datagridfield (1.3.1 for Plone 4.Ă—) but looks weird anyway.

I think I have sometimes seen this too, and I do have a UNKNOWN-0.0.0-py2.7.egg in my egg cache. The directory structure within that egg is for the backports.configparser package.

So this looks like another problem with the backports namespace. I had a problem with that one earlier this year, in z3c.autoinclude, see issue and PR.
At that time, I was using the Anaconda Python distribution, which has backports installed. Are you maybe using that distribution too? You might be better off with a cleaner Python with less packages pre-installed.

I see a stackoverflow question on backports.configparser too.
And some background info about the backports namespace is on

Anyway, I don't have a clear answer or solution, except the above suggestion to try it with a cleaner Python.

Are you maybe using that distribution too?

I don't think so: my OS is a Mageia 6 Linux box.

You might be better off with a cleaner Python with less packages pre-installed.

I had to make an install with a Python build by the installer because, with the one ship with my Linux distro (2.7.15), I was able to run buildout but not to start Plone.

Sorry, I don't have the skills for all those backports stuff.

Should I open an issue on the collective.cookiecuttr repository?

Agreed, this is tough territory, also for me.

I would not suspect collective.cookiecuttr though, but its dependency collective.z3cform.datagridfield, especially since you say that downgrading this to 1.3.1 helps.

Ah, and I see that this is a hint:

Since version 1.5.0 of this package, its is almost empty, and the configuration is moved to setup.cfg. See this commit.
@jensens, since you made that change, do you have an idea?

@dbitouze, you could try upgrading your setuptools to the latest version, as that may be needed to be able to parse the information from setup.cfg. You might want to upgrade zc.buildout to the latest version while you are at it.

Indeed, collective.z3cform.datagridfield needs a "not-so-recent" (version 30.3, from Dec.2016) of setuptools. All current versions of Plone 5 are pinned to newer setuptools than this. If there is an older version of setuptools used your Python environment has a problem anyway.

But! You are using Plone 4.3.18. Then you can not use the most recent version of collective.z3cform.datagridfield, since it does not support Plone 4 any longer. Pin it to version 1.3.1, Version 1.4+ are Plone 5 only. This version works with the older setuptools version 26.1.1 which is pinned with Plone 4.3.18.

1 Like

OK, I thought it was collective.cookiecuttr which didn't call correctly collective.z3cform.datagridfield.

The version of setuptools and zc.buildout shipped with Plone 4.3.18 are setuptools-27.3.0-py2.7.egg and zc.buildout-2.5.3-py2.7.egg. I didn't find what are the most recent versions that are compatible with Plone 4.3.18.

Yes, that's what I read on the collective.z3cform.datagridfield page.

I found a similar issue with configparser (see The nub (heart) of the issue I believe comes down to this:

[...] configparser 3.7.0 uses declarative config for package metadata. Therefore it requires setuptools 30.4 or later

So, IIUC his "declarative config" is a parallel change to the one in collective.z3cform.datagridfield

So the lesson is.... upgrade setuptools past 30.4 or pin down products that use declarative config (sorry if I'm stating the obvious)