dedupeio / dedupe

:id: A python library for accurate and scalable fuzzy matching, record deduplication and entity-resolution.
https://docs.dedupe.io
MIT License
4.15k stars 551 forks source link

Strange import behaviour with Python 3.12.3 during debugging #1192

Closed ArVar closed 5 months ago

ArVar commented 6 months ago

Apperently something has changen with how imports are processed in python when debugging. In datamodel.py the import function iterates throgh all key-value-pairs of the variables in frequency.py on import (!). This leads to an incredible long import time when running in debugger. (VSCode Python Debugger)

I've checked the changelog for python 3.12.x and a lot of other ressources and did not find any hint. Maybe replacing import with importlib.import_module can help.

Has anyone else a similar issue?

ArVar commented 6 months ago

I think, this is adressed here as well: https://github.com/microsoft/debugpy/issues/1496

fgregg commented 5 months ago

looks like it was fixed upstream https://github.com/python/cpython/issues/119118