ntfy: remove XMPP support (#481852)

This commit is contained in:
dotlambda
2026-02-01 18:01:35 +00:00
committed by GitHub
5 changed files with 4 additions and 102 deletions
+3 -8
View File
@@ -4,7 +4,6 @@
python3Packages,
fetchFromGitHub,
writableTmpDirAsHomeHook,
withXmpp ? false, # sleekxmpp doesn't support python 3.10, see https://github.com/dschep/ntfy/issues/266
withMatrix ? true,
withSlack ? true,
withEmoji ? true,
@@ -42,10 +41,6 @@ python3Packages.buildPythonApplication rec {
appdirs
ntfy-webpush
]
++ lib.optionals withXmpp [
sleekxmpp
dnspython
]
++ lib.optionals withMatrix [
matrix-client
]
@@ -72,12 +67,12 @@ python3Packages.buildPythonApplication rec {
disabledTests = [
# AssertionError: {'backends': ['default']} != {}
"test_default_config"
]
++ lib.optionals (!withXmpp) [
# sleekxmpp was deprecated in favor of slixmpp
"test_xmpp"
];
disabledTestPaths = lib.optionals (!withXmpp) [
disabledTestPaths = [
"tests/test_xmpp.py"
];
@@ -1,37 +0,0 @@
{
stdenv,
lib,
fetchPypi,
buildPythonPackage,
pythonAtLeast,
dnspython,
pyasn1,
}:
buildPythonPackage rec {
pname = "sleekxmpp";
version = "1.3.3";
format = "setuptools";
disabled = pythonAtLeast "3.10"; # Deprecated in favor of Slixmpp
propagatedBuildInputs = [
dnspython
pyasn1
];
patches = [ ./dnspython-ip6.patch ];
src = fetchPypi {
inherit pname version;
sha256 = "d213c1de71d92505f95ced0460ee0f84fdc4ddcacb7d7dd343739ed4028e5569";
};
meta = {
broken =
(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) || stdenv.hostPlatform.isDarwin;
description = "XMPP library for Python";
license = lib.licenses.mit;
homepage = "http://sleekxmpp.com/";
};
}
@@ -1,55 +0,0 @@
--- a/sleekxmpp/xmlstream/resolver.py
+++ b/sleekxmpp/xmlstream/resolver.py
@@ -175,6 +175,9 @@ def get_A(host, resolver=None, use_dnspy
"""
log.debug("DNS: Querying %s for A records." % host)
+ if isinstance(host, bytes):
+ host = host.decode("utf-8")
+
# If not using dnspython, attempt lookup using the OS level
# getaddrinfo() method.
if resolver is None or not use_dnspython:
@@ -189,7 +192,10 @@ def get_A(host, resolver=None, use_dnspy
# Using dnspython:
try:
recs = resolver.query(host, dns.rdatatype.A)
- return [rec.to_text() for rec in recs]
+ if isinstance(recs[0].to_text(), bytes):
+ return [rec.to_text().decode("utf-8") for rec in recs]
+ else:
+ return [rec.to_text() for rec in recs]
except (dns.resolver.NXDOMAIN, dns.resolver.NoAnswer):
log.debug("DNS: No A records for %s" % host)
return []
@@ -222,6 +228,9 @@ def get_AAAA(host, resolver=None, use_dn
"""
log.debug("DNS: Querying %s for AAAA records." % host)
+ if isinstance(host, bytes):
+ host = host.decode("utf-8")
+
# If not using dnspython, attempt lookup using the OS level
# getaddrinfo() method.
if resolver is None or not use_dnspython:
@@ -240,7 +249,10 @@ def get_AAAA(host, resolver=None, use_dn
# Using dnspython:
try:
recs = resolver.query(host, dns.rdatatype.AAAA)
- return [rec.to_text() for rec in recs]
+ if isinstance(recs[0].to_text(), bytes):
+ return [rec.to_text().decode("utf-8") for rec in recs]
+ else:
+ return [rec.to_text() for rec in recs]
except (dns.resolver.NXDOMAIN, dns.resolver.NoAnswer):
log.debug("DNS: No AAAA records for %s" % host)
return []
@@ -324,6 +336,8 @@ def get_SRV(host, port, service, proto='
if running_sum >= selected:
rec = sums[running_sum]
host = rec.target.to_text()
+ if isinstance(host, bytes):
+ host = host.decode("utf-8")
if host.endswith('.'):
host = host[:-1]
sorted_recs.append((host, rec.port))
+1
View File
@@ -471,6 +471,7 @@ mapAliases {
sip_4 = throw "'sip_4' has been renamed to/replaced by 'sip4'"; # Converted to throw 2025-10-29
sipsimple = lib.warnOnInstantiate "'sipsimple' has been renamed to 'python3-sipsimple' to fit upstream naming" python3-sipsimple; # added 2026-01-05
slackclient = throw "'slackclient' has been renamed to/replaced by 'slack-sdk'"; # Converted to throw 2025-10-29
sleekxmpp = throw "'sleekxmpp' has been removed because it was deprecated in favor of 'slixmpp'"; # added 2026-01-19
smart_open = throw "'smart_open' has been renamed to/replaced by 'smart-open'"; # Converted to throw 2025-10-29
smpp_pdu = throw "'smpp_pdu' has been renamed to/replaced by 'smpp-pdu'"; # Converted to throw 2025-10-29
sorl_thumbnail = throw "'sorl_thumbnail' has been renamed to/replaced by 'sorl-thumbnail'"; # Converted to throw 2025-10-29
-2
View File
@@ -17500,8 +17500,6 @@ self: super: with self; {
slapd = callPackage ../development/python-modules/slapd { };
sleekxmpp = callPackage ../development/python-modules/sleekxmpp { };
sleekxmppfs = callPackage ../development/python-modules/sleekxmppfs { };
sleepyq = callPackage ../development/python-modules/sleepyq { };