summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-telegram-bot
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2023-01-11 10:53:00 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2023-01-11 11:57:25 +0100
commitbedece9c7dccc9eae5753b81aefe22795708af58 (patch)
treed6e2c3acdaed852775cef7c469950bc98e4e845a /pkgs/development/python-modules/python-telegram-bot
parent9d7845b4ac2bf2042702de9b64f38bbd9abe877f (diff)
python310Packages.python-telegram-bot: 13.15 -> 20.0
Diffstat (limited to 'pkgs/development/python-modules/python-telegram-bot')
-rw-r--r--pkgs/development/python-modules/python-telegram-bot/default.nix123
1 files changed, 92 insertions, 31 deletions
diff --git a/pkgs/development/python-modules/python-telegram-bot/default.nix b/pkgs/development/python-modules/python-telegram-bot/default.nix
index f9154729bdb3..11ad4e25d7ba 100644
--- a/pkgs/development/python-modules/python-telegram-bot/default.nix
+++ b/pkgs/development/python-modules/python-telegram-bot/default.nix
@@ -1,59 +1,120 @@
{ lib
+, aiolimiter
, APScheduler
+, beautifulsoup4
, buildPythonPackage
, cachetools
-, certifi
-, decorator
-, fetchPypi
-, future
-, tornado
-, urllib3
+, cryptography
+, fetchFromGitHub
+, flaky
+, httpx
+, pytest-asyncio
+, pytest-timeout
+, pytest-xdist
+, pytestCheckHook
, pythonOlder
+, pytz
+, tornado
}:
buildPythonPackage rec {
pname = "python-telegram-bot";
- version = "13.15";
+ version = "20.0";
format = "setuptools";
disabled = pythonOlder "3.7";
- src = fetchPypi {
- inherit pname version;
- hash = "sha256-tAR2BrgIG2K71qo2H3yh7+h/qPGIHsnZMtNYRL9XoVQ=";
+ src = fetchFromGitHub {
+ owner = pname;
+ repo = pname;
+ rev = "refs/tags/v${version}";
+ hash = "sha256-34Apzy7id+fDxTN935hPT0HeZNZMEdQqZ0aiV0trAxE=";
};
propagatedBuildInputs = [
+ aiolimiter
APScheduler
cachetools
- certifi
- decorator
- future
- tornado
- urllib3
- ];
-
- # --with-upstream-urllib3 is not working properly
- postPatch = ''
- rm -r telegram/vendor
+ cryptography
+ httpx
+ pytz
+ ] ++ httpx.optional-dependencies.socks;
- substituteInPlace requirements.txt \
- --replace "APScheduler==3.6.3" "APScheduler" \
- --replace "cachetools==4.2.2" "cachetools" \
- --replace "tornado==6.1" "tornado"
- '';
-
- setupPyGlobalFlags = [
- "--with-upstream-urllib3"
+ checkInputs = [
+ beautifulsoup4
+ flaky
+ pytest-asyncio
+ pytest-timeout
+ pytest-xdist
+ pytestCheckHook
+ tornado
];
- # Tests not included with release
- doCheck = false;
-
pythonImportsCheck = [
"telegram"
];
+ disabledTests = [
+ # Tests require network access
+ "TestAIO"
+ "TestAnimation"
+ "TestApplication"
+ "TestAudio"
+ "TestBase"
+ "TestBot"
+ "TestCallback"
+ "TestChat"
+ "TestChosenInlineResult"
+ "TestCommandHandler"
+ "TestConstants"
+ "TestContact"
+ "TestConversationHandler"
+ "TestDice"
+ "TestDict"
+ "TestDocument"
+ "TestFile"
+ "TestForceReply"
+ "TestForum"
+ "TestGame"
+ "TestGet"
+ "TestHTTP"
+ "TestInline"
+ "TestInput"
+ "TestInvoice"
+ "TestJob"
+ "TestKeyboard"
+ "TestLocation"
+ "TestMask"
+ "TestMenu"
+ "TestMessage"
+ "TestMeta"
+ "TestOrder"
+ "TestPassport"
+ "TestPhoto"
+ "TestPickle"
+ "TestPoll"
+ "TestPre"
+ "TestPrefix"
+ "TestProximity"
+ "TestReply"
+ "TestRequest"
+ "TestSend"
+ "TestSent"
+ "TestShipping"
+ "TestSlot"
+ "TestSticker"
+ "TestString"
+ "TestSuccess"
+ "TestTelegram"
+ "TestType"
+ "TestUpdate"
+ "TestUser"
+ "TestVenue"
+ "TestVideo"
+ "TestVoice"
+ "TestWeb"
+ ];
+
meta = with lib; {
description = "Python library to interface with the Telegram Bot API";
homepage = "https://python-telegram-bot.org";