ckan / ckanext-dcat

CKAN ♥ DCAT
164 stars 142 forks source link

Does not install with python 3.10 #236

Closed GordianDziwis closed 1 year ago

GordianDziwis commented 1 year ago
Obtaining ckanext-dcat from git+https://github.com/ckan/ckanext-dcat.git#egg=ckanext-dcat
  Cloning https://github.com/ckan/ckanext-dcat.git to ./src/ckanext-dcat
  Running command git clone --filter=blob:none --quiet https://github.com/ckan/ckanext-dcat.git /tmp/src/ckanext-dcat
  Resolved https://github.com/ckan/ckanext-dcat.git to commit 618928be5a211babafc45103a72b6aab4642e964
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [39 lines of output]
      Traceback (most recent call last):
        File "/usr/local/lib/python3.10/dist-packages/pytz/lazy.py", line 3, in <module>
          from UserDict import DictMixin
      ModuleNotFoundError: No module named 'UserDict'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/src/ckanext-dcat/setup.py", line 5, in <module>
          setup(
        File "/usr/local/lib/python3.10/dist-packages/setuptools/__init__.py", line 145, in setup
          return distutils.core.setup(**attrs)
        File "/usr/lib/python3.10/distutils/core.py", line 108, in setup
          _setup_distribution = dist = klass(attrs)
        File "/usr/local/lib/python3.10/dist-packages/setuptools/dist.py", line 447, in __init__
          _Distribution.__init__(self, {
        File "/usr/lib/python3.10/distutils/dist.py", line 292, in __init__
          self.finalize_options()
        File "/usr/local/lib/python3.10/dist-packages/setuptools/dist.py", line 740, in finalize_options
          ep(self)
        File "/usr/local/lib/python3.10/dist-packages/setuptools/dist.py", line 747, in _finalize_setup_keywords
          ep.load()(self, ep.name, value)
        File "/usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py", line 2443, in load
          return self.resolve()
        File "/usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py", line 2449, in resolve
          module = __import__(self.module_name, fromlist=['__name__'], level=0)
        File "/usr/local/lib/python3.10/dist-packages/babel/messages/__init__.py", line 12, in <module>
          from babel.messages.catalog import *
        File "/usr/local/lib/python3.10/dist-packages/babel/messages/catalog.py", line 24, in <module>
          from babel.dates import format_datetime
        File "/usr/local/lib/python3.10/dist-packages/babel/dates.py", line 23, in <module>
          import pytz as _pytz
        File "/usr/local/lib/python3.10/dist-packages/pytz/__init__.py", line 32, in <module>
          from pytz.lazy import LazyDict, LazyList, LazySet
        File "/usr/local/lib/python3.10/dist-packages/pytz/lazy.py", line 5, in <module>
          from collections import Mapping as DictMixin
      ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
      [end of output]

The underlying issue is that with python 3.10 the collections API changes. See: https://stackoverflow.com/questions/69381312/in-vs-code-importerror-cannot-import-name-mapping-from-collections

GordianDziwis commented 1 year ago

Now it works