Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
v9.9.9 (unreleased)
-------------------
- chore: add releases script (#1767)
- refactor: remove webtest dependency (#1769)


v6.2.1 (2026-06-06)
Expand Down
4 changes: 3 additions & 1 deletion errbot/core_plugins/templates/plugin_info.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ log destination: {{ plugin.log.name }}

log level: {{ logging.getLevelName(plugin.log.level) }}

{% if plugin.keys %}
{% if plugin.is_activated %}
{% if plugin.keys() %}
**storage content**

Key | Value
-------------------- | -----------------------
{% for key, value in plugin.items() %}{{ key.ljust(20) }} | `{{ value }}`
{% endfor %}
{% endif %}
{% endif %}

{% if plugin.config %}
**config content**
Expand Down
20 changes: 10 additions & 10 deletions errbot/core_plugins/webserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from urllib.request import unquote

from OpenSSL import crypto
from webtest import TestApp
from werkzeug.serving import ThreadedWSGIServer

from errbot import BotPlugin, botcmd, webhook
Expand Down Expand Up @@ -57,7 +56,6 @@ def __init__(self, *args, **kwargs):
self.server = None
self.server_thread = None
self.ssl_context = None
self.test_app = TestApp(flask_app)
super().__init__(*args, **kwargs)

def get_configuration_template(self):
Expand All @@ -75,14 +73,14 @@ def get_configuration_template(self):

def check_configuration(self, configuration):
# it is a pain, just assume a default config if SSL is absent or set to None
ssl_template = self.get_configuration_template()["SSL"]
if configuration.get("SSL", None) is None:
configuration["SSL"] = {
"enabled": False,
"host": "0.0.0.0",
"port": 3142,
"certificate": "",
"key": "",
}
configuration["SSL"] = ssl_template
else:
# fill in missing keys from template if they are absent
for k, v in ssl_template.items():
if k not in configuration["SSL"]:
configuration["SSL"][k] = v
super().check_configuration(configuration)

def activate(self):
Expand Down Expand Up @@ -180,7 +178,9 @@ def webhook_test(self, _, args):

self.log.debug("Detected your post as : %s.", contenttype)

response = self.test_app.post(url, params=content, content_type=contenttype)
with flask_app.test_client() as client:
response = client.post(url, data=content, content_type=contenttype)

return {
"url": url,
"content": content,
Expand Down
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
VERSION_FILE = os.path.join("errbot", "version.py")

deps = [
"webtest==3.0.7",
"setuptools>=78.1.1",
"flask==3.1.3",
"requests==2.32.5",
Expand All @@ -40,7 +39,6 @@
"pygments-markdown-lexer==0.1.0.dev39", # syntax coloring to debug md
"dulwich==1.2.1", # python implementation of git
"deepmerge==2.0",
"legacy-cgi==2.6.4; python_version >= '3.13'", # stopgap fix for webtest after cgi dropped from stdlib in 3.13
]

src_root = os.curdir
Expand Down Expand Up @@ -90,7 +88,7 @@ def read(fname, encoding="ascii"):
]
},
install_requires=deps,
tests_require=["nose", "webtest", "requests"],
tests_require=["nose", "requests"],
package_data={
"errbot": [
"backends/*.plug",
Expand Down
Loading