Skip to content

Commit 900981b

Browse files
authored
Fixed deprecation warning as of Python 3.14 in Emoji extension
This is to address Issue #8446 Also: - Added uv.lock to .gitignore to make it easier to test with uv virtual environments using things like a release candidate version of Python
1 parent ed00263 commit 900981b

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,6 @@ tmp
6565
# IDEs & Editors
6666
.idea
6767
*~
68+
69+
# uv Python package manager
70+
uv.lock

material/extensions/emoji.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
from __future__ import annotations
2222

23-
import codecs
2423
import functools
2524
import material
2625
import os
@@ -65,7 +64,7 @@ def to_svg(
6564
# Load icon
6665
@functools.lru_cache(maxsize = None)
6766
def _load(file: str):
68-
with codecs.open(file, encoding = "utf-8") as f:
67+
with open(file, encoding = "utf-8") as f:
6968
return f.read()
7069

7170
# Load twemoji index and add icons

src/extensions/emoji.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
from __future__ import annotations
2222

23-
import codecs
2423
import functools
2524
import material
2625
import os
@@ -65,7 +64,7 @@ def to_svg(
6564
# Load icon
6665
@functools.lru_cache(maxsize = None)
6766
def _load(file: str):
68-
with codecs.open(file, encoding = "utf-8") as f:
67+
with open(file, encoding = "utf-8") as f:
6968
return f.read()
7069

7170
# Load twemoji index and add icons

0 commit comments

Comments
 (0)