File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Misc/NEWS.d/next/Tools-Demos Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change
1
+ Make redemo work with Python 3.6 and newer versions.
2
+
3
+ In Python 3.6, flags like re.DOTALL became members of an enum.IntFlag so
4
+ usages like ``getattr(re, 'DOTALL') `` are invalid.
5
+
6
+ Also, remove the ``LOCALE `` option since it doesn't work with string
7
+ patterns in Python 3.
8
+
9
+ Patch by Christoph Sarnowski.
Original file line number Diff line number Diff line change @@ -75,15 +75,14 @@ def addoptions(self):
75
75
self .boxes = []
76
76
self .vars = []
77
77
for name in ('IGNORECASE' ,
78
- 'LOCALE' ,
79
78
'MULTILINE' ,
80
79
'DOTALL' ,
81
80
'VERBOSE' ):
82
81
if len (self .boxes ) % 3 == 0 :
83
82
frame = Frame (self .master )
84
83
frame .pack (fill = X )
85
84
self .frames .append (frame )
86
- val = getattr (re , name )
85
+ val = getattr (re , name ). value
87
86
var = IntVar ()
88
87
box = Checkbutton (frame ,
89
88
variable = var , text = name ,
You can’t perform that action at this time.
0 commit comments