core: bye bye sat_tmp :)

After 11 years of "temporary" monkey patches, I've finally made a friendly fork of Wokkel
at https://www.goffi.org/forge/goffi/tx-xmpp with all needed PRs merged and changes from
`sat_tmp`, using the same license as Wokkel (with agreement from contributors). No more
monkey patching, and it will also stop the deprecation warning due to outdated packages
used in Wokkel. Last but not least, it should unblock the move to the latest Twisted and
Python versions.
This commit is contained in:
Goffi 2026-03-20 18:32:36 +01:00
commit 78d72304d5
10 changed files with 20 additions and 51 deletions

View file

@ -16,13 +16,9 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from typing import TYPE_CHECKING
from sat_tmp import wokkel
__version__ = "0.9.0.dev0"
if not wokkel.installed:
wokkel.install()
if TYPE_CHECKING:
from libervia.backend.core.main import LiberviaBackend
from libervia.backend.memory.sqla import Storage

View file

@ -2168,8 +2168,7 @@ class SatDiscoProtocol(disco.DiscoClientProtocol):
disco.DiscoClientProtocol.__init__(self)
def getDiscoInfo(self, requestor, target, nodeIdentifier=""):
# those features are implemented in Wokkel (or sat_tmp.wokkel)
# and thus are always available
# those features are implemented in Tx-XMPP and thus are always available
return [
disco.DiscoFeature(NS_DISCO_INFO),
]

View file

@ -41,7 +41,7 @@ from libervia.backend.tools.xml_tools import find_ancestor
if TYPE_CHECKING:
from libervia.backend.core.main import LiberviaBackend
from sat_tmp.wokkel.pubsub import ItemsEvent
from wokkel.pubsub import ItemsEvent
log = getLogger(__name__)

View file

@ -48,7 +48,7 @@ PLUGIN_INFO = {
C.PI_DESCRIPTION: _(
"Implementation of data forms.\n"
"This plugins extends Wokkel implementation with Pydantic models.\n"
# XXX: XEP-0315 is currently implemented in "sat_tmp.wokkel.data_form"
# XXX: XEP-0315 is currently implemented in Tx-XMPP
"XEP-0315 (Data Forms XML Element) is also supported here."
),
}

View file

@ -34,7 +34,6 @@ from twisted.words.xish import domish
from twisted.internet import defer
from twisted.python import failure
# XXX: sat_tmp.wokkel.pubsub is actually used instead of wokkel version
from wokkel import pubsub
from wokkel import disco, iwokkel, rsm
from zope.interface import implementer

View file

@ -26,8 +26,7 @@ from wokkel.muc import Room, User
from wokkel.generic import parseXml
from wokkel.disco import DiscoItem, DiscoItems
# temporary until the changes are integrated to Wokkel
from sat_tmp.wokkel.rsm import RSMResponse
from wokkel.rsm import RSMResponse
from .constants import Const as C
from libervia.backend.plugins import plugin_xep_0045

View file

@ -29,9 +29,8 @@ from wokkel.data_form import Field
from dateutil.tz import tzutc
import datetime
# TODO: change this when RSM and MAM are in wokkel
from sat_tmp.wokkel.rsm import RSMRequest
from sat_tmp.wokkel.mam import buildForm, MAMRequest
from wokkel.rsm import RSMRequest
from wokkel.mam import buildForm, MAMRequest
NS_PUBSUB = "http://jabber.org/protocol/pubsub"
SERVICE = "sat-pubsub.tazar.int"

View file

@ -50,7 +50,6 @@ dependencies = [
"python-xlib ~= 0.33",
"prompt_toolkit ~= 3.0",
"rich ~= 13.5",
"sat-tmp",
"setuptools_scm",
"shortuuid ~= 1.0.11",
"sqlalchemy >= 1.4",
@ -63,8 +62,8 @@ dependencies = [
"txdbus",
"urwid >= 1.2.0, < 3",
"urwid-satext",
"wokkel >= 18.0.0, < 19.0.0",
"xmlschema < 4.3.1",
"tx-xmpp",
]
keywords = [
"XMPP",
@ -190,8 +189,8 @@ packages = ["libervia", "twisted"]
addopts = "--reactor asyncio"
[tool.uv.sources]
sat-tmp = { url = "https://repos.goffi.org/sat_tmp/archive/tip.tar.bz2" }
urwid-satext = { url = "https://repos.goffi.org/urwid-satext/archive/tip.tar.bz2" }
tx-xmpp = { git = "https://www.goffi.org/forge/goffi/tx-xmpp" }
[tool.hatch.version]

View file

@ -28,10 +28,6 @@ from libervia.backend.core import exceptions
from libervia.backend.core.constants import Const as C
from libervia.backend.core.i18n import _
from sat_tmp.wokkel import install as install_wokkel_patches
install_wokkel_patches()
def initialise(options):
"""Method to initialise global modules"""

42
uv.lock generated
View file

@ -738,17 +738,16 @@ dependencies = [
{ name = "python-xlib" },
{ name = "pyyaml" },
{ name = "rich" },
{ name = "sat-tmp" },
{ name = "setuptools-scm" },
{ name = "shortuuid" },
{ name = "sqlalchemy" },
{ name = "treq" },
{ name = "twisted", extra = ["tls"] },
{ name = "twomemo" },
{ name = "tx-xmpp" },
{ name = "txdbus" },
{ name = "urwid" },
{ name = "urwid-satext" },
{ name = "wokkel" },
{ name = "xmlschema" },
]
@ -866,7 +865,6 @@ requires-dist = [
{ name = "python-xlib", specifier = "~=0.33" },
{ name = "pyyaml", specifier = "<7.0.0" },
{ name = "rich", specifier = "~=13.5" },
{ name = "sat-tmp", url = "https://repos.goffi.org/sat_tmp/archive/tip.tar.bz2" },
{ name = "setuptools-scm" },
{ name = "shortuuid", specifier = "~=1.0.11" },
{ name = "sqlalchemy", specifier = ">=1.4" },
@ -876,13 +874,13 @@ requires-dist = [
{ name = "treq", specifier = "~=24.9.0" },
{ name = "twisted", extras = ["tls"], specifier = ">=22.10,<24.11.0" },
{ name = "twomemo", specifier = ">=1.0.0,<2" },
{ name = "tx-xmpp", git = "https://www.goffi.org/forge/goffi/tx-xmpp" },
{ name = "txdbus" },
{ name = "txtorcon", marker = "extra == 'all'", specifier = "~=24.8.0" },
{ name = "txtorcon", marker = "extra == 'main'", specifier = "~=24.8.0" },
{ name = "txtorcon", marker = "extra == 'tor'", specifier = "~=24.8.0" },
{ name = "urwid", specifier = ">=1.2.0,<3" },
{ name = "urwid-satext", url = "https://repos.goffi.org/urwid-satext/archive/tip.tar.bz2" },
{ name = "wokkel", specifier = ">=18.0.0,<19.0.0" },
{ name = "xmlschema", specifier = "<4.3.1" },
]
provides-extras = ["all", "conferences", "gui", "main", "netifaces", "ox", "remote-control", "svg", "tor", "tui", "webrtc"]
@ -1861,18 +1859,6 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/04/54/6f679c435d28e0a568d8e8a7c0a93a09010818634c3c3907fc98d8983770/roman_numerals-4.1.0-py3-none-any.whl", hash = "sha256:647ba99caddc2cc1e55a51e4360689115551bf4476d90e8162cf8c345fe233c7", size = 7676, upload-time = "2025-12-17T18:25:33.098Z" },
]
[[package]]
name = "sat-tmp"
version = "0.9.dev0"
source = { url = "https://repos.goffi.org/sat_tmp/archive/tip.tar.bz2" }
dependencies = [
{ name = "wokkel" },
]
sdist = { hash = "sha256:15ab3c6f72474d2145f386489711587e0348cb921116cbe554ce37f4b5e5bae4" }
[package.metadata]
requires-dist = [{ name = "wokkel", specifier = "==18.0.0" }]
[[package]]
name = "service-identity"
version = "24.2.0"
@ -2213,6 +2199,16 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/ea/7c/3b36bf394b971d530a19b87c30209d4321ba8562c8ee2200d8f228564480/twomemo-1.2.0-py3-none-any.whl", hash = "sha256:c28bbdb58b4e4f32642a363e67faf11dfb5b929a0e956d5329e53edb5ec274ab", size = 19225, upload-time = "2025-06-24T02:04:02.42Z" },
]
[[package]]
name = "tx-xmpp"
version = "0.9.0"
source = { git = "https://www.goffi.org/forge/goffi/tx-xmpp#48593e5eda0f77bd425ad76965c094f7cc9fa592" }
dependencies = [
{ name = "incremental" },
{ name = "python-dateutil" },
{ name = "twisted", extra = ["tls"] },
]
[[package]]
name = "txaio"
version = "25.12.2"
@ -2329,20 +2325,6 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/f4/24/2a3e3df732393fed8b3ebf2ec078f05546de641fe1b667ee316ec1dcf3b7/webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78", size = 11774, upload-time = "2017-04-05T20:21:32.581Z" },
]
[[package]]
name = "wokkel"
version = "18.0.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "incremental" },
{ name = "python-dateutil" },
{ name = "twisted", extra = ["tls"] },
]
sdist = { url = "https://files.pythonhosted.org/packages/6a/77/0ed9531b5374bdd0537c3cba62b9fc4f43f02ffd2bdc7da0572b965fc61a/wokkel-18.0.0.tar.gz", hash = "sha256:2600ce5254a1a92b7c005791eeaf049303e6de9595ee163a8e5b3ff41e21f8ea", size = 119871, upload-time = "2018-12-04T10:22:35.069Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/c2/62/cac4da6c420a109b475b04f5685939222418eaa29abd6adbe3d039504ee5/wokkel-18.0.0-py2.py3-none-any.whl", hash = "sha256:d5116b8e3d807970beb3f7451f3a9187aa74148432c0031c3147031e6f15adb2", size = 131299, upload-time = "2018-12-04T10:22:32.739Z" },
]
[[package]]
name = "x3dh"
version = "1.3.0"