Skip to content

refactor(modutils)!: remove all unused code by our main core projects

modutils code is very old and hard to evolved and maintained and it also depends of both imp and pkg_resources which are deprecated old modules that will be removed in the future from the core python libraby.

So starting by removing everything that is not needed is a first step to get ride of those problems.

I've tested all those commit against most test suits of our core projects and everything ended up being green.

This cleanup is based on this analysis:

List of used symbols

  • LazyObject
  • load_module_from_name
  • clean_sys_modules
  • cleanup_sys_modules
  • load_module_from_file
  • modpath_from_file

Internal symbols needed by the used symbols

LazyObject
    load_module_from_name
        load_module_from_modpath
            find_module[imp]
            load_module[imp]
            _is_namespace <- pkg_resources

load_module_from_file
    modpath_from_file (deprecated)
        _canonicalize_path
        _check_init

    load_module_from_modpath
        find_module[imp]
        load_module[imp]
        _is_namespace <- pkg_resources
Edited by Laurent Peuch

Merge request reports

Loading