Browse Source
bpo-43651: Fix EncodingWarning in lib2to3/pgen2/pgen.py (GH-25127)
pull/25146/head
Inada Naoki
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
Lib/lib2to3/pgen2/pgen.py
|
|
|
@ -12,7 +12,7 @@ class ParserGenerator(object): |
|
|
|
def __init__(self, filename, stream=None): |
|
|
|
close_stream = None |
|
|
|
if stream is None: |
|
|
|
stream = open(filename) |
|
|
|
stream = open(filename, encoding="utf-8") |
|
|
|
close_stream = stream.close |
|
|
|
self.filename = filename |
|
|
|
self.stream = stream |
|
|
|
|