Depend Twisted >=23.10,<24, Django 4.0-4.2 <4.3

This commit is contained in:
Griatch 2023-12-02 23:31:18 +01:00
parent 18a72c09e6
commit f4e78d4552
7 changed files with 37 additions and 22 deletions

View file

@ -2,13 +2,17 @@
## Main branch ## 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 - [Feature][pull3313] (Backwards incompatible): `OptionHandler.set` now returns
`BaseOption` rather than its `.value`. Instead access `.value` or `.display()` `BaseOption` rather than its `.value`. Instead access `.value` or `.display()`
on this return for more control. (Volund) on this return for more control. (Volund)
- [Feature][pull3278]: (Backwards incompatible): Refactor home page into multiple sub-parts for easier - [Feature][pull3278]: (Backwards incompatible): Refactor home page into multiple sub-parts for easier
overriding and composition (johnnyvoruz) overriding and composition (johnnyvoruz)
- [Feature][pull3180]: (Can be backwards incompatible): Make build commands easier to override, with new utility - [Feature][pull3180]: (Potentially Backwards incompatible): Make build commands
hooks (Volund) easier to override, with new utility hooks (Volund)
- [Feature][issue3273]: Allow passing `text_kwargs` kwarg to `EvMore.msg` in order to expand - [Feature][issue3273]: Allow passing `text_kwargs` kwarg to `EvMore.msg` in order to expand
the outputfunc used for every evmore page. the outputfunc used for every evmore page.
- [Feature][pull3286]: Allow Discord bot to change user's nickname and assign - [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) tools `evennia.utils.match_ip` and `utils.ip_from_request` to help. (Volund)
- [Feature][pull3349]: Refactored almost all default commands to use - [Feature][pull3349]: Refactored almost all default commands to use
`Command.msg` over the `command.caller.msg` direct call (more flexible) (Volund) `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. `settings.TEST_ENVIRONMENT` to address issues during refactored startup sequence.
- [Fix][pull3197]: Make sure Global scripts only start in one place, - [Fix][pull3197]: Make sure Global scripts only start in one place,
- [Fix][pull3324]: Make account-post-login-fail signal fire properly. Add - [Fix][pull3324]: Make account-post-login-fail signal fire properly. Add
@ -81,6 +85,7 @@
[issue3273]: https://github.com/evennia/evennia/issues/3273 [issue3273]: https://github.com/evennia/evennia/issues/3273
[issue3308]: https://github.com/evennia/evennia/issues/3307 [issue3308]: https://github.com/evennia/evennia/issues/3307
[issue3331]: https://github.com/evennia/evennia/issues/3331 [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 ## Evennia 2.3.0

View file

@ -2,13 +2,17 @@
## Main branch ## 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 - [Feature][pull3313] (Backwards incompatible): `OptionHandler.set` now returns
`BaseOption` rather than its `.value`. Instead access `.value` or `.display()` `BaseOption` rather than its `.value`. Instead access `.value` or `.display()`
on this return for more control. (Volund) on this return for more control. (Volund)
- [Feature][pull3278]: (Backwards incompatible): Refactor home page into multiple sub-parts for easier - [Feature][pull3278]: (Backwards incompatible): Refactor home page into multiple sub-parts for easier
overriding and composition (johnnyvoruz) overriding and composition (johnnyvoruz)
- [Feature][pull3180]: (Can be backwards incompatible): Make build commands easier to override, with new utility - [Feature][pull3180]: (Potentially Backwards incompatible): Make build commands
hooks (Volund) easier to override, with new utility hooks (Volund)
- [Feature][issue3273]: Allow passing `text_kwargs` kwarg to `EvMore.msg` in order to expand - [Feature][issue3273]: Allow passing `text_kwargs` kwarg to `EvMore.msg` in order to expand
the outputfunc used for every evmore page. the outputfunc used for every evmore page.
- [Feature][pull3286]: Allow Discord bot to change user's nickname and assign - [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) tools `evennia.utils.match_ip` and `utils.ip_from_request` to help. (Volund)
- [Feature][pull3349]: Refactored almost all default commands to use - [Feature][pull3349]: Refactored almost all default commands to use
`Command.msg` over the `command.caller.msg` direct call (more flexible) (Volund) `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. `settings.TEST_ENVIRONMENT` to address issues during refactored startup sequence.
- [Fix][pull3197]: Make sure Global scripts only start in one place, - [Fix][pull3197]: Make sure Global scripts only start in one place,
- [Fix][pull3324]: Make account-post-login-fail signal fire properly. Add - [Fix][pull3324]: Make account-post-login-fail signal fire properly. Add
@ -81,6 +85,7 @@
[issue3273]: https://github.com/evennia/evennia/issues/3273 [issue3273]: https://github.com/evennia/evennia/issues/3273
[issue3308]: https://github.com/evennia/evennia/issues/3307 [issue3308]: https://github.com/evennia/evennia/issues/3307
[issue3331]: https://github.com/evennia/evennia/issues/3331 [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 ## Evennia 2.3.0

View file

@ -5,6 +5,6 @@
PYTHON_MIN = 3.10 PYTHON_MIN = 3.10
PYTHON_MAX_TESTED = 3.11.100 PYTHON_MAX_TESTED = 3.11.100
TWISTED_MIN = 20.3.0 TWISTED_MIN = 23.10
DJANGO_MIN = 4.0.2 DJANGO_MIN = 4.0.2
DJANGO_MAX_TESTED = 4.1.100 DJANGO_MAX_TESTED = 4.2.100

View file

@ -7,9 +7,8 @@ from random import randint
from unittest import mock from unittest import mock
from django.test import TestCase from django.test import TestCase
from parameterized import parameterized
from evennia.utils.test_resources import BaseEvenniaCommandTest, BaseEvenniaTest from evennia.utils.test_resources import BaseEvenniaCommandTest, BaseEvenniaTest
from parameterized import parameterized
from . import commands, xymap, xymap_legend, xyzgrid, xyzroom from . import commands, xymap, xymap_legend, xyzgrid, xyzroom
@ -1340,6 +1339,14 @@ class TestXYZGrid(BaseEvenniaTest):
zcoord = "map1" zcoord = "map1"
def setUp(self): 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.grid, err = xyzgrid.XYZGrid.create("testgrid")
self.map_data1 = {"map": MAP1, "zcoord": self.zcoord} self.map_data1 = {"map": MAP1, "zcoord": self.zcoord}

View file

@ -11,11 +11,10 @@ import time
import typing import typing
from collections import defaultdict from collections import defaultdict
import evennia
import inflect import inflect
from django.conf import settings from django.conf import settings
from django.utils.translation import gettext as _ from django.utils.translation import gettext as _
import evennia
from evennia.commands import cmdset from evennia.commands import cmdset
from evennia.commands.cmdsethandler import CmdSetHandler from evennia.commands.cmdsethandler import CmdSetHandler
from evennia.objects.manager import ObjectManager from evennia.objects.manager import ObjectManager

View file

@ -13,7 +13,7 @@ import os
import re import re
from twisted.conch.interfaces import IConchUser from twisted.conch.interfaces import IConchUser
from twisted.cred.checkers import credentials from twisted.cred import checkers
from twisted.cred.portal import Portal from twisted.cred.portal import Portal
_SSH_IMPORT_ERROR = """ _SSH_IMPORT_ERROR = """
@ -34,6 +34,9 @@ except ImportError:
raise ImportError(_SSH_IMPORT_ERROR) raise ImportError(_SSH_IMPORT_ERROR)
from django.conf import settings 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 import interfaces as iconch
from twisted.conch.insults import insults from twisted.conch.insults import insults
from twisted.conch.manhole import Manhole, recvline 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.internet import defer, protocol
from twisted.python import components 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_N = re.compile(r"\|n$")
_RE_SCREENREADER_REGEX = re.compile( _RE_SCREENREADER_REGEX = re.compile(
r"%s" % settings.SCREENREADER_REGEX_STRIP, re.DOTALL + re.MULTILINE r"%s" % settings.SCREENREADER_REGEX_STRIP, re.DOTALL + re.MULTILINE
@ -356,7 +355,7 @@ class ExtraInfoAuthServer(SSHUserAuthServer):
""" """
password = common.getNS(packet[1:])[0] password = common.getNS(packet[1:])[0]
c = credentials.UsernamePassword(self.user, password) c = checkers.UsernamePassword(self.user, password)
c.transport = self.transport c.transport = self.transport
return self.portal.login(c, None, IConchUser).addErrback(self._ebPassword) return self.portal.login(c, None, IConchUser).addErrback(self._ebPassword)
@ -370,7 +369,7 @@ class AccountDBPasswordChecker(object):
""" """
noisy = False noisy = False
credentialInterfaces = (credentials.IUsernamePassword,) credentialInterfaces = (checkers.IUsernamePassword,)
def __init__(self, factory): def __init__(self, factory):
""" """
@ -388,7 +387,7 @@ class AccountDBPasswordChecker(object):
Generic credentials. Generic credentials.
""" """
up = credentials.IUsernamePassword(c, None) up = checkers.IUsernamePassword(c, None)
username = up.username username = up.username
password = up.password password = up.password
account = AccountDB.objects.get_account_from_name(username) account = AccountDB.objects.get_account_from_name(username)

View file

@ -63,8 +63,8 @@ classifiers = [
] ]
dependencies = [ dependencies = [
# core dependencies # core dependencies
"django >= 4.1.3, < 4.2", "django >= 4.2, < 4.3",
"twisted >= 22.10, < 23", "twisted >= 23.10, < 24",
"pytz >= 2022.6", "pytz >= 2022.6",
"djangorestframework >= 3.14, < 3.15", "djangorestframework >= 3.14, < 3.15",
"pyyaml >= 6.0", "pyyaml >= 6.0",