1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
Switch to python3
--- a/lib/github/commands/rest2html
+++ b/lib/github/commands/rest2html
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
rest2html - A small wrapper file for parsing ReST files at GitHub.
@@ -30,12 +30,6 @@
import sys
import os
-# This fixes docutils failing with unicode parameters to CSV-Table. The -S
-# switch and the following 3 lines can be removed after upgrading to python 3.
-if sys.version_info[0] < 3:
- reload(sys)
- sys.setdefaultencoding('utf-8')
-
import site
try:
--- a/lib/github/markups.rb
+++ b/lib/github/markups.rb
@@ -45,7 +45,7 @@
command(
::GitHub::Markups::MARKUP_RST,
- "python2 -S #{Shellwords.escape(File.dirname(__FILE__))}/commands/rest2html",
+ "python3 #{Shellwords.escape(File.dirname(__FILE__))}/commands/rest2html",
/re?st(\.txt)?/,
["reStructuredText"],
"restructuredtext"
|