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

@ -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

View file

@ -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}

View file

@ -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

View file

@ -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)