Author Tim.Graham
Recipients Tim.Graham, ezio.melotti, mrabarnett, r.david.murray, rhettinger, serhiy.storchaka
Date 2018-02-05.19:23:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
It might be worth adding part of the problematic regex to the warning message. For Django's tests, I see an error like "FutureWarning: Possible nested set at position 17 return re.compile(res).match". It took some effort to track down the source.

A partial traceback is:
  File "/home/tim/code/django/django/core/management/commands/", line 247, in find_fixtures
    for candidate in glob.iglob(glob.escape(path) + '*'):
  File "/home/tim/code/cpython/Lib/", line 72, in _iglob
    for name in glob_in_dir(dirname, basename, dironly):
  File "/home/tim/code/cpython/Lib/", line 83, in _glob1
    return fnmatch.filter(names, pattern)
  File "/home/tim/code/cpython/Lib/", line 52, in filter
    match = _compile_pattern(pat)
  File "/home/tim/code/cpython/Lib/", line 46, in _compile_pattern
    return re.compile(res).match
  File "/home/tim/code/cpython/Lib/", line 240, in compile
    return _compile(pattern, flags)
  File "/home/tim/code/cpython/Lib/", line 292, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/home/tim/code/cpython/Lib/", line 764, in compile
    p = sre_parse.parse(p, flags)
  File "/home/tim/code/cpython/Lib/", line 930, in parse
    p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
  File "/home/tim/code/cpython/Lib/", line 426, in _parse_sub
    not nested and not items))
  File "/home/tim/code/cpython/Lib/", line 816, in _parse
    p = _parse_sub(source, state, sub_verbose, nested + 1)
  File "/home/tim/code/cpython/Lib/", line 426, in _parse_sub
    not nested and not items))
  File "/home/tim/code/cpython/Lib/", line 524, in _parse
    FutureWarning, stacklevel=nested + 6
FutureWarning: Possible nested set at position 17

As an aside, I'm not sure how to fix the warning in Django. It comes from the test added in where a path like 'tests/fixtures/fixtures/fixture_with[special]chars' is run through glob.escape() which creates 'tests/fixtures/fixtures/fixture_with[[]special]chars'.
Date User Action Args
2018-02-05 19:23:15Tim.Grahamsetrecipients: + Tim.Graham, rhettinger, ezio.melotti, mrabarnett, r.david.murray, serhiy.storchaka
2018-02-05 19:23:15Tim.Grahamsetmessageid: <>
2018-02-05 19:23:15Tim.Grahamlinkissue30349 messages
2018-02-05 19:23:15Tim.Grahamcreate