Message254092
When compiling a regular expression with groups (subpatterns),
circular references are created.
Here is an example to illustrate the problem:
>>> import gc
>>> import re
>>> gc.disable() # disable garbage collector
>>> gc.collect() # make sure we start with 0
0
>>> re.compile('(a|b)') # compile something with groups
re.compile('(a|b)')
>>> gc.collect() # collects x objects depending on the compiled string
11
To fix the issue a weakref object for p is used. |
|
Date |
User |
Action |
Args |
2015-11-05 08:27:44 | joente | set | recipients:
+ joente |
2015-11-05 08:27:44 | joente | set | messageid: <1446712064.78.0.0396170354874.issue25554@psf.upfronthosting.co.za> |
2015-11-05 08:27:44 | joente | link | issue25554 messages |
2015-11-05 08:27:44 | joente | create | |
|