Pull requests

#4 Merged
Repository
takluyver
Branch
pep3149
Repository
anthony_tuininga
Branch
default

Fix for finding submodules in PEP 3149 style libraries.

Author
  1. Thomas Kluyver
Reviewers
Description

I ran into a small problem on Python 3.2 - _ImportAllSubmodules found the file {{{lxml/etree.cpython-32mu.so}}}. Since .so is a valid suffix, it tried to import it as {{{lxml.extree.cpython-32mu}}}. I've made it iterate through the suffixes from {{{imp.get_suffixes()}}} in order, which has the more specific suffix first.

I'm guessing that {{{imp.get_suffixes()}}} will always return the suffixes in the order they should be checked - this seems reasonable, as that's its intended use, although the documentation doesn't appear to specifically mention anything about the order.

  • Learn about pull requests

Comments (1)