Comments (4)
Frequent warning:
~/.pyenv/versions/pypy3.10-7.3.16/lib/pypy3.10/asyncio/sslproto.py:320: ResourceWarning: unclosed transport <asyncio.sslproto._SSLProtocolTransport object at 0x...>
Test failure not linked to a specific test, but to the framework:
Traceback (most recent call last):
File "/Users/myk/dev/websockets/tests/legacy/test_client_server.py", line 122, in _decorate
return func(self, *_args, **_kwargs)
File "/Users/myk/dev/websockets/tests/legacy/test_client_server.py", line 121, in _decorate
with manager(self, *args, **kwargs):
File "/Users/myk/.pyenv/versions/pypy3.10-7.3.16/lib/pypy3.10/contextlib.py", line 135, in __enter__
return next(self.gen)
File "/Users/myk/dev/websockets/tests/legacy/test_client_server.py", line 105, in temp_test_client
test.start_client(*args, **kwargs)
File "/Users/myk/dev/websockets/tests/legacy/test_client_server.py", line 331, in start_client
super().start_client(path, **kwargs)
File "/Users/myk/dev/websockets/tests/legacy/test_client_server.py", line 266, in start_client
self.assertDeprecationWarnings(recorded_warnings, expected_warnings)
File "/Users/myk/dev/websockets/tests/legacy/utils.py", line 80, in assertDeprecationWarnings
self.assertEqual(type(recorded.message), DeprecationWarning)
AssertionError: <class 'ResourceWarning'> != <class 'DeprecationWarning'>
Failed run with that error: https://github.com/python-websockets/websockets/actions/runs/10316111205/job/28558214475
from websockets.
I doesn't make sense to spend much time fixing the test suite for the legacy implementation under PyPy, though.
from websockets.
This warning is a bug: python/cpython#90476
It was fixed in Python 3.11.
I tried to remove it by adding this to tests/__init__.py
:
import warnings
warnings.filterwarnings(action="ignore", category=ResourceWarning)
This filters out ResourceWarning. I could confirm by raising a ResourceWarning
just after this line. However, the warnings still get raised later in the tests. Probably something changes the warning filters inbetween. I just don't know what.
Removing warnings with command line arguments (pypy3.9 -W ignore:"unclosed transport":ResourceWarning:asyncio.sslproto -m unittest
) works but that's quite annoying and hard to make conditional on the Python version. Very messy.
from websockets.
After 1853a9b tests are passing again on GitHub Actions — after a long string of non-passing tests. I couldn't get rid of the warning; I'll live with it.
from websockets.
Related Issues (20)
- Feature batch receive HOT 2
- [QUESTION] Switching from websocket-client to websockets HOT 1
- Sync version of broadcast HOT 2
- Running Scheduled Task in Websokcets Or Scaling with multiple workers HOT 1
- await websocket.recv() block the coroutine loop. HOT 1
- When using websockets as a client, how to send a pong when receiving a ping? HOT 1
- Make MAX_LINE configurable HOT 5
- When I use websocket to transmit continuous audio pcm data to the server, half of the data is lost HOT 1
- websocket over stomp received Session closed error HOT 5
- Connection breaks in between during a sustained transfer HOT 9
- When there are N channels in a group, sending a message to the group will be sent N times HOT 1
- Asking for Guidance in Writing a WebsocketHandler for the Python logging Module HOT 3
- iOS and WebSockets: 0 bytes read/no close frame received/code 1006? HOT 5
- question: intended behavior with failed auth and async for auto-reconnect HOT 28
- Inconsistent raw frames when sending a custom text frame with an empty body HOT 3
- Expose list of connections as an attribute of WebSocketServer HOT 1
- Client initiated close always runs into `close_timeout` HOT 3
- Threading server should close connections on exit
- Respond with HTP 414 or 431 when exceeding security limits
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from websockets.