File tree Expand file tree Collapse file tree 5 files changed +17
-7
lines changed Expand file tree Collapse file tree 5 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 11environment :
22# websockets only works on Python >= 3.4.
33 CIBW_SKIP : cp27-* cp33-*
4- CIBW_TEST_COMMAND : python -m unittest websockets
4+ CIBW_TEST_COMMAND : python -W default - m unittest websockets
55 WEBSOCKETS_TESTS_TIMEOUT_FACTOR : 100
66
77install :
Original file line number Diff line number Diff line change 22 global :
33 # websockets only works on Python >= 3.4.
44 - CIBW_SKIP="cp27-* cp33-*"
5- - CIBW_TEST_COMMAND="python3 -m unittest websockets"
5+ - CIBW_TEST_COMMAND="python3 -W default - m unittest websockets"
66 - WEBSOCKETS_TESTS_TIMEOUT_FACTOR=100
77
88matrix :
Original file line number Diff line number Diff line change 11export PYTHONASYNCIODEBUG =1
2- export PYTHONWARNINGS =default
32
43test :
5- python -m unittest
4+ python -W default - m unittest
65
76coverage :
87 python -m coverage erase
9- python -m coverage run --branch --source=websockets -m unittest
8+ python -W default - m coverage run --branch --source=websockets -m unittest
109 python -m coverage html
1110
1211clean :
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ commands =
1212 ; Before testing with speedups, compile the extension.
1313 speedups: python setup.py --quiet build_ext --inplace
1414
15- python -m unittest {posargs}
15+ python -W default - m unittest {posargs}
1616
1717 ; After testing with speedups, remove the extension.
1818 speedups: sh -c ' rm websockets/*.so'
@@ -27,7 +27,7 @@ commands =
2727 python setup.py --quiet build_ext --inplace
2828
2929 python -m coverage erase
30- python -m coverage run --branch --source =websockets -m unittest
30+ python -W default - m coverage run --branch --source =websockets -m unittest
3131 python -m coverage report --show-missing --fail-under =100
3232
3333 speedups: sh -c ' rm websockets/*.so'
Original file line number Diff line number Diff line change 1515import logging
1616import random
1717import struct
18+ import warnings
1819
1920from .compatibility import asyncio_ensure_future
2021from .exceptions import (
2930logger = logging .getLogger (__name__ )
3031
3132
33+ # On Python ≥ 3.7, silence a deprecation warning that we can't address before
34+ # dropping support for Python < 3.5.
35+ warnings .filterwarnings (
36+ action = 'ignore' ,
37+ message = r"'with \(yield from lock\)' is deprecated "
38+ r"use 'async with lock' instead" ,
39+ category = DeprecationWarning ,
40+ )
41+
42+
3243# A WebSocket connection goes through the following four states, in order:
3344
3445class State (enum .IntEnum ):
You can’t perform that action at this time.
0 commit comments