Skip to content

Commit 0ad2080

Browse files
committed
Fix failing re tests
1 parent 064c386 commit 0ad2080

File tree

1 file changed

+2
-1
lines changed
  • Src/IronPython.Modules

1 file changed

+2
-1
lines changed

Src/IronPython.Modules/re.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ public class Pattern : IWeakReferenceable {
167167
internal Pattern(CodeContext/*!*/ context, object pattern, ReFlags flags = 0, bool compiled = false) {
168168
_prePattern = PreParseRegex(context, PatternAsString(pattern, ref flags), verbose: flags.HasFlag(ReFlags.VERBOSE), isBytes: !flags.HasFlag(ReFlags.UNICODE), out ReFlags options);
169169
flags |= options;
170-
if (flags.HasFlag(ReFlags.UNICODE | ReFlags.LOCALE)) throw PythonOps.ValueError("cannot use LOCALE flag with a str pattern");
170+
// TODO: re-enable in 3.6
171+
// if (flags.HasFlag(ReFlags.UNICODE | ReFlags.LOCALE)) throw PythonOps.ValueError("cannot use LOCALE flag with a str pattern");
171172
if (flags.HasFlag(ReFlags.ASCII | ReFlags.LOCALE)) throw PythonOps.ValueError("ASCII and LOCALE flags are incompatible");
172173
_re = GenRegex(context, _prePattern, flags, compiled, false);
173174
this.pattern = pattern;

0 commit comments

Comments
 (0)