Skip to content

Commit 7cdc107

Browse files
committed
fix ci
1 parent 9e1ee79 commit 7cdc107

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

tox.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ commands =
2525
[testenv:typing]
2626
basepython = python3
2727
deps =
28+
# mypy would error if pytest (or its sub) not found
29+
pytest
2830
mypy==0.910
2931
commands =
3032
mypy --show-error-codes {posargs: w3lib tests}

w3lib/util.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
def str_to_unicode(
77
text: StrOrBytes, encoding: Optional[str] = None, errors: str = "strict"
88
) -> str:
9+
warn(
10+
"The w3lib.utils.str_to_unicode function is deprecated and "
11+
"will be removed in a future release.",
12+
DeprecationWarning,
13+
stacklevel=2,
14+
)
915
if encoding is None:
1016
encoding = "utf-8"
1117
if isinstance(text, bytes):
@@ -64,7 +70,7 @@ def to_bytes(
6470
def to_native_str(
6571
text: StrOrBytes, encoding: Optional[str] = None, errors: str = "strict"
6672
) -> str:
67-
""" Return str representation of `text` """
73+
"""Return str representation of `text`"""
6874
warn(
6975
"The w3lib.utils.to_native_str function is deprecated and "
7076
"will be removed in a future release. Please use "

0 commit comments

Comments
 (0)