python3Packages.telethon: 1.37.0 -> 1.40.0 (#436737)

This commit is contained in:
dotlambda
2025-09-01 12:07:01 -07:00
committed by GitHub
@@ -2,6 +2,7 @@
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
openssl,
rsa,
pyaes,
@@ -14,7 +15,7 @@
buildPythonPackage rec {
pname = "telethon";
version = "1.37.0";
version = "1.40.0";
pyproject = true;
disabled = pythonOlder "3.5";
@@ -23,10 +24,26 @@ buildPythonPackage rec {
owner = "LonamiWebs";
repo = "Telethon";
tag = "v${version}";
hash = "sha256-P7FP+Wqi3dqbBCFpI9aCDvK4k3mWv8076RO6MXg+jFQ=";
hash = "sha256-y8nMh2dAy5ixATYGjH04FtfpvhO2HU5HRTXBr7Z+Dds=";
};
patchPhase = ''
patches = [
# https://github.com/LonamiWebs/Telethon/pull/4670
(fetchpatch {
url = "https://github.com/LonamiWebs/Telethon/commit/8e2a46568ef9193f5887aea1abf919ac4ca6d31e.patch";
name = "fix_async_test.patch";
hash = "sha256-oVpLnO4OxNam/mq945OskVEHkbS5TDSUXk/0xPHVv3I=";
})
]
++ lib.optionals (lib.versionOlder version "1.40.1") [
(fetchpatch {
url = "https://github.com/LonamiWebs/Telethon/commit/ae9c798e2c3648ff40dee1b3f371f5d66851642e.patch";
name = "fix_test_messages_test.patch";
hash = "sha256-8SJm8EE6w7zRQxt1NuTX6KP1MTYPiYO/maJ5tOA2I9w=";
})
];
postPatch = ''
substituteInPlace telethon/crypto/libssl.py --replace-fail \
"ctypes.util.find_library('ssl')" "'${lib.getLib openssl}/lib/libssl.so'"
'';
@@ -49,16 +66,11 @@ buildPythonPackage rec {
pytestCheckHook
];
disabledTests = [
# https://github.com/LonamiWebs/Telethon/issues/4254
"test_all_methods_present"
"test_private_get_extension"
];
meta = {
homepage = "https://github.com/LonamiWebs/Telethon";
description = "Full-featured Telegram client library for Python 3";
license = lib.licenses.mit;
changelog = "https://github.com/LonamiWebs/Telethon/blob/${src.tag}/readthedocs/misc/changelog.rst";
maintainers = with lib.maintainers; [ nyanloutre ];
};
}