The connect_lock is not necessary in threads now.
@@ -14,7 +14,6 @@ import logging
import pprint
import re
import sys
-import threading
import time
import warnings
from itertools import islice
@@ -82,8 +81,6 @@ SALESFORCE_DATETIME_FORMAT = '%Y-%m-%dT%H:%M:%S.%f+0000'
request_count = 0 # global counter
-connect_lock = threading.Lock()
-
ErrInfo = Tuple[Type[Exception], Exception]
ErrorHandler = Callable[['RawConnection', Optional['Cursor[Any]'], Type[BaseException], BaseException], None]
@@ -205,7 +202,6 @@ class RawConnection:
def make_session(self) -> None:
"""Authenticate and get the name of assigned SFDC data server"""
- with connect_lock:
if self._sf_session is None:
auth_data = self.sf_auth.authenticate_and_cache()
sf_instance_url = auth_data.get('instance_url')
