From f8be4f8fc747772d9639fdbb6e84ddbcfb61593a Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Thu, 24 Sep 2020 09:33:21 -0700 Subject: adding a _typing module this is a place that *must* only be imported inside a if typing.TYPE_CHECKING block. It is a mixture of smoothing over thinigs that moved from typing_extensions to typing in later python versions and useful but typing only code. This makes typing_extensions required for python versions older than 3.8 *when running mypy*. typing_extensions should *only* be imported inside an `if typing.TYPE_CHECKING` block (include the new _typing.py module) to ensure that it doesn't become a runtime dependency --- setup.cfg | 3 +++ 1 file changed, 3 insertions(+) (limited to 'setup.cfg') diff --git a/setup.cfg b/setup.cfg index 2ce0c4a40..7c49b71c6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -43,6 +43,9 @@ console_scripts = [options.extras_require] progress = tqdm +typing = + mypy + typing_extensions; python_version <"3.8" [options.packages.find] include = mesonbuild, mesonbuild.* -- cgit v1.2.3