Skip to content

Python import paths

Mattias Ellert requested to merge ellert/HepMC3:python-import-paths into master

Use explicit relative imports in init.py files.

Implicit relative imports are not allowed in Python 3.

Update the python tests to use simpler import paths.

This works after fixing the relative imports in the init.py files.

The complicated long import paths still work - backward compatible change. Existing python scripts don't have to be rewritten.

The egg-info file name should match the name used to import the class.

Merge request reports