Skip to content

Commit

Permalink
Depend Twisted >=23.10,<24, Django 4.0-4.2 <4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Griatch committed Dec 2, 2023
1 parent 18a72c0 commit f4e78d4
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 22 deletions.
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down
11 changes: 8 additions & 3 deletions docs/source/Coding/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions evennia/VERSION_REQS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 9 additions & 2 deletions evennia/contrib/grid/xyzgrid/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
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

Expand Down Expand Up @@ -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}
Expand Down
3 changes: 1 addition & 2 deletions evennia/objects/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
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
Expand Down
15 changes: 7 additions & 8 deletions evennia/server/portal/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
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 = """
Expand All @@ -34,6 +34,9 @@
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
Expand All @@ -43,10 +46,6 @@
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
Expand Down Expand Up @@ -356,7 +355,7 @@ def auth_password(self, packet):
"""
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)

Expand All @@ -370,7 +369,7 @@ class AccountDBPasswordChecker(object):
"""

noisy = False
credentialInterfaces = (credentials.IUsernamePassword,)
credentialInterfaces = (checkers.IUsernamePassword,)

def __init__(self, factory):
"""
Expand All @@ -388,7 +387,7 @@ def requestAvatarId(self, c):
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)
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit f4e78d4

Please sign in to comment.