Switch to Python3

Our servers have, in the two years since we last needed to change
statusbot, switched to installing packages with pip for Python 3.x
instead of 2.7. Instead of figuring out how to unfurl that, just
roll forward and embrace the glorious pastfuture.

Update the simplemediawiki version to pull in a prerelease, since
that's the only way to get a version which supports Py3K.

Change-Id: I24100ad2e9d87e20b7fd9ce90399346846529985
This commit is contained in:
Jeremy Stanley 2021-05-30 00:41:57 +00:00
parent e13ba0ca77
commit e8f9ee6e45
3 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
six>=1.7.0
simplemediawiki
simplemediawiki>=1.2.0b2
irc
python-daemon
kitchen

View File

@ -12,8 +12,8 @@ classifier =
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.5
[entry_points]
console_scripts =

View File

@ -47,7 +47,7 @@ access_token_secret=access_token_secret
"""
import argparse
import ConfigParser
import configparser
import daemon
from ib3.auth import SASL
from ib3.connection import SSL
@ -302,7 +302,7 @@ class AlertFile(UpdateInterface):
if not self.path:
return
f, path = tempfile.mkstemp(dir=self.dir)
os.write(f, json.dumps(dict(alert=msg)))
os.write(f, json.dumps(dict(alert=msg)).encode('utf-8'))
os.close(f)
os.chmod(path, 0o644)
os.rename(path, self.path)
@ -491,7 +491,7 @@ class SASLStatusBot(SASL, BaseStatusBot):
def _main(configpath):
config = ConfigParser.RawConfigParser()
config = configparser.RawConfigParser()
config.read(configpath)
setup_logging(config)