From a912b213f63d37f4dd72a38a83f90686c7ce19a1 Mon Sep 17 00:00:00 2001 From: Marcel Wilson Date: Sat, 9 Sep 2023 19:48:38 -0500 Subject: [PATCH] removing typing_extensions from package -- https://github.com/ScreenPyHQ/screenpy/issues/96 (#35) --- Makefile | 21 +++++++++++++++++++++ pyproject.toml | 1 - screenpy_selenium/protocols.py | 3 ++- setup.py | 1 - tests/unittest_protocols.py | 3 ++- 5 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..07f1948 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# shortcuts +sync: + poetry install --extras dev_all --sync + +update_lock_only: + poetry update --lock + +update: update_lock_only + poetry install --extras dev_all + +check: + poetry check + +trunk_screenpy: + poetry add screenpy git+ssh://git@github.com:ScreenPyHQ/screenpy.git#trunk + +local_screenpy: + pip uninstall screenpy + pip install -e ~/projects/screenpy + +.PHONY: sync update trunk_screenpy local_screenpy diff --git a/pyproject.toml b/pyproject.toml index fc9bf4b..6ad2c24 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,6 @@ python = "^3.8" screenpy = ">=4.0.2" screenpy_pyotp = ">=4.0.0" selenium = ">=4.1.0" -typing-extensions = ">=4.1.1" importlib_metadata = {version = "*", python = "3.8.*"} # convenience packages for development of screenpy only diff --git a/screenpy_selenium/protocols.py b/screenpy_selenium/protocols.py index c37fdde..4341296 100644 --- a/screenpy_selenium/protocols.py +++ b/screenpy_selenium/protocols.py @@ -2,9 +2,10 @@ Additional protocols for ScreenPy Selenium. """ +from typing import Protocol, runtime_checkable + from screenpy import Actor from selenium.webdriver.common.action_chains import ActionChains -from typing_extensions import Protocol, runtime_checkable @runtime_checkable diff --git a/setup.py b/setup.py index 9d50825..afece6a 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,6 @@ requires = [ "screenpy>=4.0.2", "screenpy_pyotp>=4.0.0", - "typing-extensions>=4.1.1", "selenium>=4.1.0", ] diff --git a/tests/unittest_protocols.py b/tests/unittest_protocols.py index 1981c99..4a0054f 100644 --- a/tests/unittest_protocols.py +++ b/tests/unittest_protocols.py @@ -1,5 +1,6 @@ +from typing import Protocol + from screenpy import Answerable, ErrorKeeper, Forgettable, Performable -from typing_extensions import Protocol from screenpy_selenium import Chainable