Skip to content

Commit

Permalink
Remove ssl
Browse files Browse the repository at this point in the history
  • Loading branch information
coder2020official committed May 21, 2022
1 parent 0c59d11 commit 8da749e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
pytest
requests==2.20.0
wheel==0.24.0
aiohttp>=3.8.0,<3.9.0
certifi
aiohttp>=3.8.0,<3.9.0
6 changes: 2 additions & 4 deletions telebot/asyncio_helper.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import asyncio # for future uses
import aiohttp
from telebot import types
import ssl, certifi

try:
import ujson as json
Expand All @@ -27,15 +26,14 @@

class SessionManager:
def __init__(self) -> None:
self.ssl_context = ssl.create_default_context(cafile=certifi.where())
self.session = aiohttp.ClientSession(connector=aiohttp.TCPConnector(
limit=REQUEST_LIMIT, ssl=self.ssl_context
limit=REQUEST_LIMIT
))


async def create_session(self):
self.session = aiohttp.ClientSession(connector=aiohttp.TCPConnector(
limit=REQUEST_LIMIT, ssl=self.ssl_context
limit=REQUEST_LIMIT
))
return self.session

Expand Down

0 comments on commit 8da749e

Please sign in to comment.