File tree Expand file tree Collapse file tree 3 files changed +36
-2
lines changed Expand file tree Collapse file tree 3 files changed +36
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ matrix:
11
11
- os : osx
12
12
language : generic
13
13
env :
14
- - PYTHON_VERSION=3.7.2
14
+ - PYTHON_VERSION=3.7.4
15
15
16
16
- os : osx
17
17
language : generic
@@ -20,12 +20,13 @@ matrix:
20
20
21
21
cache :
22
22
directories :
23
- - $HOME/.pyenv/versions/3.7.2
23
+ - $HOME/.pyenv/versions/3.7.4
24
24
- $HOME/.pyenv/versions/2.7.15
25
25
- $HOME/downloads
26
26
27
27
before_install :
28
28
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir $HOME/bin; ln -s $(which pip2) $HOME/bin/pip; ln -s $(which python2) $HOME/bin/python; fi
29
+ - python scripts/ssl-check.py
29
30
- python -m pip install --disable-pip-version-check --upgrade pip
30
31
- pip install -U scikit-ci scikit-ci-addons
31
32
- ci_addons --install ../addons
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ before_install:
20
20
SETUP_BDIST_WHEEL_ARGS : --plat-name macosx-10.6-x86_64
21
21
commands :
22
22
- python ../addons/travis/install_pyenv.py
23
+ - python scripts/ssl-check.py
23
24
- python ../addons/travis/install_cmake.py 3.12.0
24
25
25
26
install :
Original file line number Diff line number Diff line change
1
+ # cf. https://github.com/pypa/manylinux/issues/53
2
+
3
+ import sys
4
+
5
+ GOOD_SSL = "https://google.com"
6
+ BAD_SSL = "https://self-signed.badssl.com"
7
+
8
+ print ("Testing SSL certificate checking for Python:" , sys .version )
9
+
10
+ if (sys .version_info [:2 ] < (3 , 4 )):
11
+ print ("This version never checks SSL certs; skipping tests" )
12
+ sys .exit (0 )
13
+
14
+ if sys .version_info [0 ] >= 3 :
15
+ from urllib .request import urlopen
16
+ EXC = OSError
17
+ else :
18
+ from urllib import urlopen
19
+ EXC = IOError
20
+
21
+ print ("Connecting to %s should work" % (GOOD_SSL ,))
22
+ urlopen (GOOD_SSL )
23
+ print ("...it did, yay." )
24
+
25
+ print ("Connecting to %s should fail" % (BAD_SSL ,))
26
+ try :
27
+ urlopen (BAD_SSL )
28
+ # If we get here then we failed:
29
+ print ("...it DIDN'T!!!!!11!!1one!" )
30
+ sys .exit (1 )
31
+ except EXC :
32
+ print ("...it did, yay." )
You can’t perform that action at this time.
0 commit comments