Future warning - unicode nested set
msoucy opened this issue · 6 comments
msoucy commented
Python 3.7.1 (default, Nov 5 2018, 14:07:04)
[GCC 8.2.1 20181011 (Red Hat 8.2.1-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from scss import Compiler
/home/msoucy/Code/project/.venv/lib/python3.7/site-packages/scss/selector.py:54: FutureWarning: Possible nested set at position 329
''', re.VERBOSE | re.MULTILINE)
The fix is introduced in the 3.7 release notes, though I wasn't exactly sure which part of that large regex was the problematic area.
ginomempin commented
I got the error to go away by escaping one of the [
in selector.py:
BEFORE:
# Square brackets are attribute tests
# TODO: this doesn't handle ] within a string
| [[] .+? []]
AFTER (escape the 2nd [
):
# Square brackets are attribute tests
# TODO: this doesn't handle ] within a string
| [\[] .+? []]
Python 3.7.2
pyScss==1.3.5
Deleted user commented
you can also just write
| \[ .+? \]
@Kronuz It is four months later, how ´bout updating the PyPI package?
lamby commented
@Kronuz It is four months later, how ´bout updating the PyPI package?
Ping on this? :)
coridrew commented
This is blocking me as well
MolotovCherry commented
I had to fix this manually. Oh well, thanks for the fix @jmduke