From db051a192af5a6b54725639cf7d131a8e53d53d9 Mon Sep 17 00:00:00 2001 From: James Gerity Date: Fri, 14 Jul 2023 22:54:55 -0400 Subject: [PATCH 1/2] docs: add docstring to library root module --- sopel/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sopel/__init__.py b/sopel/__init__.py index d35d10759..4781fd050 100644 --- a/sopel/__init__.py +++ b/sopel/__init__.py @@ -1,3 +1,8 @@ +""" +Sopel is a simple, easy-to-use, open-source IRC utility bot, written in Python. + +It’s designed to be easy to use, easy to run, and easy to extend. +""" # ASCII ONLY IN THIS FILE THOUGH!!!!!!! # Python does some stupid bullshit of respecting LC_ALL over the encoding on the # file, so in order to undo Python's ridiculous fucking idiocy, we have to have From 393a22d506f1d6614ad86955eba09b01560f3bf8 Mon Sep 17 00:00:00 2001 From: James Gerity Date: Sat, 15 Jul 2023 13:00:19 -0400 Subject: [PATCH 2/2] docs: remove outdated remarks about LC_ALL --- sopel/__init__.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sopel/__init__.py b/sopel/__init__.py index 4781fd050..3c540d416 100644 --- a/sopel/__init__.py +++ b/sopel/__init__.py @@ -3,11 +3,7 @@ It’s designed to be easy to use, easy to run, and easy to extend. """ -# ASCII ONLY IN THIS FILE THOUGH!!!!!!! -# Python does some stupid bullshit of respecting LC_ALL over the encoding on the -# file, so in order to undo Python's ridiculous fucking idiocy, we have to have -# our own check. - +# # Copyright 2008, Sean B. Palmer, inamidst.com # Copyright 2012, Elsie Powell, http://embolalia.com # Copyright 2012, Elad Alfassa @@ -42,9 +38,8 @@ loc = locale.getlocale() if not loc[1] or ('UTF-8' not in loc[1] and 'utf8' not in loc[1]): - print('WARNING!!! You are running with a non-UTF8 locale environment ' - 'variable (e.g. LC_ALL is set to "C"), which makes Python 3 do ' - 'stupid things. If you get strange errors, please set it to ' + print('Warning: Running with a non-UTF8 locale. If you see strange ' + 'encoding errors, try setting the LC_ALL environment variable to ' 'something like "en_US.UTF-8".', file=sys.stderr)