From fbc96663a890035a1c59c26552bf908dfa5cf71c Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Mon, 16 Jul 2018 03:40:03 +0000 Subject: [PATCH 01/16] Clean up tox.ini Remove an unused testenv:venv definition from tox.ini, and clean up an unneeded ignore for .venv when running flake8. --- tox.ini | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index dce2bef..05e10ac 100644 --- a/tox.ini +++ b/tox.ini @@ -43,9 +43,6 @@ commands = mudpy_selftest etc/mudpy.yaml [testenv:yamllint] commands = yamllint {posargs} . -[testenv:venv] -commands = {posargs} - [flake8] show-source = True -exclude=.venv,.git,.tox,*lib/python*,*egg,build +exclude=.git,.tox,*lib/python*,*egg,build -- 2.11.0 From 32e83bf3ce8d6abaddd5e3b953551727287246c9 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Tue, 17 Jul 2018 23:17:07 +0000 Subject: [PATCH 02/16] Add signed artifact URL to Python package metadata As PyPI doesn't support serving detached signatures for sdist and wheel packages, but we provide some, link the URL to our copies in the package metadata so that it appears in the links on the PyPI project page. --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index f1e1f2b..87801ab 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,6 +17,7 @@ project_urls = Documentation = https://mudpy.org/docs/mudpy/ Git Clone URL = https://mudpy.org/code/mudpy/ License Texts = https://mudpy.org/license/ + Release Files = https://mudpy.org/dist/mudpy/ keywords = mud game telnet license = ISC License (ISCL) license_file = LICENSE -- 2.11.0 From d3af29d32745151a94bfac7a05bcf704cdb58484 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Tue, 17 Jul 2018 23:51:14 +0000 Subject: [PATCH 03/16] Drop Python 3.3 support Since wheel 0.30 and later no longer works with Python 3.3, it's increasingly hard to test. Very few old platforms are likely to lack Python 3.4 or later so this is a relatively safe move. Also clean up some 3.3 workarounds as they're no longer needed if we don't support running on it. --- README | 2 +- mudpy/__init__.py | 8 +------- mudpy/daemon.py | 7 +------ setup.cfg | 1 - 4 files changed, 3 insertions(+), 15 deletions(-) diff --git a/README b/README index 1e61636..6375283 100644 --- a/README +++ b/README @@ -10,7 +10,7 @@ The mudpy project aims to create a simple, generic, cross-platform, freely-redistributable MUD core engine which can be easily understood and extended. It is written in pure Python (currently compatible with -3.3 and later versions) and has only pure Python dependencies. All +3.4 and later versions) and has only pure Python dependencies. All configuration and data are stored in consistently-formatted plain text (YAML 1.1) files for ease of administration. The core engine is unicode-clean internally and supports UTF-8 encoding for input and diff --git a/mudpy/__init__.py b/mudpy/__init__.py index 8c12ee2..c148bda 100644 --- a/mudpy/__init__.py +++ b/mudpy/__init__.py @@ -4,16 +4,10 @@ # to use, copy, modify, and distribute this software is granted under # terms provided in the LICENSE file distributed with this software. -import sys +import importlib # noqa (referenced via exec of string literal below) import mudpy # noqa (referenced via exec of string literal below) -if sys.version_info >= (3, 4): - import importlib # noqa (referenced via exec of string literal below) -else: - # Python 3.3 lacks importlib.reload() - import imp as importlib # noqa (referenced via exec of string literal) - def load(): """Import/reload some modules (be careful, as this can result in loops).""" diff --git a/mudpy/daemon.py b/mudpy/daemon.py index 952831f..436a5ef 100644 --- a/mudpy/daemon.py +++ b/mudpy/daemon.py @@ -3,16 +3,11 @@ # terms provided in the LICENSE file distributed with this software. # core objects for the mudpy engine +import importlib import sys import mudpy -if sys.version_info >= (3, 4): - import importlib -else: - # Python 3.3 lacks importlib.reload() - import imp as importlib - def main(): diff --git a/setup.cfg b/setup.cfg index 87801ab..1e50cc8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,7 +28,6 @@ classifier = Operating System :: Unix Programming Language :: Python Programming Language :: Python :: 3 - Programming Language :: Python :: 3.3 Programming Language :: Python :: 3.4 Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.6 -- 2.11.0 From 39024df50f6992e3e6a1898d1ceabb46dbaa9cc6 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Sun, 29 Jul 2018 17:53:41 +0000 Subject: [PATCH 04/16] Clean up leading space typo in test title This is merely a cosmetic fix removing stray leading whitespace from a test's title. --- mudpy/tests/selftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mudpy/tests/selftest.py b/mudpy/tests/selftest.py index edcefbd..949488d 100644 --- a/mudpy/tests/selftest.py +++ b/mudpy/tests/selftest.py @@ -285,7 +285,7 @@ dialogue = ( (test_account0_setup, "first account setup"), (test_account1_setup, "second account setup"), (test_actor_appears, "actor spontaneous appearance"), - (test_explicit_punctuation, " explicit punctuation"), + (test_explicit_punctuation, "explicit punctuation"), (test_implicit_punctuation, "implicit punctuation"), (test_typo_replacement, "typo replacement"), (test_sentence_capitalization, "sentence capitalization"), -- 2.11.0 From c7f6a2115fd7bb0bac286c1206a728eb2c974ed1 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Sun, 29 Jul 2018 17:55:16 +0000 Subject: [PATCH 05/16] Streamline selftest output The standard output from a selftest run is much more brief, with the prior verbose information redirected to a capture_tests.log file. --- mudpy/tests/selftest.py | 60 ++++++++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/mudpy/tests/selftest.py b/mudpy/tests/selftest.py index 949488d..799ac50 100644 --- a/mudpy/tests/selftest.py +++ b/mudpy/tests/selftest.py @@ -360,7 +360,7 @@ def stop_service(service): service.terminate() returncode = service.wait(10) if returncode != 0: - print("ERROR: Service exited with code %s." % returncode) + tlog("\nERROR: Service exited with code %s." % returncode) success = False # This cleans up a daemonized and disassociated service @@ -376,21 +376,30 @@ def stop_service(service): os.remove(pidfile) # The PID file didn't disappear, so we have a hung service if os.path.exists(pidfile): - print("ERROR: Hung daemon with PID %s." % pid) + tlog("\nERROR: Hung daemon with PID %s." % pid) success = False # Log the contents of stdout and stderr, if any stdout, stderr = service.communicate() - print("Recording stdout as capture_stdout.log.") + tlog("\nRecording stdout as capture_stdout.log.") serviceout = open("capture_stdout.log", "w") serviceout.write(stdout.decode("utf-8")) - print("Recording stderr as capture_stderr.log.") + tlog("\nRecording stderr as capture_stderr.log.") serviceerr = open("capture_stderr.log", "w") serviceerr.write(stderr.decode("utf-8")) return(success) +def tlog(message, quiet=False): + logfile = "capture_tests.log" + with open(logfile, "a") as logfd: + logfd.write(message + "\n") + if not quiet: + sys.stdout.write(message) + return True + + def main(): captures = ["", "", ""] lusers = [telnetlib.Telnet(), telnetlib.Telnet(), telnetlib.Telnet()] @@ -403,23 +412,24 @@ def main(): for luser in lusers: luser.open("::1", 4000) for test, description in dialogue: - print("\nTesting %s..." % description) + tlog("\nTesting %s..." % description) test_start = time.time() for conversant, question, answer in test: - print("luser%s waiting for: %s" % (conversant, question)) + tlog("luser%s waiting for: %s" % (conversant, question), + quiet=True) try: index, match, received = lusers[conversant].expect( [re.compile(question.encode("utf-8"), flags=re.DOTALL)], 5) captures[conversant] += received.decode("utf-8") except ConnectionResetError: - print("ERROR: Unable to connect to server.") + tlog("\nERROR: Unable to connect to server.") success = False break except EOFError: - print("ERROR: luser%s premature disconnection expecting:\n\n" - "%s\n\n" - "Check the end of capture_%s.log for received data." - % (conversant, question, conversant)) + tlog("\nERROR: luser%s premature disconnection expecting:\n\n" + "%s\n\n" + "Check the end of capture_%s.log for received data." + % (conversant, question, conversant)) success = False break try: @@ -428,30 +438,30 @@ def main(): except Exception: pass if index is not 0: - print("ERROR: luser%s did not receive expected string:\n\n" - "%s\n\n" - "Check the end of capture_%s.log for received data." - % (conversant, question, conversant)) + tlog("\nERROR: luser%s did not receive expected string:\n\n" + "%s\n\n" + "Check the end of capture_%s.log for received data." + % (conversant, question, conversant)) success = False break if type(answer) is str: - print("luser%s sending: %s" % (conversant, answer)) + tlog("luser%s sending: %s" % (conversant, answer), quiet=True) lusers[conversant].write(("%s\r\n" % answer).encode("utf-8")) captures[conversant] += "%s\r\n" % answer elif type(answer) is bytes: - print("luser%s sending raw bytes: %s" % (conversant, answer)) + tlog("luser%s sending raw bytes: %s" % (conversant, answer), + quiet=True) lusers[conversant].get_socket().send(answer) captures[conversant] += "!!!RAW BYTES: %s" % answer else: - print("ERROR: answer provided with unsupported type %s" - % type(answer)) + tlog("\nERROR: answer provided with unsupported type %s" + % type(answer)) success = False break if not success: break - print("Completed in %.3f seconds." % (time.time() - test_start)) + tlog("Completed in %.3f seconds." % (time.time() - test_start)) duration = time.time() - start - print("") for conversant in range(len(captures)): try: captures[conversant] += lusers[ @@ -460,17 +470,17 @@ def main(): pass lusers[conversant].close() logfile = "capture_%s.log" % conversant - print("Recording session %s as %s." % (conversant, logfile)) + tlog("\nRecording session %s as %s." % (conversant, logfile)) log = open(logfile, "w") log.write(captures[conversant]) log.close() if not stop_service(service): success = False - print("\nRan %s tests in %.3f seconds." % (len(dialogue), duration)) + tlog("\nRan %s tests in %.3f seconds." % (len(dialogue), duration)) if success: - print("SUCCESS") + tlog("\nSUCCESS\n") else: - print("FAILURE") + tlog("\nFAILURE\n") sys.exit(1) -- 2.11.0 From f75bc473e2c6d7ef1954087261e1e139d200cfa4 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Sun, 29 Jul 2018 17:56:52 +0000 Subject: [PATCH 06/16] Add a "debug" testenv Create a convenience tox testenv named "debug" which simply starts the mudpy service with the daemon test configuration, for use in manual client testing. --- tox.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tox.ini b/tox.ini index 05e10ac..b40057b 100644 --- a/tox.ini +++ b/tox.ini @@ -17,6 +17,9 @@ setenv = deps = -r{toxinidir}/test-requirements.txt commands = mudpy_selftest mudpy/tests/fixtures/test_daemon.yaml +[testenv:debug] +commands = mudpy mudpy/tests/fixtures/test_daemon.yaml + [testenv:dist] whitelist_externals = rm deps = -- 2.11.0 From 7d270b507a1788a8d2b0a6f4747cf67ffdf81bee Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Sun, 26 Aug 2018 17:42:15 +0000 Subject: [PATCH 07/16] Support clients using CR+NUL to signal EOL IETF RFC 854 requires that a Telnet server accept CR+NUL interchangeably with CR+LF to indicate end of an input line from any NVT (client). CR+NUL also happens to be the default behavior of popular Telnet clients specifically when communicating on TCP port 23 (as opposed to non-default ports where more liberal protocol fallbacks get employed). Previously these clients would need to `set crlf` in their .telnetrc or at a telnet> command prompt as a workaround. Alter the selftest framework to send \r\0 from the NVT as an EOL to make sure this does not regress, and add a test to explicitly end a command with a \r\n just to make sure we can continue to support CR+LF from clients. --- mudpy/misc.py | 8 ++++++-- mudpy/telnet.py | 6 ++++-- mudpy/tests/selftest.py | 14 +++++++++++--- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/mudpy/misc.py b/mudpy/misc.py index bae94b6..4e43353 100644 --- a/mudpy/misc.py +++ b/mudpy/misc.py @@ -843,11 +843,15 @@ class User: mudpy.telnet.negotiate_telnet_options(self) # separate multiple input lines - new_input_lines = self.partial_input.split(b"\n") + new_input_lines = self.partial_input.split(b"\r\0") + if len(new_input_lines) == 1: + new_input_lines = new_input_lines[0].split(b"\r\n") # if input doesn't end in a newline, replace the # held partial input with the last line of it - if not self.partial_input.endswith(b"\n"): + if not ( + self.partial_input.endswith(b"\r\0") or + self.partial_input.endswith(b"\r\n")): self.partial_input = new_input_lines.pop() # otherwise, chop off the extra null input and reset diff --git a/mudpy/telnet.py b/mudpy/telnet.py index 245f44a..ed99faf 100644 --- a/mudpy/telnet.py +++ b/mudpy/telnet.py @@ -125,9 +125,11 @@ def negotiate_telnet_options(user): # the byte following the IAC is our command command = text[position+1] - # replace a double (literal) IAC if there's an LF later + # replace a double (literal) IAC if there's a CR+NUL or CR+LF later if command is IAC: - if text.find(b"\n", position) > 0: + if ( + text.find(b"\r\0", position) > 0 or + text.find(b"\r\n", position) > 0): position += 1 text = text[:position] + text[position + 1:] else: diff --git a/mudpy/tests/selftest.py b/mudpy/tests/selftest.py index 799ac50..179871e 100644 --- a/mudpy/tests/selftest.py +++ b/mudpy/tests/selftest.py @@ -158,18 +158,25 @@ test_admin_setup = ( (2, "Whom would you like to awaken?", ""), ) +test_crlf_eol = ( + # Send a CR+LF at the end of the line instead of the default CR+NUL, + # to make sure they're treated the same + (2, "> ", b"say I use CR+LF as my EOL, not CR+NUL.\r\n"), + (2, r'You say, "I use CR\+LF as my EOL, not CR\+NUL\.".*> ', ""), +) + test_telnet_iac = ( # Send a double (escaped) IAC byte within other text, which should get # unescaped and deduplicated to a single \xff in the buffer and then # the line of input discarded as a non-ASCII sequence - (2, "> ", b"say argle\xff\xffbargle\r\n"), + (2, "> ", b"say argle\xff\xffbargle\r\0"), (2, r"Non-ASCII characters from admin: b'say argle\\xffbargle'.*> ", ""), ) test_telnet_unknown = ( # Send an unsupported negotiation command #127 which should get filtered # from the line of input - (2, "> ", b"say glop\xff\x7fglyf\r\n"), + (2, "> ", b"say glop\xff\x7fglyf\r\0"), (2, r'Unknown Telnet IAC command 127 ignored\..*"Glopglyf\.".*> ', ""), ) @@ -296,6 +303,7 @@ dialogue = ( (test_actor_disappears, "actor spontaneous disappearance"), (test_account1_teardown, "second account teardown"), (test_admin_setup, "admin account setup"), + (test_crlf_eol, "send crlf from the client as eol"), (test_telnet_iac, "escape stray telnet iac bytes"), (test_telnet_unknown, "strip unknown telnet command"), (test_admin_restriction, "restricted admin commands"), @@ -446,7 +454,7 @@ def main(): break if type(answer) is str: tlog("luser%s sending: %s" % (conversant, answer), quiet=True) - lusers[conversant].write(("%s\r\n" % answer).encode("utf-8")) + lusers[conversant].write(("%s\r\0" % answer).encode("utf-8")) captures[conversant] += "%s\r\n" % answer elif type(answer) is bytes: tlog("luser%s sending raw bytes: %s" % (conversant, answer), -- 2.11.0 From 3b37218d588a84fc5610c72656a6de708042f857 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Sun, 2 Sep 2018 00:36:22 +0000 Subject: [PATCH 08/16] Expand logging for User class methods Increase logging detail so that client connection/disconnection, account login/logout, avatar activation/deactivation and creation/deletion can be clearly associated and followed for ease of troubleshooting. --- mudpy/misc.py | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/mudpy/misc.py b/mudpy/misc.py index 4e43353..6b24e1b 100644 --- a/mudpy/misc.py +++ b/mudpy/misc.py @@ -507,15 +507,10 @@ class User: def quit(self): """Log, close the connection and remove.""" if self.account: - name = self.account.get("name") + name = self.account.get("name", self) else: - name = "" - if name: - message = "User " + name - else: - message = "An unnamed user" - message += " logged out." - log(message, 2) + name = self + log("Logging out %s" % name, 2) self.deactivate_avatar() self.connection.close() self.remove() @@ -648,8 +643,8 @@ class User: log("Administrator %s authenticated." % self.account.get("name"), 2) else: - # log("User %s authenticated." % self.account.get("name"), 2) - log("User %s authenticated." % self.account.subkey, 2) + log("User %s authenticated for account %s." % ( + self, self.account.subkey), 2) def show_menu(self): """Send the user their current menu.""" @@ -677,6 +672,7 @@ class User: def remove(self): """Remove a user from the list of connected users.""" + log("Disconnecting account %s." % self, 0) universe.userlist.remove(self) def send( @@ -908,11 +904,15 @@ class User: universe) self.avatar.append("inherit", "archetype.avatar") self.account.append("avatars", self.avatar.key) + log("Created new avatar %s for user %s." % ( + self.avatar.key, self.account.get("name")), 0) def delete_avatar(self, avatar): """Remove an avatar from the world and from the user's list.""" if self.avatar is universe.contents[avatar]: self.avatar = None + log("Deleting avatar %s for user %s." % ( + avatar, self.account.get("name")), 0) universe.contents[avatar].destroy() avatars = self.account.get("avatars") avatars.remove(avatar) @@ -924,11 +924,16 @@ class User: self.account.get("avatars")[index]] self.avatar.owner = self self.state = "active" + log("Activated avatar %s (%s)." % ( + self.avatar.get("name"), self.avatar.key), 0) self.avatar.go_home() def deactivate_avatar(self): """Have the active avatar leave the world.""" if self.avatar: + log("Deactivating avatar %s (%s) for user %s." % ( + self.avatar.get("name"), self.avatar.key, + self.account.get("name")), 0) current = self.avatar.get("location") if current: self.avatar.set("default_location", current) @@ -946,6 +951,8 @@ class User: """Destroy the user and associated avatars.""" for avatar in self.account.get("avatars"): self.delete_avatar(avatar) + log("Destroying account %s for user %s." % ( + self.account.get("name"), self), 0) self.account.destroy() def list_avatar_names(self): @@ -1417,13 +1424,14 @@ def check_for_connection(listening_socket): return None # note that we got one - log("Connection from " + address[0], 2) + log("New connection from %s." % address[0], 2) # disable blocking so we can proceed whether or not we can send/receive connection.setblocking(0) # create a new user object user = User() + log("Instantiated %s for %s." % (user, address[0]), 0) # associate this connection with it user.connection = connection -- 2.11.0 From 4da48aaa62ba29424ba803bab7e4ee9eacbab9b1 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Sun, 2 Sep 2018 00:54:59 +0000 Subject: [PATCH 09/16] Add debug logging for Telnet protocol negotiation For improved debugging of Telnet protocol negotiations, add a log function wrapper to the telnet module and apply it any time Telnet commands are received or sent. --- mudpy/telnet.py | 56 ++++++++++++++++++++++++++++++++++++++++++++++--- mudpy/tests/selftest.py | 2 +- 2 files changed, 54 insertions(+), 4 deletions(-) diff --git a/mudpy/telnet.py b/mudpy/telnet.py index ed99faf..0cc29b8 100644 --- a/mudpy/telnet.py +++ b/mudpy/telnet.py @@ -10,11 +10,21 @@ import mudpy TELOPT_BINARY = 0 # transmit 8-bit data by the receiver (rfc 856) TELOPT_ECHO = 1 # echo received data back to the sender (rfc 857) TELOPT_SGA = 3 # suppress transmission of the go ahead character (rfc 858) -# TELOPT_TTYPE = 24 # exchange terminal type information (rfc 1091) +TELOPT_TTYPE = 24 # exchange terminal type information (rfc 1091) TELOPT_EOR = 25 # transmit end-of-record after transmitting data (rfc 885) TELOPT_NAWS = 31 # negotiate about window size (rfc 1073) TELOPT_LINEMODE = 34 # cooked line-by-line input mode (rfc 1184) - +option_names = { + TELOPT_BINARY: "8-bit binary", + TELOPT_ECHO: "echo", + TELOPT_SGA: "suppress go-ahead", + TELOPT_TTYPE: "terminal type", + TELOPT_EOR: "end of record", + TELOPT_NAWS: "negotiate about window size", + TELOPT_LINEMODE: "line mode", +} + +# TODO(fungi): implement support for RFC 1091 terminal type information supported = ( TELOPT_BINARY, TELOPT_ECHO, @@ -34,6 +44,17 @@ WONT = 252 # refusal or confirmation of performing an option (rfc 854) DO = 253 # request or confirm performing an option (rfc 854) DONT = 254 # demand or confirm no longer performing an option (rfc 854) IAC = 255 # interpret as command escape character (rfc 854) +command_names = { + EOR: "end of record", + SE: "subnegotiation end", + GA: "go ahead", + SB: "subnegotiation begin", + WILL: "will", + WONT: "won't", + DO: "do", + DONT: "don't", + IAC: "interpret as command", +} # RFC 1143 option negotiation states NO = 0 # option is disabled @@ -42,10 +63,31 @@ WANTNO = 2 # demanded disabling option WANTYES = 3 # requested enabling option WANTNO_OPPOSITE = 4 # demanded disabling option but queued an enable after it WANTYES_OPPOSITE = 5 # requested enabling option but queued a disable after it +state_names = { + NO: "disabled", + YES: "enabled", + WANTNO: "demand disabling", + WANTYES: "request enabling", + WANTNO_OPPOSITE: "want no queued opposite", + WANTYES_OPPOSITE: "want yes queued opposite", +} # RFC 1143 option negotiation parties HIM = 0 US = 1 +party_names = { + HIM: "him", + US: "us", +} + + +def log(message, user): + """Log debugging info for Telnet client/server interactions.""" + if user.account: + client = user.account.get("name", user) + else: + client = user + mudpy.misc.log('[telnet] %s %s.' % (message, client), 0) def telnet_proto(*arguments): @@ -53,9 +95,15 @@ def telnet_proto(*arguments): return bytes((arguments)) +def translate_action(*command): + """Convert a Telnet command sequence into text suitable for logging.""" + return "%s %s" % (command_names[command[0]], option_names[command[1]]) + + def send_command(user, *command): """Sends a Telnet command string to the specified user's socket.""" user.send(telnet_proto(IAC, *command), raw=True) + log('Sent "%s" to' % translate_action(*command), user) def is_enabled(user, telopt, party, state=YES): @@ -132,12 +180,14 @@ def negotiate_telnet_options(user): text.find(b"\r\n", position) > 0): position += 1 text = text[:position] + text[position + 1:] + log('Escaped IAC from', user) else: position += 2 # implement an RFC 1143 option negotiation queue here elif len_text > position + 2 and WILL <= command <= DONT: telopt = text[position+2] + log('Received "%s" from' % translate_action(command, telopt), user) if telopt in supported: if command <= WONT: party = HIM @@ -193,7 +243,7 @@ def negotiate_telnet_options(user): # otherwise, strip out a two-byte IAC command elif len_text > position + 2: - mudpy.misc.log("Unknown Telnet IAC command %s ignored." % command) + log("Ignored unknown command %s from" % command, user) text = text[:position] + text[position + 2:] # and this means we got the begining of an IAC diff --git a/mudpy/tests/selftest.py b/mudpy/tests/selftest.py index 179871e..3012c61 100644 --- a/mudpy/tests/selftest.py +++ b/mudpy/tests/selftest.py @@ -177,7 +177,7 @@ test_telnet_unknown = ( # Send an unsupported negotiation command #127 which should get filtered # from the line of input (2, "> ", b"say glop\xff\x7fglyf\r\0"), - (2, r'Unknown Telnet IAC command 127 ignored\..*"Glopglyf\.".*> ', ""), + (2, r'Ignored unknown command 127 from admin\..*"Glopglyf\.".*> ', ""), ) test_admin_restriction = ( -- 2.11.0 From 30511cc7a3cbf8e516f792b85fd078cc0c539606 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Tue, 25 Sep 2018 15:25:51 +0000 Subject: [PATCH 10/16] Switch to `twine check` in tox testenv:dist As of twine 1.12.0 we can now replace `setup.py check ...` with `twine check` as a more standard approach to validating the markup of description text in packages (and potentially other aspects of package metadata in the future). --- tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index b40057b..fd43312 100644 --- a/tox.ini +++ b/tox.ini @@ -25,10 +25,11 @@ whitelist_externals = rm deps = docutils pbr + twine commands = rm -fr dist - python setup.py check --restructuredtext --strict python setup.py bdist_wheel sdist + twine check dist/* [testenv:docs] whitelist_externals = rm -- 2.11.0 From 4218cf2a913c7106eeafba62183d5707ea5c2cc1 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Sat, 29 Sep 2018 17:09:40 +0000 Subject: [PATCH 11/16] Remove docutils dep in tox dist testenv Now that we're using `twine check` to validate the package long description, we no longer need to preinstall docutils in testenv:dist. --- tox.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/tox.ini b/tox.ini index fd43312..2220282 100644 --- a/tox.ini +++ b/tox.ini @@ -23,7 +23,6 @@ commands = mudpy mudpy/tests/fixtures/test_daemon.yaml [testenv:dist] whitelist_externals = rm deps = - docutils pbr twine commands = -- 2.11.0 From 94977822f75b7777555ba3de6d5a2cfeeca03d88 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Sat, 29 Sep 2018 17:42:23 +0000 Subject: [PATCH 12/16] Add AUTHORS file to wheel Now that Wheel 0.32 supports a list of license_files we can incorporate the AUTHORS file into .whl packages. With this, we should also be able to make the copyright headers in various files more generalized. --- setup.cfg | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 1e50cc8..d397c14 100644 --- a/setup.cfg +++ b/setup.cfg @@ -20,7 +20,9 @@ project_urls = Release Files = https://mudpy.org/dist/mudpy/ keywords = mud game telnet license = ISC License (ISCL) -license_file = LICENSE +license_files = + AUTHORS + LICENSE platform = POSIX/Unix classifier = License :: OSI Approved :: ISC License (ISCL) -- 2.11.0 From 7c8c6fb92849b5f923f08dff96903a2b637d5ad6 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Tue, 2 Oct 2018 20:53:01 +0000 Subject: [PATCH 13/16] Generalize copyright headers in files Since we're distributing an AUTHORS file even in wheel packages now replace the specific copyright strings with ones which generally mention "mudpy authors" instead, refer to the AUTHORS file and Git history from the LICENSE file, and embed the generated list of authors in rendered versions of the license. --- .gitignore | 6 +++--- .yamllint | 6 +++--- LICENSE | 3 ++- README | 7 +++---- doc/requirements.txt | 6 +++--- doc/source/_static/logo.svg | 2 +- doc/source/api.rst | 7 +++---- doc/source/changelog.rst | 7 +++---- doc/source/clients.rst | 7 +++---- doc/source/coder.rst | 7 +++---- doc/source/conf.py | 6 +++--- doc/source/configuration.rst | 7 +++---- doc/source/data_model.rst | 7 +++---- doc/source/index.rst | 7 +++---- doc/source/license.rst | 15 +++++++++++---- etc/mudpy.yaml | 6 +++--- mudpy/__init__.py | 6 +++--- mudpy/daemon.py | 6 +++--- mudpy/data.py | 6 +++--- mudpy/misc.py | 6 +++--- mudpy/password.py | 6 +++--- mudpy/telnet.py | 6 +++--- mudpy/tests/fixtures/test_daemon.yaml | 6 +++--- mudpy/tests/selftest.py | 6 +++--- mudpy/version.py | 6 +++--- requirements.txt | 6 +++--- sample/__init__.yaml | 6 +++--- sample/area.yaml | 6 +++--- sample/prop.yaml | 6 +++--- setup.cfg | 6 +++--- setup.py | 6 +++--- share/archetype.yaml | 6 +++--- share/command.yaml | 6 +++--- share/menu.yaml | 6 +++--- test-requirements.txt | 6 +++--- tox.ini | 6 +++--- 36 files changed, 113 insertions(+), 113 deletions(-) diff --git a/.gitignore b/.gitignore index 8334b06..bbf5674 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ -# Copyright (c) 2014-2017 Jeremy Stanley . Permission -# to use, copy, modify, and distribute this software is granted under -# terms provided in the LICENSE file distributed with this software. +# Copyright (c) 2014-2017 mudpy authors. Permission to use, copy, +# modify, and distribute this software is granted under terms +# provided in the LICENSE file distributed with this software. *.egg-info/ *.egg/ diff --git a/.yamllint b/.yamllint index c842d72..a477f75 100644 --- a/.yamllint +++ b/.yamllint @@ -1,6 +1,6 @@ -# Copyright (c) 2018 Jeremy Stanley . Permission -# to use, copy, modify, and distribute this software is granted under -# terms provided in the LICENSE file distributed with this software. +# Copyright (c) 2018 mudpy authors. Permission to use, copy, +# modify, and distribute this software is granted under terms +# provided in the LICENSE file distributed with this software. extends: default rules: diff --git a/LICENSE b/LICENSE index 2584f62..155b853 100644 --- a/LICENSE +++ b/LICENSE @@ -10,7 +10,8 @@ preferred license of many projects (OpenBSD, for example). copyright notice ---------------- -Copyright (c) 2004-2018 Jeremy Stanley +Copyright (c) 2004-2018 Jeremy Stanley and other +mudpy authors listed in the Git history or AUTHORS file. permission notice ----------------- diff --git a/README b/README index 6375283..d5c1d82 100644 --- a/README +++ b/README @@ -2,10 +2,9 @@ mudpy ======= -.. Copyright (c) 2004-2018 Jeremy Stanley . - Permission to use, copy, modify, and distribute this software is - granted under terms provided in the LICENSE file distributed with - this software. +.. Copyright (c) 2004-2018 mudpy authors. Permission to use, copy, + modify, and distribute this software is granted under terms + provided in the LICENSE file distributed with this software. The mudpy project aims to create a simple, generic, cross-platform, freely-redistributable MUD core engine which can be easily understood diff --git a/doc/requirements.txt b/doc/requirements.txt index ca1e4d4..e13feea 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,5 +1,5 @@ -# Copyright (c) 2018 Jeremy Stanley . Permission -# to use, copy, modify, and distribute this software is granted under -# terms provided in the LICENSE file distributed with this software. +# Copyright (c) 2018 mudpy authors. Permission to use, copy, +# modify, and distribute this software is granted under terms +# provided in the LICENSE file distributed with this software. sphinx diff --git a/doc/source/_static/logo.svg b/doc/source/_static/logo.svg index 626e361..d72cc61 100644 --- a/doc/source/_static/logo.svg +++ b/doc/source/_static/logo.svg @@ -31,7 +31,7 @@ - Copyright (c) 2004-2018 Jeremy Stanley mailto:fungi@yuggoth.org. Permission to use, copy, modify, and distribute this software is granted under terms provided in the LICENSE file distributed with this software. + Copyright (c) 2004-2018 mudpy authors. Permission to use, copy, modify, and distribute this software is granted under terms provided in the LICENSE file distributed with this software. Monogram box logo used as an identifying icon for the mudpy MUD server engine. diff --git a/doc/source/api.rst b/doc/source/api.rst index 875bd5f..785e136 100644 --- a/doc/source/api.rst +++ b/doc/source/api.rst @@ -1,7 +1,6 @@ -.. Copyright (c) 2018 Jeremy Stanley . - Permission to use, copy, modify, and distribute this software is - granted under terms provided in the LICENSE file distributed with - this software. +.. Copyright (c) 2018 mudpy authors. Permission to use, copy, + modify, and distribute this software is granted under terms + provided in the LICENSE file distributed with this software. =============== mudpy package diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst index b00bd96..fdc1970 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -1,7 +1,6 @@ -.. Copyright (c) 2018 Jeremy Stanley . - Permission to use, copy, modify, and distribute this software is - granted under terms provided in the LICENSE file distributed with - this software. +.. Copyright (c) 2018 mudpy authors. Permission to use, copy, + modify, and distribute this software is granted under terms + provided in the LICENSE file distributed with this software. =========== changelog diff --git a/doc/source/clients.rst b/doc/source/clients.rst index 29d1fb9..00b05b1 100644 --- a/doc/source/clients.rst +++ b/doc/source/clients.rst @@ -2,10 +2,9 @@ clients ========= -.. Copyright (c) 2004-2018 Jeremy Stanley . - Permission to use, copy, modify, and distribute this software is - granted under terms provided in the LICENSE file distributed with - this software. +.. Copyright (c) 2004-2018 mudpy authors. Permission to use, copy, + modify, and distribute this software is granted under terms + provided in the LICENSE file distributed with this software. mudpy handles input, output and formatting of UTF-8 encoded, multi-byte and wide characters, when coupled with a supporting diff --git a/doc/source/coder.rst b/doc/source/coder.rst index 5a86659..0487cb8 100644 --- a/doc/source/coder.rst +++ b/doc/source/coder.rst @@ -2,10 +2,9 @@ coder guide ============= -.. Copyright (c) 2004-2018 Jeremy Stanley . - Permission to use, copy, modify, and distribute this software is - granted under terms provided in the LICENSE file distributed with - this software. +.. Copyright (c) 2004-2018 mudpy authors. Permission to use, copy, + modify, and distribute this software is granted under terms + provided in the LICENSE file distributed with this software. This guide attempts to embody a rudimentary set of rules for developer submissions of source code and documentation targeted for inclusion diff --git a/doc/source/conf.py b/doc/source/conf.py index 1690dbc..17b9eba 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -1,6 +1,6 @@ -# Copyright (c) 2018 Jeremy Stanley . Permission -# to use, copy, modify, and distribute this software is granted under -# terms provided in the LICENSE file distributed with this software. +# Copyright (c) 2018 mudpy authors. Permission to use, copy, +# modify, and distribute this software is granted under terms +# provided in the LICENSE file distributed with this software. import os import sys diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst index f2641d4..bca9161 100644 --- a/doc/source/configuration.rst +++ b/doc/source/configuration.rst @@ -2,10 +2,9 @@ configuration =============== -.. Copyright (c) 2004-2018 Jeremy Stanley . - Permission to use, copy, modify, and distribute this software is - granted under terms provided in the LICENSE file distributed with - this software. +.. Copyright (c) 2004-2018 mudpy authors. Permission to use, copy, + modify, and distribute this software is granted under terms + provided in the LICENSE file distributed with this software. .mudpy.filing ------------- diff --git a/doc/source/data_model.rst b/doc/source/data_model.rst index 13b44ae..af7a4b0 100644 --- a/doc/source/data_model.rst +++ b/doc/source/data_model.rst @@ -2,10 +2,9 @@ data model ============ -.. Copyright (c) 2004-2018 Jeremy Stanley . - Permission to use, copy, modify, and distribute this software is - granted under terms provided in the LICENSE file distributed with - this software. +.. Copyright (c) 2004-2018 mudpy authors. Permission to use, copy, + modify, and distribute this software is granted under terms + provided in the LICENSE file distributed with this software. One of the primary goals for mudpy is to apply a consistent data model for all information, from configuration and preferences to diff --git a/doc/source/index.rst b/doc/source/index.rst index 3b219d5..e130010 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -1,7 +1,6 @@ -.. Copyright (c) 2018 Jeremy Stanley . - Permission to use, copy, modify, and distribute this software is - granted under terms provided in the LICENSE file distributed with - this software. +.. Copyright (c) 2018 mudpy authors. Permission to use, copy, + modify, and distribute this software is granted under terms + provided in the LICENSE file distributed with this software. .. title:: about .. meta:: diff --git a/doc/source/license.rst b/doc/source/license.rst index eb3da91..83541a2 100644 --- a/doc/source/license.rst +++ b/doc/source/license.rst @@ -1,6 +1,13 @@ -.. Copyright (c) 2018 Jeremy Stanley . - Permission to use, copy, modify, and distribute this software is - granted under terms provided in the LICENSE file distributed with - this software. +.. Copyright (c) 2018 mudpy authors. Permission to use, copy, + modify, and distribute this software is granted under terms + provided in the LICENSE file distributed with this software. .. include:: ../../LICENSE + +authors +------- +This list of authors is automatically generated from the `Git repository +history `_: + +.. include:: ../../AUTHORS + :literal: diff --git a/etc/mudpy.yaml b/etc/mudpy.yaml index 45f1d14..3cc39d9 100644 --- a/etc/mudpy.yaml +++ b/etc/mudpy.yaml @@ -1,7 +1,7 @@ --- -_copy: Copyright (c) 2004-2017 Jeremy Stanley . - Permission to use, copy, modify, and distribute this software is granted - under terms provided in the LICENSE file distributed with this software. +_copy: Copyright (c) 2004-2017 mudpy authors. Permission to use, copy, + modify, and distribute this software is granted under terms + provided in the LICENSE file distributed with this software. _desc: This is the top-level configuration file for mudpy service. diff --git a/mudpy/__init__.py b/mudpy/__init__.py index c148bda..38a69af 100644 --- a/mudpy/__init__.py +++ b/mudpy/__init__.py @@ -1,8 +1,8 @@ """Core modules package for the mudpy engine.""" -# Copyright (c) 2004-2018 Jeremy Stanley . Permission -# to use, copy, modify, and distribute this software is granted under -# terms provided in the LICENSE file distributed with this software. +# Copyright (c) 2004-2018 mudpy authors. Permission to use, copy, +# modify, and distribute this software is granted under terms +# provided in the LICENSE file distributed with this software. import importlib # noqa (referenced via exec of string literal below) diff --git a/mudpy/daemon.py b/mudpy/daemon.py index 436a5ef..0366ab8 100644 --- a/mudpy/daemon.py +++ b/mudpy/daemon.py @@ -1,6 +1,6 @@ -# Copyright (c) 2004-2017 Jeremy Stanley . Permission -# to use, copy, modify, and distribute this software is granted under -# terms provided in the LICENSE file distributed with this software. +# Copyright (c) 2004-2017 mudpy authors. Permission to use, copy, +# modify, and distribute this software is granted under terms +# provided in the LICENSE file distributed with this software. # core objects for the mudpy engine import importlib diff --git a/mudpy/data.py b/mudpy/data.py index be88d65..25b423b 100644 --- a/mudpy/data.py +++ b/mudpy/data.py @@ -1,8 +1,8 @@ """Data interface functions for the mudpy engine.""" -# Copyright (c) 2004-2018 Jeremy Stanley . Permission -# to use, copy, modify, and distribute this software is granted under -# terms provided in the LICENSE file distributed with this software. +# Copyright (c) 2004-2018 mudpy authors. Permission to use, copy, +# modify, and distribute this software is granted under terms +# provided in the LICENSE file distributed with this software. import os import re diff --git a/mudpy/misc.py b/mudpy/misc.py index 6b24e1b..7698e81 100644 --- a/mudpy/misc.py +++ b/mudpy/misc.py @@ -1,8 +1,8 @@ """Miscellaneous functions for the mudpy engine.""" -# Copyright (c) 2004-2018 Jeremy Stanley . Permission -# to use, copy, modify, and distribute this software is granted under -# terms provided in the LICENSE file distributed with this software. +# Copyright (c) 2004-2018 mudpy authors. Permission to use, copy, +# modify, and distribute this software is granted under terms +# provided in the LICENSE file distributed with this software. import codecs import os diff --git a/mudpy/password.py b/mudpy/password.py index f90fe88..f5638cb 100644 --- a/mudpy/password.py +++ b/mudpy/password.py @@ -1,8 +1,8 @@ """Password hashing functions and constants for the mudpy engine.""" -# Copyright (c) 2004-2017 Jeremy Stanley . Permission -# to use, copy, modify, and distribute this software is granted under -# terms provided in the LICENSE file distributed with this software. +# Copyright (c) 2004-2017 mudpy authors. Permission to use, copy, +# modify, and distribute this software is granted under terms +# provided in the LICENSE file distributed with this software. import passlib.context diff --git a/mudpy/telnet.py b/mudpy/telnet.py index 0cc29b8..0ce9aec 100644 --- a/mudpy/telnet.py +++ b/mudpy/telnet.py @@ -1,8 +1,8 @@ """Telnet functions and constants for the mudpy engine.""" -# Copyright (c) 2004-2018 Jeremy Stanley . Permission -# to use, copy, modify, and distribute this software is granted under -# terms provided in the LICENSE file distributed with this software. +# Copyright (c) 2004-2018 mudpy authors. Permission to use, copy, +# modify, and distribute this software is granted under terms +# provided in the LICENSE file distributed with this software. import mudpy diff --git a/mudpy/tests/fixtures/test_daemon.yaml b/mudpy/tests/fixtures/test_daemon.yaml index 6814feb..a2bf565 100644 --- a/mudpy/tests/fixtures/test_daemon.yaml +++ b/mudpy/tests/fixtures/test_daemon.yaml @@ -1,7 +1,7 @@ --- -_copy: Copyright (c) 2004-2017 Jeremy Stanley . - Permission to use, copy, modify, and distribute this software is granted - under terms provided in the LICENSE file distributed with this software. +_copy: Copyright (c) 2004-2017 mudpy authors. Permission to use, copy, + modify, and distribute this software is granted under terms + provided in the LICENSE file distributed with this software. _desc: This is an alternative top-level configuration with some values adjusted to better suit automated testing scenarios. diff --git a/mudpy/tests/selftest.py b/mudpy/tests/selftest.py index 3012c61..c3c5dea 100644 --- a/mudpy/tests/selftest.py +++ b/mudpy/tests/selftest.py @@ -1,6 +1,6 @@ -# Copyright (c) 2004-2018 Jeremy Stanley . Permission -# to use, copy, modify, and distribute this software is granted under -# terms provided in the LICENSE file distributed with this software. +# Copyright (c) 2004-2018 mudpy authors. Permission to use, copy, +# modify, and distribute this software is granted under terms +# provided in the LICENSE file distributed with this software. import os import pathlib diff --git a/mudpy/version.py b/mudpy/version.py index 58d7e7f..0b4ad79 100644 --- a/mudpy/version.py +++ b/mudpy/version.py @@ -1,8 +1,8 @@ """Version and diagnostic information for the mudpy engine.""" -# Copyright (c) 2018 Jeremy Stanley . Permission -# to use, copy, modify, and distribute this software is granted under -# terms provided in the LICENSE file distributed with this software. +# Copyright (c) 2018 mudpy authors. Permission to use, copy, +# modify, and distribute this software is granted under terms +# provided in the LICENSE file distributed with this software. import json import pkg_resources diff --git a/requirements.txt b/requirements.txt index f03bf88..092317a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ -# Copyright (c) 2014-2016 Jeremy Stanley . Permission -# to use, copy, modify, and distribute this software is granted under -# terms provided in the LICENSE file distributed with this software. +# Copyright (c) 2014-2016 mudpy authors. Permission to use, copy, +# modify, and distribute this software is granted under terms +# provided in the LICENSE file distributed with this software. passlib pyyaml diff --git a/sample/__init__.yaml b/sample/__init__.yaml index f4dde51..ea45b9c 100644 --- a/sample/__init__.yaml +++ b/sample/__init__.yaml @@ -1,7 +1,7 @@ --- -_copy: Copyright (c) 2004-2017 Jeremy Stanley . - Permission to use, copy, modify, and distribute this software is granted - under terms provided in the LICENSE file distributed with this software. +_copy: Copyright (c) 2004-2017 mudpy authors. Permission to use, copy, + modify, and distribute this software is granted under terms + provided in the LICENSE file distributed with this software. _desc: This is an index file for a sample collection of elements. diff --git a/sample/area.yaml b/sample/area.yaml index 66f2b23..a2fd333 100644 --- a/sample/area.yaml +++ b/sample/area.yaml @@ -1,7 +1,7 @@ --- -_copy: Copyright (c) 2004-2017 Jeremy Stanley . - Permission to use, copy, modify, and distribute this software is granted - under terms provided in the LICENSE file distributed with this software. +_copy: Copyright (c) 2004-2017 mudpy authors. Permission to use, copy, + modify, and distribute this software is granted under terms + provided in the LICENSE file distributed with this software. _desc: This is a set of sample locations for testing and demonstration purposes. diff --git a/sample/prop.yaml b/sample/prop.yaml index bdf254d..8340aa7 100644 --- a/sample/prop.yaml +++ b/sample/prop.yaml @@ -1,7 +1,7 @@ --- -_copy: Copyright (c) 2004-2017 Jeremy Stanley . - Permission to use, copy, modify, and distribute this software is granted - under terms provided in the LICENSE file distributed with this software. +_copy: Copyright (c) 2004-2017 mudpy authors. Permission to use, copy, + modify, and distribute this software is granted under terms + provided in the LICENSE file distributed with this software. _desc: This is a set of sample objects for testing and demonstration purposes. diff --git a/setup.cfg b/setup.cfg index d397c14..5da64f2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ -# Copyright (c) 2016-2018 Jeremy Stanley . Permission -# to use, copy, modify, and distribute this software is granted under -# terms provided in the LICENSE file distributed with this software. +# Copyright (c) 2016-2018 mudpy authors. Permission to use, copy, +# modify, and distribute this software is granted under terms +# provided in the LICENSE file distributed with this software. [metadata] name = mudpy diff --git a/setup.py b/setup.py index 7e4f9f6..9288753 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ -# Copyright (c) 2016 Jeremy Stanley . Permission -# to use, copy, modify, and distribute this software is granted under -# terms provided in the LICENSE file distributed with this software. +# Copyright (c) 2016 mudpy authors. Permission to use, copy, +# modify, and distribute this software is granted under terms +# provided in the LICENSE file distributed with this software. import setuptools diff --git a/share/archetype.yaml b/share/archetype.yaml index c51a639..5d45e1a 100644 --- a/share/archetype.yaml +++ b/share/archetype.yaml @@ -1,7 +1,7 @@ --- -_copy: Copyright (c) 2004-2017 Jeremy Stanley . - Permission to use, copy, modify, and distribute this software is granted - under terms provided in the LICENSE file distributed with this software. +_copy: Copyright (c) 2004-2017 mudpy authors. Permission to use, copy, + modify, and distribute this software is granted under terms + provided in the LICENSE file distributed with this software. _desc: These are the base archetypes from which other elements inherit. diff --git a/share/command.yaml b/share/command.yaml index 0c09076..85a1e91 100644 --- a/share/command.yaml +++ b/share/command.yaml @@ -1,7 +1,7 @@ --- -_copy: Copyright (c) 2004-2017 Jeremy Stanley . - Permission to use, copy, modify, and distribute this software is granted - under terms provided in the LICENSE file distributed with this software. +_copy: Copyright (c) 2004-2017 mudpy authors. Permission to use, copy, + modify, and distribute this software is granted under terms + provided in the LICENSE file distributed with this software. _desc: This is the standard library of command definitions. diff --git a/share/menu.yaml b/share/menu.yaml index 07a4601..74085c0 100644 --- a/share/menu.yaml +++ b/share/menu.yaml @@ -1,7 +1,7 @@ --- -_copy: Copyright (c) 2004-2017 Jeremy Stanley . - Permission to use, copy, modify, and distribute this software is granted - under terms provided in the LICENSE file distributed with this software. +_copy: Copyright (c) 2004-2017 mudpy authors. Permission to use, copy, + modify, and distribute this software is granted under terms + provided in the LICENSE file distributed with this software. _desc: This is the standard library of menu definitions. diff --git a/test-requirements.txt b/test-requirements.txt index 47f4a94..2021c19 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,6 +1,6 @@ -# Copyright (c) 2016-2017 Jeremy Stanley . Permission -# to use, copy, modify, and distribute this software is granted under -# terms provided in the LICENSE file distributed with this software. +# Copyright (c) 2016-2017 mudpy authors. Permission to use, copy, +# modify, and distribute this software is granted under terms +# provided in the LICENSE file distributed with this software. flake8 yamllint diff --git a/tox.ini b/tox.ini index 2220282..9e81bde 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ -# Copyright (c) 2016-2018 Jeremy Stanley . Permission -# to use, copy, modify, and distribute this software is granted under -# terms provided in the LICENSE file distributed with this software. +# Copyright (c) 2016-2018 mudpy authors. Permission to use, copy, +# modify, and distribute this software is granted under terms +# provided in the LICENSE file distributed with this software. [tox] minversion = 3.1 -- 2.11.0 From 7f557c4a6a874ea3fab1ca90f207dc3de91595dc Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Sun, 14 Oct 2018 20:48:14 +0000 Subject: [PATCH 14/16] Clarify Python version support in README Make it more apparent that testing is being performed as far back as Python 3.4, which doesn't exclude the possibility that it may also be made to work with Python 3.3 on platforms where that can still be compiled/installed. --- README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index d5c1d82..b150948 100644 --- a/README +++ b/README @@ -8,8 +8,8 @@ The mudpy project aims to create a simple, generic, cross-platform, freely-redistributable MUD core engine which can be easily understood -and extended. It is written in pure Python (currently compatible with -3.4 and later versions) and has only pure Python dependencies. All +and extended. It is written in pure Python (currently tested with 3.4 +and later versions) and has only pure Python dependencies. All configuration and data are stored in consistently-formatted plain text (YAML 1.1) files for ease of administration. The core engine is unicode-clean internally and supports UTF-8 encoding for input and -- 2.11.0 From 240f1619a0514479f3436aeedbd2e0652453aea4 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Mon, 15 Oct 2018 12:43:22 +0000 Subject: [PATCH 15/16] Reorganize Sphinx config For improved manageability, sort the contents of the Sphinx conf.py file alphabetically, and switch to the same indentation style as the rest of the codebase. --- doc/source/conf.py | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 17b9eba..17572a2 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -6,36 +6,32 @@ import os import sys sys.path.insert(0, os.path.abspath('../..')) -extensions = ['sphinx.ext.autodoc'] -source_suffix = '.rst' -master_doc = 'index' + project = 'mudpy' -copyright = '2004-2018, Jeremy Stanley ' + add_function_parentheses = True add_module_names = True -pygments_style = 'sphinx' -html_title = 'mudpy' +copyright = '2004-2018, Jeremy Stanley ' +extensions = ['sphinx.ext.autodoc'] html_favicon = '_static/logo.svg' html_logo = '_static/logo.svg' -html_theme_options = { - 'description': 'The mudpy MUD server engine.', - 'fixed_sidebar': True, - 'logo_name': True, - 'logo_text_align': 'center', -} -html_sidebars = { - '**': [ +html_sidebars = {'**': [ 'about.html', + 'donate.html', 'navigation.html', 'relations.html', 'searchbox.html', - 'donate.html', - ] +]} +html_theme_options = { + 'description': 'The mudpy MUD server engine.', + 'fixed_sidebar': True, + 'logo_name': True, + 'logo_text_align': 'center', } +html_title = 'mudpy' htmlhelp_basename = '%sdoc' % project -latex_documents = [ - ('index', - '%s.tex' % project, - u'%s' % project, - u'Jeremy Stanley', 'manual'), -] +latex_documents = [( + 'index', '%s.tex' % project, '%s' % project, 'Jeremy Stanley', 'manual')] +master_doc = 'index' +pygments_style = 'sphinx' +source_suffix = '.rst' -- 2.11.0 From 3c84da036f8a5d010deeff414d22d44259c944e4 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Mon, 15 Oct 2018 12:49:49 +0000 Subject: [PATCH 16/16] Add navigation links to Sphinx config Similar to the project URLs in the Python package configuration, include some useful hyperlinks in the Sphinx Alabaster sidebar for things like code browsing/cloning, bug reporting and release files. --- doc/source/conf.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/source/conf.py b/doc/source/conf.py index 17572a2..8d8728d 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -2,6 +2,7 @@ # modify, and distribute this software is granted under terms # provided in the LICENSE file distributed with this software. +import collections import os import sys @@ -24,6 +25,12 @@ html_sidebars = {'**': [ ]} html_theme_options = { 'description': 'The mudpy MUD server engine.', + 'extra_nav_links': collections.OrderedDict(( + ('Browse Source', 'https://mudpy.org/code/mudpy/'), + ('Bug Reporting', 'https://mudpy.org/bugs/mudpy/'), + ('Git Clone URL', 'https://mudpy.org/code/mudpy/'), + ('Release Files', 'https://mudpy.org/dist/mudpy/'), + )), 'fixed_sidebar': True, 'logo_name': True, 'logo_text_align': 'center', -- 2.11.0