eyalev / print-dict

Pretty-print Python dictionary
6 stars 0 forks source link

`print-dict` is not compatible with Python 3.13 #3

Open m472 opened 1 day ago

m472 commented 1 day ago

Installing print_dict under Python 3.13 leads to the following error:

Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    import print_dict
  File "/home/matz/.conda/envs/python313/lib/python3.13/site-packages/print_dict/__init__.py", line 2, in <module>
    from .print_dict import print_dict, pd, format_dict
  File "/home/matz/.conda/envs/python313/lib/python3.13/site-packages/print_dict/print_dict.py", line 8, in <module>
    from yapf.yapflib.yapf_api import FormatCode
  File "/home/matz/.conda/envs/python313/lib/python3.13/site-packages/yapf/__init__.py", line 35, in <module>
    from lib2to3.pgen2 import tokenize
ModuleNotFoundError: No module named 'lib2to3'

This is because the standard library module lib2to3 was removed in Python 3.13 but is required by yapf version 30.

m472 commented 1 day ago

overwriting the yapf version in the requirements using pip install --upgrade yapf seems to solve the issue