diff --git a/CHANGELOG.md b/CHANGELOG.md index 069ca1200c..f531552d81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,17 @@ ## Main branch +- Dependency: Twisted 23.10 (<24) to address upstream CVE alert. +- Dependency (potentially Backwards incompatible): Django 4.2 (<4.3). Increases + minimum supported versions of MariaDB, MySQL and PostgreSQL, + see [django release nodes][django-release-notes] - [Feature][pull3313] (Backwards incompatible): `OptionHandler.set` now returns `BaseOption` rather than its `.value`. Instead access `.value` or `.display()` on this return for more control. (Volund) - [Feature][pull3278]: (Backwards incompatible): Refactor home page into multiple sub-parts for easier overriding and composition (johnnyvoruz) -- [Feature][pull3180]: (Can be backwards incompatible): Make build commands easier to override, with new utility - hooks (Volund) +- [Feature][pull3180]: (Potentially Backwards incompatible): Make build commands + easier to override, with new utility hooks (Volund) - [Feature][issue3273]: Allow passing `text_kwargs` kwarg to `EvMore.msg` in order to expand the outputfunc used for every evmore page. - [Feature][pull3286]: Allow Discord bot to change user's nickname and assign @@ -34,7 +38,7 @@ tools `evennia.utils.match_ip` and `utils.ip_from_request` to help. (Volund) - [Feature][pull3349]: Refactored almost all default commands to use `Command.msg` over the `command.caller.msg` direct call (more flexible) (Volund) -- [Fix] (Backwards incompatible): Change `settings._TEST_ENVIRONMENT` to +- Fix (Backwards incompatible): Change `settings._TEST_ENVIRONMENT` to `settings.TEST_ENVIRONMENT` to address issues during refactored startup sequence. - [Fix][pull3197]: Make sure Global scripts only start in one place, - [Fix][pull3324]: Make account-post-login-fail signal fire properly. Add @@ -81,6 +85,7 @@ [issue3273]: https://github.com/evennia/evennia/issues/3273 [issue3308]: https://github.com/evennia/evennia/issues/3307 [issue3331]: https://github.com/evennia/evennia/issues/3331 +[django-release-notes]: https://docs.djangoproject.com/en/4.2/releases/4.2/#backwards-incompatible-changes-in-4-2 ## Evennia 2.3.0 diff --git a/docs/source/Coding/Changelog.md b/docs/source/Coding/Changelog.md index 069ca1200c..f531552d81 100644 --- a/docs/source/Coding/Changelog.md +++ b/docs/source/Coding/Changelog.md @@ -2,13 +2,17 @@ ## Main branch +- Dependency: Twisted 23.10 (<24) to address upstream CVE alert. +- Dependency (potentially Backwards incompatible): Django 4.2 (<4.3). Increases + minimum supported versions of MariaDB, MySQL and PostgreSQL, + see [django release nodes][django-release-notes] - [Feature][pull3313] (Backwards incompatible): `OptionHandler.set` now returns `BaseOption` rather than its `.value`. Instead access `.value` or `.display()` on this return for more control. (Volund) - [Feature][pull3278]: (Backwards incompatible): Refactor home page into multiple sub-parts for easier overriding and composition (johnnyvoruz) -- [Feature][pull3180]: (Can be backwards incompatible): Make build commands easier to override, with new utility - hooks (Volund) +- [Feature][pull3180]: (Potentially Backwards incompatible): Make build commands + easier to override, with new utility hooks (Volund) - [Feature][issue3273]: Allow passing `text_kwargs` kwarg to `EvMore.msg` in order to expand the outputfunc used for every evmore page. - [Feature][pull3286]: Allow Discord bot to change user's nickname and assign @@ -34,7 +38,7 @@ tools `evennia.utils.match_ip` and `utils.ip_from_request` to help. (Volund) - [Feature][pull3349]: Refactored almost all default commands to use `Command.msg` over the `command.caller.msg` direct call (more flexible) (Volund) -- [Fix] (Backwards incompatible): Change `settings._TEST_ENVIRONMENT` to +- Fix (Backwards incompatible): Change `settings._TEST_ENVIRONMENT` to `settings.TEST_ENVIRONMENT` to address issues during refactored startup sequence. - [Fix][pull3197]: Make sure Global scripts only start in one place, - [Fix][pull3324]: Make account-post-login-fail signal fire properly. Add @@ -81,6 +85,7 @@ [issue3273]: https://github.com/evennia/evennia/issues/3273 [issue3308]: https://github.com/evennia/evennia/issues/3307 [issue3331]: https://github.com/evennia/evennia/issues/3331 +[django-release-notes]: https://docs.djangoproject.com/en/4.2/releases/4.2/#backwards-incompatible-changes-in-4-2 ## Evennia 2.3.0 diff --git a/evennia/VERSION_REQS.txt b/evennia/VERSION_REQS.txt index 204efd2a48..b7f535cd4f 100644 --- a/evennia/VERSION_REQS.txt +++ b/evennia/VERSION_REQS.txt @@ -5,6 +5,6 @@ PYTHON_MIN = 3.10 PYTHON_MAX_TESTED = 3.11.100 -TWISTED_MIN = 20.3.0 +TWISTED_MIN = 23.10 DJANGO_MIN = 4.0.2 -DJANGO_MAX_TESTED = 4.1.100 +DJANGO_MAX_TESTED = 4.2.100 diff --git a/evennia/contrib/grid/xyzgrid/tests.py b/evennia/contrib/grid/xyzgrid/tests.py index 28e06cfe73..3b87170891 100644 --- a/evennia/contrib/grid/xyzgrid/tests.py +++ b/evennia/contrib/grid/xyzgrid/tests.py @@ -7,9 +7,8 @@ from random import randint from unittest import mock from django.test import TestCase -from parameterized import parameterized - from evennia.utils.test_resources import BaseEvenniaCommandTest, BaseEvenniaTest +from parameterized import parameterized from . import commands, xymap, xymap_legend, xyzgrid, xyzroom @@ -1340,6 +1339,14 @@ class TestXYZGrid(BaseEvenniaTest): zcoord = "map1" def setUp(self): + from django.conf import settings + from evennia import create_object + + # we need to create a home room for the grid to be able to be properly deleted + home = create_object(typeclass="typeclasses.rooms.Room", key="Home") + home.id = settings.DEFAULT_HOME.strip("#") + home.save() + self.grid, err = xyzgrid.XYZGrid.create("testgrid") self.map_data1 = {"map": MAP1, "zcoord": self.zcoord} diff --git a/evennia/objects/objects.py b/evennia/objects/objects.py index 0262a1a14c..67ee70b9c8 100644 --- a/evennia/objects/objects.py +++ b/evennia/objects/objects.py @@ -11,11 +11,10 @@ import time import typing from collections import defaultdict +import evennia import inflect from django.conf import settings from django.utils.translation import gettext as _ - -import evennia from evennia.commands import cmdset from evennia.commands.cmdsethandler import CmdSetHandler from evennia.objects.manager import ObjectManager diff --git a/evennia/server/portal/ssh.py b/evennia/server/portal/ssh.py index 966d065be9..41b2b320cc 100644 --- a/evennia/server/portal/ssh.py +++ b/evennia/server/portal/ssh.py @@ -13,7 +13,7 @@ import os import re from twisted.conch.interfaces import IConchUser -from twisted.cred.checkers import credentials +from twisted.cred import checkers from twisted.cred.portal import Portal _SSH_IMPORT_ERROR = """ @@ -34,6 +34,9 @@ except ImportError: raise ImportError(_SSH_IMPORT_ERROR) from django.conf import settings +from evennia.accounts.models import AccountDB +from evennia.utils import ansi +from evennia.utils.utils import class_from_module, to_str from twisted.conch import interfaces as iconch from twisted.conch.insults import insults from twisted.conch.manhole import Manhole, recvline @@ -43,10 +46,6 @@ from twisted.conch.ssh.userauth import SSHUserAuthServer from twisted.internet import defer, protocol from twisted.python import components -from evennia.accounts.models import AccountDB -from evennia.utils import ansi -from evennia.utils.utils import class_from_module, to_str - _RE_N = re.compile(r"\|n$") _RE_SCREENREADER_REGEX = re.compile( r"%s" % settings.SCREENREADER_REGEX_STRIP, re.DOTALL + re.MULTILINE @@ -356,7 +355,7 @@ class ExtraInfoAuthServer(SSHUserAuthServer): """ password = common.getNS(packet[1:])[0] - c = credentials.UsernamePassword(self.user, password) + c = checkers.UsernamePassword(self.user, password) c.transport = self.transport return self.portal.login(c, None, IConchUser).addErrback(self._ebPassword) @@ -370,7 +369,7 @@ class AccountDBPasswordChecker(object): """ noisy = False - credentialInterfaces = (credentials.IUsernamePassword,) + credentialInterfaces = (checkers.IUsernamePassword,) def __init__(self, factory): """ @@ -388,7 +387,7 @@ class AccountDBPasswordChecker(object): Generic credentials. """ - up = credentials.IUsernamePassword(c, None) + up = checkers.IUsernamePassword(c, None) username = up.username password = up.password account = AccountDB.objects.get_account_from_name(username) diff --git a/pyproject.toml b/pyproject.toml index 2120d3ced1..425a9f0177 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,8 +63,8 @@ classifiers = [ ] dependencies = [ # core dependencies - "django >= 4.1.3, < 4.2", - "twisted >= 22.10, < 23", + "django >= 4.2, < 4.3", + "twisted >= 23.10, < 24", "pytz >= 2022.6", "djangorestframework >= 3.14, < 3.15", "pyyaml >= 6.0",