Skip to content

Commit b243231

Browse files
committed
SNOW-27059: workaround for Python 2.7 bug 7980
1 parent 49f4720 commit b243231

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

connection.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
import uuid
99
from io import StringIO
1010
from threading import Lock
11+
from time import strptime
1112

1213
from . import errors
1314
from . import network
1415
from .compat import (TO_UNICODE, IS_OLD_PYTHON, urlencode, PY2)
1516
from .converter import SnowflakeConverter
16-
from .converter_snowsql import SnowflakeConverterSnowSQL
1717
from .cursor import SnowflakeCursor
1818
from .errorcode import (ER_CONNECTION_IS_CLOSED,
1919
ER_NO_ACCOUNT_NAME, ER_OLD_PYTHON, ER_NO_USER,
@@ -81,6 +81,9 @@
8181
callable(getattr(errors, method))]:
8282
setattr(sys.modules[__name__], m, getattr(errors, m))
8383

84+
# Workaround for https://bugs.python.org/issue7980
85+
strptime('20150102030405', '%Y%m%d%H%M%S')
86+
8487

8588
class SnowflakeConnection(object):
8689
u"""

ocsp_pyopenssl.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,8 +1077,6 @@ def validate(self, hostname, connection,
10771077
return True
10781078

10791079
cert_data = _extract_certificate_chain(connection)
1080-
# Workaround for https://bugs.python.org/issue7980
1081-
strptime('20150102030405', '%Y%m%d%H%M%S')
10821080

10831081
pool = ThreadPool(len(cert_data))
10841082
results = []

0 commit comments

Comments
 (0)