EnviDat / ckanext-composite

Extension for structured metadata fields based on ckanext-scheming and ckanext-repeating
GNU Affero General Public License v3.0
5 stars 20 forks source link

Incompatible with CKAN <2.9 #12

Closed cuducos closed 3 years ago

cuducos commented 3 years ago

Depending on ckan.lib.webassets_tools.add_public_path makes ckanext-composite compatible with CKAN 2.9, but breaks compatibility with CKAN 2.8:

ImportError: No module named webassets_tools
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
    return context.create()
  File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
    return self.object_type.invoke(self)
  File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
    return fix_call(context.object, context.global_conf, **context.local_conf)
  File "/usr/lib/python2.7/site-packages/paste/deploy/util.py", line 55, in fix_call
    val = callable(*args, **kw)
  File "/srv/app/src/ckan/ckan/config/middleware/__init__.py", line 55, in make_app
    load_environment(conf, app_conf)
  File "/srv/app/src/ckan/ckan/config/environment.py", line 112, in load_environment
    p.load_all()
  File "/srv/app/src/ckan/ckan/plugins/core.py", line 140, in load_all
    load(*plugins)
  File "/srv/app/src/ckan/ckan/plugins/core.py", line 154, in load
    service = _get_service(plugin)
  File "/srv/app/src/ckan/ckan/plugins/core.py", line 256, in _get_service
    return plugin.load()(name=plugin_name)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/srv/app/src/ckanext-composite/ckanext/composite/plugin.py", line 3, in <module>
    from ckan.lib.webassets_tools import add_public_path

https://github.com/EnviDat/ckanext-composite/blob/afce956a8da095e10646cf041375c8cc24bd92d6/ckanext/composite/plugin.py#L3

Is this intended? Should we have a tag with the latest version compatible with 2.8? Should we add something to the docs?

espona commented 3 years ago

We can not support backwards compatibility, there is a 2.8 branch in case you are interested. We have limited resources to maintain this extension, I hope you find a workaround.

cuducos commented 3 years ago

there is a 2.8 branch in case you are interested

Sounds good. Shouldn't it be in the docs (README.md)? I mean… if it was, probably I wouldn't have opened this issue. I can open a PR if this is interesting for the project : )

espona commented 3 years ago

I added a comment in the README, thanks for pointing it out. Feel free to contribute, for us is enough with the CKAN 2.9 support.

cuducos commented 3 years ago

Closed by e7c01d2bd33a7b4a5a7de26cc831f6e0cce87a21