Skip to content

Commit

Permalink
Drop support for Python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Aug 31, 2024
1 parent e2d558b commit 4f5b26e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ 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",
"License :: OSI Approved :: ISC License (ISCL)",
"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",
Expand Down
15 changes: 4 additions & 11 deletions src/em_keyboard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 4f5b26e

Please sign in to comment.