Commit 2784400d authored by Jason Madden's avatar Jason Madden Committed by GitHub

Merge pull request #1845 from gevent/issue1843

Update tested versions of PyPy
parents 3ca670ef f1c55eeb
...@@ -145,7 +145,7 @@ jobs: ...@@ -145,7 +145,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
python-version: [2.7, pypy-2.7, pypy-3.6, 3.6, 3.7, 3.8, 3.9, '3.10.0'] python-version: [2.7, pypy-2.7, pypy-3.7, 3.6, 3.7, 3.8, 3.9, '3.10.0']
# ubuntu-latest is at least 20.04. But this breaks the SSL # ubuntu-latest is at least 20.04. But this breaks the SSL
# tests because Ubuntu increased the default OpenSSL # tests because Ubuntu increased the default OpenSSL
# strictness. # strictness.
...@@ -156,7 +156,7 @@ jobs: ...@@ -156,7 +156,7 @@ jobs:
- os: macos-latest - os: macos-latest
python-version: pypy-2.7 python-version: pypy-2.7
- os: macos-latest - os: macos-latest
python-version: pypy-3.6 python-version: pypy-3.7
- os: macos-latest - os: macos-latest
python-version: 3.6 python-version: 3.6
- os: ubuntu-latest - os: ubuntu-latest
...@@ -164,7 +164,7 @@ jobs: ...@@ -164,7 +164,7 @@ jobs:
- os: ubuntu-latest - os: ubuntu-latest
python-version: pypy-2.7 python-version: pypy-2.7
- os: ubuntu-latest - os: ubuntu-latest
python-version: pypy-3.6 python-version: pypy-3.7
- os: ubuntu-latest - os: ubuntu-latest
python-version: 3.6 python-version: 3.6
- os: ubuntu-latest - os: ubuntu-latest
......
...@@ -41,13 +41,28 @@ environment: ...@@ -41,13 +41,28 @@ environment:
# a later point release. # a later point release.
# 64-bit # 64-bit
- PYTHON: "C:\\pypy2.7-v7.3.6-win64"
PYTHON_ID: "pypy"
PYTHON_EXE: pypy
PYTHON_VERSION: "2.7.x"
PYTHON_ARCH: "64"
# If we leave this at 2015, we hit a bug in distutils+PyPy:
# https://ci.appveyor.com/project/jamadden/gevent/builds/41819005/job/nvv7udya8ylwoqhh
# File "C:\pypy2.7-v7.3.6-win64\lib-python\2.7\distutils\_msvccompiler.py", line 122, in _get_vc_env
# vcvarsall, _ = _find_vcvarsall(plat_spec)
# File "C:\pypy2.7-v7.3.6-win64\lib-python\2.7\distutils\_msvccompiler.py", line 102, in _find_vcvarsall
# best_version, best_dir = _find_vc2015()
# File "C:\pypy2.7-v7.3.6-win64\lib-python\2.7\distutils\_msvccompiler.py", line 35, in _find_vc2015
# access=winreg.KEY_READ | winreg.KEY_WOW64_32KEY
# TypeError: OpenKey() got an unexpected keyword argument 'access'
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- PYTHON: "C:\\Python310-x64" - PYTHON: "C:\\Python310-x64"
PYTHON_VERSION: "3.10.0" PYTHON_VERSION: "3.10.0"
PYTHON_ARCH: "64" PYTHON_ARCH: "64"
PYTHON_EXE: python PYTHON_EXE: python
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- PYTHON: "C:\\Python39-x64" - PYTHON: "C:\\Python39-x64"
PYTHON_VERSION: "3.9.x" PYTHON_VERSION: "3.9.x"
PYTHON_ARCH: "64" PYTHON_ARCH: "64"
...@@ -76,12 +91,6 @@ environment: ...@@ -76,12 +91,6 @@ environment:
PYTHON_ARCH: "64" PYTHON_ARCH: "64"
PYTHON_EXE: python PYTHON_EXE: python
# 32-bit
- PYTHON: "C:\\pypy2.7-v7.3.1-win32"
PYTHON_ID: "pypy"
PYTHON_EXE: pypy
PYTHON_VERSION: "2.7.x"
PYTHON_ARCH: "32"
# 32-bit, wheel only (no testing) # 32-bit, wheel only (no testing)
- PYTHON: "C:\\Python39" - PYTHON: "C:\\Python39"
...@@ -154,10 +163,10 @@ install: ...@@ -154,10 +163,10 @@ install:
New-Item -ItemType directory -Path "$env:PYTMP" | Out-Null; New-Item -ItemType directory -Path "$env:PYTMP" | Out-Null;
} }
if ("${env:PYTHON_ID}" -eq "pypy") { if ("${env:PYTHON_ID}" -eq "pypy") {
if (!(Test-Path "${env:PYTMP}\pypy2-v7.3.1-win32.zip")) { if (!(Test-Path "${env:PYTMP}\pypy2-v7.3.6-win64.zip")) {
(New-Object Net.WebClient).DownloadFile('https://downloads.python.org/pypy/pypy2.7-v7.3.1-win32.zip', "${env:PYTMP}\pypy2-v7.3.1-win32.zip"); (New-Object Net.WebClient).DownloadFile('https://downloads.python.org/pypy/pypy2.7-v7.3.6-win64.zip', "${env:PYTMP}\pypy2-v7.3.6-win64.zip");
} }
7z x -y "${env:PYTMP}\pypy2-v7.3.1-win32.zip" -oC:\ | Out-Null; 7z x -y "${env:PYTMP}\pypy2-v7.3.6-win64.zip" -oC:\ | Out-Null;
} }
elseif (-not(Test-Path($env:PYTHON))) { elseif (-not(Test-Path($env:PYTHON))) {
& appveyor\install.ps1; & appveyor\install.ps1;
...@@ -200,7 +209,7 @@ test_script: ...@@ -200,7 +209,7 @@ test_script:
- if not "%GWHEEL_ONLY%"=="true" %PYEXE% -c "import gevent.core; print(gevent.core.loop)" - if not "%GWHEEL_ONLY%"=="true" %PYEXE% -c "import gevent.core; print(gevent.core.loop)"
- if not "%GWHEEL_ONLY%"=="true" %PYEXE% -c "import gevent; print(gevent.config.settings['resolver'].get_options())" - if not "%GWHEEL_ONLY%"=="true" %PYEXE% -c "import gevent; print(gevent.config.settings['resolver'].get_options())"
- if not "%GWHEEL_ONLY%"=="true" %PYEXE% -c "from gevent._compat import get_clock_info; print(get_clock_info('perf_counter'))" - if not "%GWHEEL_ONLY%"=="true" %PYEXE% -c "from gevent._compat import get_clock_info; print(get_clock_info('perf_counter'))"
- if not "%GWHEEL_ONLY%"=="true" %PYEXE% -mgevent.tests --second-chance --config known_failures.py --quiet - if not "%GWHEEL_ONLY%"=="true" %PYEXE% -mgevent.tests --second-chance --config known_failures.py
after_test: after_test:
# pycparser can't be built correctly in an isolated environment. # pycparser can't be built correctly in an isolated environment.
......
Update the tested versions of PyPy2 and PyPy3. For PyPy2, there should
be no user visible changes, but for PyPy3, support has moved from
Python 3.6 to Python 3.7.
...@@ -638,7 +638,6 @@ class SSLSocket(socket): ...@@ -638,7 +638,6 @@ class SSLSocket(socket):
break break
raise raise
self._sslobj = None self._sslobj = None
# The return value of shutting down the SSLObject is the # The return value of shutting down the SSLObject is the
......
...@@ -64,6 +64,7 @@ from gevent._compat import PY35 ...@@ -64,6 +64,7 @@ from gevent._compat import PY35
from gevent._compat import PY36 from gevent._compat import PY36
from gevent._compat import PY37 from gevent._compat import PY37
from gevent._compat import PY38 from gevent._compat import PY38
from gevent._compat import PYPY
from gevent._compat import reraise from gevent._compat import reraise
from gevent._compat import fsdecode from gevent._compat import fsdecode
from gevent._compat import fsencode from gevent._compat import fsencode
...@@ -1276,6 +1277,33 @@ class Popen(object): ...@@ -1276,6 +1277,33 @@ class Popen(object):
# kill children. # kill children.
creationflags |= CREATE_NEW_CONSOLE creationflags |= CREATE_NEW_CONSOLE
# PyPy 2.7 7.3.6 is now producing these errors. This
# happens automatically on Posix platforms, and is built
# in to the CreateProcess call on CPython 2 & 3. It's not
# clear why we don't pick it up for free from the
# CreateProcess call on PyPy. Currently we don't test PyPy3 on Windows,
# so we don't know for sure if it's built into CreateProcess there.
if PYPY:
def _check_nul(s, err_kind=(ValueError if PY3 else TypeError)):
if not s:
return
nul = b'\0' if isinstance(s, bytes) else '\0'
if nul in s:
# PyPy 2 expects a TypeError; Python 3 raises ValueError always.
raise err_kind("argument must be a string without NUL characters")
def _check_env():
if not env:
return
for k, v in env.items():
_check_nul(k)
_check_nul(v)
if '=' in k:
raise ValueError("'=' not allowed in environment keys")
_check_nul(executable)
_check_nul(args)
_check_env()
# Start the process # Start the process
try: try:
hp, ht, pid, tid = CreateProcess(executable, args, hp, ht, pid, tid = CreateProcess(executable, args,
......
...@@ -262,7 +262,31 @@ if OSX: ...@@ -262,7 +262,31 @@ if OSX:
'test_ssl.SimpleBackgroundTests.test_connect_capath', 'test_ssl.SimpleBackgroundTests.test_connect_capath',
'test_ssl.SimpleBackgroundTests.test_connect_with_context', 'test_ssl.SimpleBackgroundTests.test_connect_with_context',
] ]
if PYPY and PY2:
disabled_tests += [
# This is broken in a standard download of PyPy.
'test_subprocess.ProcessTestCase.test_executable_with_cwd',
]
if PYPY and PY2 and WIN:
disabled_tests += [
# XXX: New in PyPy 7.3.7. This times out. This is testing for
# whether \0 in environment keys or values are excluded; they
# are, before any waiting is done. The same goes for an '=' in
# the key. It looks like we "hang" on the last clause that
# tests when there is an '=' in the *value*. It's utterly
# unclear to me why that causes an issue; we use the same
# underlying CreateProcess call that PyPy itself does, and
# no-where before that is the environment manipulated
'test_subprocess.ProcesstestCase.test_invalid_env',
]
if PYPY and PY37:
disabled_tests += [
# The exact error message the code code checks for is different
# (possibly just on macOS?). Plain PyPy3 fails as well.
'test_signal.WakeupSignalTests.test_wakeup_write_error',
]
if 'thread' in os.getenv('GEVENT_FILE', ''): if 'thread' in os.getenv('GEVENT_FILE', ''):
disabled_tests += [ disabled_tests += [
......
...@@ -198,7 +198,9 @@ class TestTCP(greentest.TestCase): ...@@ -198,7 +198,9 @@ class TestTCP(greentest.TestCase):
# from generating ``ConnectionResetError`` on AppVeyor. # from generating ``ConnectionResetError`` on AppVeyor.
try: try:
client = client.unwrap() client = client.unwrap()
except ValueError: except (ValueError, OSError):
# PyPy 3.7 started raising _cffi_ssl._stdssl.error.SSLSyscallError,
# which is an OSError
pass pass
try: try:
......
-----BEGIN PRIVATE KEY----- -----BEGIN PRIVATE KEY-----
MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAOoy7/QOtTjQ0niE MIIG/QIBADANBgkqhkiG9w0BAQEFAASCBucwggbjAgEAAoIBgQCg/pM6dP7BTFNc
6uDcTwtkC0R2Tvy1AjVnXohCntZfdzbTGDoYTgXSOLsP8A697jUiJ8VCePGH50xG qe6wIJIBB7HjwL42bp0vjcCVl4Z3MRWFswYpfxy+o+8+PguMp4K6zndA5fwNkK/H
Z4DKnAF3a9O3a9nr2pLXb0iY3XO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mTy5njMab0in2xL/YRX/0nogK3BHqpUHrfCdEYZkciRxtAa+OPpWn4dcZi+Fpf7
ZYSgPLNt+djtFDMIAk5Bo+XDaQdW3dhF0w44enrGAOV0xPE+/jOuenNhKBafjuNb
lkeSr45+QZsi1rd18ny8z3uuaGqIAziFgmllZOH2D8giTn6+5jZcCNZCoGKUkPI9
l/GMWwxg4HQYYlZcsZzTCem9Rb2XcrasAbmhFapMtR+QAwSed5vKE7ZdtQhj74kB
7Q0E7Lkgpp6BaObb2As8/f0K/UlSVSvrYk+i3JT9wK/qqkRGxsTFEF7N9t0rKu8y
4JdQDtZCI552MsFvYW6m+IOYgxg=
-----END CERTIFICATE----- -----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY----- -----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,1A8D9D2A02EC698A DEK-Info: DES-EDE3-CBC,D134E931C96D9DEC
kJYbfZ8L0sfe9Oty3gw0aloNnY5E8fegRfQLZlNoxTl6jNt0nIwI8kDJ36CZgR9c nuGFEej7vIjkYWSMz5OJeVTNntDRQi6ZM4DBm3g8T7i/0odr3WFqGMMKZcIhLYQf
u3FDJm/KqrfUoz8vW+qEnWhSG7QPX2wWGPHd4K94Yz/FgrRzZ0DoK7XxXq9gOtVA rgRq7RSKtrJ1y5taVucMV+EuCjyfzDo0TsYt+ZrXv/D08eZhjRmkhoHnGVF0TqQm
AVGQhnz32p+6WhfGsCr9ArXEwRZrTk/FvzEPaU5fHcoSkrNVAGX8IpSVkSDwEDQr nQEXM/ERT4J2RM78dnG+homMkI76qOqxgGbRqQqJo6AiVRcAZ45y8s96bru2TAB8
Gv17+cfk99UV1OCza6yKHoFkTtrC+PZU71LomBabivS2Oc4B9hYuSR2hF01wTHP+ +pWjO/v0Je7AFVdwSU52N8OOY6uoSAygW+0UY1WVxbVGJF2XfRsNpPX+YQHYl6e+
YlWNagZOOVtNz4oKK9x9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7FZD/61581R2BYehvpWbLvvuOJhwv
CRlNBAAlvhKzO7Clpf9l0YKBEfraJByX DFzexL2sXcAl7SsxbzeQKRHqGbIDfbnQTXfs3/VC6Ye5P82P2ucj+XC32N9piRmO
gCBP8L3ub+YzzdxikZN2gZXXE2jsb3QyE/R2LkWdWyshpKe+RsZP1SBRbHShUyOh
yJ90baoiEwj2mwIDAQABoxgwFjAUBgNVHREEDTALgglsb2NhbGhvc3QwDQYJKoZI
hvcNAQELBQADggGBAHRUO/UIHl3jXQENewYayHxkIx8t7nu40iO2DXbicSijz5bo
5//xAB6RxhBAlsDBehgQP1uoZg+WJW+nHu3CIVOU3qZNZRaozxiCl2UFKcNqLOmx
R3NKpo1jYf4REQIeG8Yw9+hSWLRbshNteP6bKUUf+vanhg9+axyOEOH/iOQvgk/m
b8wA8wNa4ujWljPbTQnj7ry8RqhTM0GcAN5LSdSvcKcpzLcs3aYwh+Z8e30sQWna
F40sa5u7izgBTOrwpcDm/w5kC46vpRQ5fnbshVw6pne2by0mdMECASid/p25N103
jMqTFlmO7kpf/jpCSmamp3/JSEE1BJKHwQ6Ql4nzRA2N1mnvWH7Zxcv043gkHeAu
0x8evpvwuhdIyproejNFlBpKmW8OX7yKTCPPMC/VkX8Q1rVkxU0DQ6hmvwZlhoKa
9Wc2uXpw9xF8itV4Uvcdr3dwqByvIqn7iI/gB+4l41e0u8OmH2MKOx4Nxlly5TNW
HcVKQHyOeyvnINuBAQ==
-----END CERTIFICATE----- -----END CERTIFICATE-----
-----BEGIN PRIVATE KEY----- -----BEGIN PRIVATE KEY-----
MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBANcLaMB7T/Wi9DBc MIIG/QIBADANBgkqhkiG9w0BAQEFAASCBucwggbjAgEAAoIBgQDKjrjWZlfOs1Ch
PltGzgt8cxsv55m7PQPHMZvn6Ke8xmNqcmEzib8opRwKGrCV6TltKeFlNSg8dwQK qt1RoyLfqyXbHVXIAW0fTzAxfJnxvFOi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YzGCkPWD5zA+mYFpMMGZPTwajenMw7TVaPXcc9CZBtr
oOjwwiLEqdkpxUj13mJYTlt5wsS/Kw==
-----END CERTIFICATE----- -----END CERTIFICATE-----
This diff is collapsed.
This diff is collapsed.
Certificate: Certificate:
Data: Data:
Version: 3 (0x2) Version: 3 (0x2)
Serial Number: 12723342612721443280 (0xb09264b1f2da21d0) Serial Number:
Signature Algorithm: sha1WithRSAEncryption cb:2d:80:99:5a:69:52:5b
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=XY, O=Python Software Foundation CA, CN=our-ca-server Issuer: C=XY, O=Python Software Foundation CA, CN=our-ca-server
Validity Validity
Not Before: Jan 4 19:47:07 2013 GMT Not Before: Aug 29 14:23:16 2018 GMT
Not After : Jan 2 19:47:07 2023 GMT Not After : Aug 26 14:23:16 2028 GMT
Subject: C=XY, O=Python Software Foundation CA, CN=our-ca-server Subject: C=XY, O=Python Software Foundation CA, CN=our-ca-server
Subject Public Key Info: Subject Public Key Info:
Public Key Algorithm: rsaEncryption Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit) Public-Key: (3072 bit)
Modulus: Modulus:
00:e7:de:e9:e3:0c:9f:00:b6:a1:fd:2b:5b:96:d2: 00:97:ed:55:41:ba:36:17:95:db:71:1c:d3:e1:61:
6f:cc:e0:be:86:b9:20:5e:ec:03:7a:55:ab:ea:a4: ac:58:73:e3:c6:96:cf:2b:1f:b8:08:f5:9d:4b:4b:
e9:f9:49:85:d2:66:d5:ed:c7:7a:ea:56:8e:2d:8f: c7:30:f6:b8:0b:b3:52:72:a0:bb:c9:4d:3b:8e:df:
e7:42:e2:62:28:a9:9f:d6:1b:8e:eb:b5:b4:9c:9f: 22:8e:01:57:81:c9:92:73:cc:00:c6:ec:70:b0:3a:
14:ab:df:e6:94:8b:76:1d:3e:6d:24:61:ed:0c:bf: 17:40:c1:df:f2:8c:36:4c:c4:a7:81:e7:b6:24:68:
00:8a:61:0c:df:5c:c8:36:73:16:00:cd:47:ba:6d: e2:a0:7e:35:07:2f:a0:5b:f9:45:46:f7:1e:f0:46:
a4:a4:74:88:83:23:0a:19:fc:09:a7:3c:4a:4b:d3: 11:fe:ca:1a:3c:50:f1:26:a9:5f:9c:22:9c:f8:41:
e7:1d:2d:e4:ea:4c:54:21:f3:26:db:89:37:18:d4: e1:df:4f:12:95:19:2f:5c:90:01:17:6e:7e:3e:7d:
02:bb:40:32:5f:a4:ff:2d:1c:f7:d4:bb:ec:8e:cf: cf:e9:09:af:25:f8:f8:42:77:2d:6d:5f:36:f2:78:
5c:82:ac:e6:7c:08:6c:48:85:61:07:7f:25:e0:5c: 1e:7d:4a:87:68:63:6c:06:71:1b:8d:fa:25:fe:d4:
e0:bc:34:5f:e0:b9:04:47:75:c8:47:0b:8d:bc:d6: d3:f5:a5:17:b1:ef:ea:17:cb:54:c8:27:99:80:cb:
c8:68:5f:33:83:62:d2:20:44:35:b1:ad:81:1a:8a: 3c:45:f1:2c:52:1c:dd:1f:51:45:20:50:1e:5e:ab:
cd:bc:35:b0:5c:8b:47:d6:18:e9:9c:18:97:cc:01: 57:73:1b:41:78:96:de:84:a4:7a:dd:8f:30:85:36:
3c:29:cc:e8:1e:e4:e4:c1:b8:de:e7:c2:11:18:87: 58:79:76:a0:d2:61:c8:1b:a9:94:99:63:c6:ee:f8:
5a:93:34:d8:a6:25:f7:14:71:eb:e4:21:a2:d2:0f: 14:bf:b4:52:56:31:97:fa:eb:ac:53:9e:95:ce:4c:
2e:2e:d4:62:00:35:d3:d6:ef:5c:60:4b:4c:a9:14: c4:5a:4a:b7:ca:03:27:5b:35:57:ce:02:dc:ec:ca:
e2:dd:15:58:46:37:33:26:b7:e7:2e:5d:ed:42:e4: 69:f8:8a:5a:39:cb:16:20:15:03:24:61:6c:f4:7a:
c5:4d fc:b6:48:e5:59:10:5c:49:d0:23:9f:fb:71:5e:3a:
e9:68:9f:34:72:80:27:b6:3f:4c:b1:d9:db:63:7f:
67:68:4a:6e:11:f8:e8:c0:f4:5a:16:39:53:0b:68:
de:77:fa:45:e7:f8:91:cd:78:cd:28:94:97:71:54:
fb:cf:f0:37:de:c9:26:c5:dc:1b:9e:89:6d:09:ac:
c8:44:71:cb:6d:f1:97:31:d5:4c:20:33:bf:75:4a:
a0:e0:dc:69:11:ed:2a:b4:64:10:11:30:8b:0e:b0:
a7:10:d8:8a:c5:aa:1b:c8:26:8a:25:e7:66:9f:a5:
6a:1a:2f:7c:5f:83:c6:78:4f:1f
Exponent: 65537 (0x10001) Exponent: 65537 (0x10001)
X509v3 extensions: X509v3 extensions:
X509v3 Subject Key Identifier: X509v3 Subject Key Identifier:
BC:DD:62:D9:76:DA:1B:D2:54:6B:CF:E0:66:9B:1E:1E:7B:56:0C:0B DD:BF:CA:DA:E6:D1:34:BA:37:75:21:CA:6F:9A:08:28:F2:35:B6:48
X509v3 Authority Key Identifier: X509v3 Authority Key Identifier:
keyid:BC:DD:62:D9:76:DA:1B:D2:54:6B:CF:E0:66:9B:1E:1E:7B:56:0C:0B keyid:DD:BF:CA:DA:E6:D1:34:BA:37:75:21:CA:6F:9A:08:28:F2:35:B6:48
X509v3 Basic Constraints: X509v3 Basic Constraints:
CA:TRUE CA:TRUE
Signature Algorithm: sha1WithRSAEncryption Signature Algorithm: sha256WithRSAEncryption
7d:0a:f5:cb:8d:d3:5d:bd:99:8e:f8:2b:0f:ba:eb:c2:d9:a6: 33:6a:54:d3:6b:c0:d7:01:5f:9d:f4:05:c1:93:66:90:50:d0:
27:4f:2e:7b:2f:0e:64:d8:1c:35:50:4e:ee:fc:90:b9:8d:6d: b7:18:e9:b0:1e:4a:a0:b6:da:76:93:af:84:db:ad:15:54:31:
a8:c5:c6:06:b0:af:f3:2d:bf:3b:b8:42:07:dd:18:7d:6d:95: 15:13:e4:de:7e:4e:0c:d5:09:1c:34:35:b6:e5:4c:d6:6f:65:
54:57:85:18:60:47:2f:eb:78:1b:f9:e8:17:fd:5a:0d:87:17: 7d:32:5f:eb:fc:a9:6b:07:f7:49:82:e5:81:7e:07:80:9a:63:
28:ac:4c:6a:e6:bc:29:f4:f4:55:70:29:42:de:85:ea:ab:6c: f8:2c:c3:40:bc:8f:d4:2a:da:3e:d1:ee:08:b7:4d:a7:84:ca:
23:06:64:30:75:02:8e:53:bc:5e:01:33:37:cc:1e:cd:b8:a4: f4:3f:a1:98:45:be:b1:05:69:e7:df:d7:99:ab:1b:ee:8b:30:
fd:ca:e4:5f:65:3b:83:1c:86:f1:55:02:a0:3a:8f:db:91:b7: cc:f7:fc:e7:d4:0b:17:ae:97:bf:e4:7b:fd:0f:a7:b4:85:79:
40:14:b4:e7:8d:d2:ee:73:ba:e3:e5:34:2d:bc:94:6f:4e:24: e3:59:e2:16:87:bf:1f:29:45:2c:23:93:76:be:c0:87:1d:de:
06:f7:5f:8b:0e:a7:8e:6b:de:5e:75:f4:32:9a:50:b1:44:33: ec:2b:42:6a:e5:bb:c8:f4:0a:4a:08:0a:8c:5c:d8:7d:4d:d1:
9a:d0:05:e2:78:82:ff:db:da:8a:63:eb:a9:dd:d1:bf:a0:61: b8:bf:d5:f7:29:ed:92:d1:94:04:e8:35:06:57:7f:2c:23:97:
ad:e3:9e:8a:24:5d:62:0e:e7:4c:91:7f:ef:df:34:36:3b:2f: 87:a5:35:8d:26:d3:1a:47:f2:16:d7:d9:c6:d4:1f:23:43:d3:
5d:f5:84:b2:2f:c4:6d:93:96:1a:6f:30:28:f1:da:12:9a:64: 26:99:39:ca:20:f4:71:23:6f:0c:4a:76:76:f7:76:1f:b3:fe:
b4:40:33:1d:bd:de:2b:53:a8:ea:be:d6:bc:4e:96:f5:44:fb: bf:47:b0:fc:2a:56:81:e1:d2:dd:ee:08:d8:f4:ff:5a:dc:25:
32:18:ae:d5:1f:f6:69:af:b6:4e:7b:1d:58:ec:3b:a9:53:a3: 61:8a:91:02:b9:86:1c:f2:50:73:76:25:35:fc:b6:25:26:15:
5e:58:c8:9e cb:eb:c4:2b:61:0c:1c:e7:ee:2f:17:9b:ec:f0:d4:a1:84:e7:
d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NVHQ4EFgQU3b/K2ubR
QgfdGH1tlVRXhRhgRy/reBv56Bf9Wg2HFyisTGrmvCn09FVwKULeheqrbCMGZDB1 NLo3dSHKb5oIKPI1tkgwHwYDVR0jBBgwFoAU3b/K2ubRNLo3dSHKb5oIKPI1tkgw
Ao5TvF4BMzfMHs24pP3K5F9lO4MchvFVAqA6j9uRt0AUtOeN0u5zuuPlNC28lG9O DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAYEAM2pU02vA1wFfnfQFwZNm
JAb3X4sOp45r3l519DKaULFEM5rQBeJ4gv/b2opj66nd0b+gYa3jnookXWIO50yR kFDQtxjpsB5KoLbadpOvhNutFVQxFRPk3n5ODNUJHDQ1tuVM1m9lfTJf6/ypawf3
f+/fNDY7L131hLIvxG2TlhpvMCjx2hKaZLRAMx293itTqOq+1rxOlvVE+zIYrtUf SYLlgX4HgJpj+CzDQLyP1CraPtHuCLdNp4TK9D+hmEW+sQVp59/Xmasb7oswzPf8
9mmvtk57HVjsO6lTo15YyJ4= 59QLF66Xv+R7/Q+ntIV541niFoe/HylFLCOTdr7Ahx3e7CtCauW7yPQKSggKjFzY
fU3RuL/V9yntktGUBOg1Bld/LCOXh6U1jSbTGkfyFtfZxtQfI0PTJpk5yiD0cSNv
DEp2dvd2H7P+v0ew/CpWgeHS3e4I2PT/WtwlYYqRArmGHPJQc3YlNfy2JSYVy+vE
K2EMHOfuLxeb7PDUoYTn0q/e5BskFKcBh+OrKVhGoNnACuCN11nTG/hUID54paXI
T4sDxJaf7PtHz3YtjWU0J7/6rgEFivOSCt2JbJehx+dgUees60t9LLhlyf5dakhV
juTH+WpA4bhkRem1WSmlX899WH1keeWkCawedmU9lMRo
-----END CERTIFICATE----- -----END CERTIFICATE-----
-----BEGIN X509 CRL----- -----BEGIN X509 CRL-----
MIIBpjCBjwIBATANBgkqhkiG9w0BAQUFADBNMQswCQYDVQQGEwJYWTEmMCQGA1UE MIICJjCBjwIBATANBgkqhkiG9w0BAQs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R3NKpo1jYf4REQIeG8Yw9+hSWLRbshNteP6bKUUf+vanhg9+axyOEOH/iOQvgk/m
b8wA8wNa4ujWljPbTQnj7ry8RqhTM0GcAN5LSdSvcKcpzLcs3aYwh+Z8e30sQWna
F40sa5u7izgBTOrwpcDm/w5kC46vpRQ5fnbshVw6pne2by0mdMECASid/p25N103
jMqTFlmO7kpf/jpCSmamp3/JSEE1BJKHwQ6Ql4nzRA2N1mnvWH7Zxcv043gkHeAu
0x8evpvwuhdIyproejNFlBpKmW8OX7yKTCPPMC/VkX8Q1rVkxU0DQ6hmvwZlhoKa
9Wc2uXpw9xF8itV4Uvcdr3dwqByvIqn7iI/gB+4l41e0u8OmH2MKOx4Nxlly5TNW
HcVKQHyOeyvnINuBAQ==
-----END CERTIFICATE----- -----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY----- -----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,1A8D9D2A02EC698A DEK-Info: DES-EDE3-CBC,8064BE1494B24B13
kJYbfZ8L0sfe9Oty3gw0aloNnY5E8fegRfQLZlNoxTl6jNt0nIwI8kDJ36CZgR9c KJrffOMbo8M0I3PzcYxRZGMpKD1yB3Ii4+bT5XoanxjIJ+4fdx6LfZ0Rsx+riyzs
u3FDJm/KqrfUoz8vW+qEnWhSG7QPX2wWGPHd4K94Yz/FgrRzZ0DoK7XxXq9gOtVA tymsQu/iYY9j+4rCvN9+eetsL1X6iZpiimKsLexcid9M3fb0vxED5Sgw0dvunCUA
AVGQhnz32p+6WhfGsCr9ArXEwRZrTk/FvzEPaU5fHcoSkrNVAGX8IpSVkSDwEDQr xhqjLIKR92MKbODHf6KrDKCpsiPbjq4gZ7P+uCGXAMHL3MXIJSC0hW9rK7Ce6oyO
Gv17+cfk99UV1OCza6yKHoFkTtrC+PZU71LomBabivS2Oc4B9hYuSR2hF01wTHP+ CjpIcgB8x+GUWZZZhAFdlzIHM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Bc8PErkGqR0BkpxDMOInTOXSrQe6lxIBoECVXc3
HTbrmiay0a5y5GfCgxPKqIJhfcToAceoVjovv0y7S4yoxGZKuUEe7E8JY2iqRNAO
yOvKCCICv/hcN235E44RF+2/rDlOltagNej5tY6rIFkaDdgOF4bD7f9O5eEni1Bg
litfoesDtQP/3rECgcEAkQfvQ7D6tIPmbqsbJBfCr6fmoqZllT4FIJN84b50+OL0
mTGsfjdqC4tdhx3sdu7/VPbaIqm5NmX10bowWgWSY7MbVME4yQPyqSwC5NbIonEC
d6N0mzoLR0kQ+Ai4u+2g82gicgAq2oj1uSNi3WZi48jQjHYFulCbo246o1NgeFFK
77WshYe2R1ioQfQDOU1URKCR0uTaMHClgfu112yiGd12JAD+aF3TM0kxDXz+sXI5
SKy311DFxECZeXRLpcC3AoHBAJkNMJWTyPYbeVu+CTQkec8Uun233EkXa2kUNZc/
5DuXDaK+A3DMgYRufTKSPpDHGaCZ1SYPInX1Uoe2dgVjWssRL2uitR4ENabDoAOA
ICVYXYYNagqQu5wwirF0QeaMXo1fjhuuHQh8GsMdXZvYEaAITZ9/NG5x/oY08+8H
kr78SMBOPy3XQn964uKG+e3JwpOG14GKABdAlrHKFXNWchu/6dgcYXB87mrC/GhO
zNwzC+QhFTZoOomFoqMgFWujng==
-----END PRIVATE KEY----- -----END PRIVATE KEY-----
This diff is collapsed.
...@@ -2,6 +2,7 @@ import unittest ...@@ -2,6 +2,7 @@ import unittest
from test import test_support from test import test_support
import subprocess import subprocess
import sys import sys
import platform
import signal import signal
import os import os
import errno import errno
...@@ -9,6 +10,14 @@ import tempfile ...@@ -9,6 +10,14 @@ import tempfile
import time import time
import re import re
import sysconfig import sysconfig
import textwrap
try:
import ctypes
except ImportError:
ctypes = None
else:
import ctypes.util
try: try:
import resource import resource
...@@ -19,6 +28,11 @@ try: ...@@ -19,6 +28,11 @@ try:
except ImportError: except ImportError:
threading = None threading = None
try:
import _testcapi
except ImportError:
_testcapi = None
mswindows = (sys.platform == "win32") mswindows = (sys.platform == "win32")
# #
...@@ -43,6 +57,8 @@ class BaseTestCase(unittest.TestCase): ...@@ -43,6 +57,8 @@ class BaseTestCase(unittest.TestCase):
inst.wait() inst.wait()
subprocess._cleanup() subprocess._cleanup()
self.assertFalse(subprocess._active, "subprocess._active not empty") self.assertFalse(subprocess._active, "subprocess._active not empty")
self.doCleanups()
test_support.reap_children()
def assertStderrEqual(self, stderr, expected, msg=None): def assertStderrEqual(self, stderr, expected, msg=None):
# In a debug build, stuff like "[6580 refs]" is printed to stderr at # In a debug build, stuff like "[6580 refs]" is printed to stderr at
...@@ -379,6 +395,46 @@ class ProcessTestCase(BaseTestCase): ...@@ -379,6 +395,46 @@ class ProcessTestCase(BaseTestCase):
self.addCleanup(p.stdout.close) self.addCleanup(p.stdout.close)
self.assertEqual(p.stdout.read(), "orange") self.assertEqual(p.stdout.read(), "orange")
def test_invalid_cmd(self):
# null character in the command name
cmd = sys.executable + '\0'
with self.assertRaises(TypeError):
subprocess.Popen([cmd, "-c", "pass"])
# null character in the command argument
with self.assertRaises(TypeError):
subprocess.Popen([sys.executable, "-c", "pass#\0"])
def test_invalid_env(self):
# null character in the enviroment variable name
newenv = os.environ.copy()
newenv["FRUIT\0VEGETABLE"] = "cabbage"
with self.assertRaises(TypeError):
subprocess.Popen([sys.executable, "-c", "pass"], env=newenv)
# null character in the enviroment variable value
newenv = os.environ.copy()
newenv["FRUIT"] = "orange\0VEGETABLE=cabbage"
with self.assertRaises(TypeError):
subprocess.Popen([sys.executable, "-c", "pass"], env=newenv)
# equal character in the enviroment variable name
newenv = os.environ.copy()
newenv["FRUIT=ORANGE"] = "lemon"
with self.assertRaises(ValueError):
subprocess.Popen([sys.executable, "-c", "pass"], env=newenv)
# equal character in the enviroment variable value
newenv = os.environ.copy()
newenv["FRUIT"] = "orange=lemon"
p = subprocess.Popen([sys.executable, "-c",
'import sys, os;'
'sys.stdout.write(os.getenv("FRUIT"))'],
stdout=subprocess.PIPE,
env=newenv)
stdout, stderr = p.communicate()
self.assertEqual(stdout, "orange=lemon")
def test_communicate_stdin(self): def test_communicate_stdin(self):
p = subprocess.Popen([sys.executable, "-c", p = subprocess.Popen([sys.executable, "-c",
'import sys;' 'import sys;'
...@@ -643,7 +699,7 @@ class ProcessTestCase(BaseTestCase): ...@@ -643,7 +699,7 @@ class ProcessTestCase(BaseTestCase):
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE) stderr=subprocess.PIPE)
# ignore errors that indicate the command was not found # ignore errors that indicate the command was not found
if c.exception.errno not in (errno.ENOENT, errno.EACCES): if c.exception.errno not in (errno.ENOENT, errno.ENOTDIR, errno.EACCES):
raise c.exception raise c.exception
@unittest.skipIf(threading is None, "threading required") @unittest.skipIf(threading is None, "threading required")
...@@ -789,8 +845,11 @@ class _SuppressCoreFiles(object): ...@@ -789,8 +845,11 @@ class _SuppressCoreFiles(object):
kw = {stream: subprocess.PIPE} kw = {stream: subprocess.PIPE}
with subprocess.Popen(args, **kw) as process: with subprocess.Popen(args, **kw) as process:
signal.alarm(1) signal.alarm(1)
# communicate() will be interrupted by SIGALRM try:
process.communicate() # communicate() will be interrupted by SIGALRM
process.communicate()
finally:
signal.alarm(0)
@unittest.skipIf(mswindows, "POSIX specific tests") @unittest.skipIf(mswindows, "POSIX specific tests")
...@@ -1220,6 +1279,29 @@ class POSIXProcessTestCase(BaseTestCase): ...@@ -1220,6 +1279,29 @@ class POSIXProcessTestCase(BaseTestCase):
self.assertEqual(p2.returncode, 0, "Unexpected error: " + repr(stderr)) self.assertEqual(p2.returncode, 0, "Unexpected error: " + repr(stderr))
@unittest.skipUnless(_testcapi is not None
and hasattr(_testcapi, 'W_STOPCODE'),
'need _testcapi.W_STOPCODE')
def test_stopped(self):
"""Test wait() behavior when waitpid returns WIFSTOPPED; issue29335."""
args = [sys.executable, '-c', 'pass']
proc = subprocess.Popen(args)
# Wait until the real process completes to avoid zombie process
pid = proc.pid
pid, status = os.waitpid(pid, 0)
self.assertEqual(status, 0)
status = _testcapi.W_STOPCODE(3)
def mock_waitpid(pid, flags):
return (pid, status)
with test_support.swap_attr(os, 'waitpid', mock_waitpid):
returncode = proc.wait()
self.assertEqual(returncode, -3)
@unittest.skipUnless(mswindows, "Windows specific tests") @unittest.skipUnless(mswindows, "Windows specific tests")
class Win32ProcessTestCase(BaseTestCase): class Win32ProcessTestCase(BaseTestCase):
......
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,8064BE1494B24B13
KJrffOMbo8M0I3PzcYxRZGMpKD1yB3Ii4+bT5XoanxjIJ+4fdx6LfZ0Rsx+riyzs
tymsQu/iYY9j+4rCvN9+eetsL1X6iZpiimKsLexcid9M3fb0vxED5Sgw0dvunCUA
xhqjLIKR92MKbODHf6KrDKCpsiPbjq4gZ7P+uCGXAMHL3MXIJSC0hW9rK7Ce6oyO
CjpIcgB8x+GUWZZZhAFdlzIHMZrteNP2P5HK6QcaT71P034Dz1hhqoj4Q0t+Fta2
4tfsM/bnTR/l6hwlhPa1e3Uj322tDTDWBScgWANn5+sEWldLmozMaWhZsn22pfk2
KjRMGXG024JVheV882nbdOBvG7oq+lxkZ/ZP+vvqJqnvYtf7WtM8UivzYpe5Hz5b
kVvWzPjBLUSZ9whM9rDLqSSqMPyPvDTuEmLkuq+xm7pYJmsLqIMP2klZLqRxLX6K
uqwplb8UG440qauxgnQ905PId1l2fJEnRtV+7vXprA0L0QotgXLVHBhLmTFM+3PH
9H3onf31dionUAPrn3nfVE36HhvVgRyvDBnBzJSIMighgq21Qx/d1dk0DRYi1hUI
nCHl0YJPXheVcXR7JiSF2XQCAaFuS1Mr7NCXfWZOZQC/0dkvmHnl9DUAhuqq9BNZ
1cKhZXcKHadg2/r0Zup/oDzmHPUEfTAXT0xbqoWlhkdwbF2veWQ96A/ncx3ISTb4
PkXBlX9rdia8nmtyQDQRn4NuvchbaGkj4WKFC8pF8Hn7naHqwjpHaDUimBc0CoQW
edNJqruKWwt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vssWMaiSjFE0pMyFXrFR5lBywBTx
uQa/SFH+paQNbZOj8MRwPSqqiIxJFuLswKte1R+W7LKn1yBSM7Pp39lNbzGvJD2E PiGEUWtvrKG94X1TMlGUzDzDJOQNZ9dT94bonNe9pVmP5BP4/DzwwiWh6qrzWk6p
YRfnCwFpJ54voVAuQ4jXJvigCW2qeCjXlxeD6K2j4eGJEEOmIjIW1wjubyBY6OI3 j8OE4cfCSh2WvHnhJbH7/N0v+JKjtxeIeJ16jx/K2oK5
-----END RSA PRIVATE KEY----- -----END ENCRYPTED PRIVATE KEY-----
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIEWTCCAsGgAwIBAgIJAJinz4jHSjLtMA0GCSqGSIb3DQEBCwUAMF8xCzAJBgNV MIIEWTCCAsGgAwIBAgIJAJinz4jHSjLtMA0GCSqGSIb3DQEBCwUAMF8xCzAJBgNV
BAYTAlhZMRcwFQYDVQQHDA5DYXN0bGUgQW50aHJheDEjMCEGA1UECgwaUHl0aG9u BAYTAlhZMRcwFQYDVQQHDA5DYXN0bGUgQW50aHJheDEjMCEGA1UECgwaUHl0aG9u
...@@ -66,3 +66,4 @@ jMqTFlmO7kpf/jpCSmamp3/JSEE1BJKHwQ6Ql4nzRA2N1mnvWH7Zxcv043gkHeAu ...@@ -66,3 +66,4 @@ jMqTFlmO7kpf/jpCSmamp3/JSEE1BJKHwQ6Ql4nzRA2N1mnvWH7Zxcv043gkHeAu
9Wc2uXpw9xF8itV4Uvcdr3dwqByvIqn7iI/gB+4l41e0u8OmH2MKOx4Nxlly5TNW 9Wc2uXpw9xF8itV4Uvcdr3dwqByvIqn7iI/gB+4l41e0u8OmH2MKOx4Nxlly5TNW
HcVKQHyOeyvnINuBAQ== HcVKQHyOeyvnINuBAQ==
-----END CERTIFICATE----- -----END CERTIFICATE-----
-----BEGIN PRIVATE KEY-----
MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDBL2Y5JfpzbgHw+t4Q+
c5SHhsZcD9ylEtUMg7OyF9xW6j+3VIVORGaokcOtE0Z2Y5ehZANiAASzz/rInKUz
onpxP5bLxmq8fmrtgRSS0jRPUOU16XKX+KtifnLbmLHQtPrctdkRRROCxnURz2fB
ihQTJkXyBMSswNTRCs+4DUKbMAfihigMVYgdWbZPFBDleo5aeFw4/FM=
-----END PRIVATE KEY-----
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
cb:2d:80:99:5a:69:52:5e
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=XY, O=Python Software Foundation CA, CN=our-ca-server
Validity
Not Before: Aug 29 14:23:16 2018 GMT
Not After : Jul 7 14:23:16 2028 GMT
Subject: C=XY, L=Castle Anthrax, O=Python Software Foundation, CN=localhost-ecc
Subject Public Key Info:
Public Key Algorithm: id-ecPublicKey
Public-Key: (384 bit)
pub:
04:b3:cf:fa:c8:9c:a5:33:a2:7a:71:3f:96:cb:c6:
6a:bc:7e:6a:ed:81:14:92:d2:34:4f:50:e5:35:e9:
72:97:f8:ab:62:7e:72:db:98:b1:d0:b4:fa:dc:b5:
d9:11:45:13:82:c6:75:11:cf:67:c1:8a:14:13:26:
45:f2:04:c4:ac:c0:d4:d1:0a:cf:b8:0d:42:9b:30:
07:e2:86:28:0c:55:88:1d:59:b6:4f:14:10:e5:7a:
8e:5a:78:5c:38:fc:53
ASN1 OID: secp384r1
NIST CURVE: P-384
X509v3 extensions:
X509v3 Subject Alternative Name:
DNS:localhost-ecc
X509v3 Key Usage: critical
Digital Signature, Key Encipherment
X509v3 Extended Key Usage:
TLS Web Server Authentication, TLS Web Client Authentication
X509v3 Basic Constraints: critical
CA:FALSE
X509v3 Subject Key Identifier:
C6:82:22:BF:4F:3D:40:AD:9B:16:AD:E7:C5:ED:C4:82:EB:35:97:98
X509v3 Authority Key Identifier:
keyid:DD:BF:CA:DA:E6:D1:34:BA:37:75:21:CA:6F:9A:08:28:F2:35:B6:48
DirName:/C=XY/O=Python Software Foundation CA/CN=our-ca-server
serial:CB:2D:80:99:5A:69:52:5B
Authority Information Access:
CA Issuers - URI:http://testca.pythontest.net/testca/pycacert.cer
OCSP - URI:http://testca.pythontest.net/testca/ocsp/
X509v3 CRL Distribution Points:
Full Name:
URI:http://testca.pythontest.net/testca/revocation.crl
Signature Algorithm: sha256WithRSAEncryption
76:e3:19:4d:34:78:50:3e:fa:63:53:d6:3f:01:87:e8:f4:a3:
a9:81:5b:31:d6:de:3a:98:f3:bb:70:4d:29:35:1f:b0:6a:b3:
9d:bf:03:2b:79:c4:f2:0b:32:f8:fc:f6:cb:13:47:28:81:fa:
96:b3:1a:1d:bd:4b:f6:35:df:87:ef:6e:74:63:87:3d:7e:2b:
c6:78:d4:8e:ef:03:e6:01:11:22:4e:1b:ef:2c:c1:c5:4e:3f:
4a:07:ae:92:ef:d3:ac:79:59:7c:60:89:4b:3d:39:08:ef:c4:
9a:dc:b0:8b:ee:5f:30:40:d3:c2:f3:f8:90:77:9d:8c:a7:07:
b9:5f:62:83:4d:37:fa:36:e1:1d:26:2b:cc:8f:7c:6f:f1:23:
87:71:48:40:ad:6b:30:16:47:4c:d7:98:bb:f5:9b:63:c8:66:
47:65:58:d2:c1:07:81:14:0c:25:20:87:b9:1d:ab:0b:56:db:
2c:ab:36:db:7f:c7:42:52:af:91:d6:fb:18:cf:94:f7:1e:25:
99:ce:20:78:c6:f8:69:6e:9c:53:f3:fe:90:3e:4d:ca:d5:d6:
ac:6e:02:17:be:4a:0f:fe:e6:14:d4:ce:25:df:17:8f:6f:b9:
d3:28:dc:b4:98:ef:05:6f:eb:20:14:1c:c1:e9:9d:02:7b:0e:
0f:e4:a8:bc:3b:62:e0:42:0c:b0:f7:a1:63:fe:98:d7:aa:b0:
f6:ed:ff:ab:4f:1a:9a:8f:eb:f0:86:61:d2:d3:a5:08:d0:db:
e4:d6:a9:0e:ec:08:6f:af:fb:ef:73:3f:47:69:97:90:b2:5a:
6f:31:66:a7:4c:32:0c:e9:ea:18:ce:a9:79:9c:f5:c4:42:f5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0dHA6Ly90ZXN0Y2EucHl0
aG9udGVzdC5uZXQvdGVzdGNhL3B5Y2FjZXJ0LmNlcjA1BggrBgEFBQcwAYYpaHR0
cDovL3Rlc3RjYS5weXRob250ZXN0Lm5ldC90ZXN0Y2Evb2NzcC8wQwYDVR0fBDww
OjA4oDagNIYyaHR0cDovL3Rlc3RjYS5weXRob250ZXN0Lm5ldC90ZXN0Y2EvcmV2
b2NhdGlvbi5jcmwwDQYJKoZIhvcNAQELBQADggGBAHbjGU00eFA++mNT1j8Bh+j0
o6mBWzHW3jqY87twTSk1H7Bqs52/Ayt5xPILMvj89ssTRyiB+pazGh29S/Y134fv
bnRjhz1+K8Z41I7vA+YBESJOG+8swcVOP0oHrpLv06x5WXxgiUs9OQjvxJrcsIvu
XzBA08Lz+JB3nYynB7lfYoNNN/o24R0mK8yPfG/xI4dxSECtazAWR0zXmLv1m2PI
ZkdlWNLBB4EUDCUgh7kdqwtW2yyrNtt/x0JSr5HW+xjPlPceJZnOIHjG+GlunFPz
/pA+TcrV1qxuAhe+Sg/+5hTUziXfF49vudMo3LSY7wVv6yAUHMHpnQJ7Dg/kqLw7
YuBCDLD3oWP+mNeqsPbt/6tPGpqP6/CGYdLTpQjQ2+TWqQ7sCG+v++9zP0dpl5Cy
Wm8xZqdMMgzp6hjOqXmc9cRC9WhTsqSMmD+XNGJhQQpU1wvNM8hiYtr3B8bGO/po
yl9iPlfbvcsWlAeatTFVuPjLsH+g0YLfcciQYLOIsA==
-----END CERTIFICATE-----
...@@ -75,7 +75,7 @@ class BaseTestCase(unittest.TestCase): ...@@ -75,7 +75,7 @@ class BaseTestCase(unittest.TestCase):
support.reap_children() support.reap_children()
def assertTimeout(self, actual, expected): def assertTimeout(self, actual, expected):
# The waiting and/or time.time() can be imprecise, which # The waiting and/or time.monotonic() can be imprecise, which
# is why comparing to the expected value would sometimes fail # is why comparing to the expected value would sometimes fail
# (especially under Windows). # (especially under Windows).
self.assertGreaterEqual(actual, expected * 0.6) self.assertGreaterEqual(actual, expected * 0.6)
...@@ -191,16 +191,16 @@ class BaseLockTests(BaseTestCase): ...@@ -191,16 +191,16 @@ class BaseLockTests(BaseTestCase):
# TIMEOUT_MAX is ok # TIMEOUT_MAX is ok
lock.acquire(timeout=TIMEOUT_MAX) lock.acquire(timeout=TIMEOUT_MAX)
lock.release() lock.release()
t1 = time.time() t1 = time.monotonic()
self.assertTrue(lock.acquire(timeout=5)) self.assertTrue(lock.acquire(timeout=5))
t2 = time.time() t2 = time.monotonic()
# Just a sanity test that it didn't actually wait for the timeout. # Just a sanity test that it didn't actually wait for the timeout.
self.assertLess(t2 - t1, 5) self.assertLess(t2 - t1, 5)
results = [] results = []
def f(): def f():
t1 = time.time() t1 = time.monotonic()
results.append(lock.acquire(timeout=0.5)) results.append(lock.acquire(timeout=0.5))
t2 = time.time() t2 = time.monotonic()
results.append(t2 - t1) results.append(t2 - t1)
Bunch(f, 1).wait_for_finished() Bunch(f, 1).wait_for_finished()
self.assertFalse(results[0]) self.assertFalse(results[0])
...@@ -384,9 +384,9 @@ class EventTests(BaseTestCase): ...@@ -384,9 +384,9 @@ class EventTests(BaseTestCase):
N = 5 N = 5
def f(): def f():
results1.append(evt.wait(0.0)) results1.append(evt.wait(0.0))
t1 = time.time() t1 = time.monotonic()
r = evt.wait(0.5) r = evt.wait(0.5)
t2 = time.time() t2 = time.monotonic()
results2.append((r, t2 - t1)) results2.append((r, t2 - t1))
Bunch(f, N).wait_for_finished() Bunch(f, N).wait_for_finished()
self.assertEqual(results1, [False] * N) self.assertEqual(results1, [False] * N)
...@@ -547,9 +547,9 @@ class ConditionTests(BaseTestCase): ...@@ -547,9 +547,9 @@ class ConditionTests(BaseTestCase):
N = 5 N = 5
def f(): def f():
cond.acquire() cond.acquire()
t1 = time.time() t1 = time.monotonic()
result = cond.wait(0.5) result = cond.wait(0.5)
t2 = time.time() t2 = time.monotonic()
cond.release() cond.release()
results.append((t2 - t1, result)) results.append((t2 - t1, result))
Bunch(f, N).wait_for_finished() Bunch(f, N).wait_for_finished()
...@@ -586,9 +586,9 @@ class ConditionTests(BaseTestCase): ...@@ -586,9 +586,9 @@ class ConditionTests(BaseTestCase):
success = [] success = []
def f(): def f():
with cond: with cond:
dt = time.time() dt = time.monotonic()
result = cond.wait_for(lambda : state==4, timeout=0.1) result = cond.wait_for(lambda : state==4, timeout=0.1)
dt = time.time() - dt dt = time.monotonic() - dt
self.assertFalse(result) self.assertFalse(result)
self.assertTimeout(dt, 0.1) self.assertTimeout(dt, 0.1)
success.append(None) success.append(None)
...@@ -694,9 +694,9 @@ class BaseSemaphoreTests(BaseTestCase): ...@@ -694,9 +694,9 @@ class BaseSemaphoreTests(BaseTestCase):
self.assertFalse(sem.acquire(timeout=0.005)) self.assertFalse(sem.acquire(timeout=0.005))
sem.release() sem.release()
self.assertTrue(sem.acquire(timeout=0.005)) self.assertTrue(sem.acquire(timeout=0.005))
t = time.time() t = time.monotonic()
self.assertFalse(sem.acquire(timeout=0.5)) self.assertFalse(sem.acquire(timeout=0.5))
dt = time.time() - t dt = time.monotonic() - t
self.assertTimeout(dt, 0.5) self.assertTimeout(dt, 0.5)
def test_default_value(self): def test_default_value(self):
......
-----BEGIN ENCRYPTED PRIVATE KEY-----
MIIHbTBXBgkqhkiG9w0BBQ0wSjApBgkqhkiG9w0BBQwwHAQI072N7W+PDDMCAggA
MAwGCCqGSIb3DQIJBQAwHQYJYIZIAWUDBAEqBBA/AuaRNi4vE4KGqI4In+70BIIH
ENGS5Vex5NID873frmd1UZEHZ+O/Bd0wDb+NUpIqesHkRYf7kKi6Gnr+nKQ/oVVn
Lm3JjE7c8ECP0OkOOXmiXuWL1SkzBBWqCI4stSGUPvBiHsGwNnvJAaGjUffgMlcC
aJOA2+dnejLkzblq4CB2LQdm06N3Xoe9tyqtQaUHxfzJAf5Ydd8uj7vpKN2MMhY7
icIPJwSyh0N7S6XWVtHEokr9Kp4y2hS5a+BgCWV1/1z0aF7agnSVndmT1VR+nWmc
lM14k+lethmHMB+fsN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h9op0MU6WOX7ea2Rxyt4t6
-----END ENCRYPTED PRIVATE KEY-----
...@@ -7,6 +7,7 @@ import sys ...@@ -7,6 +7,7 @@ import sys
import time import time
import errno import errno
import struct import struct
import threading
from test import support from test import support
from io import BytesIO from io import BytesIO
...@@ -14,10 +15,6 @@ from io import BytesIO ...@@ -14,10 +15,6 @@ from io import BytesIO
if support.PGO: if support.PGO:
raise unittest.SkipTest("test is not helpful for PGO") raise unittest.SkipTest("test is not helpful for PGO")
try:
import threading
except ImportError:
threading = None
TIMEOUT = 3 TIMEOUT = 3
HAS_UNIX_SOCKETS = hasattr(socket, 'AF_UNIX') HAS_UNIX_SOCKETS = hasattr(socket, 'AF_UNIX')
...@@ -73,8 +70,8 @@ def capture_server(evt, buf, serv): ...@@ -73,8 +70,8 @@ def capture_server(evt, buf, serv):
pass pass
else: else:
n = 200 n = 200
start = time.time() start = time.monotonic()
while n > 0 and time.time() - start < 3.0: while n > 0 and time.monotonic() - start < 3.0:
r, w, e = select.select([conn], [], [], 0.1) r, w, e = select.select([conn], [], [], 0.1)
if r: if r:
n -= 1 n -= 1
...@@ -326,7 +323,6 @@ class DispatcherWithSendTests(unittest.TestCase): ...@@ -326,7 +323,6 @@ class DispatcherWithSendTests(unittest.TestCase):
def tearDown(self): def tearDown(self):
asyncore.close_all() asyncore.close_all()
@unittest.skipUnless(threading, 'Threading required for this test.')
@support.reap_threads @support.reap_threads
def test_send(self): def test_send(self):
evt = threading.Event() evt = threading.Event()
...@@ -364,9 +360,7 @@ class DispatcherWithSendTests(unittest.TestCase): ...@@ -364,9 +360,7 @@ class DispatcherWithSendTests(unittest.TestCase):
self.assertEqual(cap.getvalue(), data*2) self.assertEqual(cap.getvalue(), data*2)
finally: finally:
t.join(timeout=TIMEOUT) support.join_thread(t, timeout=TIMEOUT)
if t.is_alive():
self.fail("join() timed out")
@unittest.skipUnless(hasattr(asyncore, 'file_wrapper'), @unittest.skipUnless(hasattr(asyncore, 'file_wrapper'),
...@@ -732,14 +726,10 @@ class BaseTestAPI: ...@@ -732,14 +726,10 @@ class BaseTestAPI:
def test_create_socket(self): def test_create_socket(self):
s = asyncore.dispatcher() s = asyncore.dispatcher()
s.create_socket(self.family) s.create_socket(self.family)
self.assertEqual(s.socket.type, socket.SOCK_STREAM)
self.assertEqual(s.socket.family, self.family) self.assertEqual(s.socket.family, self.family)
SOCK_NONBLOCK = getattr(socket, 'SOCK_NONBLOCK', 0) self.assertEqual(s.socket.gettimeout(), 0)
sock_type = socket.SOCK_STREAM | SOCK_NONBLOCK self.assertFalse(s.socket.get_inheritable())
if hasattr(socket, 'SOCK_CLOEXEC'):
self.assertIn(s.socket.type,
(sock_type | socket.SOCK_CLOEXEC, sock_type))
else:
self.assertEqual(s.socket.type, sock_type)
def test_bind(self): def test_bind(self):
if HAS_UNIX_SOCKETS and self.family == socket.AF_UNIX: if HAS_UNIX_SOCKETS and self.family == socket.AF_UNIX:
...@@ -776,7 +766,6 @@ class BaseTestAPI: ...@@ -776,7 +766,6 @@ class BaseTestAPI:
self.assertTrue(s.socket.getsockopt(socket.SOL_SOCKET, self.assertTrue(s.socket.getsockopt(socket.SOL_SOCKET,
socket.SO_REUSEADDR)) socket.SO_REUSEADDR))
@unittest.skipUnless(threading, 'Threading required for this test.')
@support.reap_threads @support.reap_threads
def test_quick_connect(self): def test_quick_connect(self):
# see: http://bugs.python.org/issue10340 # see: http://bugs.python.org/issue10340
...@@ -799,9 +788,7 @@ class BaseTestAPI: ...@@ -799,9 +788,7 @@ class BaseTestAPI:
except OSError: except OSError:
pass pass
finally: finally:
t.join(timeout=TIMEOUT) support.join_thread(t, timeout=TIMEOUT)
if t.is_alive():
self.fail("join() timed out")
class TestAPI_UseIPv4Sockets(BaseTestAPI): class TestAPI_UseIPv4Sockets(BaseTestAPI):
family = socket.AF_INET family = socket.AF_INET
......
...@@ -14,16 +14,21 @@ import re ...@@ -14,16 +14,21 @@ import re
import base64 import base64
import ntpath import ntpath
import shutil import shutil
import urllib.parse import email.message
import email.utils
import html import html
import http.client import http.client
import urllib.parse
import tempfile import tempfile
import time import time
import datetime
import threading
from unittest import mock
from io import BytesIO from io import BytesIO
import unittest import unittest
from test import support from test import support
threading = support.import_module('threading')
class NoLogRequestHandler: class NoLogRequestHandler:
def log_message(self, *args): def log_message(self, *args):
...@@ -334,8 +339,17 @@ class SimpleHTTPServerTestCase(BaseTestCase): ...@@ -334,8 +339,17 @@ class SimpleHTTPServerTestCase(BaseTestCase):
self.tempdir = tempfile.mkdtemp(dir=basetempdir) self.tempdir = tempfile.mkdtemp(dir=basetempdir)
self.tempdir_name = os.path.basename(self.tempdir) self.tempdir_name = os.path.basename(self.tempdir)
self.base_url = '/' + self.tempdir_name self.base_url = '/' + self.tempdir_name
with open(os.path.join(self.tempdir, 'test'), 'wb') as temp: tempname = os.path.join(self.tempdir, 'test')
with open(tempname, 'wb') as temp:
temp.write(self.data) temp.write(self.data)
temp.flush()
mtime = os.stat(tempname).st_mtime
# compute last modification datetime for browser cache tests
last_modif = datetime.datetime.fromtimestamp(mtime,
datetime.timezone.utc)
self.last_modif_datetime = last_modif.replace(microsecond=0)
self.last_modif_header = email.utils.formatdate(
last_modif.timestamp(), usegmt=True)
def tearDown(self): def tearDown(self):
try: try:
...@@ -448,6 +462,44 @@ class SimpleHTTPServerTestCase(BaseTestCase): ...@@ -448,6 +462,44 @@ class SimpleHTTPServerTestCase(BaseTestCase):
self.assertEqual(response.getheader('content-type'), self.assertEqual(response.getheader('content-type'),
'application/octet-stream') 'application/octet-stream')
def test_browser_cache(self):
"""Check that when a request to /test is sent with the request header
If-Modified-Since set to date of last modification, the server returns
status code 304, not 200
"""
headers = email.message.Message()
headers['If-Modified-Since'] = self.last_modif_header
response = self.request(self.base_url + '/test', headers=headers)
self.check_status_and_reason(response, HTTPStatus.NOT_MODIFIED)
# one hour after last modification : must return 304
new_dt = self.last_modif_datetime + datetime.timedelta(hours=1)
headers = email.message.Message()
headers['If-Modified-Since'] = email.utils.format_datetime(new_dt,
usegmt=True)
response = self.request(self.base_url + '/test', headers=headers)
self.check_status_and_reason(response, HTTPStatus.NOT_MODIFIED)
def test_browser_cache_file_changed(self):
# with If-Modified-Since earlier than Last-Modified, must return 200
dt = self.last_modif_datetime
# build datetime object : 365 days before last modification
old_dt = dt - datetime.timedelta(days=365)
headers = email.message.Message()
headers['If-Modified-Since'] = email.utils.format_datetime(old_dt,
usegmt=True)
response = self.request(self.base_url + '/test', headers=headers)
self.check_status_and_reason(response, HTTPStatus.OK)
def test_browser_cache_with_If_None_Match_header(self):
# if If-None-Match header is present, ignore If-Modified-Since
headers = email.message.Message()
headers['If-Modified-Since'] = self.last_modif_header
headers['If-None-Match'] = "*"
response = self.request(self.base_url + '/test', headers=headers)
self.check_status_and_reason(response, HTTPStatus.OK)
def test_invalid_requests(self): def test_invalid_requests(self):
response = self.request('/', method='FOO') response = self.request('/', method='FOO')
self.check_status_and_reason(response, HTTPStatus.NOT_IMPLEMENTED) self.check_status_and_reason(response, HTTPStatus.NOT_IMPLEMENTED)
...@@ -457,6 +509,15 @@ class SimpleHTTPServerTestCase(BaseTestCase): ...@@ -457,6 +509,15 @@ class SimpleHTTPServerTestCase(BaseTestCase):
response = self.request('/', method='GETs') response = self.request('/', method='GETs')
self.check_status_and_reason(response, HTTPStatus.NOT_IMPLEMENTED) self.check_status_and_reason(response, HTTPStatus.NOT_IMPLEMENTED)
def test_last_modified(self):
"""Checks that the datetime returned in Last-Modified response header
is the actual datetime of last modification, rounded to the second
"""
response = self.request(self.base_url + '/test')
self.check_status_and_reason(response, HTTPStatus.OK, data=self.data)
last_modif_header = response.headers['Last-modified']
self.assertEqual(last_modif_header, self.last_modif_header)
def test_path_without_leading_slash(self): def test_path_without_leading_slash(self):
response = self.request(self.tempdir_name + '/test') response = self.request(self.tempdir_name + '/test')
self.check_status_and_reason(response, HTTPStatus.OK, data=self.data) self.check_status_and_reason(response, HTTPStatus.OK, data=self.data)
...@@ -729,7 +790,11 @@ class CGIHTTPServerTestCase(BaseTestCase): ...@@ -729,7 +790,11 @@ class CGIHTTPServerTestCase(BaseTestCase):
class SocketlessRequestHandler(SimpleHTTPRequestHandler): class SocketlessRequestHandler(SimpleHTTPRequestHandler):
def __init__(self): def __init__(self, *args, **kwargs):
request = mock.Mock()
request.makefile.return_value = BytesIO()
super().__init__(request, None, None)
self.get_called = False self.get_called = False
self.protocol_version = "HTTP/1.1" self.protocol_version = "HTTP/1.1"
...@@ -826,6 +891,16 @@ class BaseHTTPRequestHandlerTestCase(unittest.TestCase): ...@@ -826,6 +891,16 @@ class BaseHTTPRequestHandlerTestCase(unittest.TestCase):
self.assertEqual(result[0], b'<html><body>Data</body></html>\r\n') self.assertEqual(result[0], b'<html><body>Data</body></html>\r\n')
self.verify_get_called() self.verify_get_called()
def test_extra_space(self):
result = self.send_typical_request(
b'GET /spaced out HTTP/1.1\r\n'
b'Host: dummy\r\n'
b'\r\n'
)
self.assertTrue(result[0].startswith(b'HTTP/1.1 400 '))
self.verify_expected_headers(result[1:result.index(b'\r\n')])
self.assertFalse(self.handler.get_called)
def test_with_continue_1_0(self): def test_with_continue_1_0(self):
result = self.send_typical_request(b'GET / HTTP/1.0\r\nExpect: 100-continue\r\n\r\n') result = self.send_typical_request(b'GET / HTTP/1.0\r\nExpect: 100-continue\r\n\r\n')
self.verify_http_server_response(result[0]) self.verify_http_server_response(result[0])
......
# Some simple queue module tests, plus some failure conditions # Some simple queue module tests, plus some failure conditions
# to ensure the Queue locks remain stable. # to ensure the Queue locks remain stable.
import collections
import itertools
import queue import queue
import random
import sys
import threading
import time import time
import unittest import unittest
import weakref
from test import support from test import support
threading = support.import_module('threading')
try:
import _queue
except ImportError:
_queue = None
QUEUE_SIZE = 5 QUEUE_SIZE = 5
...@@ -53,14 +64,11 @@ class BlockingTestMixin: ...@@ -53,14 +64,11 @@ class BlockingTestMixin:
self.result = block_func(*block_args) self.result = block_func(*block_args)
# If block_func returned before our thread made the call, we failed! # If block_func returned before our thread made the call, we failed!
if not thread.startedEvent.is_set(): if not thread.startedEvent.is_set():
self.fail("blocking function '%r' appeared not to block" % self.fail("blocking function %r appeared not to block" %
block_func) block_func)
return self.result return self.result
finally: finally:
thread.join(10) # make sure the thread terminates support.join_thread(thread, 10) # make sure the thread terminates
if thread.is_alive():
self.fail("trigger function '%r' appeared to not return" %
trigger_func)
# Call this instead if block_func is supposed to raise an exception. # Call this instead if block_func is supposed to raise an exception.
def do_exceptional_blocking_test(self,block_func, block_args, trigger_func, def do_exceptional_blocking_test(self,block_func, block_args, trigger_func,
...@@ -76,10 +84,7 @@ class BlockingTestMixin: ...@@ -76,10 +84,7 @@ class BlockingTestMixin:
self.fail("expected exception of kind %r" % self.fail("expected exception of kind %r" %
expected_exception_class) expected_exception_class)
finally: finally:
thread.join(10) # make sure the thread terminates support.join_thread(thread, 10) # make sure the thread terminates
if thread.is_alive():
self.fail("trigger function '%r' appeared to not return" %
trigger_func)
if not thread.startedEvent.is_set(): if not thread.startedEvent.is_set():
self.fail("trigger thread ended but event never set") self.fail("trigger thread ended but event never set")
...@@ -89,7 +94,7 @@ class BaseQueueTestMixin(BlockingTestMixin): ...@@ -89,7 +94,7 @@ class BaseQueueTestMixin(BlockingTestMixin):
self.cum = 0 self.cum = 0
self.cumlock = threading.Lock() self.cumlock = threading.Lock()
def simple_queue_test(self, q): def basic_queue_test(self, q):
if q.qsize(): if q.qsize():
raise RuntimeError("Call this function with an empty queue") raise RuntimeError("Call this function with an empty queue")
self.assertTrue(q.empty()) self.assertTrue(q.empty())
...@@ -197,12 +202,12 @@ class BaseQueueTestMixin(BlockingTestMixin): ...@@ -197,12 +202,12 @@ class BaseQueueTestMixin(BlockingTestMixin):
else: else:
self.fail("Did not detect task count going negative") self.fail("Did not detect task count going negative")
def test_simple_queue(self): def test_basic(self):
# Do it a couple of times on the same queue. # Do it a couple of times on the same queue.
# Done twice to make sure works with same instance reused. # Done twice to make sure works with same instance reused.
q = self.type2test(QUEUE_SIZE) q = self.type2test(QUEUE_SIZE)
self.simple_queue_test(q) self.basic_queue_test(q)
self.simple_queue_test(q) self.basic_queue_test(q)
def test_negative_timeout_raises_exception(self): def test_negative_timeout_raises_exception(self):
q = self.type2test(QUEUE_SIZE) q = self.type2test(QUEUE_SIZE)
...@@ -358,5 +363,228 @@ class FailingQueueTest(BlockingTestMixin, unittest.TestCase): ...@@ -358,5 +363,228 @@ class FailingQueueTest(BlockingTestMixin, unittest.TestCase):
self.failing_queue_test(q) self.failing_queue_test(q)
class BaseSimpleQueueTest:
def setUp(self):
self.q = self.type2test()
def feed(self, q, seq, rnd):
while True:
try:
val = seq.pop()
except IndexError:
return
q.put(val)
if rnd.random() > 0.5:
time.sleep(rnd.random() * 1e-3)
def consume(self, q, results, sentinel):
while True:
val = q.get()
if val == sentinel:
return
results.append(val)
def consume_nonblock(self, q, results, sentinel):
while True:
while True:
try:
val = q.get(block=False)
except queue.Empty:
time.sleep(1e-5)
else:
break
if val == sentinel:
return
results.append(val)
def consume_timeout(self, q, results, sentinel):
while True:
while True:
try:
val = q.get(timeout=1e-5)
except queue.Empty:
pass
else:
break
if val == sentinel:
return
results.append(val)
def run_threads(self, n_feeders, n_consumers, q, inputs,
feed_func, consume_func):
results = []
sentinel = None
seq = inputs + [sentinel] * n_consumers
seq.reverse()
rnd = random.Random(42)
exceptions = []
def log_exceptions(f):
def wrapper(*args, **kwargs):
try:
f(*args, **kwargs)
except BaseException as e:
exceptions.append(e)
return wrapper
feeders = [threading.Thread(target=log_exceptions(feed_func),
args=(q, seq, rnd))
for i in range(n_feeders)]
consumers = [threading.Thread(target=log_exceptions(consume_func),
args=(q, results, sentinel))
for i in range(n_consumers)]
with support.start_threads(feeders + consumers):
pass
self.assertFalse(exceptions)
self.assertTrue(q.empty())
self.assertEqual(q.qsize(), 0)
return results
def test_basic(self):
# Basic tests for get(), put() etc.
q = self.q
self.assertTrue(q.empty())
self.assertEqual(q.qsize(), 0)
q.put(1)
self.assertFalse(q.empty())
self.assertEqual(q.qsize(), 1)
q.put(2)
q.put_nowait(3)
q.put(4)
self.assertFalse(q.empty())
self.assertEqual(q.qsize(), 4)
self.assertEqual(q.get(), 1)
self.assertEqual(q.qsize(), 3)
self.assertEqual(q.get_nowait(), 2)
self.assertEqual(q.qsize(), 2)
self.assertEqual(q.get(block=False), 3)
self.assertFalse(q.empty())
self.assertEqual(q.qsize(), 1)
self.assertEqual(q.get(timeout=0.1), 4)
self.assertTrue(q.empty())
self.assertEqual(q.qsize(), 0)
with self.assertRaises(queue.Empty):
q.get(block=False)
with self.assertRaises(queue.Empty):
q.get(timeout=1e-3)
with self.assertRaises(queue.Empty):
q.get_nowait()
self.assertTrue(q.empty())
self.assertEqual(q.qsize(), 0)
def test_negative_timeout_raises_exception(self):
q = self.q
q.put(1)
with self.assertRaises(ValueError):
q.get(timeout=-1)
def test_order(self):
# Test a pair of concurrent put() and get()
q = self.q
inputs = list(range(100))
results = self.run_threads(1, 1, q, inputs, self.feed, self.consume)
# One producer, one consumer => results appended in well-defined order
self.assertEqual(results, inputs)
def test_many_threads(self):
# Test multiple concurrent put() and get()
N = 50
q = self.q
inputs = list(range(10000))
results = self.run_threads(N, N, q, inputs, self.feed, self.consume)
# Multiple consumers without synchronization append the
# results in random order
self.assertEqual(sorted(results), inputs)
def test_many_threads_nonblock(self):
# Test multiple concurrent put() and get(block=False)
N = 50
q = self.q
inputs = list(range(10000))
results = self.run_threads(N, N, q, inputs,
self.feed, self.consume_nonblock)
self.assertEqual(sorted(results), inputs)
def test_many_threads_timeout(self):
# Test multiple concurrent put() and get(timeout=...)
N = 50
q = self.q
inputs = list(range(1000))
results = self.run_threads(N, N, q, inputs,
self.feed, self.consume_timeout)
self.assertEqual(sorted(results), inputs)
def test_references(self):
# The queue should lose references to each item as soon as
# it leaves the queue.
class C:
pass
N = 20
q = self.q
for i in range(N):
q.put(C())
for i in range(N):
wr = weakref.ref(q.get())
support.gc_collect()
self.assertIsNone(wr())
class PySimpleQueueTest(BaseSimpleQueueTest, unittest.TestCase):
type2test = queue._PySimpleQueue
@unittest.skipIf(_queue is None, "No _queue module found")
class CSimpleQueueTest(BaseSimpleQueueTest, unittest.TestCase):
def setUp(self):
self.type2test = _queue.SimpleQueue
super().setUp()
def test_is_default(self):
self.assertIs(self.type2test, queue.SimpleQueue)
def test_reentrancy(self):
# bpo-14976: put() may be called reentrantly in an asynchronous
# callback.
q = self.q
gen = itertools.count()
N = 10000
results = []
# This test exploits the fact that __del__ in a reference cycle
# can be called any time the GC may run.
class Circular(object):
def __init__(self):
self.circular = self
def __del__(self):
q.put(next(gen))
while True:
o = Circular()
q.put(next(gen))
del o
results.append(q.get())
if results[-1] >= N:
break
self.assertEqual(results, list(range(N + 1)))
if __name__ == "__main__": if __name__ == "__main__":
unittest.main() unittest.main()
...@@ -9,15 +9,13 @@ import select ...@@ -9,15 +9,13 @@ import select
import signal import signal
import socket import socket
import tempfile import tempfile
import threading
import unittest import unittest
import socketserver import socketserver
import test.support import test.support
from test.support import reap_children, reap_threads, verbose from test.support import reap_children, reap_threads, verbose
try:
import threading
except ImportError:
threading = None
test.support.requires("network") test.support.requires("network")
...@@ -48,11 +46,11 @@ def receive(sock, n, timeout=20): ...@@ -48,11 +46,11 @@ def receive(sock, n, timeout=20):
if HAVE_UNIX_SOCKETS and HAVE_FORKING: if HAVE_UNIX_SOCKETS and HAVE_FORKING:
class ForkingUnixStreamServer(socketserver.ForkingMixIn, class ForkingUnixStreamServer(socketserver.ForkingMixIn,
socketserver.UnixStreamServer): socketserver.UnixStreamServer):
_block_on_close = True pass
class ForkingUnixDatagramServer(socketserver.ForkingMixIn, class ForkingUnixDatagramServer(socketserver.ForkingMixIn,
socketserver.UnixDatagramServer): socketserver.UnixDatagramServer):
_block_on_close = True pass
@contextlib.contextmanager @contextlib.contextmanager
...@@ -72,7 +70,6 @@ def simple_subprocess(testcase): ...@@ -72,7 +70,6 @@ def simple_subprocess(testcase):
testcase.assertEqual(72 << 8, status) testcase.assertEqual(72 << 8, status)
@unittest.skipUnless(threading, 'Threading required for this test.')
class SocketServerTest(unittest.TestCase): class SocketServerTest(unittest.TestCase):
"""Test all socket servers.""" """Test all socket servers."""
...@@ -105,8 +102,6 @@ class SocketServerTest(unittest.TestCase): ...@@ -105,8 +102,6 @@ class SocketServerTest(unittest.TestCase):
def make_server(self, addr, svrcls, hdlrbase): def make_server(self, addr, svrcls, hdlrbase):
class MyServer(svrcls): class MyServer(svrcls):
_block_on_close = True
def handle_error(self, request, client_address): def handle_error(self, request, client_address):
self.close_request(request) self.close_request(request)
raise raise
...@@ -117,7 +112,12 @@ class SocketServerTest(unittest.TestCase): ...@@ -117,7 +112,12 @@ class SocketServerTest(unittest.TestCase):
self.wfile.write(line) self.wfile.write(line)
if verbose: print("creating server") if verbose: print("creating server")
server = MyServer(addr, MyHandler) try:
server = MyServer(addr, MyHandler)
except PermissionError as e:
# Issue 29184: cannot bind() a Unix socket on Android.
self.skipTest('Cannot create server (%s, %s): %s' %
(svrcls, addr, e))
self.assertEqual(server.server_address, server.socket.getsockname()) self.assertEqual(server.server_address, server.socket.getsockname())
return server return server
...@@ -302,7 +302,6 @@ class ErrorHandlerTest(unittest.TestCase): ...@@ -302,7 +302,6 @@ class ErrorHandlerTest(unittest.TestCase):
def tearDown(self): def tearDown(self):
test.support.unlink(test.support.TESTFN) test.support.unlink(test.support.TESTFN)
reap_children()
def test_sync_handled(self): def test_sync_handled(self):
BaseErrorTestServer(ValueError) BaseErrorTestServer(ValueError)
...@@ -313,12 +312,10 @@ class ErrorHandlerTest(unittest.TestCase): ...@@ -313,12 +312,10 @@ class ErrorHandlerTest(unittest.TestCase):
BaseErrorTestServer(SystemExit) BaseErrorTestServer(SystemExit)
self.check_result(handled=False) self.check_result(handled=False)
@unittest.skipUnless(threading, 'Threading required for this test.')
def test_threading_handled(self): def test_threading_handled(self):
ThreadingErrorTestServer(ValueError) ThreadingErrorTestServer(ValueError)
self.check_result(handled=True) self.check_result(handled=True)
@unittest.skipUnless(threading, 'Threading required for this test.')
def test_threading_not_handled(self): def test_threading_not_handled(self):
ThreadingErrorTestServer(SystemExit) ThreadingErrorTestServer(SystemExit)
self.check_result(handled=False) self.check_result(handled=False)
...@@ -340,8 +337,6 @@ class ErrorHandlerTest(unittest.TestCase): ...@@ -340,8 +337,6 @@ class ErrorHandlerTest(unittest.TestCase):
class BaseErrorTestServer(socketserver.TCPServer): class BaseErrorTestServer(socketserver.TCPServer):
_block_on_close = True
def __init__(self, exception): def __init__(self, exception):
self.exception = exception self.exception = exception
super().__init__((HOST, 0), BadHandler) super().__init__((HOST, 0), BadHandler)
...@@ -384,7 +379,7 @@ class ThreadingErrorTestServer(socketserver.ThreadingMixIn, ...@@ -384,7 +379,7 @@ class ThreadingErrorTestServer(socketserver.ThreadingMixIn,
if HAVE_FORKING: if HAVE_FORKING:
class ForkingErrorTestServer(socketserver.ForkingMixIn, BaseErrorTestServer): class ForkingErrorTestServer(socketserver.ForkingMixIn, BaseErrorTestServer):
_block_on_close = True pass
class SocketWriterTest(unittest.TestCase): class SocketWriterTest(unittest.TestCase):
...@@ -405,7 +400,6 @@ class SocketWriterTest(unittest.TestCase): ...@@ -405,7 +400,6 @@ class SocketWriterTest(unittest.TestCase):
self.assertIsInstance(server.wfile, io.BufferedIOBase) self.assertIsInstance(server.wfile, io.BufferedIOBase)
self.assertEqual(server.wfile_fileno, server.request_fileno) self.assertEqual(server.wfile_fileno, server.request_fileno)
@unittest.skipUnless(threading, 'Threading required for this test.')
def test_write(self): def test_write(self):
# Test that wfile.write() sends data immediately, and that it does # Test that wfile.write() sends data immediately, and that it does
# not truncate sends when interrupted by a Unix signal # not truncate sends when interrupted by a Unix signal
......
import socket import socket
import selectors import selectors
import telnetlib import telnetlib
import threading
import contextlib import contextlib
from test import support from test import support
import unittest import unittest
threading = support.import_module('threading')
HOST = support.HOST HOST = support.HOST
......
...@@ -2,7 +2,7 @@ import os ...@@ -2,7 +2,7 @@ import os
import unittest import unittest
import random import random
from test import support from test import support
thread = support.import_module('_thread') import _thread as thread
import time import time
import sys import sys
import weakref import weakref
......
import sys
import unittest import unittest
from doctest import DocTestSuite from doctest import DocTestSuite
from test import support from test import support
...@@ -5,8 +6,8 @@ import weakref ...@@ -5,8 +6,8 @@ import weakref
import gc import gc
# Modules under test # Modules under test
_thread = support.import_module('_thread') import _thread
threading = support.import_module('threading') import threading
import _threading_local import _threading_local
......
...@@ -127,11 +127,11 @@ class TimeoutTestCase(unittest.TestCase): ...@@ -127,11 +127,11 @@ class TimeoutTestCase(unittest.TestCase):
self.sock.settimeout(timeout) self.sock.settimeout(timeout)
method = getattr(self.sock, method) method = getattr(self.sock, method)
for i in range(count): for i in range(count):
t1 = time.time() t1 = time.monotonic()
try: try:
method(*args) method(*args)
except socket.timeout as e: except socket.timeout as e:
delta = time.time() - t1 delta = time.monotonic() - t1
break break
else: else:
self.fail('socket.timeout was not raised') self.fail('socket.timeout was not raised')
...@@ -150,6 +150,7 @@ class TCPTimeoutTestCase(TimeoutTestCase): ...@@ -150,6 +150,7 @@ class TCPTimeoutTestCase(TimeoutTestCase):
def tearDown(self): def tearDown(self):
self.sock.close() self.sock.close()
@unittest.skipIf(True, 'need to replace these hosts; see bpo-35518')
def testConnectTimeout(self): def testConnectTimeout(self):
# Testing connect timeout is tricky: we need to have IP connectivity # Testing connect timeout is tricky: we need to have IP connectivity
# to a host that silently drops our packets. We can't simulate this # to a host that silently drops our packets. We can't simulate this
......
...@@ -253,14 +253,36 @@ class ProxyTests(unittest.TestCase): ...@@ -253,14 +253,36 @@ class ProxyTests(unittest.TestCase):
self.assertTrue(bypass('localhost')) self.assertTrue(bypass('localhost'))
self.assertTrue(bypass('LocalHost')) # MixedCase self.assertTrue(bypass('LocalHost')) # MixedCase
self.assertTrue(bypass('LOCALHOST')) # UPPERCASE self.assertTrue(bypass('LOCALHOST')) # UPPERCASE
self.assertTrue(bypass('.localhost'))
self.assertTrue(bypass('newdomain.com:1234')) self.assertTrue(bypass('newdomain.com:1234'))
self.assertTrue(bypass('.newdomain.com:1234'))
self.assertTrue(bypass('foo.d.o.t')) # issue 29142 self.assertTrue(bypass('foo.d.o.t')) # issue 29142
self.assertTrue(bypass('d.o.t'))
self.assertTrue(bypass('anotherdomain.com:8888')) self.assertTrue(bypass('anotherdomain.com:8888'))
self.assertTrue(bypass('.anotherdomain.com:8888'))
self.assertTrue(bypass('www.newdomain.com:1234')) self.assertTrue(bypass('www.newdomain.com:1234'))
self.assertFalse(bypass('prelocalhost')) self.assertFalse(bypass('prelocalhost'))
self.assertFalse(bypass('newdomain.com')) # no port self.assertFalse(bypass('newdomain.com')) # no port
self.assertFalse(bypass('newdomain.com:1235')) # wrong port self.assertFalse(bypass('newdomain.com:1235')) # wrong port
def test_proxy_bypass_environment_always_match(self):
bypass = urllib.request.proxy_bypass_environment
self.env.set('NO_PROXY', '*')
self.assertTrue(bypass('newdomain.com'))
self.assertTrue(bypass('newdomain.com:1234'))
self.env.set('NO_PROXY', '*, anotherdomain.com')
self.assertTrue(bypass('anotherdomain.com'))
self.assertFalse(bypass('newdomain.com'))
self.assertFalse(bypass('newdomain.com:1234'))
def test_proxy_bypass_environment_newline(self):
bypass = urllib.request.proxy_bypass_environment
self.env.set('NO_PROXY',
'localhost, anotherdomain.com, newdomain.com:1234')
self.assertFalse(bypass('localhost\n'))
self.assertFalse(bypass('anotherdomain.com:8888\n'))
self.assertFalse(bypass('newdomain.com:1234\n'))
class ProxyTests_withOrderedEnv(unittest.TestCase): class ProxyTests_withOrderedEnv(unittest.TestCase):
...@@ -331,7 +353,7 @@ class urlopen_HttpTests(unittest.TestCase, FakeHTTPMixin, FakeFTPMixin): ...@@ -331,7 +353,7 @@ class urlopen_HttpTests(unittest.TestCase, FakeHTTPMixin, FakeFTPMixin):
self.unfakehttp() self.unfakehttp()
@unittest.skipUnless(ssl, "ssl module required") @unittest.skipUnless(ssl, "ssl module required")
def test_url_with_control_char_rejected(self): def test_url_path_with_control_char_rejected(self):
for char_no in list(range(0, 0x21)) + [0x7f]: for char_no in list(range(0, 0x21)) + [0x7f]:
char = chr(char_no) char = chr(char_no)
schemeless_url = f"//localhost:7777/test{char}/" schemeless_url = f"//localhost:7777/test{char}/"
...@@ -358,7 +380,7 @@ class urlopen_HttpTests(unittest.TestCase, FakeHTTPMixin, FakeFTPMixin): ...@@ -358,7 +380,7 @@ class urlopen_HttpTests(unittest.TestCase, FakeHTTPMixin, FakeFTPMixin):
self.unfakehttp() self.unfakehttp()
@unittest.skipUnless(ssl, "ssl module required") @unittest.skipUnless(ssl, "ssl module required")
def test_url_with_newline_header_injection_rejected(self): def test_url_path_with_newline_header_injection_rejected(self):
self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.") self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
host = "localhost:7777?a=1 HTTP/1.1\r\nX-injected: header\r\nTEST: 123" host = "localhost:7777?a=1 HTTP/1.1\r\nX-injected: header\r\nTEST: 123"
schemeless_url = "//" + host + ":8080/test/?test=a" schemeless_url = "//" + host + ":8080/test/?test=a"
...@@ -383,6 +405,38 @@ class urlopen_HttpTests(unittest.TestCase, FakeHTTPMixin, FakeFTPMixin): ...@@ -383,6 +405,38 @@ class urlopen_HttpTests(unittest.TestCase, FakeHTTPMixin, FakeFTPMixin):
finally: finally:
self.unfakehttp() self.unfakehttp()
@unittest.skipUnless(ssl, "ssl module required")
def test_url_host_with_control_char_rejected(self):
for char_no in list(range(0, 0x21)) + [0x7f]:
char = chr(char_no)
schemeless_url = f"//localhost{char}/test/"
self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
try:
escaped_char_repr = repr(char).replace('\\', r'\\')
InvalidURL = http.client.InvalidURL
with self.assertRaisesRegex(
InvalidURL, f"contain control.*{escaped_char_repr}"):
urlopen(f"http:{schemeless_url}")
with self.assertRaisesRegex(InvalidURL, f"contain control.*{escaped_char_repr}"):
urlopen(f"https:{schemeless_url}")
finally:
self.unfakehttp()
@unittest.skipUnless(ssl, "ssl module required")
def test_url_host_with_newline_header_injection_rejected(self):
self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
host = "localhost\r\nX-injected: header\r\n"
schemeless_url = "//" + host + ":8080/test/?test=a"
try:
InvalidURL = http.client.InvalidURL
with self.assertRaisesRegex(
InvalidURL, r"contain control.*\\r"):
urlopen(f"http:{schemeless_url}")
with self.assertRaisesRegex(InvalidURL, r"contain control.*\\n"):
urlopen(f"https:{schemeless_url}")
finally:
self.unfakehttp()
def test_read_0_9(self): def test_read_0_9(self):
# "0.9" response accepted (but not "simple responses" without # "0.9" response accepted (but not "simple responses" without
# a status line) # a status line)
...@@ -766,7 +820,7 @@ FF ...@@ -766,7 +820,7 @@ FF
with self.assertRaises(urllib.error.ContentTooShortError): with self.assertRaises(urllib.error.ContentTooShortError):
try: try:
urllib.request.urlretrieve('http://example.com/', urllib.request.urlretrieve(support.TEST_HTTP_URL,
reporthook=_reporthook) reporthook=_reporthook)
finally: finally:
self.unfakehttp() self.unfakehttp()
...@@ -783,7 +837,7 @@ FF ...@@ -783,7 +837,7 @@ FF
''') ''')
with self.assertRaises(urllib.error.ContentTooShortError): with self.assertRaises(urllib.error.ContentTooShortError):
try: try:
urllib.request.urlretrieve('http://example.com/') urllib.request.urlretrieve(support.TEST_HTTP_URL)
finally: finally:
self.unfakehttp() self.unfakehttp()
...@@ -791,7 +845,7 @@ FF ...@@ -791,7 +845,7 @@ FF
class QuotingTests(unittest.TestCase): class QuotingTests(unittest.TestCase):
r"""Tests for urllib.quote() and urllib.quote_plus() r"""Tests for urllib.quote() and urllib.quote_plus()
According to RFC 2396 (Uniform Resource Identifiers), to escape a According to RFC 3986 (Uniform Resource Identifiers), to escape a
character you write it as '%' + <2 character US-ASCII hex value>. character you write it as '%' + <2 character US-ASCII hex value>.
The Python code of ``'%' + hex(ord(<character>))[2:]`` escapes a The Python code of ``'%' + hex(ord(<character>))[2:]`` escapes a
character properly. Case does not matter on the hex letters. character properly. Case does not matter on the hex letters.
...@@ -819,7 +873,7 @@ class QuotingTests(unittest.TestCase): ...@@ -819,7 +873,7 @@ class QuotingTests(unittest.TestCase):
do_not_quote = '' .join(["ABCDEFGHIJKLMNOPQRSTUVWXYZ", do_not_quote = '' .join(["ABCDEFGHIJKLMNOPQRSTUVWXYZ",
"abcdefghijklmnopqrstuvwxyz", "abcdefghijklmnopqrstuvwxyz",
"0123456789", "0123456789",
"_.-"]) "_.-~"])
result = urllib.parse.quote(do_not_quote) result = urllib.parse.quote(do_not_quote)
self.assertEqual(do_not_quote, result, self.assertEqual(do_not_quote, result,
"using quote(): %r != %r" % (do_not_quote, result)) "using quote(): %r != %r" % (do_not_quote, result))
......
...@@ -4,13 +4,12 @@ import email ...@@ -4,13 +4,12 @@ import email
import urllib.parse import urllib.parse
import urllib.request import urllib.request
import http.server import http.server
import threading
import unittest import unittest
import hashlib import hashlib
from test import support from test import support
threading = support.import_module('threading')
try: try:
import ssl import ssl
except ImportError: except ImportError:
...@@ -276,7 +275,6 @@ class FakeProxyHandler(http.server.BaseHTTPRequestHandler): ...@@ -276,7 +275,6 @@ class FakeProxyHandler(http.server.BaseHTTPRequestHandler):
# Test cases # Test cases
@unittest.skipUnless(threading, "Threading required for this test.")
class BasicAuthTests(unittest.TestCase): class BasicAuthTests(unittest.TestCase):
USER = "testUser" USER = "testUser"
PASSWD = "testPass" PASSWD = "testPass"
...@@ -317,7 +315,6 @@ class BasicAuthTests(unittest.TestCase): ...@@ -317,7 +315,6 @@ class BasicAuthTests(unittest.TestCase):
self.assertRaises(urllib.error.HTTPError, urllib.request.urlopen, self.server_url) self.assertRaises(urllib.error.HTTPError, urllib.request.urlopen, self.server_url)
@unittest.skipUnless(threading, "Threading required for this test.")
class ProxyAuthTests(unittest.TestCase): class ProxyAuthTests(unittest.TestCase):
URL = "http://localhost" URL = "http://localhost"
...@@ -439,7 +436,6 @@ def GetRequestHandler(responses): ...@@ -439,7 +436,6 @@ def GetRequestHandler(responses):
return FakeHTTPRequestHandler return FakeHTTPRequestHandler
@unittest.skipUnless(threading, "Threading required for this test.")
class TestUrlopen(unittest.TestCase): class TestUrlopen(unittest.TestCase):
"""Tests urllib.request.urlopen using the network. """Tests urllib.request.urlopen using the network.
...@@ -577,7 +573,7 @@ class TestUrlopen(unittest.TestCase): ...@@ -577,7 +573,7 @@ class TestUrlopen(unittest.TestCase):
cafile=CERT_fakehostname) cafile=CERT_fakehostname)
# Good cert, but mismatching hostname # Good cert, but mismatching hostname
handler = self.start_https_server(certfile=CERT_fakehostname) handler = self.start_https_server(certfile=CERT_fakehostname)
with self.assertRaises(ssl.CertificateError) as cm: with self.assertRaises(urllib.error.URLError) as cm:
self.urlopen("https://localhost:%s/bizarre" % handler.port, self.urlopen("https://localhost:%s/bizarre" % handler.port,
cafile=CERT_fakehostname) cafile=CERT_fakehostname)
...@@ -598,7 +594,7 @@ class TestUrlopen(unittest.TestCase): ...@@ -598,7 +594,7 @@ class TestUrlopen(unittest.TestCase):
def cb_sni(ssl_sock, server_name, initial_context): def cb_sni(ssl_sock, server_name, initial_context):
nonlocal sni_name nonlocal sni_name
sni_name = server_name sni_name = server_name
context = ssl.SSLContext(ssl.PROTOCOL_TLS) context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
context.set_servername_callback(cb_sni) context.set_servername_callback(cb_sni)
handler = self.start_https_server(context=context, certfile=CERT_localhost) handler = self.start_https_server(context=context, certfile=CERT_localhost)
context = ssl.create_default_context(cafile=CERT_localhost) context = ssl.create_default_context(cafile=CERT_localhost)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment