python-stringcase
python-stringcase copied to clipboard
alphanumcase : Deprecated regex on Pypi version 1.2.0
The package on pypi is not the same of this repo.
On this repo : https://github.com/okunishinishi/python-stringcase/blob/50fe41d3c9bebf001f24fc49b89fe023b5eba12c/stringcase.py#L245
On pypi :
def alphanumcase(string):
"""Cuts all non-alphanumeric symbols,
i.e. cuts all expect except 0-9, a-z and A-Z.
Args:
string: String to convert.
Returns:
string: String with cutted non-alphanumeric symbols.
"""
# return filter(str.isalnum, str(string))
return re.sub("\W+", "", string)
DeprecationWarning: invalid escape sequence \W : return re.sub("\W+", "", string)
Must be :
return re.sub(r"\W+", "", string)
We need a new release to ship this fix. :-) @okunishinishi is it feasible to do it? 🙏🏼
@okunishinishi Hey, could you please ship this?)