Skip to content

python 3.12: imp is deprecated in favor of importlib #259

@dirks

Description

@dirks

In src/ansiblecmdb/render.py imp is used, which has been deprecated in python 3.4 and removed in python 3.12, see https://docs.python.org/3.12/whatsnew/3.12.html#imp

import imp
[…]
    def _render_py(self, hosts, vars={}):
        module = imp.load_source('r', self.tpl_file)
        return module.render(hosts, vars=vars, tpl_dirs=self.tpl_dirs)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions