summaryrefslogtreecommitdiff
path: root/tools/changelog.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2018-12-18 11:23:58 -0700
committerCharles Harris <charlesr.harris@gmail.com>2018-12-19 12:52:45 -0700
commit8bb395841605948b5003701b8fc2e3bc36f24bde (patch)
tree7efba3fb804f809cbd85230fcc1fcc58d3101cdc /tools/changelog.py
parentf4ddc2b3251d4606cc227761933e991131425416 (diff)
downloadnumpy-8bb395841605948b5003701b8fc2e3bc36f24bde.tar.gz
MAINT: Update changelog.py for Python 3.
- Don't use UTF8Writer in Python 3. - Don't use print() for blank lines. This is left compatible with Python 2 as someone may use it with that version and there is no need to force the change.
Diffstat (limited to 'tools/changelog.py')
-rwxr-xr-xtools/changelog.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/changelog.py b/tools/changelog.py
index 84e046c5f..b135b14e5 100755
--- a/tools/changelog.py
+++ b/tools/changelog.py
@@ -42,8 +42,10 @@ import codecs
from git import Repo
from github import Github
-UTF8Writer = codecs.getwriter('utf8')
-sys.stdout = UTF8Writer(sys.stdout)
+if sys.version_info.major < 3:
+ UTF8Writer = codecs.getwriter('utf8')
+ sys.stdout = UTF8Writer(sys.stdout)
+
this_repo = Repo(os.path.join(os.path.dirname(__file__), ".."))
author_msg =\