<86>Oct 18 17:05:29 userdel[3425594]: delete user 'rooter' <86>Oct 18 17:05:29 userdel[3425594]: removed group 'rooter' owned by 'rooter' <86>Oct 18 17:05:29 userdel[3425594]: removed shadow group 'rooter' owned by 'rooter' <86>Oct 18 17:05:29 groupadd[3425637]: group added to /etc/group: name=rooter, GID=1841 <86>Oct 18 17:05:29 groupadd[3425637]: group added to /etc/gshadow: name=rooter <86>Oct 18 17:05:29 groupadd[3425637]: new group: name=rooter, GID=1841 <86>Oct 18 17:05:29 useradd[3425681]: new user: name=rooter, UID=1841, GID=1841, home=/root, shell=/bin/bash, from=none <86>Oct 18 17:05:29 userdel[3425736]: delete user 'builder' <86>Oct 18 17:05:29 userdel[3425736]: removed group 'builder' owned by 'builder' <86>Oct 18 17:05:29 userdel[3425736]: removed shadow group 'builder' owned by 'builder' <86>Oct 18 17:05:29 groupadd[3425770]: group added to /etc/group: name=builder, GID=1842 <86>Oct 18 17:05:29 groupadd[3425770]: group added to /etc/gshadow: name=builder <86>Oct 18 17:05:29 groupadd[3425770]: new group: name=builder, GID=1842 <86>Oct 18 17:05:29 useradd[3425803]: new user: name=builder, UID=1842, GID=1842, home=/usr/src, shell=/bin/bash, from=none <13>Oct 18 17:05:34 rpmi: libtcl-8.6.13-alt1 sisyphus+310696.100.1.1 1669548266 installed <13>Oct 18 17:05:34 rpmi: libexpat-2.5.0-alt1 sisyphus+346180.200.2.1 1716349835 installed <13>Oct 18 17:05:34 rpmi: tcl-8.6.13-alt1 sisyphus+310696.100.1.1 1669548266 installed <13>Oct 18 17:05:34 rpmi: libncurses6-6.3.20220618-alt4 sisyphus+327286.4600.14.1 1711486705 installed <13>Oct 18 17:05:34 rpmi: libtinfo-devel-6.3.20220618-alt4 sisyphus+327286.4600.14.1 1711486705 installed <13>Oct 18 17:05:34 rpmi: libncurses-devel-6.3.20220618-alt4 sisyphus+327286.4600.14.1 1711486705 installed <13>Oct 18 17:05:34 rpmi: libmpdec3-2.5.1-alt3 sisyphus+314490.500.5.1 1675432004 installed <13>Oct 18 17:05:34 rpmi: libusb-1.0.27-alt1 sisyphus+347412.100.1.1 1714739651 installed <13>Oct 18 17:05:34 rpmi: libhidapi-0.12.0-alt1_1 sisyphus+303213.100.1.1 1657034192 installed <13>Oct 18 17:05:34 rpmi: libgdbm-1.8.3-alt10 sisyphus+346222.200.3.2 1716468404 installed <13>Oct 18 17:05:34 rpmi: libcares-1.34.1-alt1 sisyphus+359478.100.1.1 1728580443 installed <13>Oct 18 17:05:34 rpmi: libb2-0.98.1-alt1_1 sisyphus+291614.100.1.1 1638962877 installed <13>Oct 18 17:05:34 rpmi: libpng16-1.6.42-alt2 sisyphus+339555.100.1.1 1706781682 installed <13>Oct 18 17:05:34 rpmi: libbrotlicommon-1.1.0-alt1 sisyphus+328501.100.1.1 1693598419 installed <13>Oct 18 17:05:34 rpmi: libbrotlidec-1.1.0-alt1 sisyphus+328501.100.1.1 1693598419 installed <13>Oct 18 17:05:34 rpmi: libgraphite2-1.3.14-alt2.1 sisyphus+279571.100.1.2 1626605111 installed <13>Oct 18 17:05:34 rpmi: libharfbuzz-10.0.1-alt1 sisyphus+358317.100.1.1 1727257731 installed <13>Oct 18 17:05:34 rpmi: libfreetype-2.13.3-alt1 sisyphus+355656.100.1.1 1724221064 installed <13>Oct 18 17:05:34 rpmi: libfontconfig1-2.15.0-alt1 sisyphus+355771.100.2.3 1724337298 installed <13>Oct 18 17:05:34 rpmi: libXdmcp-1.1.5-alt1 sisyphus+343583.700.1.1 1711441061 installed <13>Oct 18 17:05:34 rpmi: libXau-1.0.11-alt1 sisyphus+311428.100.1.1 1670577439 installed <13>Oct 18 17:05:34 rpmi: libxcb-1.17.0-alt1 sisyphus+345308.200.1.1 1713342004 installed <13>Oct 18 17:05:34 rpmi: libX11-locales-3:1.8.10-alt1 sisyphus+353866.100.1.1 1722240771 installed <13>Oct 18 17:05:34 rpmi: libX11-3:1.8.10-alt1 sisyphus+353866.100.1.1 1722240771 installed <13>Oct 18 17:05:34 rpmi: libXrender-0.9.11-alt1 sisyphus+308841.100.1.1 1666436130 installed <13>Oct 18 17:05:34 rpmi: libXft-2.3.8-alt1 sisyphus+331490.400.1.1 1697023269 installed <13>Oct 18 17:05:34 rpmi: libtk-8.6.13-alt1 sisyphus+310696.200.1.1 1669548530 installed <13>Oct 18 17:05:34 rpmi: tk-8.6.13-alt1 sisyphus+310696.200.1.1 1669548530 installed <13>Oct 18 17:05:34 rpmi: tcl-tix-8.4.3-alt4 sisyphus+277292.300.2.1 1625442550 installed <13>Oct 18 17:05:35 rpmi: libp11-kit-1:0.25.5-alt1 sisyphus+352553.100.1.1 1720622573 installed <13>Oct 18 17:05:35 rpmi: libtasn1-4.19.0-alt3 sisyphus+327816.100.1.1 1692802615 installed <13>Oct 18 17:05:35 rpmi: rpm-macros-alternatives-0.5.2-alt2 sisyphus+315270.200.2.1 1676457367 installed <13>Oct 18 17:05:35 rpmi: alternatives-0.5.2-alt2 sisyphus+315270.200.2.1 1676457367 installed <13>Oct 18 17:05:35 rpmi: ca-certificates-2024.07.01-alt1 sisyphus+351897.100.1.1 1719826350 installed <13>Oct 18 17:05:35 rpmi: ca-trust-0.2.0-alt1 sisyphus+344843.100.1.1 1712743326 installed <13>Oct 18 17:05:35 rpmi: p11-kit-trust-1:0.25.5-alt1 sisyphus+352553.100.1.1 1720622573 installed <13>Oct 18 17:05:35 rpmi: libcrypto3-3.1.7-alt1 sisyphus+356755.100.1.1 1725388416 installed <13>Oct 18 17:05:35 rpmi: libssl3-3.1.7-alt1 sisyphus+356755.100.1.1 1725388416 installed <13>Oct 18 17:05:35 rpmi: python3-3.12.7-alt1 sisyphus+358796.100.1.1 1727844808 installed <13>Oct 18 17:05:35 rpmi: python3-base-3.12.7-alt1 sisyphus+358796.100.1.1 1727844808 installed <13>Oct 18 17:05:35 rpmi: python3-module-idna-3.10-alt1 sisyphus+358681.100.1.1 1727701241 installed <13>Oct 18 17:05:35 rpmi: python3-module-attrs-24.2.0-alt2 sisyphus+355603.200.1.1 1724160494 installed <13>Oct 18 17:05:35 rpmi: python3-module-certifi-2024.8.30-alt1 sisyphus+356919.100.1.1 1725546651 installed <13>Oct 18 17:05:36 rpmi: python3-module-Pygments-2.18.0-alt1 sisyphus+347552.100.1.1 1714992955 installed <13>Oct 18 17:05:36 rpmi: python3-module-sniffio-1.3.1-alt1 sisyphus+341424.100.1.1 1708941879 installed <13>Oct 18 17:05:36 rpmi: python3-module-pluggy-1.5.0-alt1 sisyphus+345632.100.2.1 1713864244 installed <13>Oct 18 17:05:36 rpmi: python3-module-pkg_resources-1:70.3.0-alt1 sisyphus+352532.100.2.1 1720689192 installed <13>Oct 18 17:05:36 rpmi: python3-module-zope.interface-7.1.0-alt1 sisyphus+359443.100.1.1 1728564441 installed <13>Oct 18 17:05:36 rpmi: python3-module-click-8.1.7-alt1 sisyphus+327424.100.2.1 1695395098 installed <13>Oct 18 17:05:36 rpmi: python3-module-pyasn1-0.6.0-alt1 sisyphus+343691.100.1.1 1711530038 installed <13>Oct 18 17:05:36 rpmi: python3-module-pyasn1-modules-0.4.0-alt1 sisyphus+343691.200.1.1 1711530070 installed <13>Oct 18 17:05:36 rpmi: python3-module-incremental-22.10.0-alt1 sisyphus+312706.100.1.1 1672404273 installed <13>Oct 18 17:05:36 rpmi: python3-module-outcome-1.3.0-alt1 sisyphus+332382.100.1.1 1697882349 installed <13>Oct 18 17:05:36 rpmi: python3-module-hyperlink-21.0.0-alt1.1 sisyphus+304836.100.1.1 1659710964 installed <13>Oct 18 17:05:36 rpmi: libpython3-3.12.7-alt1 sisyphus+358796.100.1.1 1727844808 installed <13>Oct 18 17:05:36 rpmi: python3-module-py3dephell-0.1.0-alt2 sisyphus+328191.600.5.1 1693609196 installed <13>Oct 18 17:05:36 rpmi: python3-module-iniconfig-2.0.0-alt1 sisyphus+314076.200.3.1 1674737275 installed <13>Oct 18 17:05:36 rpmi: python3-module-packaging-24.1-alt1 sisyphus+350717.100.2.1 1718268656 installed <13>Oct 18 17:05:36 rpmi: python3-module-pytest-8.3.3-alt1 sisyphus+357310.100.1.1 1726063386 installed <13>Oct 18 17:05:36 rpmi: python3-module-appdirs-1.4.4-alt2 sisyphus+359005.100.1.1 1728036426 installed <13>Oct 18 17:05:36 rpmi: python3-module-argcomplete-3.5.1-alt1 sisyphus+359143.100.1.1 1728289121 installed <13>Oct 18 17:05:36 rpmi: python3-module-pycparser-2.21-alt1.1 sisyphus+309935.7300.4.1 1668527005 installed <13>Oct 18 17:05:36 rpmi: python3-module-cffi-1.17.1-alt1 sisyphus+357396.100.1.1 1726156476 installed <13>Oct 18 17:05:36 rpmi: python3-module-cryptography-43.0.0-alt1 sisyphus+353417.100.1.1 1721731007 installed <13>Oct 18 17:05:36 rpmi: python3-module-openssl-24.2.1-alt1 sisyphus+353417.200.1.1 1721731036 installed <13>Oct 18 17:05:36 rpmi: python3-module-service_identity-24.1.0-alt1 sisyphus+338892.100.1.2 1706114425 installed <13>Oct 18 17:05:36 rpmi: python3-module-pycares-4.4.0-alt1 sisyphus+347421.100.1.1 1714743573 installed <13>Oct 18 17:05:36 rpmi: python3-module-zombie-imp-0.0.2-alt1 sisyphus+339293.100.1.1 1706537230 installed <13>Oct 18 17:05:36 rpmi: python3-module-cython-hidapi-0.14.0-alt1.1 sisyphus+333513.54340.73.1 1704651867 installed <13>Oct 18 17:05:36 rpmi: python3-module-serial-3.5-alt2 sisyphus+281995.100.1.1 1628172783 installed <13>Oct 18 17:05:36 rpmi: python3-modules-tkinter-3.12.7-alt1 sisyphus+358796.100.1.1 1727844808 installed <13>Oct 18 17:05:36 rpmi: python3-module-typing_extensions-4.12.2-alt1 sisyphus+351501.100.1.2 1719296652 installed <13>Oct 18 17:05:36 rpmi: python3-module-constantly-15.1.0-alt7 sisyphus+338906.100.1.1 1706107088 installed <13>Oct 18 17:05:36 rpmi: python3-module-hyperframe-6.0.1-alt1 sisyphus+270376.300.2.1 1618957001 installed <13>Oct 18 17:05:36 rpmi: python3-module-hpack-4.0.0-alt1 sisyphus+270376.200.1.1 1618956626 installed <13>Oct 18 17:05:36 rpmi: python3-module-h2-4.1.0-alt1 sisyphus+325714.100.2.2 1690478873 installed <13>Oct 18 17:05:36 rpmi: python3-module-priority-2.0.0-alt3 sisyphus+338701.100.1.2 1705988383 installed <13>Oct 18 17:05:36 rpmi: python3-module-twisted-logger-22.10.0-alt3 sisyphus+341870.100.1.1 1709406646 installed <13>Oct 18 17:05:36 rpmi: python3-module-twisted-web-22.10.0-alt3 sisyphus+341870.100.1.1 1709406646 installed <13>Oct 18 17:05:36 rpmi: python3-module-twisted-words-22.10.0-alt3 sisyphus+341870.100.1.1 1709406646 installed <13>Oct 18 17:05:36 rpmi: python3-module-automat-24.8.1-alt1 sisyphus+355768.100.2.1 1724411664 installed <13>Oct 18 17:05:37 rpmi: python3-module-twisted-core-22.10.0-alt3 sisyphus+341870.100.1.1 1709406646 installed <13>Oct 18 17:05:37 rpmi: python3-module-twisted-names-22.10.0-alt3 sisyphus+341870.100.1.1 1709406646 installed <13>Oct 18 17:05:37 rpmi: python3-module-bottle-1:0.12.25-alt1 sisyphus+316623.100.1.1 1678651894 installed <13>Oct 18 17:05:37 rpmi: python3-module-bson-4.10.1-alt1 sisyphus+358819.100.1.1 1727869387 installed <13>Oct 18 17:05:37 rpmi: python3-module-charset-normalizer-3.2.0-alt1 sisyphus+347396.200.2.1 1714733155 installed <13>Oct 18 17:05:37 rpmi: python3-module-wcwidth-0.2.13-alt1 sisyphus+341792.100.2.1 1709543329 installed <13>Oct 18 17:05:37 rpmi: python3-module-prettytable-2.1.0-alt1 sisyphus+269172.200.1.1 1617824839 installed <13>Oct 18 17:05:37 rpmi: python3-module-urllib3-2:2.2.3-alt1 sisyphus+357427.100.2.1 1726567364 installed <13>Oct 18 17:05:37 rpmi: python3-module-requests-2.32.3-alt1 sisyphus+349946.100.1.1 1717059877 installed <13>Oct 18 17:05:37 rpmi: python3-module-pymongo-4.10.1-alt1 sisyphus+358819.100.1.1 1727869387 installed <13>Oct 18 17:05:37 rpmi: python3-module-servicemanager-2.0.7-alt1 sisyphus+275998.100.1.1 1624811123 installed <13>Oct 18 17:05:37 rpmi: python3-module-execnet-2.1.1-alt1 sisyphus+344737.100.1.1 1712657795 installed <13>Oct 18 17:05:37 rpmi: python3-module-h11-0.14.0-alt1 sisyphus+312690.100.1.1 1672395335 installed <13>Oct 18 17:05:37 rpmi: python3-module-socksio-1.0.0-alt1 sisyphus+295017.1500.2.1 1644498004 installed <13>Oct 18 17:05:37 rpmi: python3-module-httpcore-1.0.5-alt1 sisyphus+347570.100.1.1 1715005713 installed <13>Oct 18 17:05:37 rpmi: python3-module-mdurl-0.1.2-alt1 sisyphus+318894.1000.3.1 1682420700 installed <13>Oct 18 17:05:37 rpmi: python3-module-markdown-it-3.0.0-alt1 sisyphus+324665.100.1.1 1689081992 installed <13>Oct 18 17:05:37 rpmi: python3-module-rich-13.9.2-alt1 sisyphus+359171.100.1.1 1728309554 installed <13>Oct 18 17:05:37 rpmi: tests-for-installed-python3-pkgs-0.1.25-alt1 sisyphus+344685.100.1.1 1712595070 installed <13>Oct 18 17:05:37 rpmi: rpm-build-python3-0.1.25-alt1 sisyphus+344685.100.1.1 1712595070 installed <13>Oct 18 17:05:38 rpmi: python3-dev-3.12.7-alt1 sisyphus+358796.100.1.1 1727844808 installed <13>Oct 18 17:05:38 rpmi: python3-module-setuptools-1:70.3.0-alt1 sisyphus+352532.100.2.1 1720689192 installed <13>Oct 18 17:05:38 rpmi: python3-module-httpx-0.27.0-alt1 sisyphus+347574.100.1.1 1715005951 installed <13>Oct 18 17:05:38 rpmi: python3-module-pytest-xdist-3.6.1-alt1 sisyphus+347405.100.1.1 1714737453 installed <13>Oct 18 17:05:38 rpmi: python3-module-tornado-6.4.1-alt1 sisyphus+352243.100.1.1 1720177912 installed <13>Oct 18 17:05:38 rpmi: python3-module-anyio-4.6.2-alt1.post1 sisyphus+359801.200.1.1 1728992164 installed <13>Oct 18 17:05:38 rpmi: python3-module-flaky-3.8.1-alt1 sisyphus+344119.100.1.1 1711967596 installed <13>Oct 18 17:05:38 rpmi: python3-module-pytest-asyncio-0.24.0-alt1 sisyphus+358335.100.2.1 1727347857 installed <13>Oct 18 17:05:38 rpmi: python3-module-cachetools-5.5.0-alt1 sisyphus+357428.100.1.1 1726222868 installed <13>Oct 18 17:05:38 rpmi: python3-module-pytz-1:2024.1-alt1 sisyphus+353671.100.1.2 1722000143 installed <13>Oct 18 17:05:38 rpmi: python3-module-wheel-0.44.0-alt1 sisyphus+355530.100.1.1 1724069901 installed Building target platforms: x86_64 Building for target x86_64 Wrote: /usr/src/in/nosrpm/python3-module-telegram-bot-21.3-alt1.nosrc.rpm (w1.gzdio) <13>Oct 18 17:05:41 rpmi: python3-module-pyproject-installer-0.5.4-alt1 sisyphus+352023.140.3.1 1720195943 installed Installing python3-module-telegram-bot-21.3-alt1.src.rpm Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.31994 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf python3-module-telegram-bot-21.3 + echo 'Source #0 (python3-module-telegram-bot-21.3-alt1.tar):' Source #0 (python3-module-telegram-bot-21.3-alt1.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/python3-module-telegram-bot-21.3-alt1.tar + cd python3-module-telegram-bot-21.3 + /bin/chmod -c -Rf u+rwX,go-w . + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.31994 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python3-module-telegram-bot-21.3 + export 'CFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto' + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto' + export 'CXXFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto' + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto' + export 'FFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto' + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto' + /usr/bin/python3 -m pyproject_installer -v build INFO : pyproject_installer.build_cmd._build : Building wheel INFO : pyproject_installer.build_cmd._build : Source tree: /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3 INFO : pyproject_installer.build_cmd._build : Output dir: /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/dist DEBUG : pyproject_installer.lib.build_backend : Validating source path DEBUG : pyproject_installer.lib.build_backend : Checking for PEP517 spec DEBUG : pyproject_installer.lib.build_backend : Parsing configuration file: /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/pyproject.toml INFO : pyproject_installer.lib.build_backend : build-system was not found, using defaults INFO : backend_caller.py : Calling hook build_wheel in subprocess INFO : backend_caller.py : Build backend: setuptools.build_meta:__legacy__ INFO : backend_caller.py : Hook args: ['/usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/dist'] INFO : backend_caller.py : Hook kwargs: {'config_settings': None} INFO : root : running bdist_wheel INFO : root : running build INFO : root : running build_py INFO : root : creating build INFO : root : creating build/lib INFO : root : creating build/lib/telegram INFO : root : copying telegram/warnings.py -> build/lib/telegram INFO : root : copying telegram/helpers.py -> build/lib/telegram INFO : root : copying telegram/error.py -> build/lib/telegram INFO : root : copying telegram/constants.py -> build/lib/telegram INFO : root : copying telegram/_writeaccessallowed.py -> build/lib/telegram INFO : root : copying telegram/_webhookinfo.py -> build/lib/telegram INFO : root : copying telegram/_webappinfo.py -> build/lib/telegram INFO : root : copying telegram/_webappdata.py -> build/lib/telegram INFO : root : copying telegram/_videochat.py -> build/lib/telegram INFO : root : copying telegram/_version.py -> build/lib/telegram INFO : root : copying telegram/_userprofilephotos.py -> build/lib/telegram INFO : root : copying telegram/_user.py -> build/lib/telegram INFO : root : copying telegram/_update.py -> build/lib/telegram INFO : root : copying telegram/_telegramobject.py -> build/lib/telegram INFO : root : copying telegram/_switchinlinequerychosenchat.py -> build/lib/telegram INFO : root : copying telegram/_story.py -> build/lib/telegram INFO : root : copying telegram/_shared.py -> build/lib/telegram INFO : root : copying telegram/_sentwebappmessage.py -> build/lib/telegram INFO : root : copying telegram/_replykeyboardremove.py -> build/lib/telegram INFO : root : copying telegram/_replykeyboardmarkup.py -> build/lib/telegram INFO : root : copying telegram/_reply.py -> build/lib/telegram INFO : root : copying telegram/_reaction.py -> build/lib/telegram INFO : root : copying telegram/_proximityalerttriggered.py -> build/lib/telegram INFO : root : copying telegram/_poll.py -> build/lib/telegram INFO : root : copying telegram/_messagereactionupdated.py -> build/lib/telegram INFO : root : copying telegram/_messageorigin.py -> build/lib/telegram INFO : root : copying telegram/_messageid.py -> build/lib/telegram INFO : root : copying telegram/_messageentity.py -> build/lib/telegram INFO : root : copying telegram/_messageautodeletetimerchanged.py -> build/lib/telegram INFO : root : copying telegram/_message.py -> build/lib/telegram INFO : root : copying telegram/_menubutton.py -> build/lib/telegram INFO : root : copying telegram/_loginurl.py -> build/lib/telegram INFO : root : copying telegram/_linkpreviewoptions.py -> build/lib/telegram INFO : root : copying telegram/_keyboardbuttonrequest.py -> build/lib/telegram INFO : root : copying telegram/_keyboardbuttonpolltype.py -> build/lib/telegram INFO : root : copying telegram/_keyboardbutton.py -> build/lib/telegram INFO : root : copying telegram/_giveaway.py -> build/lib/telegram INFO : root : copying telegram/_forumtopic.py -> build/lib/telegram INFO : root : copying telegram/_forcereply.py -> build/lib/telegram INFO : root : copying telegram/_dice.py -> build/lib/telegram INFO : root : copying telegram/_choseninlineresult.py -> build/lib/telegram INFO : root : copying telegram/_chatpermissions.py -> build/lib/telegram INFO : root : copying telegram/_chatmemberupdated.py -> build/lib/telegram INFO : root : copying telegram/_chatmember.py -> build/lib/telegram INFO : root : copying telegram/_chatlocation.py -> build/lib/telegram INFO : root : copying telegram/_chatjoinrequest.py -> build/lib/telegram INFO : root : copying telegram/_chatinvitelink.py -> build/lib/telegram INFO : root : copying telegram/_chatfullinfo.py -> build/lib/telegram INFO : root : copying telegram/_chatboost.py -> build/lib/telegram INFO : root : copying telegram/_chatbackground.py -> build/lib/telegram INFO : root : copying telegram/_chatadministratorrights.py -> build/lib/telegram INFO : root : copying telegram/_chat.py -> build/lib/telegram INFO : root : copying telegram/_callbackquery.py -> build/lib/telegram INFO : root : copying telegram/_business.py -> build/lib/telegram INFO : root : copying telegram/_botname.py -> build/lib/telegram INFO : root : copying telegram/_botdescription.py -> build/lib/telegram INFO : root : copying telegram/_botcommandscope.py -> build/lib/telegram INFO : root : copying telegram/_botcommand.py -> build/lib/telegram INFO : root : copying telegram/_bot.py -> build/lib/telegram INFO : root : copying telegram/_birthdate.py -> build/lib/telegram INFO : root : copying telegram/__main__.py -> build/lib/telegram INFO : root : copying telegram/__init__.py -> build/lib/telegram INFO : root : creating build/lib/telegram/request INFO : root : copying telegram/request/_requestparameter.py -> build/lib/telegram/request INFO : root : copying telegram/request/_requestdata.py -> build/lib/telegram/request INFO : root : copying telegram/request/_httpxrequest.py -> build/lib/telegram/request INFO : root : copying telegram/request/_baserequest.py -> build/lib/telegram/request INFO : root : copying telegram/request/__init__.py -> build/lib/telegram/request INFO : root : creating build/lib/telegram/ext INFO : root : copying telegram/ext/filters.py -> build/lib/telegram/ext INFO : root : copying telegram/ext/_updater.py -> build/lib/telegram/ext INFO : root : copying telegram/ext/_picklepersistence.py -> build/lib/telegram/ext INFO : root : copying telegram/ext/_jobqueue.py -> build/lib/telegram/ext INFO : root : copying telegram/ext/_extbot.py -> build/lib/telegram/ext INFO : root : copying telegram/ext/_dictpersistence.py -> build/lib/telegram/ext INFO : root : copying telegram/ext/_defaults.py -> build/lib/telegram/ext INFO : root : copying telegram/ext/_contexttypes.py -> build/lib/telegram/ext INFO : root : copying telegram/ext/_callbackdatacache.py -> build/lib/telegram/ext INFO : root : copying telegram/ext/_callbackcontext.py -> build/lib/telegram/ext INFO : root : copying telegram/ext/_baseupdateprocessor.py -> build/lib/telegram/ext INFO : root : copying telegram/ext/_baseratelimiter.py -> build/lib/telegram/ext INFO : root : copying telegram/ext/_basepersistence.py -> build/lib/telegram/ext INFO : root : copying telegram/ext/_applicationbuilder.py -> build/lib/telegram/ext INFO : root : copying telegram/ext/_application.py -> build/lib/telegram/ext INFO : root : copying telegram/ext/_aioratelimiter.py -> build/lib/telegram/ext INFO : root : copying telegram/ext/__init__.py -> build/lib/telegram/ext INFO : root : creating build/lib/telegram/_utils INFO : root : copying telegram/_utils/warnings_transition.py -> build/lib/telegram/_utils INFO : root : copying telegram/_utils/warnings.py -> build/lib/telegram/_utils INFO : root : copying telegram/_utils/types.py -> build/lib/telegram/_utils INFO : root : copying telegram/_utils/strings.py -> build/lib/telegram/_utils INFO : root : copying telegram/_utils/repr.py -> build/lib/telegram/_utils INFO : root : copying telegram/_utils/markup.py -> build/lib/telegram/_utils INFO : root : copying telegram/_utils/logging.py -> build/lib/telegram/_utils INFO : root : copying telegram/_utils/files.py -> build/lib/telegram/_utils INFO : root : copying telegram/_utils/enum.py -> build/lib/telegram/_utils INFO : root : copying telegram/_utils/entities.py -> build/lib/telegram/_utils INFO : root : copying telegram/_utils/defaultvalue.py -> build/lib/telegram/_utils INFO : root : copying telegram/_utils/datetime.py -> build/lib/telegram/_utils INFO : root : copying telegram/_utils/argumentparsing.py -> build/lib/telegram/_utils INFO : root : copying telegram/_utils/__init__.py -> build/lib/telegram/_utils INFO : root : creating build/lib/telegram/_payment INFO : root : copying telegram/_payment/successfulpayment.py -> build/lib/telegram/_payment INFO : root : copying telegram/_payment/shippingquery.py -> build/lib/telegram/_payment INFO : root : copying telegram/_payment/shippingoption.py -> build/lib/telegram/_payment INFO : root : copying telegram/_payment/shippingaddress.py -> build/lib/telegram/_payment INFO : root : copying telegram/_payment/precheckoutquery.py -> build/lib/telegram/_payment INFO : root : copying telegram/_payment/orderinfo.py -> build/lib/telegram/_payment INFO : root : copying telegram/_payment/labeledprice.py -> build/lib/telegram/_payment INFO : root : copying telegram/_payment/invoice.py -> build/lib/telegram/_payment INFO : root : copying telegram/_payment/__init__.py -> build/lib/telegram/_payment INFO : root : creating build/lib/telegram/_passport INFO : root : copying telegram/_passport/passportfile.py -> build/lib/telegram/_passport INFO : root : copying telegram/_passport/passportelementerrors.py -> build/lib/telegram/_passport INFO : root : copying telegram/_passport/passportdata.py -> build/lib/telegram/_passport INFO : root : copying telegram/_passport/encryptedpassportelement.py -> build/lib/telegram/_passport INFO : root : copying telegram/_passport/data.py -> build/lib/telegram/_passport INFO : root : copying telegram/_passport/credentials.py -> build/lib/telegram/_passport INFO : root : copying telegram/_passport/__init__.py -> build/lib/telegram/_passport INFO : root : creating build/lib/telegram/_inline INFO : root : copying telegram/_inline/inputvenuemessagecontent.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inputtextmessagecontent.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inputmessagecontent.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inputlocationmessagecontent.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inputinvoicemessagecontent.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inputcontactmessagecontent.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequeryresultvoice.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequeryresultvideo.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequeryresultvenue.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequeryresultsbutton.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequeryresultphoto.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequeryresultmpeg4gif.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequeryresultlocation.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequeryresultgif.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequeryresultgame.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequeryresultdocument.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequeryresultcontact.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequeryresultcachedvoice.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequeryresultcachedvideo.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequeryresultcachedsticker.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequeryresultcachedphoto.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequeryresultcachedmpeg4gif.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequeryresultcachedgif.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequeryresultcacheddocument.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequeryresultcachedaudio.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequeryresultaudio.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequeryresultarticle.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequeryresult.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinequery.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinekeyboardmarkup.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/inlinekeyboardbutton.py -> build/lib/telegram/_inline INFO : root : copying telegram/_inline/__init__.py -> build/lib/telegram/_inline INFO : root : creating build/lib/telegram/_games INFO : root : copying telegram/_games/gamehighscore.py -> build/lib/telegram/_games INFO : root : copying telegram/_games/game.py -> build/lib/telegram/_games INFO : root : copying telegram/_games/callbackgame.py -> build/lib/telegram/_games INFO : root : copying telegram/_games/__init__.py -> build/lib/telegram/_games INFO : root : creating build/lib/telegram/_files INFO : root : copying telegram/_files/voice.py -> build/lib/telegram/_files INFO : root : copying telegram/_files/videonote.py -> build/lib/telegram/_files INFO : root : copying telegram/_files/video.py -> build/lib/telegram/_files INFO : root : copying telegram/_files/venue.py -> build/lib/telegram/_files INFO : root : copying telegram/_files/sticker.py -> build/lib/telegram/_files INFO : root : copying telegram/_files/photosize.py -> build/lib/telegram/_files INFO : root : copying telegram/_files/location.py -> build/lib/telegram/_files INFO : root : copying telegram/_files/inputsticker.py -> build/lib/telegram/_files INFO : root : copying telegram/_files/inputmedia.py -> build/lib/telegram/_files INFO : root : copying telegram/_files/inputfile.py -> build/lib/telegram/_files INFO : root : copying telegram/_files/file.py -> build/lib/telegram/_files INFO : root : copying telegram/_files/document.py -> build/lib/telegram/_files INFO : root : copying telegram/_files/contact.py -> build/lib/telegram/_files INFO : root : copying telegram/_files/chatphoto.py -> build/lib/telegram/_files INFO : root : copying telegram/_files/audio.py -> build/lib/telegram/_files INFO : root : copying telegram/_files/animation.py -> build/lib/telegram/_files INFO : root : copying telegram/_files/_basethumbedmedium.py -> build/lib/telegram/_files INFO : root : copying telegram/_files/_basemedium.py -> build/lib/telegram/_files INFO : root : copying telegram/_files/__init__.py -> build/lib/telegram/_files INFO : root : creating build/lib/telegram/ext/_utils INFO : root : copying telegram/ext/_utils/webhookhandler.py -> build/lib/telegram/ext/_utils INFO : root : copying telegram/ext/_utils/types.py -> build/lib/telegram/ext/_utils INFO : root : copying telegram/ext/_utils/trackingdict.py -> build/lib/telegram/ext/_utils INFO : root : copying telegram/ext/_utils/stack.py -> build/lib/telegram/ext/_utils INFO : root : copying telegram/ext/_utils/_update_parsing.py -> build/lib/telegram/ext/_utils INFO : root : copying telegram/ext/_utils/__init__.py -> build/lib/telegram/ext/_utils INFO : root : creating build/lib/telegram/ext/_handlers INFO : root : copying telegram/ext/_handlers/typehandler.py -> build/lib/telegram/ext/_handlers INFO : root : copying telegram/ext/_handlers/stringregexhandler.py -> build/lib/telegram/ext/_handlers INFO : root : copying telegram/ext/_handlers/stringcommandhandler.py -> build/lib/telegram/ext/_handlers INFO : root : copying telegram/ext/_handlers/shippingqueryhandler.py -> build/lib/telegram/ext/_handlers INFO : root : copying telegram/ext/_handlers/prefixhandler.py -> build/lib/telegram/ext/_handlers INFO : root : copying telegram/ext/_handlers/precheckoutqueryhandler.py -> build/lib/telegram/ext/_handlers INFO : root : copying telegram/ext/_handlers/pollhandler.py -> build/lib/telegram/ext/_handlers INFO : root : copying telegram/ext/_handlers/pollanswerhandler.py -> build/lib/telegram/ext/_handlers INFO : root : copying telegram/ext/_handlers/messagereactionhandler.py -> build/lib/telegram/ext/_handlers INFO : root : copying telegram/ext/_handlers/messagehandler.py -> build/lib/telegram/ext/_handlers INFO : root : copying telegram/ext/_handlers/inlinequeryhandler.py -> build/lib/telegram/ext/_handlers INFO : root : copying telegram/ext/_handlers/conversationhandler.py -> build/lib/telegram/ext/_handlers INFO : root : copying telegram/ext/_handlers/commandhandler.py -> build/lib/telegram/ext/_handlers INFO : root : copying telegram/ext/_handlers/choseninlineresulthandler.py -> build/lib/telegram/ext/_handlers INFO : root : copying telegram/ext/_handlers/chatmemberhandler.py -> build/lib/telegram/ext/_handlers INFO : root : copying telegram/ext/_handlers/chatjoinrequesthandler.py -> build/lib/telegram/ext/_handlers INFO : root : copying telegram/ext/_handlers/chatboosthandler.py -> build/lib/telegram/ext/_handlers INFO : root : copying telegram/ext/_handlers/callbackqueryhandler.py -> build/lib/telegram/ext/_handlers INFO : root : copying telegram/ext/_handlers/businessmessagesdeletedhandler.py -> build/lib/telegram/ext/_handlers INFO : root : copying telegram/ext/_handlers/businessconnectionhandler.py -> build/lib/telegram/ext/_handlers INFO : root : copying telegram/ext/_handlers/basehandler.py -> build/lib/telegram/ext/_handlers INFO : root : copying telegram/ext/_handlers/__init__.py -> build/lib/telegram/ext/_handlers INFO : root : running egg_info INFO : root : creating python_telegram_bot.egg-info INFO : root : writing python_telegram_bot.egg-info/PKG-INFO INFO : root : writing dependency_links to python_telegram_bot.egg-info/dependency_links.txt INFO : root : writing requirements to python_telegram_bot.egg-info/requires.txt INFO : root : writing top-level names to python_telegram_bot.egg-info/top_level.txt INFO : root : writing manifest file 'python_telegram_bot.egg-info/SOURCES.txt' INFO : root : reading manifest file 'python_telegram_bot.egg-info/SOURCES.txt' INFO : root : reading manifest template 'MANIFEST.in' INFO : root : adding license file 'LICENSE' INFO : root : adding license file 'LICENSE.dual' INFO : root : adding license file 'LICENSE.lesser' INFO : root : writing manifest file 'python_telegram_bot.egg-info/SOURCES.txt' INFO : root : copying telegram/py.typed -> build/lib/telegram INFO : root : installing to build/bdist.linux-x86_64/wheel INFO : root : running install INFO : root : running install_lib INFO : root : creating build/bdist.linux-x86_64 INFO : root : creating build/bdist.linux-x86_64/wheel INFO : root : creating build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/py.typed -> build/bdist.linux-x86_64/wheel/telegram INFO : root : creating build/bdist.linux-x86_64/wheel/telegram/_files INFO : root : copying build/lib/telegram/_files/__init__.py -> build/bdist.linux-x86_64/wheel/telegram/_files INFO : root : copying build/lib/telegram/_files/_basemedium.py -> build/bdist.linux-x86_64/wheel/telegram/_files INFO : root : copying build/lib/telegram/_files/_basethumbedmedium.py -> build/bdist.linux-x86_64/wheel/telegram/_files INFO : root : copying build/lib/telegram/_files/animation.py -> build/bdist.linux-x86_64/wheel/telegram/_files INFO : root : copying build/lib/telegram/_files/audio.py -> build/bdist.linux-x86_64/wheel/telegram/_files INFO : root : copying build/lib/telegram/_files/chatphoto.py -> build/bdist.linux-x86_64/wheel/telegram/_files INFO : root : copying build/lib/telegram/_files/contact.py -> build/bdist.linux-x86_64/wheel/telegram/_files INFO : root : copying build/lib/telegram/_files/document.py -> build/bdist.linux-x86_64/wheel/telegram/_files INFO : root : copying build/lib/telegram/_files/file.py -> build/bdist.linux-x86_64/wheel/telegram/_files INFO : root : copying build/lib/telegram/_files/inputfile.py -> build/bdist.linux-x86_64/wheel/telegram/_files INFO : root : copying build/lib/telegram/_files/inputmedia.py -> build/bdist.linux-x86_64/wheel/telegram/_files INFO : root : copying build/lib/telegram/_files/inputsticker.py -> build/bdist.linux-x86_64/wheel/telegram/_files INFO : root : copying build/lib/telegram/_files/location.py -> build/bdist.linux-x86_64/wheel/telegram/_files INFO : root : copying build/lib/telegram/_files/photosize.py -> build/bdist.linux-x86_64/wheel/telegram/_files INFO : root : copying build/lib/telegram/_files/sticker.py -> build/bdist.linux-x86_64/wheel/telegram/_files INFO : root : copying build/lib/telegram/_files/venue.py -> build/bdist.linux-x86_64/wheel/telegram/_files INFO : root : copying build/lib/telegram/_files/video.py -> build/bdist.linux-x86_64/wheel/telegram/_files INFO : root : copying build/lib/telegram/_files/videonote.py -> build/bdist.linux-x86_64/wheel/telegram/_files INFO : root : copying build/lib/telegram/_files/voice.py -> build/bdist.linux-x86_64/wheel/telegram/_files INFO : root : creating build/bdist.linux-x86_64/wheel/telegram/_games INFO : root : copying build/lib/telegram/_games/__init__.py -> build/bdist.linux-x86_64/wheel/telegram/_games INFO : root : copying build/lib/telegram/_games/callbackgame.py -> build/bdist.linux-x86_64/wheel/telegram/_games INFO : root : copying build/lib/telegram/_games/game.py -> build/bdist.linux-x86_64/wheel/telegram/_games INFO : root : copying build/lib/telegram/_games/gamehighscore.py -> build/bdist.linux-x86_64/wheel/telegram/_games INFO : root : creating build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/__init__.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinekeyboardbutton.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinekeyboardmarkup.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequery.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequeryresult.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequeryresultarticle.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequeryresultaudio.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequeryresultcachedaudio.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequeryresultcacheddocument.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequeryresultcachedgif.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequeryresultcachedmpeg4gif.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequeryresultcachedphoto.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequeryresultcachedsticker.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequeryresultcachedvideo.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequeryresultcachedvoice.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequeryresultcontact.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequeryresultdocument.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequeryresultgame.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequeryresultgif.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequeryresultlocation.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequeryresultmpeg4gif.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequeryresultphoto.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequeryresultsbutton.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequeryresultvenue.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequeryresultvideo.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inlinequeryresultvoice.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inputcontactmessagecontent.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inputinvoicemessagecontent.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inputlocationmessagecontent.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inputmessagecontent.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inputtextmessagecontent.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : copying build/lib/telegram/_inline/inputvenuemessagecontent.py -> build/bdist.linux-x86_64/wheel/telegram/_inline INFO : root : creating build/bdist.linux-x86_64/wheel/telegram/_passport INFO : root : copying build/lib/telegram/_passport/__init__.py -> build/bdist.linux-x86_64/wheel/telegram/_passport INFO : root : copying build/lib/telegram/_passport/credentials.py -> build/bdist.linux-x86_64/wheel/telegram/_passport INFO : root : copying build/lib/telegram/_passport/data.py -> build/bdist.linux-x86_64/wheel/telegram/_passport INFO : root : copying build/lib/telegram/_passport/encryptedpassportelement.py -> build/bdist.linux-x86_64/wheel/telegram/_passport INFO : root : copying build/lib/telegram/_passport/passportdata.py -> build/bdist.linux-x86_64/wheel/telegram/_passport INFO : root : copying build/lib/telegram/_passport/passportelementerrors.py -> build/bdist.linux-x86_64/wheel/telegram/_passport INFO : root : copying build/lib/telegram/_passport/passportfile.py -> build/bdist.linux-x86_64/wheel/telegram/_passport INFO : root : creating build/bdist.linux-x86_64/wheel/telegram/_payment INFO : root : copying build/lib/telegram/_payment/__init__.py -> build/bdist.linux-x86_64/wheel/telegram/_payment INFO : root : copying build/lib/telegram/_payment/invoice.py -> build/bdist.linux-x86_64/wheel/telegram/_payment INFO : root : copying build/lib/telegram/_payment/labeledprice.py -> build/bdist.linux-x86_64/wheel/telegram/_payment INFO : root : copying build/lib/telegram/_payment/orderinfo.py -> build/bdist.linux-x86_64/wheel/telegram/_payment INFO : root : copying build/lib/telegram/_payment/precheckoutquery.py -> build/bdist.linux-x86_64/wheel/telegram/_payment INFO : root : copying build/lib/telegram/_payment/shippingaddress.py -> build/bdist.linux-x86_64/wheel/telegram/_payment INFO : root : copying build/lib/telegram/_payment/shippingoption.py -> build/bdist.linux-x86_64/wheel/telegram/_payment INFO : root : copying build/lib/telegram/_payment/shippingquery.py -> build/bdist.linux-x86_64/wheel/telegram/_payment INFO : root : copying build/lib/telegram/_payment/successfulpayment.py -> build/bdist.linux-x86_64/wheel/telegram/_payment INFO : root : creating build/bdist.linux-x86_64/wheel/telegram/_utils INFO : root : copying build/lib/telegram/_utils/__init__.py -> build/bdist.linux-x86_64/wheel/telegram/_utils INFO : root : copying build/lib/telegram/_utils/argumentparsing.py -> build/bdist.linux-x86_64/wheel/telegram/_utils INFO : root : copying build/lib/telegram/_utils/datetime.py -> build/bdist.linux-x86_64/wheel/telegram/_utils INFO : root : copying build/lib/telegram/_utils/defaultvalue.py -> build/bdist.linux-x86_64/wheel/telegram/_utils INFO : root : copying build/lib/telegram/_utils/entities.py -> build/bdist.linux-x86_64/wheel/telegram/_utils INFO : root : copying build/lib/telegram/_utils/enum.py -> build/bdist.linux-x86_64/wheel/telegram/_utils INFO : root : copying build/lib/telegram/_utils/files.py -> build/bdist.linux-x86_64/wheel/telegram/_utils INFO : root : copying build/lib/telegram/_utils/logging.py -> build/bdist.linux-x86_64/wheel/telegram/_utils INFO : root : copying build/lib/telegram/_utils/markup.py -> build/bdist.linux-x86_64/wheel/telegram/_utils INFO : root : copying build/lib/telegram/_utils/repr.py -> build/bdist.linux-x86_64/wheel/telegram/_utils INFO : root : copying build/lib/telegram/_utils/strings.py -> build/bdist.linux-x86_64/wheel/telegram/_utils INFO : root : copying build/lib/telegram/_utils/types.py -> build/bdist.linux-x86_64/wheel/telegram/_utils INFO : root : copying build/lib/telegram/_utils/warnings.py -> build/bdist.linux-x86_64/wheel/telegram/_utils INFO : root : copying build/lib/telegram/_utils/warnings_transition.py -> build/bdist.linux-x86_64/wheel/telegram/_utils INFO : root : creating build/bdist.linux-x86_64/wheel/telegram/ext INFO : root : creating build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : copying build/lib/telegram/ext/_handlers/__init__.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : copying build/lib/telegram/ext/_handlers/basehandler.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : copying build/lib/telegram/ext/_handlers/businessconnectionhandler.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : copying build/lib/telegram/ext/_handlers/businessmessagesdeletedhandler.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : copying build/lib/telegram/ext/_handlers/callbackqueryhandler.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : copying build/lib/telegram/ext/_handlers/chatboosthandler.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : copying build/lib/telegram/ext/_handlers/chatjoinrequesthandler.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : copying build/lib/telegram/ext/_handlers/chatmemberhandler.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : copying build/lib/telegram/ext/_handlers/choseninlineresulthandler.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : copying build/lib/telegram/ext/_handlers/commandhandler.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : copying build/lib/telegram/ext/_handlers/conversationhandler.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : copying build/lib/telegram/ext/_handlers/inlinequeryhandler.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : copying build/lib/telegram/ext/_handlers/messagehandler.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : copying build/lib/telegram/ext/_handlers/messagereactionhandler.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : copying build/lib/telegram/ext/_handlers/pollanswerhandler.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : copying build/lib/telegram/ext/_handlers/pollhandler.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : copying build/lib/telegram/ext/_handlers/precheckoutqueryhandler.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : copying build/lib/telegram/ext/_handlers/prefixhandler.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : copying build/lib/telegram/ext/_handlers/shippingqueryhandler.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : copying build/lib/telegram/ext/_handlers/stringcommandhandler.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : copying build/lib/telegram/ext/_handlers/stringregexhandler.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : copying build/lib/telegram/ext/_handlers/typehandler.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_handlers INFO : root : creating build/bdist.linux-x86_64/wheel/telegram/ext/_utils INFO : root : copying build/lib/telegram/ext/_utils/__init__.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_utils INFO : root : copying build/lib/telegram/ext/_utils/_update_parsing.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_utils INFO : root : copying build/lib/telegram/ext/_utils/stack.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_utils INFO : root : copying build/lib/telegram/ext/_utils/trackingdict.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_utils INFO : root : copying build/lib/telegram/ext/_utils/types.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_utils INFO : root : copying build/lib/telegram/ext/_utils/webhookhandler.py -> build/bdist.linux-x86_64/wheel/telegram/ext/_utils INFO : root : copying build/lib/telegram/ext/__init__.py -> build/bdist.linux-x86_64/wheel/telegram/ext INFO : root : copying build/lib/telegram/ext/_aioratelimiter.py -> build/bdist.linux-x86_64/wheel/telegram/ext INFO : root : copying build/lib/telegram/ext/_application.py -> build/bdist.linux-x86_64/wheel/telegram/ext INFO : root : copying build/lib/telegram/ext/_applicationbuilder.py -> build/bdist.linux-x86_64/wheel/telegram/ext INFO : root : copying build/lib/telegram/ext/_basepersistence.py -> build/bdist.linux-x86_64/wheel/telegram/ext INFO : root : copying build/lib/telegram/ext/_baseratelimiter.py -> build/bdist.linux-x86_64/wheel/telegram/ext INFO : root : copying build/lib/telegram/ext/_baseupdateprocessor.py -> build/bdist.linux-x86_64/wheel/telegram/ext INFO : root : copying build/lib/telegram/ext/_callbackcontext.py -> build/bdist.linux-x86_64/wheel/telegram/ext INFO : root : copying build/lib/telegram/ext/_callbackdatacache.py -> build/bdist.linux-x86_64/wheel/telegram/ext INFO : root : copying build/lib/telegram/ext/_contexttypes.py -> build/bdist.linux-x86_64/wheel/telegram/ext INFO : root : copying build/lib/telegram/ext/_defaults.py -> build/bdist.linux-x86_64/wheel/telegram/ext INFO : root : copying build/lib/telegram/ext/_dictpersistence.py -> build/bdist.linux-x86_64/wheel/telegram/ext INFO : root : copying build/lib/telegram/ext/_extbot.py -> build/bdist.linux-x86_64/wheel/telegram/ext INFO : root : copying build/lib/telegram/ext/_jobqueue.py -> build/bdist.linux-x86_64/wheel/telegram/ext INFO : root : copying build/lib/telegram/ext/_picklepersistence.py -> build/bdist.linux-x86_64/wheel/telegram/ext INFO : root : copying build/lib/telegram/ext/_updater.py -> build/bdist.linux-x86_64/wheel/telegram/ext INFO : root : copying build/lib/telegram/ext/filters.py -> build/bdist.linux-x86_64/wheel/telegram/ext INFO : root : creating build/bdist.linux-x86_64/wheel/telegram/request INFO : root : copying build/lib/telegram/request/__init__.py -> build/bdist.linux-x86_64/wheel/telegram/request INFO : root : copying build/lib/telegram/request/_baserequest.py -> build/bdist.linux-x86_64/wheel/telegram/request INFO : root : copying build/lib/telegram/request/_httpxrequest.py -> build/bdist.linux-x86_64/wheel/telegram/request INFO : root : copying build/lib/telegram/request/_requestdata.py -> build/bdist.linux-x86_64/wheel/telegram/request INFO : root : copying build/lib/telegram/request/_requestparameter.py -> build/bdist.linux-x86_64/wheel/telegram/request INFO : root : copying build/lib/telegram/__init__.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/__main__.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_birthdate.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_bot.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_botcommand.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_botcommandscope.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_botdescription.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_botname.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_business.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_callbackquery.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_chat.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_chatadministratorrights.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_chatbackground.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_chatboost.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_chatfullinfo.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_chatinvitelink.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_chatjoinrequest.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_chatlocation.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_chatmember.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_chatmemberupdated.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_chatpermissions.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_choseninlineresult.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_dice.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_forcereply.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_forumtopic.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_giveaway.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_keyboardbutton.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_keyboardbuttonpolltype.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_keyboardbuttonrequest.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_linkpreviewoptions.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_loginurl.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_menubutton.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_message.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_messageautodeletetimerchanged.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_messageentity.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_messageid.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_messageorigin.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_messagereactionupdated.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_poll.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_proximityalerttriggered.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_reaction.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_reply.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_replykeyboardmarkup.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_replykeyboardremove.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_sentwebappmessage.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_shared.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_story.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_switchinlinequerychosenchat.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_telegramobject.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_update.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_user.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_userprofilephotos.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_version.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_videochat.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_webappdata.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_webappinfo.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_webhookinfo.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/_writeaccessallowed.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/constants.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/error.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/helpers.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : copying build/lib/telegram/warnings.py -> build/bdist.linux-x86_64/wheel/telegram INFO : root : running install_egg_info INFO : root : Copying python_telegram_bot.egg-info to build/bdist.linux-x86_64/wheel/python_telegram_bot-21.3-py3.12.egg-info INFO : root : running install_scripts INFO : root : creating build/bdist.linux-x86_64/wheel/python_telegram_bot-21.3.dist-info/WHEEL INFO : wheel : creating '/usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/dist/.tmp-k9dncsvs/python_telegram_bot-21.3-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it INFO : wheel : adding 'telegram/__init__.py' INFO : wheel : adding 'telegram/__main__.py' INFO : wheel : adding 'telegram/_birthdate.py' INFO : wheel : adding 'telegram/_bot.py' INFO : wheel : adding 'telegram/_botcommand.py' INFO : wheel : adding 'telegram/_botcommandscope.py' INFO : wheel : adding 'telegram/_botdescription.py' INFO : wheel : adding 'telegram/_botname.py' INFO : wheel : adding 'telegram/_business.py' INFO : wheel : adding 'telegram/_callbackquery.py' INFO : wheel : adding 'telegram/_chat.py' INFO : wheel : adding 'telegram/_chatadministratorrights.py' INFO : wheel : adding 'telegram/_chatbackground.py' INFO : wheel : adding 'telegram/_chatboost.py' INFO : wheel : adding 'telegram/_chatfullinfo.py' INFO : wheel : adding 'telegram/_chatinvitelink.py' INFO : wheel : adding 'telegram/_chatjoinrequest.py' INFO : wheel : adding 'telegram/_chatlocation.py' INFO : wheel : adding 'telegram/_chatmember.py' INFO : wheel : adding 'telegram/_chatmemberupdated.py' INFO : wheel : adding 'telegram/_chatpermissions.py' INFO : wheel : adding 'telegram/_choseninlineresult.py' INFO : wheel : adding 'telegram/_dice.py' INFO : wheel : adding 'telegram/_forcereply.py' INFO : wheel : adding 'telegram/_forumtopic.py' INFO : wheel : adding 'telegram/_giveaway.py' INFO : wheel : adding 'telegram/_keyboardbutton.py' INFO : wheel : adding 'telegram/_keyboardbuttonpolltype.py' INFO : wheel : adding 'telegram/_keyboardbuttonrequest.py' INFO : wheel : adding 'telegram/_linkpreviewoptions.py' INFO : wheel : adding 'telegram/_loginurl.py' INFO : wheel : adding 'telegram/_menubutton.py' INFO : wheel : adding 'telegram/_message.py' INFO : wheel : adding 'telegram/_messageautodeletetimerchanged.py' INFO : wheel : adding 'telegram/_messageentity.py' INFO : wheel : adding 'telegram/_messageid.py' INFO : wheel : adding 'telegram/_messageorigin.py' INFO : wheel : adding 'telegram/_messagereactionupdated.py' INFO : wheel : adding 'telegram/_poll.py' INFO : wheel : adding 'telegram/_proximityalerttriggered.py' INFO : wheel : adding 'telegram/_reaction.py' INFO : wheel : adding 'telegram/_reply.py' INFO : wheel : adding 'telegram/_replykeyboardmarkup.py' INFO : wheel : adding 'telegram/_replykeyboardremove.py' INFO : wheel : adding 'telegram/_sentwebappmessage.py' INFO : wheel : adding 'telegram/_shared.py' INFO : wheel : adding 'telegram/_story.py' INFO : wheel : adding 'telegram/_switchinlinequerychosenchat.py' INFO : wheel : adding 'telegram/_telegramobject.py' INFO : wheel : adding 'telegram/_update.py' INFO : wheel : adding 'telegram/_user.py' INFO : wheel : adding 'telegram/_userprofilephotos.py' INFO : wheel : adding 'telegram/_version.py' INFO : wheel : adding 'telegram/_videochat.py' INFO : wheel : adding 'telegram/_webappdata.py' INFO : wheel : adding 'telegram/_webappinfo.py' INFO : wheel : adding 'telegram/_webhookinfo.py' INFO : wheel : adding 'telegram/_writeaccessallowed.py' INFO : wheel : adding 'telegram/constants.py' INFO : wheel : adding 'telegram/error.py' INFO : wheel : adding 'telegram/helpers.py' INFO : wheel : adding 'telegram/py.typed' INFO : wheel : adding 'telegram/warnings.py' INFO : wheel : adding 'telegram/_files/__init__.py' INFO : wheel : adding 'telegram/_files/_basemedium.py' INFO : wheel : adding 'telegram/_files/_basethumbedmedium.py' INFO : wheel : adding 'telegram/_files/animation.py' INFO : wheel : adding 'telegram/_files/audio.py' INFO : wheel : adding 'telegram/_files/chatphoto.py' INFO : wheel : adding 'telegram/_files/contact.py' INFO : wheel : adding 'telegram/_files/document.py' INFO : wheel : adding 'telegram/_files/file.py' INFO : wheel : adding 'telegram/_files/inputfile.py' INFO : wheel : adding 'telegram/_files/inputmedia.py' INFO : wheel : adding 'telegram/_files/inputsticker.py' INFO : wheel : adding 'telegram/_files/location.py' INFO : wheel : adding 'telegram/_files/photosize.py' INFO : wheel : adding 'telegram/_files/sticker.py' INFO : wheel : adding 'telegram/_files/venue.py' INFO : wheel : adding 'telegram/_files/video.py' INFO : wheel : adding 'telegram/_files/videonote.py' INFO : wheel : adding 'telegram/_files/voice.py' INFO : wheel : adding 'telegram/_games/__init__.py' INFO : wheel : adding 'telegram/_games/callbackgame.py' INFO : wheel : adding 'telegram/_games/game.py' INFO : wheel : adding 'telegram/_games/gamehighscore.py' INFO : wheel : adding 'telegram/_inline/__init__.py' INFO : wheel : adding 'telegram/_inline/inlinekeyboardbutton.py' INFO : wheel : adding 'telegram/_inline/inlinekeyboardmarkup.py' INFO : wheel : adding 'telegram/_inline/inlinequery.py' INFO : wheel : adding 'telegram/_inline/inlinequeryresult.py' INFO : wheel : adding 'telegram/_inline/inlinequeryresultarticle.py' INFO : wheel : adding 'telegram/_inline/inlinequeryresultaudio.py' INFO : wheel : adding 'telegram/_inline/inlinequeryresultcachedaudio.py' INFO : wheel : adding 'telegram/_inline/inlinequeryresultcacheddocument.py' INFO : wheel : adding 'telegram/_inline/inlinequeryresultcachedgif.py' INFO : wheel : adding 'telegram/_inline/inlinequeryresultcachedmpeg4gif.py' INFO : wheel : adding 'telegram/_inline/inlinequeryresultcachedphoto.py' INFO : wheel : adding 'telegram/_inline/inlinequeryresultcachedsticker.py' INFO : wheel : adding 'telegram/_inline/inlinequeryresultcachedvideo.py' INFO : wheel : adding 'telegram/_inline/inlinequeryresultcachedvoice.py' INFO : wheel : adding 'telegram/_inline/inlinequeryresultcontact.py' INFO : wheel : adding 'telegram/_inline/inlinequeryresultdocument.py' INFO : wheel : adding 'telegram/_inline/inlinequeryresultgame.py' INFO : wheel : adding 'telegram/_inline/inlinequeryresultgif.py' INFO : wheel : adding 'telegram/_inline/inlinequeryresultlocation.py' INFO : wheel : adding 'telegram/_inline/inlinequeryresultmpeg4gif.py' INFO : wheel : adding 'telegram/_inline/inlinequeryresultphoto.py' INFO : wheel : adding 'telegram/_inline/inlinequeryresultsbutton.py' INFO : wheel : adding 'telegram/_inline/inlinequeryresultvenue.py' INFO : wheel : adding 'telegram/_inline/inlinequeryresultvideo.py' INFO : wheel : adding 'telegram/_inline/inlinequeryresultvoice.py' INFO : wheel : adding 'telegram/_inline/inputcontactmessagecontent.py' INFO : wheel : adding 'telegram/_inline/inputinvoicemessagecontent.py' INFO : wheel : adding 'telegram/_inline/inputlocationmessagecontent.py' INFO : wheel : adding 'telegram/_inline/inputmessagecontent.py' INFO : wheel : adding 'telegram/_inline/inputtextmessagecontent.py' INFO : wheel : adding 'telegram/_inline/inputvenuemessagecontent.py' INFO : wheel : adding 'telegram/_passport/__init__.py' INFO : wheel : adding 'telegram/_passport/credentials.py' INFO : wheel : adding 'telegram/_passport/data.py' INFO : wheel : adding 'telegram/_passport/encryptedpassportelement.py' INFO : wheel : adding 'telegram/_passport/passportdata.py' INFO : wheel : adding 'telegram/_passport/passportelementerrors.py' INFO : wheel : adding 'telegram/_passport/passportfile.py' INFO : wheel : adding 'telegram/_payment/__init__.py' INFO : wheel : adding 'telegram/_payment/invoice.py' INFO : wheel : adding 'telegram/_payment/labeledprice.py' INFO : wheel : adding 'telegram/_payment/orderinfo.py' INFO : wheel : adding 'telegram/_payment/precheckoutquery.py' INFO : wheel : adding 'telegram/_payment/shippingaddress.py' INFO : wheel : adding 'telegram/_payment/shippingoption.py' INFO : wheel : adding 'telegram/_payment/shippingquery.py' INFO : wheel : adding 'telegram/_payment/successfulpayment.py' INFO : wheel : adding 'telegram/_utils/__init__.py' INFO : wheel : adding 'telegram/_utils/argumentparsing.py' INFO : wheel : adding 'telegram/_utils/datetime.py' INFO : wheel : adding 'telegram/_utils/defaultvalue.py' INFO : wheel : adding 'telegram/_utils/entities.py' INFO : wheel : adding 'telegram/_utils/enum.py' INFO : wheel : adding 'telegram/_utils/files.py' INFO : wheel : adding 'telegram/_utils/logging.py' INFO : wheel : adding 'telegram/_utils/markup.py' INFO : wheel : adding 'telegram/_utils/repr.py' INFO : wheel : adding 'telegram/_utils/strings.py' INFO : wheel : adding 'telegram/_utils/types.py' INFO : wheel : adding 'telegram/_utils/warnings.py' INFO : wheel : adding 'telegram/_utils/warnings_transition.py' INFO : wheel : adding 'telegram/ext/__init__.py' INFO : wheel : adding 'telegram/ext/_aioratelimiter.py' INFO : wheel : adding 'telegram/ext/_application.py' INFO : wheel : adding 'telegram/ext/_applicationbuilder.py' INFO : wheel : adding 'telegram/ext/_basepersistence.py' INFO : wheel : adding 'telegram/ext/_baseratelimiter.py' INFO : wheel : adding 'telegram/ext/_baseupdateprocessor.py' INFO : wheel : adding 'telegram/ext/_callbackcontext.py' INFO : wheel : adding 'telegram/ext/_callbackdatacache.py' INFO : wheel : adding 'telegram/ext/_contexttypes.py' INFO : wheel : adding 'telegram/ext/_defaults.py' INFO : wheel : adding 'telegram/ext/_dictpersistence.py' INFO : wheel : adding 'telegram/ext/_extbot.py' INFO : wheel : adding 'telegram/ext/_jobqueue.py' INFO : wheel : adding 'telegram/ext/_picklepersistence.py' INFO : wheel : adding 'telegram/ext/_updater.py' INFO : wheel : adding 'telegram/ext/filters.py' INFO : wheel : adding 'telegram/ext/_handlers/__init__.py' INFO : wheel : adding 'telegram/ext/_handlers/basehandler.py' INFO : wheel : adding 'telegram/ext/_handlers/businessconnectionhandler.py' INFO : wheel : adding 'telegram/ext/_handlers/businessmessagesdeletedhandler.py' INFO : wheel : adding 'telegram/ext/_handlers/callbackqueryhandler.py' INFO : wheel : adding 'telegram/ext/_handlers/chatboosthandler.py' INFO : wheel : adding 'telegram/ext/_handlers/chatjoinrequesthandler.py' INFO : wheel : adding 'telegram/ext/_handlers/chatmemberhandler.py' INFO : wheel : adding 'telegram/ext/_handlers/choseninlineresulthandler.py' INFO : wheel : adding 'telegram/ext/_handlers/commandhandler.py' INFO : wheel : adding 'telegram/ext/_handlers/conversationhandler.py' INFO : wheel : adding 'telegram/ext/_handlers/inlinequeryhandler.py' INFO : wheel : adding 'telegram/ext/_handlers/messagehandler.py' INFO : wheel : adding 'telegram/ext/_handlers/messagereactionhandler.py' INFO : wheel : adding 'telegram/ext/_handlers/pollanswerhandler.py' INFO : wheel : adding 'telegram/ext/_handlers/pollhandler.py' INFO : wheel : adding 'telegram/ext/_handlers/precheckoutqueryhandler.py' INFO : wheel : adding 'telegram/ext/_handlers/prefixhandler.py' INFO : wheel : adding 'telegram/ext/_handlers/shippingqueryhandler.py' INFO : wheel : adding 'telegram/ext/_handlers/stringcommandhandler.py' INFO : wheel : adding 'telegram/ext/_handlers/stringregexhandler.py' INFO : wheel : adding 'telegram/ext/_handlers/typehandler.py' INFO : wheel : adding 'telegram/ext/_utils/__init__.py' INFO : wheel : adding 'telegram/ext/_utils/_update_parsing.py' INFO : wheel : adding 'telegram/ext/_utils/stack.py' INFO : wheel : adding 'telegram/ext/_utils/trackingdict.py' INFO : wheel : adding 'telegram/ext/_utils/types.py' INFO : wheel : adding 'telegram/ext/_utils/webhookhandler.py' INFO : wheel : adding 'telegram/request/__init__.py' INFO : wheel : adding 'telegram/request/_baserequest.py' INFO : wheel : adding 'telegram/request/_httpxrequest.py' INFO : wheel : adding 'telegram/request/_requestdata.py' INFO : wheel : adding 'telegram/request/_requestparameter.py' INFO : wheel : adding 'python_telegram_bot-21.3.dist-info/LICENSE' INFO : wheel : adding 'python_telegram_bot-21.3.dist-info/LICENSE.dual' INFO : wheel : adding 'python_telegram_bot-21.3.dist-info/LICENSE.lesser' INFO : wheel : adding 'python_telegram_bot-21.3.dist-info/METADATA' INFO : wheel : adding 'python_telegram_bot-21.3.dist-info/WHEEL' INFO : wheel : adding 'python_telegram_bot-21.3.dist-info/top_level.txt' INFO : wheel : adding 'python_telegram_bot-21.3.dist-info/RECORD' INFO : root : removing build/bdist.linux-x86_64/wheel INFO : pyproject_installer.build_cmd._build : Built wheel: python_telegram_bot-21.3-py3-none-any.whl + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.31994 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/python3-module-telegram-bot-buildroot + : + /bin/rm -rf -- /usr/src/tmp/python3-module-telegram-bot-buildroot + PATH=/usr/libexec/rpm-build:/usr/src/bin:/usr/bin:/bin:/usr/local/bin:/usr/games + cd python3-module-telegram-bot-21.3 + /usr/bin/python3 -m pyproject_installer -v install --destdir=/usr/src/tmp/python3-module-telegram-bot-buildroot INFO : pyproject_installer.install_cmd._install : Installing wheel INFO : pyproject_installer.install_cmd._install : Wheel directory: /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/dist INFO : pyproject_installer.install_cmd._install : Wheel filename: python_telegram_bot-21.3-py3-none-any.whl INFO : pyproject_installer.install_cmd._install : Destination: /usr/src/tmp/python3-module-telegram-bot-buildroot DEBUG : pyproject_installer.lib.wheel : Parsing wheel filename DEBUG : pyproject_installer.lib.wheel : Validating wheel file DEBUG : pyproject_installer.lib.wheel : Validating wheel spec version DEBUG : pyproject_installer.lib.wheel : Parsing wheel spec metadata DEBUG : pyproject_installer.lib.wheel : Validating RECORD INFO : pyproject_installer.install_cmd._install : Wheel installation root: /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages INFO : pyproject_installer.install_cmd._install : Extracting wheel DEBUG : pyproject_installer.install_cmd._install : Filtering out not allowed file: python_telegram_bot-21.3.dist-info/LICENSE DEBUG : pyproject_installer.install_cmd._install : Filtering out not allowed file: python_telegram_bot-21.3.dist-info/LICENSE.dual DEBUG : pyproject_installer.install_cmd._install : Filtering out not allowed file: python_telegram_bot-21.3.dist-info/LICENSE.lesser DEBUG : pyproject_installer.install_cmd._install : Filtering out not allowed file: python_telegram_bot-21.3.dist-info/WHEEL DEBUG : pyproject_installer.install_cmd._install : Filtering out not allowed file: python_telegram_bot-21.3.dist-info/top_level.txt DEBUG : pyproject_installer.install_cmd._install : Filtering out not allowed file: python_telegram_bot-21.3.dist-info/RECORD INFO : pyproject_installer.install_cmd._install : Wheel was installed + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/python3-module-telegram-bot-buildroot (auto) Verifying and fixing files in /usr/src/tmp/python3-module-telegram-bot-buildroot (binconfig,pkgconfig,libtool,desktop,gnuconfig) Checking contents of files in /usr/src/tmp/python3-module-telegram-bot-buildroot/ (default) Compressing files in /usr/src/tmp/python3-module-telegram-bot-buildroot (auto) Adjusting library links in /usr/src/tmp/python3-module-telegram-bot-buildroot ./usr/lib: (from :0) Verifying ELF objects in /usr/src/tmp/python3-module-telegram-bot-buildroot (arch=normal,fhs=normal,lfs=relaxed,lint=relaxed,rpath=normal,stack=normal,textrel=normal,unresolved=normal) Splitting links to aliased files under /{,s}bin in /usr/src/tmp/python3-module-telegram-bot-buildroot Bytecompiling python3 modules in /usr/src/tmp/python3-module-telegram-bot-buildroot using /usr/bin/python3 compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/_basemedium.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/_basethumbedmedium.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/animation.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/audio.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/chatphoto.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/contact.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/document.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/file.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/inputfile.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/inputmedia.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/inputsticker.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/location.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/photosize.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/sticker.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/venue.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/video.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/videonote.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/voice.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_games/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_games/callbackgame.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_games/game.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_games/gamehighscore.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinekeyboardbutton.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinekeyboardmarkup.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequery.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresult.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultarticle.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultaudio.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcachedaudio.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcacheddocument.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcachedgif.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcachedmpeg4gif.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcachedphoto.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcachedsticker.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcachedvideo.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcachedvoice.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcontact.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultdocument.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultgame.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultgif.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultlocation.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultmpeg4gif.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultphoto.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultsbutton.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultvenue.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultvideo.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultvoice.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inputcontactmessagecontent.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inputinvoicemessagecontent.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inputlocationmessagecontent.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inputmessagecontent.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inputtextmessagecontent.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inputvenuemessagecontent.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_passport/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_passport/credentials.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_passport/data.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_passport/encryptedpassportelement.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_passport/passportdata.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_passport/passportelementerrors.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_passport/passportfile.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/invoice.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/labeledprice.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/orderinfo.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/precheckoutquery.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/shippingaddress.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/shippingoption.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/shippingquery.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/successfulpayment.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/argumentparsing.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/datetime.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/defaultvalue.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/entities.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/enum.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/files.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/logging.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/markup.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/repr.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/strings.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/types.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/warnings.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/warnings_transition.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/basehandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/businessconnectionhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/businessmessagesdeletedhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/callbackqueryhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/chatboosthandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/chatjoinrequesthandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/chatmemberhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/choseninlineresulthandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/commandhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/conversationhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/inlinequeryhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/messagehandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/messagereactionhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/pollanswerhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/pollhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/precheckoutqueryhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/prefixhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/shippingqueryhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/stringcommandhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/stringregexhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/typehandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_utils/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_utils/_update_parsing.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_utils/stack.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_utils/trackingdict.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_utils/types.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_utils/webhookhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_aioratelimiter.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_application.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_applicationbuilder.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_basepersistence.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_baseratelimiter.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_baseupdateprocessor.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_callbackcontext.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_callbackdatacache.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_contexttypes.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_defaults.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_dictpersistence.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_extbot.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_jobqueue.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_picklepersistence.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_updater.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/filters.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/request/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/request/_baserequest.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/request/_httpxrequest.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/request/_requestdata.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/request/_requestparameter.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/__main__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_birthdate.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_bot.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_botcommand.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_botcommandscope.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_botdescription.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_botname.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_business.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_callbackquery.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chat.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatadministratorrights.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatbackground.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatboost.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatfullinfo.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatinvitelink.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatjoinrequest.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatlocation.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatmember.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatmemberupdated.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatpermissions.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_choseninlineresult.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_dice.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_forcereply.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_forumtopic.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_giveaway.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_keyboardbutton.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_keyboardbuttonpolltype.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_keyboardbuttonrequest.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_linkpreviewoptions.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_loginurl.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_menubutton.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_message.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_messageautodeletetimerchanged.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_messageentity.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_messageid.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_messageorigin.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_messagereactionupdated.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_poll.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_proximityalerttriggered.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_reaction.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_reply.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_replykeyboardmarkup.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_replykeyboardremove.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_sentwebappmessage.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_shared.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_story.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_switchinlinequerychosenchat.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_telegramobject.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_update.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_user.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_userprofilephotos.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_version.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_videochat.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_webappdata.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_webappinfo.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_webhookinfo.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_writeaccessallowed.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/constants.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/error.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/helpers.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/warnings.py Bytecompiling python3 modules with optimization in /usr/src/tmp/python3-module-telegram-bot-buildroot using /usr/bin/python3 -O compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/_basemedium.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/_basethumbedmedium.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/animation.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/audio.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/chatphoto.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/contact.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/document.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/file.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/inputfile.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/inputmedia.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/inputsticker.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/location.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/photosize.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/sticker.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/venue.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/video.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/videonote.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/voice.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_games/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_games/callbackgame.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_games/game.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_games/gamehighscore.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinekeyboardbutton.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinekeyboardmarkup.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequery.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresult.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultarticle.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultaudio.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcachedaudio.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcacheddocument.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcachedgif.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcachedmpeg4gif.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcachedphoto.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcachedsticker.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcachedvideo.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcachedvoice.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcontact.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultdocument.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultgame.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultgif.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultlocation.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultmpeg4gif.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultphoto.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultsbutton.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultvenue.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultvideo.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultvoice.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inputcontactmessagecontent.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inputinvoicemessagecontent.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inputlocationmessagecontent.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inputmessagecontent.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inputtextmessagecontent.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inputvenuemessagecontent.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_passport/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_passport/credentials.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_passport/data.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_passport/encryptedpassportelement.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_passport/passportdata.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_passport/passportelementerrors.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_passport/passportfile.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/invoice.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/labeledprice.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/orderinfo.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/precheckoutquery.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/shippingaddress.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/shippingoption.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/shippingquery.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/successfulpayment.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/argumentparsing.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/datetime.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/defaultvalue.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/entities.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/enum.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/files.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/logging.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/markup.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/repr.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/strings.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/types.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/warnings.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/warnings_transition.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/basehandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/businessconnectionhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/businessmessagesdeletedhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/callbackqueryhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/chatboosthandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/chatjoinrequesthandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/chatmemberhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/choseninlineresulthandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/commandhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/conversationhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/inlinequeryhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/messagehandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/messagereactionhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/pollanswerhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/pollhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/precheckoutqueryhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/prefixhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/shippingqueryhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/stringcommandhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/stringregexhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/typehandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_utils/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_utils/_update_parsing.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_utils/stack.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_utils/trackingdict.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_utils/types.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_utils/webhookhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_aioratelimiter.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_application.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_applicationbuilder.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_basepersistence.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_baseratelimiter.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_baseupdateprocessor.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_callbackcontext.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_callbackdatacache.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_contexttypes.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_defaults.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_dictpersistence.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_extbot.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_jobqueue.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_picklepersistence.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_updater.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/filters.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/request/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/request/_baserequest.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/request/_httpxrequest.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/request/_requestdata.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/request/_requestparameter.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/__main__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_birthdate.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_bot.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_botcommand.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_botcommandscope.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_botdescription.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_botname.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_business.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_callbackquery.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chat.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatadministratorrights.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatbackground.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatboost.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatfullinfo.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatinvitelink.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatjoinrequest.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatlocation.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatmember.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatmemberupdated.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatpermissions.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_choseninlineresult.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_dice.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_forcereply.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_forumtopic.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_giveaway.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_keyboardbutton.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_keyboardbuttonpolltype.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_keyboardbuttonrequest.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_linkpreviewoptions.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_loginurl.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_menubutton.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_message.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_messageautodeletetimerchanged.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_messageentity.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_messageid.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_messageorigin.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_messagereactionupdated.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_poll.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_proximityalerttriggered.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_reaction.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_reply.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_replykeyboardmarkup.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_replykeyboardremove.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_sentwebappmessage.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_shared.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_story.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_switchinlinequerychosenchat.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_telegramobject.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_update.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_user.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_userprofilephotos.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_version.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_videochat.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_webappdata.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_webappinfo.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_webhookinfo.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_writeaccessallowed.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/constants.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/error.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/helpers.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/warnings.py Bytecompiling python3 modules with optimization-2 in /usr/src/tmp/python3-module-telegram-bot-buildroot using /usr/bin/python3 -OO compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/_basemedium.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/_basethumbedmedium.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/animation.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/audio.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/chatphoto.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/contact.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/document.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/file.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/inputfile.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/inputmedia.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/inputsticker.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/location.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/photosize.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/sticker.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/venue.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/video.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/videonote.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_files/voice.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_games/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_games/callbackgame.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_games/game.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_games/gamehighscore.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinekeyboardbutton.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinekeyboardmarkup.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequery.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresult.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultarticle.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultaudio.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcachedaudio.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcacheddocument.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcachedgif.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcachedmpeg4gif.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcachedphoto.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcachedsticker.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcachedvideo.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcachedvoice.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultcontact.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultdocument.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultgame.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultgif.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultlocation.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultmpeg4gif.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultphoto.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultsbutton.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultvenue.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultvideo.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inlinequeryresultvoice.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inputcontactmessagecontent.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inputinvoicemessagecontent.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inputlocationmessagecontent.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inputmessagecontent.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inputtextmessagecontent.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_inline/inputvenuemessagecontent.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_passport/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_passport/credentials.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_passport/data.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_passport/encryptedpassportelement.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_passport/passportdata.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_passport/passportelementerrors.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_passport/passportfile.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/invoice.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/labeledprice.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/orderinfo.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/precheckoutquery.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/shippingaddress.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/shippingoption.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/shippingquery.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_payment/successfulpayment.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/argumentparsing.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/datetime.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/defaultvalue.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/entities.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/enum.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/files.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/logging.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/markup.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/repr.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/strings.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/types.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/warnings.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_utils/warnings_transition.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/basehandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/businessconnectionhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/businessmessagesdeletedhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/callbackqueryhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/chatboosthandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/chatjoinrequesthandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/chatmemberhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/choseninlineresulthandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/commandhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/conversationhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/inlinequeryhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/messagehandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/messagereactionhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/pollanswerhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/pollhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/precheckoutqueryhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/prefixhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/shippingqueryhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/stringcommandhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/stringregexhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_handlers/typehandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_utils/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_utils/_update_parsing.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_utils/stack.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_utils/trackingdict.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_utils/types.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_utils/webhookhandler.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_aioratelimiter.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_application.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_applicationbuilder.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_basepersistence.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_baseratelimiter.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_baseupdateprocessor.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_callbackcontext.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_callbackdatacache.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_contexttypes.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_defaults.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_dictpersistence.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_extbot.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_jobqueue.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_picklepersistence.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/_updater.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/ext/filters.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/request/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/request/_baserequest.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/request/_httpxrequest.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/request/_requestdata.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/request/_requestparameter.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/__init__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/__main__.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_birthdate.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_bot.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_botcommand.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_botcommandscope.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_botdescription.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_botname.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_business.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_callbackquery.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chat.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatadministratorrights.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatbackground.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatboost.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatfullinfo.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatinvitelink.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatjoinrequest.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatlocation.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatmember.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatmemberupdated.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_chatpermissions.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_choseninlineresult.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_dice.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_forcereply.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_forumtopic.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_giveaway.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_keyboardbutton.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_keyboardbuttonpolltype.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_keyboardbuttonrequest.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_linkpreviewoptions.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_loginurl.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_menubutton.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_message.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_messageautodeletetimerchanged.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_messageentity.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_messageid.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_messageorigin.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_messagereactionupdated.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_poll.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_proximityalerttriggered.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_reaction.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_reply.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_replykeyboardmarkup.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_replykeyboardremove.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_sentwebappmessage.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_shared.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_story.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_switchinlinequerychosenchat.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_telegramobject.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_update.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_user.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_userprofilephotos.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_version.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_videochat.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_webappdata.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_webappinfo.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_webhookinfo.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/_writeaccessallowed.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/constants.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/error.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/helpers.py compile /usr/src/tmp/python3-module-telegram-bot-buildroot/usr/lib/python3/site-packages/telegram/warnings.py Hardlinking identical .pyc and .opt-?.pyc files './usr/lib/python3/site-packages/telegram/__pycache__/__init__.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/__init__.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/__main__.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/__main__.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_birthdate.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_birthdate.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_bot.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_bot.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_botcommand.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_botcommand.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_botcommandscope.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_botcommandscope.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_botdescription.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_botdescription.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_botname.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_botname.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_business.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_business.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_callbackquery.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_callbackquery.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_chat.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_chat.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_chatadministratorrights.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_chatadministratorrights.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_chatbackground.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_chatbackground.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_chatboost.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_chatboost.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_chatfullinfo.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_chatfullinfo.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_chatinvitelink.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_chatinvitelink.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_chatjoinrequest.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_chatjoinrequest.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_chatlocation.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_chatlocation.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_chatmember.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_chatmember.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_chatmemberupdated.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_chatmemberupdated.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_chatpermissions.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_chatpermissions.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_choseninlineresult.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_choseninlineresult.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_dice.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_dice.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_forcereply.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_forcereply.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_forumtopic.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_forumtopic.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_giveaway.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_giveaway.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_keyboardbutton.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_keyboardbutton.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_keyboardbuttonpolltype.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_keyboardbuttonpolltype.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_keyboardbuttonrequest.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_keyboardbuttonrequest.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_linkpreviewoptions.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_linkpreviewoptions.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_loginurl.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_loginurl.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_menubutton.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_menubutton.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_message.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_message.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_messageautodeletetimerchanged.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_messageautodeletetimerchanged.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_messageentity.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_messageentity.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_messageid.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_messageid.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_messageorigin.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_messageorigin.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_messagereactionupdated.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_messagereactionupdated.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_poll.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_poll.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_proximityalerttriggered.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_proximityalerttriggered.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_reaction.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_reaction.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_reply.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_reply.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_replykeyboardmarkup.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_replykeyboardmarkup.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_replykeyboardremove.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_replykeyboardremove.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_sentwebappmessage.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_sentwebappmessage.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_shared.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_shared.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_story.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_story.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_switchinlinequerychosenchat.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_switchinlinequerychosenchat.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_telegramobject.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_telegramobject.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_update.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_update.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_user.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_user.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_userprofilephotos.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_userprofilephotos.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_version.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_version.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_videochat.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_videochat.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_webappdata.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_webappdata.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_webappinfo.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_webappinfo.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_webhookinfo.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_webhookinfo.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/_writeaccessallowed.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/_writeaccessallowed.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/constants.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/constants.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/error.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/error.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/helpers.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/helpers.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/__pycache__/warnings.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/__pycache__/warnings.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_files/__pycache__/__init__.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_files/__pycache__/__init__.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_files/__pycache__/__init__.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/telegram/_files/__pycache__/__init__.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/telegram/_files/__pycache__/_basemedium.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_files/__pycache__/_basemedium.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_files/__pycache__/_basethumbedmedium.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_files/__pycache__/_basethumbedmedium.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_files/__pycache__/animation.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_files/__pycache__/animation.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_files/__pycache__/audio.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_files/__pycache__/audio.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_files/__pycache__/chatphoto.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_files/__pycache__/chatphoto.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_files/__pycache__/contact.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_files/__pycache__/contact.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_files/__pycache__/document.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_files/__pycache__/document.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_files/__pycache__/file.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_files/__pycache__/file.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_files/__pycache__/inputfile.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_files/__pycache__/inputfile.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_files/__pycache__/inputmedia.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_files/__pycache__/inputmedia.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_files/__pycache__/inputsticker.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_files/__pycache__/inputsticker.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_files/__pycache__/location.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_files/__pycache__/location.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_files/__pycache__/photosize.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_files/__pycache__/photosize.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_files/__pycache__/sticker.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_files/__pycache__/sticker.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_files/__pycache__/venue.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_files/__pycache__/venue.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_files/__pycache__/video.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_files/__pycache__/video.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_files/__pycache__/videonote.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_files/__pycache__/videonote.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_files/__pycache__/voice.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_files/__pycache__/voice.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_games/__pycache__/__init__.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_games/__pycache__/__init__.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_games/__pycache__/__init__.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/telegram/_games/__pycache__/__init__.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/telegram/_games/__pycache__/callbackgame.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_games/__pycache__/callbackgame.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_games/__pycache__/game.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_games/__pycache__/game.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_games/__pycache__/gamehighscore.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_games/__pycache__/gamehighscore.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/__init__.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/__init__.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/__init__.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/__init__.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinekeyboardbutton.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinekeyboardbutton.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinekeyboardmarkup.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinekeyboardmarkup.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequery.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequery.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresult.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresult.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultarticle.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultarticle.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultaudio.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultaudio.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultcachedaudio.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultcachedaudio.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultcacheddocument.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultcacheddocument.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultcachedgif.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultcachedgif.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultcachedmpeg4gif.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultcachedmpeg4gif.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultcachedphoto.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultcachedphoto.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultcachedsticker.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultcachedsticker.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultcachedvideo.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultcachedvideo.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultcachedvoice.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultcachedvoice.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultcontact.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultcontact.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultdocument.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultdocument.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultgame.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultgame.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultgif.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultgif.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultlocation.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultlocation.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultmpeg4gif.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultmpeg4gif.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultphoto.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultphoto.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultsbutton.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultsbutton.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultvenue.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultvenue.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultvideo.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultvideo.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultvoice.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inlinequeryresultvoice.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inputcontactmessagecontent.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inputcontactmessagecontent.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inputinvoicemessagecontent.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inputinvoicemessagecontent.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inputlocationmessagecontent.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inputlocationmessagecontent.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inputmessagecontent.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inputmessagecontent.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inputtextmessagecontent.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inputtextmessagecontent.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inputvenuemessagecontent.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_inline/__pycache__/inputvenuemessagecontent.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_passport/__pycache__/__init__.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_passport/__pycache__/__init__.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_passport/__pycache__/__init__.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/telegram/_passport/__pycache__/__init__.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/telegram/_passport/__pycache__/credentials.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_passport/__pycache__/credentials.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_passport/__pycache__/data.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_passport/__pycache__/data.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_passport/__pycache__/encryptedpassportelement.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_passport/__pycache__/encryptedpassportelement.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_passport/__pycache__/passportdata.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_passport/__pycache__/passportdata.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_passport/__pycache__/passportelementerrors.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_passport/__pycache__/passportelementerrors.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_passport/__pycache__/passportfile.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_passport/__pycache__/passportfile.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_payment/__pycache__/__init__.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_payment/__pycache__/__init__.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_payment/__pycache__/__init__.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/telegram/_payment/__pycache__/__init__.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/telegram/_payment/__pycache__/invoice.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_payment/__pycache__/invoice.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_payment/__pycache__/labeledprice.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_payment/__pycache__/labeledprice.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_payment/__pycache__/orderinfo.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_payment/__pycache__/orderinfo.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_payment/__pycache__/precheckoutquery.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_payment/__pycache__/precheckoutquery.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_payment/__pycache__/shippingaddress.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_payment/__pycache__/shippingaddress.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_payment/__pycache__/shippingoption.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_payment/__pycache__/shippingoption.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_payment/__pycache__/shippingquery.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_payment/__pycache__/shippingquery.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_payment/__pycache__/successfulpayment.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_payment/__pycache__/successfulpayment.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_utils/__pycache__/__init__.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_utils/__pycache__/__init__.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_utils/__pycache__/__init__.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/telegram/_utils/__pycache__/__init__.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/telegram/_utils/__pycache__/argumentparsing.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_utils/__pycache__/argumentparsing.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_utils/__pycache__/datetime.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_utils/__pycache__/datetime.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_utils/__pycache__/defaultvalue.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_utils/__pycache__/defaultvalue.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_utils/__pycache__/entities.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_utils/__pycache__/entities.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_utils/__pycache__/enum.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_utils/__pycache__/enum.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_utils/__pycache__/files.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_utils/__pycache__/files.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_utils/__pycache__/logging.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_utils/__pycache__/logging.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_utils/__pycache__/markup.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_utils/__pycache__/markup.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_utils/__pycache__/repr.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_utils/__pycache__/repr.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_utils/__pycache__/strings.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_utils/__pycache__/strings.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_utils/__pycache__/types.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_utils/__pycache__/types.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_utils/__pycache__/warnings.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_utils/__pycache__/warnings.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/_utils/__pycache__/warnings_transition.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/_utils/__pycache__/warnings_transition.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/__pycache__/__init__.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/__pycache__/__init__.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/__pycache__/_aioratelimiter.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/__pycache__/_aioratelimiter.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/__pycache__/_application.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/__pycache__/_application.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/__pycache__/_applicationbuilder.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/__pycache__/_applicationbuilder.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/__pycache__/_basepersistence.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/__pycache__/_basepersistence.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/__pycache__/_baseratelimiter.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/__pycache__/_baseratelimiter.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/__pycache__/_baseupdateprocessor.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/__pycache__/_baseupdateprocessor.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/__pycache__/_callbackcontext.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/__pycache__/_callbackcontext.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/__pycache__/_callbackdatacache.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/__pycache__/_callbackdatacache.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/__pycache__/_contexttypes.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/__pycache__/_contexttypes.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/__pycache__/_defaults.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/__pycache__/_defaults.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/__pycache__/_dictpersistence.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/__pycache__/_dictpersistence.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/__pycache__/_extbot.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/__pycache__/_extbot.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/__pycache__/_jobqueue.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/__pycache__/_jobqueue.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/__pycache__/_picklepersistence.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/__pycache__/_picklepersistence.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/__pycache__/_updater.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/__pycache__/_updater.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/__pycache__/filters.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/__pycache__/filters.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/__init__.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/__init__.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/__init__.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/__init__.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/basehandler.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/basehandler.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/businessconnectionhandler.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/businessconnectionhandler.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/businessmessagesdeletedhandler.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/businessmessagesdeletedhandler.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/callbackqueryhandler.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/callbackqueryhandler.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/chatboosthandler.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/chatboosthandler.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/chatjoinrequesthandler.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/chatjoinrequesthandler.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/chatmemberhandler.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/chatmemberhandler.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/choseninlineresulthandler.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/choseninlineresulthandler.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/commandhandler.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/commandhandler.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/conversationhandler.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/conversationhandler.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/inlinequeryhandler.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/inlinequeryhandler.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/messagehandler.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/messagehandler.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/messagereactionhandler.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/messagereactionhandler.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/pollanswerhandler.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/pollanswerhandler.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/pollhandler.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/pollhandler.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/precheckoutqueryhandler.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/precheckoutqueryhandler.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/prefixhandler.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/prefixhandler.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/shippingqueryhandler.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/shippingqueryhandler.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/stringcommandhandler.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/stringcommandhandler.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/stringregexhandler.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/stringregexhandler.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/typehandler.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_handlers/__pycache__/typehandler.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_utils/__pycache__/__init__.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_utils/__pycache__/__init__.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_utils/__pycache__/__init__.cpython-312.opt-2.pyc' => './usr/lib/python3/site-packages/telegram/ext/_utils/__pycache__/__init__.cpython-312.opt-1.pyc' './usr/lib/python3/site-packages/telegram/ext/_utils/__pycache__/_update_parsing.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_utils/__pycache__/_update_parsing.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_utils/__pycache__/stack.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_utils/__pycache__/stack.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_utils/__pycache__/trackingdict.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_utils/__pycache__/trackingdict.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_utils/__pycache__/types.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_utils/__pycache__/types.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/ext/_utils/__pycache__/webhookhandler.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/ext/_utils/__pycache__/webhookhandler.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/request/__pycache__/__init__.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/request/__pycache__/__init__.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/request/__pycache__/_baserequest.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/request/__pycache__/_baserequest.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/request/__pycache__/_httpxrequest.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/request/__pycache__/_httpxrequest.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/request/__pycache__/_requestdata.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/request/__pycache__/_requestdata.cpython-312.pyc' './usr/lib/python3/site-packages/telegram/request/__pycache__/_requestparameter.cpython-312.opt-1.pyc' => './usr/lib/python3/site-packages/telegram/request/__pycache__/_requestparameter.cpython-312.pyc' Executing(%check): /bin/sh -e /usr/src/tmp/rpm-tmp.75782 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python3-module-telegram-bot-21.3 + export 'CFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto' + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto' + export 'CXXFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto' + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto' + export 'FFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto' + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto' + export NO_INTERNET=YES + NO_INTERNET=YES + /usr/bin/python3 -m pyproject_installer run -- python3 -m pytest -n auto --dist=loadgroup -m no_req INFO : Creating venv INFO : Installing console scripts INFO : Installing package: /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/dist/python_telegram_bot-21.3-py3-none-any.whl INFO : Running command: ['/usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3', '-m', 'pyproject_installer', 'install', '/usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/dist/python_telegram_bot-21.3-py3-none-any.whl'] INFO : Running command: ['python3', '-m', 'pytest', '-n', 'auto', '--dist=loadgroup', '-m', 'no_req'] /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) ============================= test session starts ============================== platform linux -- Python 3.12.7, pytest-8.3.3, pluggy-1.5.0 rootdir: /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3 configfile: pyproject.toml testpaths: tests plugins: asyncio-0.24.0, flaky-3.8.1, anyio-4.6.2, xdist-3.6.1 asyncio: mode=Mode.AUTO, default_loop_scope=None created: 16/16 workers 16 workers [3452 items] ......EEEEEE.E..E..E.E....EE.EEE.E.EE..........E...EE.......E........... [ 2%] ...EE.....EE.E.E........E.EEE................E.E..E.E....EEE..EE..EE.... [ 4%] ..EE.E.E.....................EEE.EEE.EEE.EEE.E..EE.EEEE...E.EEE..EE...EE [ 6%] .EEEEE..............E.........................................E......... [ 8%] ...................E.......E....E......E...............E................ [ 10%] ..E............................sss...E........E.........E..........E..E. [ 12%] ................EE....................................................E. [ 14%] E........E....EE....E.........E.....E..........E.....................s.. [ 16%] ........................................................................ [ 18%] ................................................F....................... [ 20%] ...F.................................................................... [ 22%] ........................................................................ [ 25%] ........................................................................ [ 27%] ........................................................................ [ 29%] ........................................................................ [ 31%] ........................................................F............... [ 33%] ..............................................................F......... [ 35%] ........................................................................ [ 37%] ........F............................................................... [ 39%] ........................................................................ [ 41%] .....................................................F.................. [ 43%] ........................................................................ [ 45%] ........................................................................ [ 47%] ........................................................................ [ 50%] ........................................................................ [ 52%] ........................................................................ [ 54%] ........................................................................ [ 56%] ...............................................E..EE.....E.............. [ 58%] .....................E..............E.................sss....s.......... [ 60%] ..................E..................................................... [ 62%] ........................................................................ [ 64%] ..E..................................................................... [ 66%] .....................................................E.................. [ 68%] ........................................................................ [ 70%] ........................................................................ [ 73%] ........................................................................ [ 75%] ........................................................................ [ 77%] ........................................................................ [ 79%] ........................................................................ [ 81%] ........................................................................ [ 83%] .....................F.F..........E..E.................................. [ 85%] ..........E..........E.................................................. [ 87%] ....E.....E............................................................. [ 89%] ........................................................................ [ 91%] ........................................................................ [ 93%] ........................................................................ [ 95%] ........................................................................ [ 98%] ....................................................................E [100%]sys:1: RuntimeWarning: coroutine '_wrap_asyncgen_fixture.._asyncgen_fixture_wrapper..finalizer..async_finalizer' was never awaited RuntimeWarning: Enable tracemalloc to get the object allocation traceback ==================================== ERRORS ==================================== ____________ ERROR collecting tests/test_official/test_official.py _____________ ImportError while importing test module '/usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/tests/test_official/test_official.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: /usr/lib64/python3.12/importlib/__init__.py:90: in import_module return _bootstrap._gcd_import(name[level:], package, level) tests/test_official/test_official.py:26: in from tests.test_official.arg_type_checker import ( tests/test_official/arg_type_checker.py:33: in from tests.test_official.exceptions import ParamTypeCheckingExceptions as PTCE tests/test_official/exceptions.py:23: in from tests.test_official.helpers import _get_params_base tests/test_official/helpers.py:25: in from bs4 import PageElement, Tag E ModuleNotFoundError: No module named 'bs4' ___________ ERROR at setup of TestAudioWithoutRequest.test_equality ____________ [gw7] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def audio(bot, chat_id): with data_file("telegram.mp3").open("rb") as f, data_file("thumb.jpg").open("rb") as thumb: > return (await bot.send_audio(chat_id, audio=f, read_timeout=50, thumbnail=thumb)).audio tests/_files/test_audio.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2459: in send_audio return await super().send_audio( telegram/_bot.py:1554: in send_audio return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ______ ERROR at setup of TestAnimationWithoutRequest.test_slot_behaviour _______ [gw0] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAnimation' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def animation(bot, chat_id): with data_file("game.gif").open("rb") as f, data_file("thumb.jpg").open("rb") as thumb: return ( > await bot.send_animation(chat_id, animation=f, read_timeout=50, thumbnail=thumb) ).animation tests/_files/test_animation.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2401: in send_animation return await super().send_animation( telegram/_bot.py:2304: in send_animation return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAnimation' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ________ ERROR at setup of TestAudioWithoutRequest.test_send_with_audio ________ [gw8] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def audio(bot, chat_id): with data_file("telegram.mp3").open("rb") as f, data_file("thumb.jpg").open("rb") as thumb: > return (await bot.send_audio(chat_id, audio=f, read_timeout=50, thumbnail=thumb)).audio tests/_files/test_audio.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2459: in send_audio return await super().send_audio( telegram/_bot.py:1554: in send_audio return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError __________ ERROR at setup of TestAnimationWithoutRequest.test_to_dict __________ [gw4] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAnimation' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def animation(bot, chat_id): with data_file("game.gif").open("rb") as f, data_file("thumb.jpg").open("rb") as thumb: return ( > await bot.send_animation(chat_id, animation=f, read_timeout=50, thumbnail=thumb) ).animation tests/_files/test_animation.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2401: in send_animation return await super().send_animation( telegram/_bot.py:2304: in send_animation return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAnimation' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ____ ERROR at setup of TestAnimationWithoutRequest.test_send_with_animation ____ [gw9] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendAnimation' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def animation(bot, chat_id): with data_file("game.gif").open("rb") as f, data_file("thumb.jpg").open("rb") as thumb: return ( > await bot.send_animation(chat_id, animation=f, read_timeout=50, thumbnail=thumb) ).animation tests/_files/test_animation.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2401: in send_animation return await super().send_animation( telegram/_bot.py:2304: in send_animation return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendAnimation' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _________ ERROR at setup of TestAnimationWithoutRequest.test_creation __________ [gw1] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAnimation' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def animation(bot, chat_id): with data_file("game.gif").open("rb") as f, data_file("thumb.jpg").open("rb") as thumb: return ( > await bot.send_animation(chat_id, animation=f, read_timeout=50, thumbnail=thumb) ).animation tests/_files/test_animation.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2401: in send_animation return await super().send_animation( telegram/_bot.py:2304: in send_animation return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAnimation' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ______ ERROR at setup of TestAnimationWithoutRequest.test_expected_values ______ [gw2] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAnimation' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def animation(bot, chat_id): with data_file("game.gif").open("rb") as f, data_file("thumb.jpg").open("rb") as thumb: return ( > await bot.send_animation(chat_id, animation=f, read_timeout=50, thumbnail=thumb) ).animation tests/_files/test_animation.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2401: in send_animation return await super().send_animation( telegram/_bot.py:2304: in send_animation return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAnimation' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ____________ ERROR at setup of TestAudioWithoutRequest.test_to_dict ____________ [gw5] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def audio(bot, chat_id): with data_file("telegram.mp3").open("rb") as f, data_file("thumb.jpg").open("rb") as thumb: > return (await bot.send_audio(chat_id, audio=f, read_timeout=50, thumbnail=thumb)).audio tests/_files/test_audio.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2459: in send_audio return await super().send_audio( telegram/_bot.py:1554: in send_audio return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestAnimationWithoutRequest.test_get_file_instance_method __ [gw10] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendAnimation' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def animation(bot, chat_id): with data_file("game.gif").open("rb") as f, data_file("thumb.jpg").open("rb") as thumb: return ( > await bot.send_animation(chat_id, animation=f, read_timeout=50, thumbnail=thumb) ).animation tests/_files/test_animation.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2401: in send_animation return await super().send_animation( telegram/_bot.py:2304: in send_animation return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendAnimation' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError __________ ERROR at setup of TestAnimationWithoutRequest.test_de_json __________ [gw3] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAnimation' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def animation(bot, chat_id): with data_file("game.gif").open("rb") as f, data_file("thumb.jpg").open("rb") as thumb: return ( > await bot.send_animation(chat_id, animation=f, read_timeout=50, thumbnail=thumb) ).animation tests/_files/test_animation.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2401: in send_animation return await super().send_animation( telegram/_bot.py:2304: in send_animation return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAnimation' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ____________ ERROR at setup of TestAudioWithoutRequest.test_de_json ____________ [gw6] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def audio(bot, chat_id): with data_file("telegram.mp3").open("rb") as f, data_file("thumb.jpg").open("rb") as thumb: > return (await bot.send_audio(chat_id, audio=f, read_timeout=50, thumbnail=thumb)).audio tests/_files/test_audio.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2459: in send_audio return await super().send_audio( telegram/_bot.py:1554: in send_audio return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestAnimationWithoutRequest.test_send_animation_default_quote_parse_mode[default_bot0-None] _ [gw12] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAnimation' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def animation(bot, chat_id): with data_file("game.gif").open("rb") as f, data_file("thumb.jpg").open("rb") as thumb: return ( > await bot.send_animation(chat_id, animation=f, read_timeout=50, thumbnail=thumb) ).animation tests/_files/test_animation.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2401: in send_animation return await super().send_animation( telegram/_bot.py:2304: in send_animation return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAnimation' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestAnimationWithoutRequest.test_send_animation_default_quote_parse_mode[default_bot2-MarkdownV2] _ [gw13] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendAnimation' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def animation(bot, chat_id): with data_file("game.gif").open("rb") as f, data_file("thumb.jpg").open("rb") as thumb: return ( > await bot.send_animation(chat_id, animation=f, read_timeout=50, thumbnail=thumb) ).animation tests/_files/test_animation.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2401: in send_animation return await super().send_animation( telegram/_bot.py:2304: in send_animation return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendAnimation' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestAudioWithoutRequest.test_send_audio_default_quote_parse_mode[default_bot1-MarkdownV2] _ [gw14] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def audio(bot, chat_id): with data_file("telegram.mp3").open("rb") as f, data_file("thumb.jpg").open("rb") as thumb: > return (await bot.send_audio(chat_id, audio=f, read_timeout=50, thumbnail=thumb)).audio tests/_files/test_audio.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2459: in send_audio return await super().send_audio( telegram/_bot.py:1554: in send_audio return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestAnimationWithoutRequest.test_send_animation_default_quote_parse_mode[default_bot1-MarkdownV2] _ [gw11] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendAnimation' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def animation(bot, chat_id): with data_file("game.gif").open("rb") as f, data_file("thumb.jpg").open("rb") as thumb: return ( > await bot.send_animation(chat_id, animation=f, read_timeout=50, thumbnail=thumb) ).animation tests/_files/test_animation.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2401: in send_animation return await super().send_animation( telegram/_bot.py:2304: in send_animation return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendAnimation' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestAudioWithoutRequest.test_send_audio_default_quote_parse_mode[default_bot2-MarkdownV2] _ [gw15] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def audio(bot, chat_id): with data_file("telegram.mp3").open("rb") as f, data_file("thumb.jpg").open("rb") as thumb: > return (await bot.send_audio(chat_id, audio=f, read_timeout=50, thumbnail=thumb)).audio tests/_files/test_audio.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2459: in send_audio return await super().send_audio( telegram/_bot.py:1554: in send_audio return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError __________ ERROR at setup of TestChatPhotoWithoutRequest.test_de_json __________ [gw7] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/getChat' method = 'POST' request_data = read_timeout = 50, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] super_group_id = '-1001221216830' @pytest.fixture(scope="module") async def chat_photo(bot, super_group_id): async def func(): return (await bot.get_chat(super_group_id, read_timeout=50)).photo > return await expect_bad_request( func, "Type of file mismatch", "Telegram did not accept the file." ) tests/_files/test_chatphoto.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/auxil/networking.py:77: in expect_bad_request return await func() tests/_files/test_chatphoto.py:48: in func return (await bot.get_chat(super_group_id, read_timeout=50)).photo telegram/ext/_extbot.py:882: in get_chat result = await super().get_chat( telegram/_bot.py:4571: in get_chat result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/getChat' method = 'POST' request_data = read_timeout = 50, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ______ ERROR at setup of TestChatPhotoWithoutRequest.test_slot_behaviour _______ [gw6] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/getChat' method = 'POST' request_data = read_timeout = 50, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] super_group_id = '-1001221216830' @pytest.fixture(scope="module") async def chat_photo(bot, super_group_id): async def func(): return (await bot.get_chat(super_group_id, read_timeout=50)).photo > return await expect_bad_request( func, "Type of file mismatch", "Telegram did not accept the file." ) tests/_files/test_chatphoto.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/auxil/networking.py:77: in expect_bad_request return await func() tests/_files/test_chatphoto.py:48: in func return (await bot.get_chat(super_group_id, read_timeout=50)).photo telegram/ext/_extbot.py:882: in get_chat result = await super().get_chat( telegram/_bot.py:4571: in get_chat result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/getChat' method = 'POST' request_data = read_timeout = 50, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ___________ ERROR at setup of TestAudioWithoutRequest.test_creation ____________ [gw3] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def audio(bot, chat_id): with data_file("telegram.mp3").open("rb") as f, data_file("thumb.jpg").open("rb") as thumb: > return (await bot.send_audio(chat_id, audio=f, read_timeout=50, thumbnail=thumb)).audio tests/_files/test_audio.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2459: in send_audio return await super().send_audio( telegram/_bot.py:1554: in send_audio return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ___ ERROR at setup of TestChatPhotoWithoutRequest.test_send_with_chat_photo ____ [gw8] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/getChat' method = 'POST' request_data = read_timeout = 50, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] super_group_id = '-1001310911135' @pytest.fixture(scope="module") async def chat_photo(bot, super_group_id): async def func(): return (await bot.get_chat(super_group_id, read_timeout=50)).photo > return await expect_bad_request( func, "Type of file mismatch", "Telegram did not accept the file." ) tests/_files/test_chatphoto.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/auxil/networking.py:77: in expect_bad_request return await func() tests/_files/test_chatphoto.py:48: in func return (await bot.get_chat(super_group_id, read_timeout=50)).photo telegram/ext/_extbot.py:882: in get_chat result = await super().get_chat( telegram/_bot.py:4571: in get_chat result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/getChat' method = 'POST' request_data = read_timeout = 50, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError __________ ERROR at setup of TestDocumentWithoutRequest.test_creation __________ [gw10] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def document(bot, chat_id): with data_file("telegram.png").open("rb") as f: > return (await bot.send_document(chat_id, document=f, read_timeout=50)).document tests/_files/test_document.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2627: in send_document return await super().send_document( telegram/_bot.py:1704: in send_document return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError __________ ERROR at setup of TestDocumentWithoutRequest.test_to_dict ___________ [gw0] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def document(bot, chat_id): with data_file("telegram.png").open("rb") as f: > return (await bot.send_document(chat_id, document=f, read_timeout=50)).document tests/_files/test_document.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2627: in send_document return await super().send_document( telegram/_bot.py:1704: in send_document return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError __ ERROR at setup of TestDocumentWithoutRequest.test_send_with_document[None] __ [gw12] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def document(bot, chat_id): with data_file("telegram.png").open("rb") as f: > return (await bot.send_document(chat_id, document=f, read_timeout=50)).document tests/_files/test_document.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2627: in send_document return await super().send_document( telegram/_bot.py:1704: in send_document return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ________ ERROR at setup of TestAudioWithoutRequest.test_expected_values ________ [gw4] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def audio(bot, chat_id): with data_file("telegram.mp3").open("rb") as f, data_file("thumb.jpg").open("rb") as thumb: > return (await bot.send_audio(chat_id, audio=f, read_timeout=50, thumbnail=thumb)).audio tests/_files/test_audio.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2459: in send_audio return await super().send_audio( telegram/_bot.py:1554: in send_audio return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ________ ERROR at setup of TestAudioWithoutRequest.test_slot_behaviour _________ [gw2] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def audio(bot, chat_id): with data_file("telegram.mp3").open("rb") as f, data_file("thumb.jpg").open("rb") as thumb: > return (await bot.send_audio(chat_id, audio=f, read_timeout=50, thumbnail=thumb)).audio tests/_files/test_audio.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2459: in send_audio return await super().send_audio( telegram/_bot.py:1554: in send_audio return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestChatPhotoWithoutRequest.test_get_small_file_instance_method _ [gw15] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/getChat' method = 'POST' request_data = read_timeout = 50, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] super_group_id = '-1001310911135' @pytest.fixture(scope="module") async def chat_photo(bot, super_group_id): async def func(): return (await bot.get_chat(super_group_id, read_timeout=50)).photo > return await expect_bad_request( func, "Type of file mismatch", "Telegram did not accept the file." ) tests/_files/test_chatphoto.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/auxil/networking.py:77: in expect_bad_request return await func() tests/_files/test_chatphoto.py:48: in func return (await bot.get_chat(super_group_id, read_timeout=50)).photo telegram/ext/_extbot.py:882: in get_chat result = await super().get_chat( telegram/_bot.py:4571: in get_chat result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/getChat' method = 'POST' request_data = read_timeout = 50, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError __________ ERROR at setup of TestDocumentWithoutRequest.test_equality __________ [gw1] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def document(bot, chat_id): with data_file("telegram.png").open("rb") as f: > return (await bot.send_document(chat_id, document=f, read_timeout=50)).document tests/_files/test_document.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2627: in send_document return await super().send_document( telegram/_bot.py:1704: in send_document return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ___ ERROR at setup of TestAudioWithoutRequest.test_get_file_instance_method ____ [gw11] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def audio(bot, chat_id): with data_file("telegram.mp3").open("rb") as f, data_file("thumb.jpg").open("rb") as thumb: > return (await bot.send_audio(chat_id, audio=f, read_timeout=50, thumbnail=thumb)).audio tests/_files/test_audio.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2459: in send_audio return await super().send_audio( telegram/_bot.py:1554: in send_audio return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestChatPhotoWithoutRequest.test_get_big_file_instance_method _ [gw7] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/getChat' method = 'POST' request_data = read_timeout = 50, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] super_group_id = '-1001221216830' @pytest.fixture(scope="module") async def chat_photo(bot, super_group_id): async def func(): return (await bot.get_chat(super_group_id, read_timeout=50)).photo > return await expect_bad_request( func, "Type of file mismatch", "Telegram did not accept the file." ) tests/_files/test_chatphoto.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/auxil/networking.py:77: in expect_bad_request return await func() tests/_files/test_chatphoto.py:48: in func return (await bot.get_chat(super_group_id, read_timeout=50)).photo telegram/ext/_extbot.py:882: in get_chat result = await super().get_chat( telegram/_bot.py:4571: in get_chat result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/getChat' method = 'POST' request_data = read_timeout = 50, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError __________ ERROR at setup of TestChatPhotoWithoutRequest.test_to_dict __________ [gw14] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/getChat' method = 'POST' request_data = read_timeout = 50, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] super_group_id = '-1001221216830' @pytest.fixture(scope="module") async def chat_photo(bot, super_group_id): async def func(): return (await bot.get_chat(super_group_id, read_timeout=50)).photo > return await expect_bad_request( func, "Type of file mismatch", "Telegram did not accept the file." ) tests/_files/test_chatphoto.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/auxil/networking.py:77: in expect_bad_request return await func() tests/_files/test_chatphoto.py:48: in func return (await bot.get_chat(super_group_id, read_timeout=50)).photo telegram/ext/_extbot.py:882: in get_chat result = await super().get_chat( telegram/_bot.py:4571: in get_chat result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/getChat' method = 'POST' request_data = read_timeout = 50, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestAudioWithoutRequest.test_send_audio_default_quote_parse_mode[default_bot0-None] _ [gw13] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def audio(bot, chat_id): with data_file("telegram.mp3").open("rb") as f, data_file("thumb.jpg").open("rb") as thumb: > return (await bot.send_audio(chat_id, audio=f, read_timeout=50, thumbnail=thumb)).audio tests/_files/test_audio.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2459: in send_audio return await super().send_audio( telegram/_bot.py:1554: in send_audio return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _______ ERROR at setup of TestDocumentWithoutRequest.test_slot_behaviour _______ [gw5] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def document(bot, chat_id): with data_file("telegram.png").open("rb") as f: > return (await bot.send_document(chat_id, document=f, read_timeout=50)).document tests/_files/test_document.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2627: in send_document return await super().send_document( telegram/_bot.py:1704: in send_document return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestDocumentWithoutRequest.test_send_with_document[False] __ [gw6] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def document(bot, chat_id): with data_file("telegram.png").open("rb") as f: > return (await bot.send_document(chat_id, document=f, read_timeout=50)).document tests/_files/test_document.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2627: in send_document return await super().send_document( telegram/_bot.py:1704: in send_document return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError __________ ERROR at setup of TestDocumentWithoutRequest.test_de_json ___________ [gw3] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def document(bot, chat_id): with data_file("telegram.png").open("rb") as f: > return (await bot.send_document(chat_id, document=f, read_timeout=50)).document tests/_files/test_document.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2627: in send_document return await super().send_document( telegram/_bot.py:1704: in send_document return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestDocumentWithoutRequest.test_send_document_default_quote_parse_mode[default_bot0-None] _ [gw12] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def document(bot, chat_id): with data_file("telegram.png").open("rb") as f: > return (await bot.send_document(chat_id, document=f, read_timeout=50)).document tests/_files/test_document.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2627: in send_document return await super().send_document( telegram/_bot.py:1704: in send_document return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestInputMediaAnimationWithoutRequest.test_with_animation __ [gw8] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendAnimation' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:366: in _async_fixture_wrapper return event_loop.run_until_complete(setup()) /usr/lib64/python3.12/asyncio/base_events.py:687: in run_until_complete return future.result() /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:363: in setup res = await func(**_add_kwargs(func, kwargs, event_loop, request)) tests/_files/test_animation.py:50: in animation await bot.send_animation(chat_id, animation=f, read_timeout=50, thumbnail=thumb) telegram/ext/_extbot.py:2401: in send_animation return await super().send_animation( telegram/_bot.py:2304: in send_animation return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendAnimation' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError __ ERROR at setup of TestDocumentWithoutRequest.test_get_file_instance_method __ [gw15] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def document(bot, chat_id): with data_file("telegram.png").open("rb") as f: > return (await bot.send_document(chat_id, document=f, read_timeout=50)).document tests/_files/test_document.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2627: in send_document return await super().send_document( telegram/_bot.py:1704: in send_document return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _____ ERROR at setup of TestInputMediaVideoWithoutRequest.test_with_video ______ [gw9] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVideo' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:366: in _async_fixture_wrapper return event_loop.run_until_complete(setup()) /usr/lib64/python3.12/asyncio/base_events.py:687: in run_until_complete return future.result() /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:363: in setup res = await func(**_add_kwargs(func, kwargs, event_loop, request)) tests/_files/test_video.py:49: in video return (await bot.send_video(chat_id, video=f, read_timeout=50)).video telegram/ext/_extbot.py:3164: in send_video return await super().send_video( telegram/_bot.py:1996: in send_video return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVideo' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError __ ERROR at setup of TestDocumentWithoutRequest.test_send_with_document[True] __ [gw1] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def document(bot, chat_id): with data_file("telegram.png").open("rb") as f: > return (await bot.send_document(chat_id, document=f, read_timeout=50)).document tests/_files/test_document.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2627: in send_document return await super().send_document( telegram/_bot.py:1704: in send_document return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ______ ERROR at setup of TestDocumentWithoutRequest.test_expected_values _______ [gw10] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def document(bot, chat_id): with data_file("telegram.png").open("rb") as f: > return (await bot.send_document(chat_id, document=f, read_timeout=50)).document tests/_files/test_document.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2627: in send_document return await super().send_document( telegram/_bot.py:1704: in send_document return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _____ ERROR at setup of TestInputMediaPhotoWithoutRequest.test_with_photo ______ [gw0] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:366: in _async_fixture_wrapper return event_loop.run_until_complete(setup()) /usr/lib64/python3.12/asyncio/base_events.py:687: in run_until_complete return future.result() /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:363: in setup res = await func(**_add_kwargs(func, kwargs, event_loop, request)) tests/_files/test_photo.py:53: in photolist return await expect_bad_request( tests/auxil/networking.py:77: in expect_bad_request return await func() tests/_files/test_photo.py:51: in func return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo telegram/ext/_extbot.py:2943: in send_photo return await super().send_photo( telegram/_bot.py:1397: in send_photo return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _____ ERROR at setup of TestInputMediaAudioWithoutRequest.test_with_audio ______ [gw4] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:366: in _async_fixture_wrapper return event_loop.run_until_complete(setup()) /usr/lib64/python3.12/asyncio/base_events.py:687: in run_until_complete return future.result() /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:363: in setup res = await func(**_add_kwargs(func, kwargs, event_loop, request)) tests/_files/test_audio.py:49: in audio return (await bot.send_audio(chat_id, audio=f, read_timeout=50, thumbnail=thumb)).audio telegram/ext/_extbot.py:2459: in send_audio return await super().send_audio( telegram/_bot.py:1554: in send_audio return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendAudio' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestSendMediaGroupWithoutRequest.test_send_media_group_throws_error_with_group_caption_and_individual_captions _ [gw2] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:366: in _async_fixture_wrapper return event_loop.run_until_complete(setup()) /usr/lib64/python3.12/asyncio/base_events.py:687: in run_until_complete return future.result() /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:363: in setup res = await func(**_add_kwargs(func, kwargs, event_loop, request)) tests/_files/test_photo.py:53: in photolist return await expect_bad_request( tests/auxil/networking.py:77: in expect_bad_request return await func() tests/_files/test_photo.py:51: in func return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo telegram/ext/_extbot.py:2943: in send_photo return await super().send_photo( telegram/_bot.py:1397: in send_photo return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestSendMediaGroupWithoutRequest.test_send_media_group_default_quote_parse_mode[default_bot0-None] _ [gw11] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:366: in _async_fixture_wrapper return event_loop.run_until_complete(setup()) /usr/lib64/python3.12/asyncio/base_events.py:687: in run_until_complete return future.result() /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:363: in setup res = await func(**_add_kwargs(func, kwargs, event_loop, request)) tests/_files/test_photo.py:53: in photolist return await expect_bad_request( tests/auxil/networking.py:77: in expect_bad_request return await func() tests/_files/test_photo.py:51: in func return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo telegram/ext/_extbot.py:2943: in send_photo return await super().send_photo( telegram/_bot.py:1397: in send_photo return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestDocumentWithoutRequest.test_send_document_default_quote_parse_mode[default_bot1-MarkdownV2] _ [gw13] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def document(bot, chat_id): with data_file("telegram.png").open("rb") as f: > return (await bot.send_document(chat_id, document=f, read_timeout=50)).document tests/_files/test_document.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2627: in send_document return await super().send_document( telegram/_bot.py:1704: in send_document return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestDocumentWithoutRequest.test_send_document_default_quote_parse_mode[default_bot2-MarkdownV2] _ [gw14] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def document(bot, chat_id): with data_file("telegram.png").open("rb") as f: > return (await bot.send_document(chat_id, document=f, read_timeout=50)).document tests/_files/test_document.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2627: in send_document return await super().send_document( telegram/_bot.py:1704: in send_document return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestSendMediaGroupWithoutRequest.test_send_media_group_default_quote_parse_mode[default_bot2-MarkdownV2] _ [gw7] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:366: in _async_fixture_wrapper return event_loop.run_until_complete(setup()) /usr/lib64/python3.12/asyncio/base_events.py:687: in run_until_complete return future.result() /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:363: in setup res = await func(**_add_kwargs(func, kwargs, event_loop, request)) tests/_files/test_photo.py:53: in photolist return await expect_bad_request( tests/auxil/networking.py:77: in expect_bad_request return await func() tests/_files/test_photo.py:51: in func return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo telegram/ext/_extbot.py:2943: in send_photo return await super().send_photo( telegram/_bot.py:1397: in send_photo return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ________ ERROR at setup of TestPhotoWithoutRequest.test_expected_values ________ [gw3] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def photolist(bot, chat_id): async def func(): with data_file("telegram.jpg").open("rb") as f: return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo > return await expect_bad_request( func, "Type of file mismatch", "Telegram did not accept the file." ) tests/_files/test_photo.py:53: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/auxil/networking.py:77: in expect_bad_request return await func() tests/_files/test_photo.py:51: in func return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo telegram/ext/_extbot.py:2943: in send_photo return await super().send_photo( telegram/_bot.py:1397: in send_photo return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ________ ERROR at setup of TestPhotoWithoutRequest.test_slot_behaviour _________ [gw6] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def photolist(bot, chat_id): async def func(): with data_file("telegram.jpg").open("rb") as f: return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo > return await expect_bad_request( func, "Type of file mismatch", "Telegram did not accept the file." ) tests/_files/test_photo.py:53: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/auxil/networking.py:77: in expect_bad_request return await func() tests/_files/test_photo.py:51: in func return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo telegram/ext/_extbot.py:2943: in send_photo return await super().send_photo( telegram/_bot.py:1397: in send_photo return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ___________ ERROR at setup of TestPhotoWithoutRequest.test_equality ____________ [gw12] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def photolist(bot, chat_id): async def func(): with data_file("telegram.jpg").open("rb") as f: return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo > return await expect_bad_request( func, "Type of file mismatch", "Telegram did not accept the file." ) tests/_files/test_photo.py:53: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/auxil/networking.py:77: in expect_bad_request return await func() tests/_files/test_photo.py:51: in func return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo telegram/ext/_extbot.py:2943: in send_photo return await super().send_photo( telegram/_bot.py:1397: in send_photo return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ______ ERROR at setup of TestPhotoWithoutRequest.test_send_with_photosize ______ [gw8] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def photolist(bot, chat_id): async def func(): with data_file("telegram.jpg").open("rb") as f: return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo > return await expect_bad_request( func, "Type of file mismatch", "Telegram did not accept the file." ) tests/_files/test_photo.py:53: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/auxil/networking.py:77: in expect_bad_request return await func() tests/_files/test_photo.py:51: in func return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo telegram/ext/_extbot.py:2943: in send_photo return await super().send_photo( telegram/_bot.py:1397: in send_photo return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _______ ERROR at setup of TestStickerWithoutRequest.test_expected_values _______ [gw10] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def sticker(bot, chat_id): with data_file("telegram.webp").open("rb") as f: > sticker = (await bot.send_sticker(chat_id, sticker=f, read_timeout=50)).sticker tests/_files/test_sticker.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3056: in send_sticker return await super().send_sticker( telegram/_bot.py:1825: in send_sticker return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ___________ ERROR at setup of TestStickerWithoutRequest.test_to_dict ___________ [gw0] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def sticker(bot, chat_id): with data_file("telegram.webp").open("rb") as f: > sticker = (await bot.send_sticker(chat_id, sticker=f, read_timeout=50)).sticker tests/_files/test_sticker.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3056: in send_sticker return await super().send_sticker( telegram/_bot.py:1825: in send_sticker return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestPhotoWithoutRequest.test_send_photo_default_quote_parse_mode[default_bot0-None] _ [gw9] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def photolist(bot, chat_id): async def func(): with data_file("telegram.jpg").open("rb") as f: return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo > return await expect_bad_request( func, "Type of file mismatch", "Telegram did not accept the file." ) tests/_files/test_photo.py:53: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/auxil/networking.py:77: in expect_bad_request return await func() tests/_files/test_photo.py:51: in func return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo telegram/ext/_extbot.py:2943: in send_photo return await super().send_photo( telegram/_bot.py:1397: in send_photo return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError __ ERROR at setup of TestInputMediaDocumentWithoutRequest.test_with_document ___ [gw1] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:366: in _async_fixture_wrapper return event_loop.run_until_complete(setup()) /usr/lib64/python3.12/asyncio/base_events.py:687: in run_until_complete return future.result() /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:363: in setup res = await func(**_add_kwargs(func, kwargs, event_loop, request)) tests/_files/test_document.py:49: in document return (await bot.send_document(chat_id, document=f, read_timeout=50)).document telegram/ext/_extbot.py:2627: in send_document return await super().send_document( telegram/_bot.py:1704: in send_document return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendDocument' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestPhotoWithoutRequest.test_send_photo_default_quote_parse_mode[default_bot1-MarkdownV2] _ [gw15] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def photolist(bot, chat_id): async def func(): with data_file("telegram.jpg").open("rb") as f: return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo > return await expect_bad_request( func, "Type of file mismatch", "Telegram did not accept the file." ) tests/_files/test_photo.py:53: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/auxil/networking.py:77: in expect_bad_request return await func() tests/_files/test_photo.py:51: in func return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo telegram/ext/_extbot.py:2943: in send_photo return await super().send_photo( telegram/_bot.py:1397: in send_photo return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError __________ ERROR at setup of TestStickerWithoutRequest.test_equality ___________ [gw4] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def sticker(bot, chat_id): with data_file("telegram.webp").open("rb") as f: > sticker = (await bot.send_sticker(chat_id, sticker=f, read_timeout=50)).sticker tests/_files/test_sticker.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3056: in send_sticker return await super().send_sticker( telegram/_bot.py:1825: in send_sticker return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestStickerWithoutRequest.test_send_sticker_default_quote_parse_mode[default_bot0-None] _ [gw2] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def sticker(bot, chat_id): with data_file("telegram.webp").open("rb") as f: > sticker = (await bot.send_sticker(chat_id, sticker=f, read_timeout=50)).sticker tests/_files/test_sticker.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3056: in send_sticker return await super().send_sticker( telegram/_bot.py:1825: in send_sticker return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ____________ ERROR at setup of TestPhotoWithoutRequest.test_to_dict ____________ [gw5] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def photolist(bot, chat_id): async def func(): with data_file("telegram.jpg").open("rb") as f: return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo > return await expect_bad_request( func, "Type of file mismatch", "Telegram did not accept the file." ) tests/_files/test_photo.py:53: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/auxil/networking.py:77: in expect_bad_request return await func() tests/_files/test_photo.py:51: in func return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo telegram/ext/_extbot.py:2943: in send_photo return await super().send_photo( telegram/_bot.py:1397: in send_photo return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestSendMediaGroupWithoutRequest.test_send_media_group_default_quote_parse_mode[default_bot1-MarkdownV2] _ [gw11] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:366: in _async_fixture_wrapper return event_loop.run_until_complete(setup()) /usr/lib64/python3.12/asyncio/base_events.py:687: in run_until_complete return future.result() /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:363: in setup res = await func(**_add_kwargs(func, kwargs, event_loop, request)) tests/_files/test_photo.py:53: in photolist return await expect_bad_request( tests/auxil/networking.py:77: in expect_bad_request return await func() tests/_files/test_photo.py:51: in func return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo telegram/ext/_extbot.py:2943: in send_photo return await super().send_photo( telegram/_bot.py:1397: in send_photo return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _________ ERROR at setup of TestStickerSetWithoutRequest.test_de_json __________ [gw13] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def sticker(bot, chat_id): with data_file("telegram.webp").open("rb") as f: > sticker = (await bot.send_sticker(chat_id, sticker=f, read_timeout=50)).sticker tests/_files/test_sticker.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3056: in send_sticker return await super().send_sticker( telegram/_bot.py:1825: in send_sticker return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestStickerSetWithoutRequest.test_get_file_instance_method _ [gw14] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def sticker(bot, chat_id): with data_file("telegram.webp").open("rb") as f: > sticker = (await bot.send_sticker(chat_id, sticker=f, read_timeout=50)).sticker tests/_files/test_sticker.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3056: in send_sticker return await super().send_sticker( telegram/_bot.py:1825: in send_sticker return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ___________ ERROR at setup of TestPhotoWithoutRequest.test_creation ____________ [gw6] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def photolist(bot, chat_id): async def func(): with data_file("telegram.jpg").open("rb") as f: return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo > return await expect_bad_request( func, "Type of file mismatch", "Telegram did not accept the file." ) tests/_files/test_photo.py:53: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/auxil/networking.py:77: in expect_bad_request return await func() tests/_files/test_photo.py:51: in func return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo telegram/ext/_extbot.py:2943: in send_photo return await super().send_photo( telegram/_bot.py:1397: in send_photo return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ____________ ERROR at setup of TestPhotoWithoutRequest.test_de_json ____________ [gw3] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def photolist(bot, chat_id): async def func(): with data_file("telegram.jpg").open("rb") as f: return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo > return await expect_bad_request( func, "Type of file mismatch", "Telegram did not accept the file." ) tests/_files/test_photo.py:53: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/auxil/networking.py:77: in expect_bad_request return await func() tests/_files/test_photo.py:51: in func return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo telegram/ext/_extbot.py:2943: in send_photo return await super().send_photo( telegram/_bot.py:1397: in send_photo return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ___________ ERROR at setup of TestVideoWithoutRequest.test_creation ____________ [gw12] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideo' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def video(bot, chat_id): with data_file("telegram.mp4").open("rb") as f: > return (await bot.send_video(chat_id, video=f, read_timeout=50)).video tests/_files/test_video.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3164: in send_video return await super().send_video( telegram/_bot.py:1996: in send_video return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideo' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ___ ERROR at setup of TestPhotoWithoutRequest.test_get_file_instance_method ____ [gw8] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def photolist(bot, chat_id): async def func(): with data_file("telegram.jpg").open("rb") as f: return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo > return await expect_bad_request( func, "Type of file mismatch", "Telegram did not accept the file." ) tests/_files/test_photo.py:53: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/auxil/networking.py:77: in expect_bad_request return await func() tests/_files/test_photo.py:51: in func return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo telegram/ext/_extbot.py:2943: in send_photo return await super().send_photo( telegram/_bot.py:1397: in send_photo return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ___________ ERROR at setup of TestVideoWithoutRequest.test_equality ____________ [gw0] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideo' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def video(bot, chat_id): with data_file("telegram.mp4").open("rb") as f: > return (await bot.send_video(chat_id, video=f, read_timeout=50)).video tests/_files/test_video.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3164: in send_video return await super().send_video( telegram/_bot.py:1996: in send_video return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideo' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ___________ ERROR at setup of TestStickerWithoutRequest.test_de_json ___________ [gw10] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def sticker(bot, chat_id): with data_file("telegram.webp").open("rb") as f: > sticker = (await bot.send_sticker(chat_id, sticker=f, read_timeout=50)).sticker tests/_files/test_sticker.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3056: in send_sticker return await super().send_sticker( telegram/_bot.py:1825: in send_sticker return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError __________ ERROR at setup of TestStickerWithoutRequest.test_creation ___________ [gw9] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def sticker(bot, chat_id): with data_file("telegram.webp").open("rb") as f: > sticker = (await bot.send_sticker(chat_id, sticker=f, read_timeout=50)).sticker tests/_files/test_sticker.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3056: in send_sticker return await super().send_sticker( telegram/_bot.py:1825: in send_sticker return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _______ ERROR at setup of TestStickerWithoutRequest.test_slot_behaviour ________ [gw15] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def sticker(bot, chat_id): with data_file("telegram.webp").open("rb") as f: > sticker = (await bot.send_sticker(chat_id, sticker=f, read_timeout=50)).sticker tests/_files/test_sticker.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3056: in send_sticker return await super().send_sticker( telegram/_bot.py:1825: in send_sticker return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ______ ERROR at setup of TestStickerWithoutRequest.test_send_with_sticker ______ [gw4] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def sticker(bot, chat_id): with data_file("telegram.webp").open("rb") as f: > sticker = (await bot.send_sticker(chat_id, sticker=f, read_timeout=50)).sticker tests/_files/test_sticker.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3056: in send_sticker return await super().send_sticker( telegram/_bot.py:1825: in send_sticker return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestPhotoWithoutRequest.test_send_photo_default_quote_parse_mode[default_bot2-MarkdownV2] _ [gw1] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def photolist(bot, chat_id): async def func(): with data_file("telegram.jpg").open("rb") as f: return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo > return await expect_bad_request( func, "Type of file mismatch", "Telegram did not accept the file." ) tests/_files/test_photo.py:53: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/auxil/networking.py:77: in expect_bad_request return await func() tests/_files/test_photo.py:51: in func return (await bot.send_photo(chat_id, photo=f, read_timeout=50)).photo telegram/ext/_extbot.py:2943: in send_photo return await super().send_photo( telegram/_bot.py:1397: in send_photo return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendPhoto' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ___ ERROR at setup of TestStickerSetWithoutRequest.test_sticker_set_to_dict ____ [gw13] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/getStickerSet' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] @pytest.fixture() async def sticker_set(bot): > ss = await bot.get_sticker_set(f"test_by_{bot.username}") tests/_files/test_sticker.py:529: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:1967: in get_sticker_set return await super().get_sticker_set( telegram/_bot.py:6233: in get_sticker_set result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/getStickerSet' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestStickerWithoutRequest.test_send_sticker_default_quote_parse_mode[default_bot1-MarkdownV2] _ [gw2] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def sticker(bot, chat_id): with data_file("telegram.webp").open("rb") as f: > sticker = (await bot.send_sticker(chat_id, sticker=f, read_timeout=50)).sticker tests/_files/test_sticker.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3056: in send_sticker return await super().send_sticker( telegram/_bot.py:1825: in send_sticker return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ______ ERROR at setup of TestVideoNoteWithoutRequest.test_slot_behaviour _______ [gw11] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVideoNote' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def video_note(bot, chat_id): with data_file("telegram2.mp4").open("rb") as f: > return (await bot.send_video_note(chat_id, video_note=f, read_timeout=50)).video_note tests/_files/test_videonote.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3219: in send_video_note return await super().send_video_note( telegram/_bot.py:2141: in send_video_note return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVideoNote' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestStickerWithoutRequest.test_send_sticker_default_quote_parse_mode[default_bot2-MarkdownV2] _ [gw5] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def sticker(bot, chat_id): with data_file("telegram.webp").open("rb") as f: > sticker = (await bot.send_sticker(chat_id, sticker=f, read_timeout=50)).sticker tests/_files/test_sticker.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3056: in send_sticker return await super().send_sticker( telegram/_bot.py:1825: in send_sticker return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendSticker' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestVideoWithoutRequest.test_send_video_default_quote_parse_mode[default_bot2-MarkdownV2] _ [gw7] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideo' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def video(bot, chat_id): with data_file("telegram.mp4").open("rb") as f: > return (await bot.send_video(chat_id, video=f, read_timeout=50)).video tests/_files/test_video.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3164: in send_video return await super().send_video( telegram/_bot.py:1996: in send_video return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideo' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError __________ ERROR at setup of TestVideoNoteWithoutRequest.test_to_dict __________ [gw14] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideoNote' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def video_note(bot, chat_id): with data_file("telegram2.mp4").open("rb") as f: > return (await bot.send_video_note(chat_id, video_note=f, read_timeout=50)).video_note tests/_files/test_videonote.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3219: in send_video_note return await super().send_video_note( telegram/_bot.py:2141: in send_video_note return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideoNote' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ________ ERROR at setup of TestVideoWithoutRequest.test_expected_values ________ [gw12] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideo' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def video(bot, chat_id): with data_file("telegram.mp4").open("rb") as f: > return (await bot.send_video(chat_id, video=f, read_timeout=50)).video tests/_files/test_video.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3164: in send_video return await super().send_video( telegram/_bot.py:1996: in send_video return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideo' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ________ ERROR at setup of TestVideoWithoutRequest.test_slot_behaviour _________ [gw6] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideo' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def video(bot, chat_id): with data_file("telegram.mp4").open("rb") as f: > return (await bot.send_video(chat_id, video=f, read_timeout=50)).video tests/_files/test_video.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3164: in send_video return await super().send_video( telegram/_bot.py:1996: in send_video return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideo' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestVideoNoteWithoutRequest.test_get_file_instance_method __ [gw8] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVideoNote' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def video_note(bot, chat_id): with data_file("telegram2.mp4").open("rb") as f: > return (await bot.send_video_note(chat_id, video_note=f, read_timeout=50)).video_note tests/_files/test_videonote.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3219: in send_video_note return await super().send_video_note( telegram/_bot.py:2141: in send_video_note return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVideoNote' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ____________ ERROR at setup of TestVideoWithoutRequest.test_to_dict ____________ [gw10] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVideo' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def video(bot, chat_id): with data_file("telegram.mp4").open("rb") as f: > return (await bot.send_video(chat_id, video=f, read_timeout=50)).video tests/_files/test_video.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3164: in send_video return await super().send_video( telegram/_bot.py:1996: in send_video return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVideo' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestVideoNoteWithoutRequest.test_send_video_note_default_quote_parse_mode[default_bot1-MarkdownV2] _ [gw0] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideoNote' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def video_note(bot, chat_id): with data_file("telegram2.mp4").open("rb") as f: > return (await bot.send_video_note(chat_id, video_note=f, read_timeout=50)).video_note tests/_files/test_videonote.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3219: in send_video_note return await super().send_video_note( telegram/_bot.py:2141: in send_video_note return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideoNote' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ________ ERROR at setup of TestVoiceWithoutRequest.test_expected_values ________ [gw15] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVoice' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def voice(bot, chat_id): with data_file("telegram.ogg").open("rb") as f: > return (await bot.send_voice(chat_id, voice=f, read_timeout=50)).voice tests/_files/test_voice.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3268: in send_voice return await super().send_voice( telegram/_bot.py:2451: in send_voice return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVoice' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ___ ERROR at setup of TestVideoNoteWithoutRequest.test_send_with_video_note ____ [gw3] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideoNote' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def video_note(bot, chat_id): with data_file("telegram2.mp4").open("rb") as f: > return (await bot.send_video_note(chat_id, video_note=f, read_timeout=50)).video_note tests/_files/test_videonote.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3219: in send_video_note return await super().send_video_note( telegram/_bot.py:2141: in send_video_note return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideoNote' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ________ ERROR at setup of TestVideoWithoutRequest.test_send_with_video ________ [gw9] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVideo' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def video(bot, chat_id): with data_file("telegram.mp4").open("rb") as f: > return (await bot.send_video(chat_id, video=f, read_timeout=50)).video tests/_files/test_video.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3164: in send_video return await super().send_video( telegram/_bot.py:1996: in send_video return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVideo' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ___ ERROR at setup of TestVideoWithoutRequest.test_get_file_instance_method ____ [gw4] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideo' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def video(bot, chat_id): with data_file("telegram.mp4").open("rb") as f: > return (await bot.send_video(chat_id, video=f, read_timeout=50)).video tests/_files/test_video.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3164: in send_video return await super().send_video( telegram/_bot.py:1996: in send_video return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideo' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestVideoWithoutRequest.test_send_video_default_quote_parse_mode[default_bot0-None] _ [gw2] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideo' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def video(bot, chat_id): with data_file("telegram.mp4").open("rb") as f: > return (await bot.send_video(chat_id, video=f, read_timeout=50)).video tests/_files/test_video.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3164: in send_video return await super().send_video( telegram/_bot.py:1996: in send_video return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideo' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ______ ERROR at setup of TestVideoNoteWithoutRequest.test_expected_values ______ [gw11] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVideoNote' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def video_note(bot, chat_id): with data_file("telegram2.mp4").open("rb") as f: > return (await bot.send_video_note(chat_id, video_note=f, read_timeout=50)).video_note tests/_files/test_videonote.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3219: in send_video_note return await super().send_video_note( telegram/_bot.py:2141: in send_video_note return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVideoNote' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ________ ERROR at setup of TestVoiceWithoutRequest.test_send_with_voice ________ [gw1] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVoice' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def voice(bot, chat_id): with data_file("telegram.ogg").open("rb") as f: > return (await bot.send_voice(chat_id, voice=f, read_timeout=50)).voice tests/_files/test_voice.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3268: in send_voice return await super().send_voice( telegram/_bot.py:2451: in send_voice return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVoice' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestVideoWithoutRequest.test_send_video_default_quote_parse_mode[default_bot1-MarkdownV2] _ [gw5] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVideo' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def video(bot, chat_id): with data_file("telegram.mp4").open("rb") as f: > return (await bot.send_video(chat_id, video=f, read_timeout=50)).video tests/_files/test_video.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3164: in send_video return await super().send_video( telegram/_bot.py:1996: in send_video return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVideo' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ___ ERROR at setup of TestVoiceWithoutRequest.test_get_file_instance_method ____ [gw13] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVoice' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def voice(bot, chat_id): with data_file("telegram.ogg").open("rb") as f: > return (await bot.send_voice(chat_id, voice=f, read_timeout=50)).voice tests/_files/test_voice.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3268: in send_voice return await super().send_voice( telegram/_bot.py:2451: in send_voice return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVoice' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _________ ERROR at setup of TestVideoNoteWithoutRequest.test_creation __________ [gw7] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideoNote' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def video_note(bot, chat_id): with data_file("telegram2.mp4").open("rb") as f: > return (await bot.send_video_note(chat_id, video_note=f, read_timeout=50)).video_note tests/_files/test_videonote.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3219: in send_video_note return await super().send_video_note( telegram/_bot.py:2141: in send_video_note return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideoNote' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _________ ERROR at setup of TestVideoNoteWithoutRequest.test_equality __________ [gw14] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideoNote' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def video_note(bot, chat_id): with data_file("telegram2.mp4").open("rb") as f: > return (await bot.send_video_note(chat_id, video_note=f, read_timeout=50)).video_note tests/_files/test_videonote.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3219: in send_video_note return await super().send_video_note( telegram/_bot.py:2141: in send_video_note return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideoNote' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ________ ERROR at setup of TestVoiceWithoutRequest.test_slot_behaviour _________ [gw10] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVoice' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def voice(bot, chat_id): with data_file("telegram.ogg").open("rb") as f: > return (await bot.send_voice(chat_id, voice=f, read_timeout=50)).voice tests/_files/test_voice.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3268: in send_voice return await super().send_voice( telegram/_bot.py:2451: in send_voice return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVoice' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ____________ ERROR at setup of TestVoiceWithoutRequest.test_to_dict ____________ [gw15] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVoice' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def voice(bot, chat_id): with data_file("telegram.ogg").open("rb") as f: > return (await bot.send_voice(chat_id, voice=f, read_timeout=50)).voice tests/_files/test_voice.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3268: in send_voice return await super().send_voice( telegram/_bot.py:2451: in send_voice return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVoice' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestVideoNoteWithoutRequest.test_send_video_note_default_quote_parse_mode[default_bot0-None] _ [gw8] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVideoNote' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def video_note(bot, chat_id): with data_file("telegram2.mp4").open("rb") as f: > return (await bot.send_video_note(chat_id, video_note=f, read_timeout=50)).video_note tests/_files/test_videonote.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3219: in send_video_note return await super().send_video_note( telegram/_bot.py:2141: in send_video_note return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVideoNote' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ___________ ERROR at setup of TestVoiceWithoutRequest.test_equality ____________ [gw4] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVoice' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def voice(bot, chat_id): with data_file("telegram.ogg").open("rb") as f: > return (await bot.send_voice(chat_id, voice=f, read_timeout=50)).voice tests/_files/test_voice.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3268: in send_voice return await super().send_voice( telegram/_bot.py:2451: in send_voice return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVoice' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ___________ ERROR at setup of TestVoiceWithoutRequest.test_creation ____________ [gw9] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVoice' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def voice(bot, chat_id): with data_file("telegram.ogg").open("rb") as f: > return (await bot.send_voice(chat_id, voice=f, read_timeout=50)).voice tests/_files/test_voice.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3268: in send_voice return await super().send_voice( telegram/_bot.py:2451: in send_voice return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVoice' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestVideoNoteWithoutRequest.test_send_video_note_default_quote_parse_mode[default_bot2-MarkdownV2] _ [gw0] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideoNote' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def video_note(bot, chat_id): with data_file("telegram2.mp4").open("rb") as f: > return (await bot.send_video_note(chat_id, video_note=f, read_timeout=50)).video_note tests/_files/test_videonote.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3219: in send_video_note return await super().send_video_note( telegram/_bot.py:2141: in send_video_note return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVideoNote' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestVoiceWithoutRequest.test_send_voice_default_quote_parse_mode[default_bot1-MarkdownV2] _ [gw11] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVoice' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def voice(bot, chat_id): with data_file("telegram.ogg").open("rb") as f: > return (await bot.send_voice(chat_id, voice=f, read_timeout=50)).voice tests/_files/test_voice.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3268: in send_voice return await super().send_voice( telegram/_bot.py:2451: in send_voice return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVoice' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestVoiceWithoutRequest.test_send_voice_default_quote_parse_mode[default_bot2-MarkdownV2] _ [gw5] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVoice' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def voice(bot, chat_id): with data_file("telegram.ogg").open("rb") as f: > return (await bot.send_voice(chat_id, voice=f, read_timeout=50)).voice tests/_files/test_voice.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3268: in send_voice return await super().send_voice( telegram/_bot.py:2451: in send_voice return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVoice' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestVoiceWithoutRequest.test_send_voice_default_quote_parse_mode[default_bot0-None] _ [gw13] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVoice' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def voice(bot, chat_id): with data_file("telegram.ogg").open("rb") as f: > return (await bot.send_voice(chat_id, voice=f, read_timeout=50)).voice tests/_files/test_voice.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3268: in send_voice return await super().send_voice( telegram/_bot.py:2451: in send_voice return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVoice' method = 'POST' request_data = read_timeout = 50, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestBotWithoutRequest.test_copy_message[Test-True] __ [gw5] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVoice' method = 'POST' request_data = read_timeout = 10, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def media_message(bot, chat_id): with data_file("telegram.ogg").open("rb") as f: > return await bot.send_voice(chat_id, voice=f, caption="my caption", read_timeout=10) tests/test_bot.py:120: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3268: in send_voice return await super().send_voice( telegram/_bot.py:2451: in send_voice return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVoice' method = 'POST' request_data = read_timeout = 10, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ____ ERROR at setup of TestBotWithoutRequest.test_copy_message[None-False] _____ [gw14] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVoice' method = 'POST' request_data = read_timeout = 10, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def media_message(bot, chat_id): with data_file("telegram.ogg").open("rb") as f: > return await bot.send_voice(chat_id, voice=f, caption="my caption", read_timeout=10) tests/test_bot.py:120: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3268: in send_voice return await super().send_voice( telegram/_bot.py:2451: in send_voice return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVoice' method = 'POST' request_data = read_timeout = 10, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _____ ERROR at setup of TestBotWithoutRequest.test_copy_message[None-True] _____ [gw7] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVoice' method = 'POST' request_data = read_timeout = 10, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def media_message(bot, chat_id): with data_file("telegram.ogg").open("rb") as f: > return await bot.send_voice(chat_id, voice=f, caption="my caption", read_timeout=10) tests/test_bot.py:120: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3268: in send_voice return await super().send_voice( telegram/_bot.py:2451: in send_voice return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVoice' method = 'POST' request_data = read_timeout = 10, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ______ ERROR at setup of TestBotWithoutRequest.test_copy_message[-False] _______ [gw4] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVoice' method = 'POST' request_data = read_timeout = 10, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture(scope="module") async def media_message(bot, chat_id): with data_file("telegram.ogg").open("rb") as f: > return await bot.send_voice(chat_id, voice=f, caption="my caption", read_timeout=10) tests/test_bot.py:120: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3268: in send_voice return await super().send_voice( telegram/_bot.py:2451: in send_voice return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendVoice' method = 'POST' request_data = read_timeout = 10, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _______ ERROR at setup of TestBotWithoutRequest.test_copy_message[-True] _______ [gw15] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVoice' method = 'POST' request_data = read_timeout = 10, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def media_message(bot, chat_id): with data_file("telegram.ogg").open("rb") as f: > return await bot.send_voice(chat_id, voice=f, caption="my caption", read_timeout=10) tests/test_bot.py:120: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3268: in send_voice return await super().send_voice( telegram/_bot.py:2451: in send_voice return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVoice' method = 'POST' request_data = read_timeout = 10, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestBotWithoutRequest.test_copy_message[Test-False] _ [gw9] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVoice' method = 'POST' request_data = read_timeout = 10, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture(scope="module") async def media_message(bot, chat_id): with data_file("telegram.ogg").open("rb") as f: > return await bot.send_voice(chat_id, voice=f, caption="my caption", read_timeout=10) tests/test_bot.py:120: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:3268: in send_voice return await super().send_voice( telegram/_bot.py:2451: in send_voice return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendVoice' method = 'POST' request_data = read_timeout = 10, write_timeout = 20.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestBotWithoutRequest.test_send_message_default_quote_parse_mode[default_bot2-MarkdownV2] _ [gw8] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendMessage' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] chat_id = '675666224' @pytest.fixture() async def message(bot, chat_id): # mostly used in tests for edit_message > out = await bot.send_message( chat_id, "Text", disable_web_page_preview=True, disable_notification=True ) tests/test_bot.py:110: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2893: in send_message return await super().send_message( telegram/_bot.py:1024: in send_message return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/sendMessage' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestBotWithoutRequest.test_send_message_default_quote_parse_mode[default_bot1-MarkdownV2] _ [gw6] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendMessage' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture() async def message(bot, chat_id): # mostly used in tests for edit_message > out = await bot.send_message( chat_id, "Text", disable_web_page_preview=True, disable_notification=True ) tests/test_bot.py:110: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2893: in send_message return await super().send_message( telegram/_bot.py:1024: in send_message return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendMessage' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _ ERROR at setup of TestBotWithoutRequest.test_send_message_default_quote_parse_mode[default_bot0-None] _ [gw3] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendMessage' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] chat_id = '675666224' @pytest.fixture() async def message(bot, chat_id): # mostly used in tests for edit_message > out = await bot.send_message( chat_id, "Text", disable_web_page_preview=True, disable_notification=True ) tests/test_bot.py:110: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:2893: in send_message return await super().send_message( telegram/_bot.py:1024: in send_message return await self._send_message( telegram/ext/_extbot.py:608: in _send_message result = await super()._send_message( telegram/_bot.py:740: in _send_message result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/sendMessage' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ______ ERROR at setup of TestForumTopicWithoutRequest.test_slot_behaviour ______ [gw9] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/getForumTopicIconStickers' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] @pytest.fixture(scope="module") async def emoji_id(bot): > emoji_sticker_list = await bot.get_forum_topic_icon_stickers() tests/test_forum.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:1862: in get_forum_topic_icon_stickers return await super().get_forum_topic_icon_stickers( telegram/_bot.py:8024: in get_forum_topic_icon_stickers result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/getForumTopicIconStickers' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _________ ERROR at setup of TestForumTopicWithoutRequest.test_de_json __________ [gw10] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/getForumTopicIconStickers' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] @pytest.fixture(scope="module") async def emoji_id(bot): > emoji_sticker_list = await bot.get_forum_topic_icon_stickers() tests/test_forum.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:1862: in get_forum_topic_icon_stickers return await super().get_forum_topic_icon_stickers( telegram/_bot.py:8024: in get_forum_topic_icon_stickers result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/getForumTopicIconStickers' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _____ ERROR at setup of TestForumTopicCreatedWithoutRequest.test_equality ______ [gw5] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/getForumTopicIconStickers' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] @pytest.fixture(scope="module") async def emoji_id(bot): > emoji_sticker_list = await bot.get_forum_topic_icon_stickers() tests/test_forum.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:1862: in get_forum_topic_icon_stickers return await super().get_forum_topic_icon_stickers( telegram/_bot.py:8024: in get_forum_topic_icon_stickers result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/getForumTopicIconStickers' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _____ ERROR at setup of TestForumTopicWithoutRequest.test_expected_values ______ [gw15] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/getForumTopicIconStickers' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c] @pytest.fixture(scope="module") async def emoji_id(bot): > emoji_sticker_list = await bot.get_forum_topic_icon_stickers() tests/test_forum.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:1862: in get_forum_topic_icon_stickers return await super().get_forum_topic_icon_stickers( telegram/_bot.py:8024: in get_forum_topic_icon_stickers result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/getForumTopicIconStickers' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _________ ERROR at setup of TestForumTopicWithoutRequest.test_equality _________ [gw6] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/getForumTopicIconStickers' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] @pytest.fixture(scope="module") async def emoji_id(bot): > emoji_sticker_list = await bot.get_forum_topic_icon_stickers() tests/test_forum.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:1862: in get_forum_topic_icon_stickers return await super().get_forum_topic_icon_stickers( telegram/_bot.py:8024: in get_forum_topic_icon_stickers result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/getForumTopicIconStickers' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _________ ERROR at setup of TestForumTopicWithoutRequest.test_to_dict __________ [gw0] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/getForumTopicIconStickers' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] @pytest.fixture(scope="module") async def emoji_id(bot): > emoji_sticker_list = await bot.get_forum_topic_icon_stickers() tests/test_forum.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:1862: in get_forum_topic_icon_stickers return await super().get_forum_topic_icon_stickers( telegram/_bot.py:8024: in get_forum_topic_icon_stickers result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( tests/auxil/networking.py:47: in _request_wrapper return await super()._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/getForumTopicIconStickers' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _______ ERROR at teardown of TestWebhookInfoWithoutRequest.test_de_json ________ [gw13] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) /usr/lib/python3/site-packages/flaky/flaky_pytest_plugin.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/pytest_asyncio/plugin.py:341: in finalizer event_loop.run_until_complete(async_finalizer()) /usr/lib64/python3.12/asyncio/base_events.py:662: in run_until_complete self._check_closed() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> def _check_closed(self): if self._closed: > raise RuntimeError('Event loop is closed') E RuntimeError: Event loop is closed /usr/lib64/python3.12/asyncio/base_events.py:541: RuntimeError =================================== FAILURES =================================== _____________ TestHTTPXRequestWithoutRequest.test_http_1_response ______________ [gw15] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = async def test_http_1_response(self): httpx_request = HTTPXRequest(http_version="1.1") async with httpx_request: > resp = await httpx_request._client.request( url="https://python-telegram-bot.org", method="GET", headers={"User-Agent": httpx_request.USER_AGENT}, ) tests/request/test_request.py:529: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError ___________ TestHTTPXRequestWithoutRequest.test_multiple_init_cycles ___________ [gw10] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://python-telegram-bot.org', method = 'GET', request_data = None read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: self = async def test_multiple_init_cycles(self): # nothing really to assert - this should just not fail httpx_request = HTTPXRequest() async with httpx_request: > await httpx_request.do_request(url="https://python-telegram-bot.org", method="GET") tests/request/test_request.py:518: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://python-telegram-bot.org', method = 'GET', request_data = None read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _______ TestBotWithoutRequest.test_bot_method_logging[Bot-telegram.Bot] ________ [gw14] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/getMe' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: self = bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] cls = , logger_name = 'telegram.Bot' caplog = <_pytest.logging.LogCaptureFixture object at 0x7f1658c0fa70> @pytest.mark.parametrize( ("cls", "logger_name"), [(Bot, "telegram.Bot"), (ExtBot, "telegram.ext.ExtBot")] ) async def test_bot_method_logging(self, bot: PytestExtBot, cls, logger_name, caplog): # Second argument makes sure that we ignore logs from e.g. httpx with caplog.at_level(logging.DEBUG, logger="telegram"): > await cls(bot.token).get_me() tests/test_bot.py:399: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/_bot.py:904: in get_me result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/getMe' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ------------------------------ Captured log call ------------------------------- _do_post - Line 646 - Calling Bot API endpoint `getMe` with parameters `{}` _______________ TestBotWithoutRequest.test_get_me_and_properties _______________ [gw2] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/getMe' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: self = bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] async def test_get_me_and_properties(self, bot): > get_me_bot = await ExtBot(bot.token).get_me() tests/test_bot.py:372: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:1906: in get_me return await super().get_me( telegram/_bot.py:904: in get_me result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/getMe' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError __ TestBotWithoutRequest.test_bot_method_logging[ExtBot-telegram.ext.ExtBot] ___ [gw6] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/getMe' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: self = bot = PytestExtBot[token=558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo] cls = , logger_name = 'telegram.ext.ExtBot' caplog = <_pytest.logging.LogCaptureFixture object at 0x7fdbfbed4ef0> @pytest.mark.parametrize( ("cls", "logger_name"), [(Bot, "telegram.Bot"), (ExtBot, "telegram.ext.ExtBot")] ) async def test_bot_method_logging(self, bot: PytestExtBot, cls, logger_name, caplog): # Second argument makes sure that we ignore logs from e.g. httpx with caplog.at_level(logging.DEBUG, logger="telegram"): > await cls(bot.token).get_me() tests/test_bot.py:399: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/ext/_extbot.py:1906: in get_me return await super().get_me( telegram/_bot.py:904: in get_me result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/ext/_extbot.py:353: in _do_post return await super()._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot558194066:AAFwDPIFlzGUlCaWHtTOEX4RFrX8u9DMqfo/getMe' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError ------------------------------ Captured log call ------------------------------- _do_post - Line 646 - Calling Bot API endpoint `getMe` with parameters `{}` _____________________ TestBotWithoutRequest.test_equality ______________________ [gw1] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: > yield /usr/lib/python3/site-packages/httpx/_transports/default.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_transports/default.py:373: in handle_async_request resp = await self._pool.handle_async_request(req) /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:216: in handle_async_request raise exc from None /usr/lib/python3/site-packages/httpcore/_async/connection_pool.py:196: in handle_async_request response = await connection.handle_async_request( /usr/lib/python3/site-packages/httpcore/_async/connection.py:99: in handle_async_request raise exc /usr/lib/python3/site-packages/httpcore/_async/connection.py:76: in handle_async_request stream = await self._connect(request) /usr/lib/python3/site-packages/httpcore/_async/connection.py:122: in _connect stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/site-packages/httpcore/_backends/auto.py:30: in connect_tcp return await self._backend.connect_tcp( /usr/lib/python3/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp with map_exceptions(exc_map): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ map = {: , : , : } @contextlib.contextmanager def map_exceptions(map: ExceptionMapping) -> Iterator[None]: try: yield except Exception as exc: # noqa: PIE786 for from_exc, to_exc in map.items(): if isinstance(exc, from_exc): > raise to_exc(exc) from exc E httpcore.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpcore/_exceptions.py:14: ConnectError The above exception was the direct cause of the following exception: self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/getMe' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: > res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) telegram/request/_httpxrequest.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/site-packages/httpx/_client.py:1574: in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3/site-packages/httpx/_client.py:1661: in send response = await self._send_handling_auth( /usr/lib/python3/site-packages/httpx/_client.py:1689: in _send_handling_auth response = await self._send_handling_redirects( /usr/lib/python3/site-packages/httpx/_client.py:1726: in _send_handling_redirects response = await self._send_single_request(request) /usr/lib/python3/site-packages/httpx/_client.py:1763: in _send_single_request response = await transport.handle_async_request(request) /usr/lib/python3/site-packages/httpx/_transports/default.py:372: in handle_async_request with map_httpcore_exceptions(): /usr/lib64/python3.12/contextlib.py:158: in __exit__ self.gen.throw(value) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @contextlib.contextmanager def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): if not isinstance(exc, from_exc): continue # We want to map to the most specific exception we can find. # Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to # `httpx.ReadTimeout`, not just `httpx.TimeoutException`. if mapped_exc is None or issubclass(to_exc, mapped_exc): mapped_exc = to_exc if mapped_exc is None: # pragma: no cover raise message = str(exc) > raise mapped_exc(message) from exc E httpx.ConnectError: [Errno -3] Temporary failure in name resolution /usr/lib/python3/site-packages/httpx/_transports/default.py:86: ConnectError The above exception was the direct cause of the following exception: self = async def test_equality(self): async with make_bot(token=FALLBACKS[0]["token"]) as a, make_bot( token=FALLBACKS[0]["token"] > ) as b, Bot(token=FALLBACKS[0]["token"]) as c, make_bot(token=FALLBACKS[1]["token"]) as d: tests/test_bot.py:329: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ telegram/_bot.py:329: in __aenter__ raise exc telegram/_bot.py:325: in __aenter__ await self.initialize() telegram/_bot.py:772: in initialize await self.get_me() telegram/_bot.py:904: in get_me result = await self._post( telegram/_bot.py:618: in _post return await self._do_post( telegram/_bot.py:647: in _do_post result = await request.post( telegram/request/_baserequest.py:200: in post result = await self._request_wrapper( telegram/request/_baserequest.py:342: in _request_wrapper raise exc telegram/request/_baserequest.py:332: in _request_wrapper code, payload = await self.do_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = url = 'https://api.telegram.org/bot579694714:AAFpK8w6zkkUrD4xSeYwF3MO8e-4Grmcy7c/getMe' method = 'POST' request_data = read_timeout = 5.0, write_timeout = 5.0, connect_timeout = 5.0 pool_timeout = 1.0 async def do_request( self, url: str, method: str, request_data: Optional[RequestData] = None, read_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, write_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, connect_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, pool_timeout: ODVInput[float] = BaseRequest.DEFAULT_NONE, ) -> Tuple[int, bytes]: """See :meth:`BaseRequest.do_request`.""" if self._client.is_closed: raise RuntimeError("This HTTPXRequest is not initialized!") files = request_data.multipart_data if request_data else None data = request_data.json_parameters if request_data else None # If user did not specify timeouts (for e.g. in a bot method), use the default ones when we # created this instance. if isinstance(read_timeout, DefaultValue): read_timeout = self._client.timeout.read if isinstance(connect_timeout, DefaultValue): connect_timeout = self._client.timeout.connect if isinstance(pool_timeout, DefaultValue): pool_timeout = self._client.timeout.pool if isinstance(write_timeout, DefaultValue): write_timeout = self._client.timeout.write if not files else self._media_write_timeout timeout = httpx.Timeout( connect=connect_timeout, read=read_timeout, write=write_timeout, pool=pool_timeout, ) try: res = await self._client.request( method=method, url=url, headers={"User-Agent": self.USER_AGENT}, timeout=timeout, files=files, data=data, ) except httpx.TimeoutException as err: if isinstance(err, httpx.PoolTimeout): raise TimedOut( message=( "Pool timeout: All connections in the connection pool are occupied. " "Request was *not* sent to Telegram. Consider adjusting the connection " "pool size or the pool timeout." ) ) from err raise TimedOut from err except httpx.HTTPError as err: # HTTPError must come last as its the base httpx exception class # TODO p4: do something smart here; for now just raise NetworkError # We include the class name for easier debugging. Especially useful if the error # message of `err` is empty. > raise NetworkError(f"httpx.{err.__class__.__name__}: {err}") from err E telegram.error.NetworkError: httpx.ConnectError: [Errno -3] Temporary failure in name resolution telegram/request/_httpxrequest.py:300: NetworkError _______________ TestMessageWithoutRequest.test_link_with_topics ________________ [gw11] linux -- Python 3.12.7 /usr/src/RPM/BUILD/python3-module-telegram-bot-21.3/.run_venv/bin/python3 self = message = PytestMessage(business_connection_id='123456789', channel_chat_created=False, chat=Chat(id=-1003, type= assert message.link == f"https://t.me/c/3/{message.message_id}?thread=123" E AssertionError: assert None == 'https://t.me/c/3/1?thread=123' E + where None = PytestMessage(business_connection_id='123456789', channel_chat_created=False, chat=Chat(id=-1003, type= message = PytestMessage(business_connection_id='123456789', channel_chat_created=False, chat=Chat(id=-1003, type= assert message.link == f"https://t.me/c/3/{message.message_id}?thread=123" E AssertionError: assert None == 'https://t.me/c/3/1?thread=123' E + where None = PytestMessage(business_connection_id='123456789', channel_chat_created=False, chat=Chat(id=-1003, type=