Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Future warning - unicode nested set #376

Closed
msoucy opened this issue Nov 16, 2018 · 6 comments · Fixed by #403
Closed

Future warning - unicode nested set #376

msoucy opened this issue Nov 16, 2018 · 6 comments · Fixed by #403

Comments

@msoucy
Copy link

msoucy commented Nov 16, 2018

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
Copy link

ginomempin commented Jan 14, 2019

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

@ghost
Copy link

ghost commented Mar 21, 2019

you can also just write

| \[ .+? \]

@Kronuz It is four months later, how ´bout updating the PyPI package?

@lamby
Copy link

lamby commented Mar 28, 2019

@Kronuz It is four months later, how ´bout updating the PyPI package?

Ping on this? :)

@coridrew
Copy link

coridrew commented Apr 9, 2019

This is blocking me as well

@jmduke
Copy link

jmduke commented Jun 22, 2019

Added a PR to fix this:

#381

@MolotovCherry
Copy link

I had to fix this manually. Oh well, thanks for the fix @jmduke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants