python310Packages.python-telegram-bot: 13.15 -> 20.0

This commit is contained in:
Fabian Affolter 2023-01-11 10:53:00 +01:00
parent 9d7845b4ac
commit bedece9c7d

View file

@ -1,59 +1,120 @@
{ lib { lib
, aiolimiter
, APScheduler , APScheduler
, beautifulsoup4
, buildPythonPackage , buildPythonPackage
, cachetools , cachetools
, certifi , cryptography
, decorator , fetchFromGitHub
, fetchPypi , flaky
, future , httpx
, tornado , pytest-asyncio
, urllib3 , pytest-timeout
, pytest-xdist
, pytestCheckHook
, pythonOlder , pythonOlder
, pytz
, tornado
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "python-telegram-bot"; pname = "python-telegram-bot";
version = "13.15"; version = "20.0";
format = "setuptools"; format = "setuptools";
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
src = fetchPypi { src = fetchFromGitHub {
inherit pname version; owner = pname;
hash = "sha256-tAR2BrgIG2K71qo2H3yh7+h/qPGIHsnZMtNYRL9XoVQ="; repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-34Apzy7id+fDxTN935hPT0HeZNZMEdQqZ0aiV0trAxE=";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [
aiolimiter
APScheduler APScheduler
cachetools cachetools
certifi cryptography
decorator httpx
future pytz
] ++ httpx.optional-dependencies.socks;
checkInputs = [
beautifulsoup4
flaky
pytest-asyncio
pytest-timeout
pytest-xdist
pytestCheckHook
tornado tornado
urllib3
]; ];
# --with-upstream-urllib3 is not working properly
postPatch = ''
rm -r telegram/vendor
substituteInPlace requirements.txt \
--replace "APScheduler==3.6.3" "APScheduler" \
--replace "cachetools==4.2.2" "cachetools" \
--replace "tornado==6.1" "tornado"
'';
setupPyGlobalFlags = [
"--with-upstream-urllib3"
];
# Tests not included with release
doCheck = false;
pythonImportsCheck = [ pythonImportsCheck = [
"telegram" "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; { meta = with lib; {
description = "Python library to interface with the Telegram Bot API"; description = "Python library to interface with the Telegram Bot API";
homepage = "https://python-telegram-bot.org"; homepage = "https://python-telegram-bot.org";