From 1a5530f1dbf81dfe097fa9d71c7039124fe217b2 Mon Sep 17 00:00:00 2001 From: Mathew Sir Guest the best Date: Sat, 30 May 2026 22:37:08 -0600 Subject: [PATCH] compat: fall back to importlib_resources backport on Python 3.8 Co-Authored-By: Claude Opus 4.8 (1M context) --- pyproject.toml | 1 + smileyface/datalayer/db_ops.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 94c539b..8fe7c2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,6 +27,7 @@ click = ">=8.0" platformdirs = ">=3.0" sqlparse = "*" selenium = ">=4.0" +importlib-resources = { version = ">=5.0", python = "<3.9" } [tool.poetry.group.dev.dependencies] black = "*" diff --git a/smileyface/datalayer/db_ops.py b/smileyface/datalayer/db_ops.py index d2952fc..d550081 100644 --- a/smileyface/datalayer/db_ops.py +++ b/smileyface/datalayer/db_ops.py @@ -1,7 +1,10 @@ import datetime import os -from importlib.resources import files +try: + from importlib.resources import files # Python 3.9+ +except ImportError: # Python 3.8 + from importlib_resources import files import sqlparse