| 1 | diff -rupN a/pymaging/formats.py b/pymaging/formats.py |
| 2 | |
| 3 | |
| 4 | class FormatRegistry(object): |
| 5 | if self.loaded: |
| 6 | return |
| 7 | with self.write_lock: |
| 8 | - import pkg_resources |
| 9 | - for entry_point in pkg_resources.iter_entry_points('pymaging.formats'): |
| 10 | + from importlib.metadata import entry_points |
| 11 | + for entry_point in entry_points(name='pymaging.formats'): |
| 12 | format = entry_point.load() |
| 13 | self.register(format) |
| 14 | self.loaded = True |