[pytest-dev] pyi stubs (PEP 561/ PEP-484) for pytest

Bruno Oliveira nicoddemus at gmail.com
Wed Nov 14 05:48:29 EST 2018


Hi Ilya,

On Tue, Nov 13, 2018 at 8:19 PM Ilya Kazakevich <
ilya.kazakevich at jetbrains.com> wrote:

>
> My name is Ilya, I develop pytest integration in PyCharm IDE.
>

That's great! I use PyCharm daily and it is an awesome IDE, thanks for all
the work.


> We can create this package by ourselves (physically we create pytest-subs
> package on pypi,
> see PEP-561) but at least we need approvement from pytest devs, and any
> contributions
> are welcome)
>

I've read PEP-561 and I like the idea of providing .pyi files with pytest
itself: having them closer to the code they are in sync with the API, and I
think the maintenance would be negligible once the first work is in place
as we don't change the API often.

One subject in particular is not very clear to me from reading PEP-561:
pytest is distributed both as a package (`_pytest`) and a module
(`pytest.py`, which exposes the API selectively from `_pytest`). PEP-561
only makes provisions for package-distributed libraries. Anybody know how
would could distribute the .pyi files following pytest's source layout?

So from my POV, if somebody wants to provide the initial .pyi files and
setup, it is easy to maintain them within pytest itself (and it can be
dropped in favor of type hints once Python 2 is dropped), so we definitely
should accept a PR in that regard IMHO.

Cheers,
Bruno.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20181114/854dc5ff/attachment.html>


More information about the pytest-dev mailing list