Stop adding the directory of every .capnp file to the import path. If a .capnp file wants to import a file in its own directory, it should use a relative import. Fixes #278
Stop using /usr/include/capnp as an import path. This is incorrect. It should only be /usr/include. People that want to import, for example, rpc.capnp should do import capnp.rpc_capnp instead of import rpc_capnp. This fixes another bug similar to #278.
Stop allowing additional paths to be specified for magic imports. This leads to inconsistencies. More specifically, the way that a nested import like ma.mb.mc_capnp gets imported by python, is to first import ma, then import ma.mb, and finally ma.mb.mc_capnp. Pycapnp's magic importing is only involved in the last step. So any additional paths specified don't work for nested imports. It is very confusing to only have this for non-nested imports. Users with folder layouts that don't follow pythons import paths can still use capnp.load(.., .., imports=[blah]).
Possibly this is also a fix for #279 but I cannot verify that.
rpc.capnp
should doimport capnp.rpc_capnp
instead ofimport rpc_capnp
. This fixes another bug similar to #278.ma.mb.mc_capnp
gets imported by python, is to first importma
, then importma.mb
, and finallyma.mb.mc_capnp
. Pycapnp's magic importing is only involved in the last step. So any additional paths specified don't work for nested imports. It is very confusing to only have this for non-nested imports. Users with folder layouts that don't follow pythons import paths can still usecapnp.load(.., .., imports=[blah])
.Possibly this is also a fix for #279 but I cannot verify that.