Searched hist:9737 (Results 1 - 1 of 1) sorted by relevance

/gem5/src/python/
H A Dimporter.pydiff 9737:cc3b8601f582 Mon Jun 03 07:51:00 EDT 2013 Andreas Sandberg <andreas@sandberg.pp.se> base: Make the Python module loader PEP302 compliant

The custom Python loader didn't comply with PEP302 for two reasons:

* Previously, we would overwrite old modules on name
conflicts. PEP302 explicitly states that: "If there is an existing
module object named 'fullname' in sys.modules, the loader must use
that existing module".

* The "__package__" attribute wasn't set. PEP302: "The __package__
attribute must be set."

This changeset addresses both of these issues.

Completed in 6 milliseconds