diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3532410..144d8dd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["pypy3.10", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["pypy3.10", "3.9", "3.10", "3.11", "3.12", "3.13"] os: [windows-latest, macos-latest, ubuntu-latest] steps: diff --git a/pyproject.toml b/pyproject.toml index 05ee356..b2ee935 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ keywords = [ license = { text = "ISC" } maintainers = [ { name = "Hugo van Kemenade" } ] authors = [ { name = "Kenneth Reitz", email = "me@kennethreitz.org" } ] -requires-python = ">=3.8" +requires-python = ">=3.9" classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", @@ -26,7 +26,6 @@ classifiers = [ "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", diff --git a/src/em_keyboard/__init__.py b/src/em_keyboard/__init__.py index 52d15b4..9cf1a6a 100644 --- a/src/em_keyboard/__init__.py +++ b/src/em_keyboard/__init__.py @@ -35,21 +35,14 @@ __version__ = _version.__version__ -try: - from importlib.resources import as_file, files - - with as_file(files("em_keyboard").joinpath("emojis.json")) as em_json: - EMOJI_PATH = em_json -except ImportError: - from importlib.resources import path +from importlib.resources import as_file, files - with path("em_keyboard", "emojis.json") as em_json: - EMOJI_PATH = em_json +with as_file(files("em_keyboard").joinpath("emojis.json")) as em_json: + EMOJI_PATH = em_json CUSTOM_EMOJI_PATH = os.path.join(os.path.expanduser("~/.emojis.json")) -# TODO Remove quotes when dropping Python 3.8 -EmojiDict = "dict[str, list[str]]" +EmojiDict = dict[str, list[str]] def parse_emojis(filename: str | os.PathLike[str] = EMOJI_PATH) -> EmojiDict: diff --git a/tox.ini b/tox.ini index 52d9bb9..2952a6e 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ requires = env_list = cli lint - py{py3, 313, 312, 311, 310, 39, 38} + py{py3, 313, 312, 311, 310, 39} [testenv] extras =