Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita5f9d24

Browse files
miss-islingtonberkerpeksag
authored andcommitted
bpo-30722: Make redemo work with Python 3.6+ (GH-2311)
(cherry picked from commit62adc55)
1 parent6e45d7b commita5f9d24

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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.

‎Tools/demo/redemo.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,14 @@ def addoptions(self):
7575
self.boxes= []
7676
self.vars= []
7777
fornamein ('IGNORECASE',
78-
'LOCALE',
7978
'MULTILINE',
8079
'DOTALL',
8180
'VERBOSE'):
8281
iflen(self.boxes)%3==0:
8382
frame=Frame(self.master)
8483
frame.pack(fill=X)
8584
self.frames.append(frame)
86-
val=getattr(re,name)
85+
val=getattr(re,name).value
8786
var=IntVar()
8887
box=Checkbutton(frame,
8988
variable=var,text=name,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp