If we want to distribute type information the right way and for the
tools to pick it up we need to follow PEP 561 and include a file named
py.typed. Unfortunately there's no way to include the file with
module-only distributions[1]:
This PEP does not support distributing typing information as part of
module-only distributions. The code should be refactored into
a package-based distribution and indicate that the package supports
typing as described above.
Therefore we need to have a package first - this is what this commit
does.
[1] https://www.python.org/dev/peps/pep-0561/#packaging-type-information
provider provides (all puns intended) a more compact way to do what
provider + inject used to. It infers the interface to provide based on
decorated method's return type annotations therefore cooperating nicely
with type hints[1] and tools that use them.
Some source files are no longer fed to py.test because they contain
Python 3+ only syntax.
[1] https://docs.python.org/3/library/typing.html