File tree Expand file tree Collapse file tree 4 files changed +7
-8
lines changed
Expand file tree Collapse file tree 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.
25
36## 8.0.2
47
Original file line number Diff line number Diff line change 1- from __future__ import absolute_import , annotations , print_function
1+ from __future__ import annotations
22
33import argparse
44import sys
Original file line number Diff line number Diff line change 55__url__ = 'https://github.com/un33k/python-slugify'
66__license__ = 'MIT'
77__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 11from __future__ import annotations
22
33import re
4- import sys
54import unicodedata
65from collections .abc import Iterable
76from html .entities import name2codepoint
@@ -83,7 +82,7 @@ def slugify(
8382 separator : str = DEFAULT_SEPARATOR ,
8483 save_order : bool = False ,
8584 stopwords : Iterable [str ] = (),
86- regex_pattern : str | None = None ,
85+ regex_pattern : re . Pattern [ str ] | str | None = None ,
8786 lowercase : bool = True ,
8887 replacements : Iterable [Iterable [str ]] = (),
8988 allow_unicode : bool = False ,
@@ -153,9 +152,6 @@ def slugify(
153152 else :
154153 text = unicodedata .normalize ('NFKD' , text )
155154
156- if sys .version_info < (3 ,):
157- text = text .encode ('ascii' , 'ignore' )
158-
159155 # make the text lowercase (optional)
160156 if lowercase :
161157 text = text .lower ()
You can’t perform that action at this time.
0 commit comments