File tree 4 files changed +7
-8
lines changed
4 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
- ## Work in progress
1
+ ## 8.0.3
2
+
3
+ - Drop compatibility for unsupported Python Version (@Viicos - thx)
4
+ - Fix pattern types.
2
5
3
6
## 8.0.2
4
7
Original file line number Diff line number Diff line change 1
- from __future__ import absolute_import , annotations , print_function
1
+ from __future__ import annotations
2
2
3
3
import argparse
4
4
import sys
Original file line number Diff line number Diff line change 5
5
__url__ = 'https://github.com/un33k/python-slugify'
6
6
__license__ = 'MIT'
7
7
__copyright__ = 'Copyright 2022 Val Neekman @ Neekware Inc.'
8
- __version__ = '8.0.2 '
8
+ __version__ = '8.0.3 '
Original file line number Diff line number Diff line change 1
1
from __future__ import annotations
2
2
3
3
import re
4
- import sys
5
4
import unicodedata
6
5
from collections .abc import Iterable
7
6
from html .entities import name2codepoint
@@ -83,7 +82,7 @@ def slugify(
83
82
separator : str = DEFAULT_SEPARATOR ,
84
83
save_order : bool = False ,
85
84
stopwords : Iterable [str ] = (),
86
- regex_pattern : str | None = None ,
85
+ regex_pattern : re . Pattern [ str ] | str | None = None ,
87
86
lowercase : bool = True ,
88
87
replacements : Iterable [Iterable [str ]] = (),
89
88
allow_unicode : bool = False ,
@@ -153,9 +152,6 @@ def slugify(
153
152
else :
154
153
text = unicodedata .normalize ('NFKD' , text )
155
154
156
- if sys .version_info < (3 ,):
157
- text = text .encode ('ascii' , 'ignore' )
158
-
159
155
# make the text lowercase (optional)
160
156
if lowercase :
161
157
text = text .lower ()
You can’t perform that action at this time.
0 commit comments