Polyconseil / zbarlight

A simple wrapper for zbar
BSD 3-Clause "New" or "Revised" License
163 stars 37 forks source link

Fails with python 3.12: AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'? #39

Open KIC opened 4 months ago

KIC commented 4 months ago

Since Python 3.12. removed the long-deprecated pkgutil.ImpImporter class any import zbarlight fails with:

    import zbarlight
  File "/env/lib/python3.12/site-packages/zbarlight/__init__.py", line 3, in <module>
    import pkg_resources
  File "/env/lib/python3.12/site-packages/pkg_resources/__init__.py", line 2191, in <module>
    register_finder(pkgutil.ImpImporter, find_on_path)
                    ^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?