Skip to content

Cannot import xtuml module #51

@leviathan747

Description

@leviathan747

When importing the 'xtuml' module, the 'tools' module gets imported and there is an exception in the import of that module related to the 'collections.abc' module:

To Reproduce
Steps to reproduce the behavior:

  1. Create a script "test.py" containing a single line "import xtuml"
  2. Run the script: python test.py
  3. See the following output:
Traceback (most recent call last):
  File "/Users/levi/git/plus2json/test2.py", line 1, in <module>
    import xtuml
  File "/Users/levi/.pyenv/versions/3.10.10/lib/python3.10/site-packages/xtuml/__init__.py", line 24, in <module>
    from .tools import IdGenerator
  File "/Users/levi/.pyenv/versions/3.10.10/lib/python3.10/site-packages/xtuml/tools.py", line 131, in <module>
    class OrderedSet(collectionsAbc.MutableSet):
AttributeError: module 'collections' has no attribute 'MutableSet'

Environment (please complete the following information):

  • OS: macOS Ventura
  • Python version: 3.10.10
  • pyxtuml version: 2.3.1

Additional context
I found this python issue: https://bugs.python.org/issue45776.

The problem is that in tools.py, the "collections.abc" module is not being explicitly imported.

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