Skip to content

Dependency issue on Python 3.8 (should be fixed on Python 3.9+) #23

@zbisch

Description

@zbisch

I ran into an error while trying to install/setup pyipmeta on a machine that had Python 3.8 (Ubuntu 20.04 LTS). It looks like there is an incompatibility in one of pyipmeta's dependencies that relies on features supported in Python 3.9+. My suggestion with this issue is just to note that Python 3.9+ is a requirement in pyipmeta's README (under prerequisites).

Based on the error below, it looks like the issue is the result of keystoneauth1 using built-in types like list, dict, and tuple directly in type hints, which Google tells me is not supported prior to Python 3.9. I switched to Python 3.13 and that resolved the issue for me.

Admittedly, Ubuntu 20.04 LTS is EoL this May but other OSes (e.g., RHEL 8) have longer support and ship with Python 3.6, which likely have a similar issue.

Error:

Python 3.8.10 (default, Mar 11 2025, 17:45:31)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyipmeta
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/zachary/pyipmeta-3.2.1/pyipmeta/__init__.py", line 1, in <module>
    from .pyipmeta import *
  File "/home/zachary/pyipmeta-3.2.1/pyipmeta/pyipmeta.py", line 28, in <module>
    from . import dbidx
  File "/home/zachary/pyipmeta-3.2.1/pyipmeta/dbidx.py", line 31, in <module>
    from swiftclient.service import SwiftService, SwiftError
  File "/home/zachary/.local/lib/python3.8/site-packages/python_swiftclient-4.7.0-py3.8.egg/swiftclient/__init__.py", line 19, in <module>
    from .client import *  # noqa
  File "/home/zachary/.local/lib/python3.8/site-packages/python_swiftclient-4.7.0-py3.8.egg/swiftclient/client.py", line 54, in <module>
    from keystoneclient import exceptions as ksexceptions
  File "<frozen importlib._bootstrap>", line 1039, in _handle_fromlist
  File "/home/zachary/.local/lib/python3.8/site-packages/python_keystoneclient-5.6.0-py3.8.egg/keystoneclient/__init__.py", line 72, in __getattr__
    return importlib.import_module('keystoneclient.%s' % name)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/zachary/.local/lib/python3.8/site-packages/python_keystoneclient-5.6.0-py3.8.egg/keystoneclient/exceptions.py", line 17, in <module>
    from keystoneauth1 import exceptions as _exc
  File "/home/zachary/.local/lib/python3.8/site-packages/keystoneauth1-5.10.0-py3.8.egg/keystoneauth1/exceptions/__init__.py", line 19, in <module>
    from keystoneauth1.exceptions.discovery import *  # noqa
  File "/home/zachary/.local/lib/python3.8/site-packages/keystoneauth1-5.10.0-py3.8.egg/keystoneauth1/exceptions/discovery.py", line 30, in <module>
    _PARSED_VERSION_T = tuple[ty.Union[int, float], ...]
TypeError: 'type' object is not subscriptable```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions