Skip to content

Commit a27887a

Browse files
author
Fidel Ramos
committed
Fix pelican.themes.reflex import
pkg_resources has been deprecated for many Python versions, and is not available since Python 3.12.
1 parent 02d5f0e commit a27887a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pelican/themes/reflex/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
Reflex theme for Pelican static site generator
33
'''
44

5-
from pkg_resources import resource_filename
5+
from importlib.resources import files
66

77

88
def path():
99
'''
1010
Return path to theme templates and assets.
1111
Use this as value for THEME in Pelican settings.
1212
'''
13-
return resource_filename(__name__, '')
13+
return str(files(__name__))

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ classifiers = [
1818
"Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Content Management System",
1919
"Topic :: Text Processing :: Markup :: HTML",
2020
]
21-
requires-python = ">=3.8"
21+
requires-python = ">=3.9"
2222

2323
[project.urls]
2424
Homepage = "https://github.com/haplo/python-theme-reflex"

0 commit comments

Comments
 (0)