diff --git a/IPython/core/completer.py b/IPython/core/completer.py index 5ba8ea0..f0bbb4e 100644 --- a/IPython/core/completer.py +++ b/IPython/core/completer.py @@ -256,7 +256,7 @@ except ImportError: JEDI_INSTALLED = False -if TYPE_CHECKING or GENERATING_DOCUMENTATION: +if TYPE_CHECKING or GENERATING_DOCUMENTATION and sys.version_info >= (3, 11): from typing import cast from typing_extensions import TypedDict, NotRequired, Protocol, TypeAlias, TypeGuard else: diff --git a/tools/release_helper.sh b/tools/release_helper.sh index d221f55..ebf8098 100644 --- a/tools/release_helper.sh +++ b/tools/release_helper.sh @@ -2,15 +2,6 @@ # when releasing with bash, simple source it to get asked questions. # misc check before starting - -python -c 'import keyring' -python -c 'import twine' -python -c 'import sphinx' -python -c 'import sphinx_rtd_theme' -python -c 'import pytest' -python -c 'import build' - - BLACK=$(tput setaf 1) RED=$(tput setaf 1) GREEN=$(tput setaf 2) @@ -22,6 +13,22 @@ WHITE=$(tput setaf 7) NOR=$(tput sgr0) +echo "Checking all tools are installed..." + +python -c 'import keyring' +python -c 'import twine' +python -c 'import sphinx' +python -c 'import sphinx_rtd_theme' +python -c 'import pytest' +python -c 'import build' +# those are necessary fo building the docs +echo "Checking imports for docs" +python -c 'import numpy' +python -c 'import matplotlib' + + + + echo "Will use $BLUE'$EDITOR'$NOR to edit files when necessary" echo -n "PREV_RELEASE (X.y.z) [$PREV_RELEASE]: " read input