Skip to content

Commit 2fb5ac2

Browse files
committed
Always read python source using UTF-8
1 parent 0749004 commit 2fb5ac2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
Release History
33
---------------
44

5+
2.2.1
6+
- Python source is now always read using utf-8, even if default encoding is set
7+
otherwise.
8+
59
2.2.0
610

711
- Added `--skip-incompatible` flag to `pip-extra-reqs`, which makes it ignore

pip_check_reqs/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def find_imported_modules(options):
119119
log.info('ignoring: %s', os.path.relpath(filename))
120120
continue
121121
log.debug('scanning: %s', os.path.relpath(filename))
122-
with open(filename) as f:
122+
with open(filename, encoding='utf-8') as f:
123123
content = f.read()
124124
vis.set_location(filename)
125125
vis.visit(ast.parse(content))

0 commit comments

Comments
 (0)