nielsvanspauwen / pystructurizr

A Python DSL inspired by Structurizr, intended for generating C4 diagrams
MIT License
96 stars 17 forks source link

Upgrade Python version support #10

Open fgmacedo opened 8 months ago

fgmacedo commented 8 months ago

Hi, thanks for this nice project! I'm still playing with the examples, and tried to use Python3.12, got this error:

Since Python3.9, MutableMapping has moved to collections.abc. The issue is on the tornado dependency.

Deprecated since version 3.3, will be removed in version 3.10: Moved Collections Abstract Base Classes to the collections.abc module. For backwards compatibility, they continue to be visible in this module through Python 3.9.

Ref. https://docs.python.org/3.9/library/collections.html

(-c4-py3.12) ❯ pystructurizr dev --view lc4.transport_containerview
Setting up live preview of view lc4.transport_containerview...
Generating diagram...
[...]
  File "/-c4/.venv/lib/python3.12/site-packages/tornado/web.py", line 86, in <module>
    from tornado import httputil
  File "/-c4/.venv/lib/python3.12/site-packages/tornado/httputil.py", line 106, in <module>
    class HTTPHeaders(collections.MutableMapping):
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'collections' has no attribute 'MutableMapping'
[...]
Pvandreev commented 2 months ago

Hi! Same issue here, upvoting!

Jakeroid commented 2 weeks ago

@nielsvanspauwen

Would you review and merge a pull request if someone made it? I mean, maybe you aren't interested in developing it.