Message10275
There's a minor difference between CPython 2.7's sre_compile.py and our patched version:
$ diff Lib/sre_compile.py lib-python/2.7/sre_compile.py
14c14
<
---
> import sre_parse
15a16
> from _sre import MAXREPEAT
27,32d27
< def set(seq):
< s = {}
< for elem in seq:
< s[elem] = 1
< return s
<
308,310d302
< # problems with optimization in Jython, forget about it for now
< return charset
<
353,355c345
< # change this for Jython from 'I', since that will expand to
< # long, and cause needless complexity (or so it seems)
< code = 'i'
---
> code = 'I'
510d499
< import sre_parse
The latter change in the diff is not even used - optimization as a whole for Unicode is skipped. I don't see this as an issue.
Because re contains a cache of compile REs, it's possible there is a chance of reentrancy issues. However my simple stress test running 20 threads for 15 minutes didn't see this issue. We have the same re.py as in CPython 2.7, but there's a possibility that we need to update.
Maybe you can explicitly list REs that this problem arises on? Right now, it works for me. |
|
Date |
User |
Action |
Args |
2015-09-22 18:24:20 | zyasoft | set | messageid: <1442946260.13.0.613317081855.issue2392@psf.upfronthosting.co.za> |
2015-09-22 18:24:20 | zyasoft | set | recipients:
+ zyasoft, public.marvin |
2015-09-22 18:24:20 | zyasoft | link | issue2392 messages |
2015-09-22 18:24:19 | zyasoft | create | |
|