| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* create_dispatcher() w/ is_ssl determined by url instead of sslopt
* added .lower() (per @rm-you's suggestion)
* create_dispatcher() w/ parse_url()-derived is_ssl
* Fix failing test, missing wss
Co-authored-by: engn33r <engn33r@users.noreply.github.com>
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Was digging through the code base the past few days as it's been an excellent aid in learning about Websockets and TCP. Noticed _create_sec_websocket_key was getting called twice per ws.connect method. I may be missing something, but thought I would bring it to your attention in case it's an artifact or something. Best Regards!
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* rel example
* tweaked rel example for linter
* added rel note to examples.rst
* slightly more compact example
* added example header
* matched wording
* _socket.recv(): _recv() except socket.error - changed or to and; added except TimeoutError - raise WebSocketTimeoutException
* _app - custom dispatcher check_callback() integration (and fixed pyevent compatibility): WrappedDispatcher (for use with generic event dispatchers such as pyevent and rel); create_dispatcher() accepts dispatcher kwarg (default None), and if it is specified, returns a WrappedDispatcher; use create_dispatcher() (passing specified dispatcher if any) every time (regardless of dispatcher specification)
* Add clarifying comment, rerun CI tests
* Add space to make linter happy
* working reconnect
* rmed logs
* added _logging.warning() disconnected/reconnected notifications to handleDisconnect()
* moved connect notification and dispatcher.read() (if doread kwarg [default False] is True) to setSock() (prevents those lines from running on ConnectionRefusedError)
* run_forever(): reconnect kwarg now specifies sleep() time (defualt 5)
* handleDisconnect(): fixed log msg
* run_forever() refactor: stabilized stack frame count (at least in rel mode); added stack frame count to disconnect (warning) log; grossly oversimplified ;)
* dispatcher simplification via DispatcherBase and DispatcherBase/WrappedDispatcher.timeout()
* _logging: info(); enableTrace() supports level kwarg (default "DEBUG")
* handleDisconnect() uses info() log
* Fix linting errors
* moved timeout() from Dispatcher to DispatcherBase (thus also applying to SSLDispatcher)
* reconnect()s for DispatcherBase (uses while loop) and WrappedDispatcher (uses timeout()); setSock() reconnecting (default False) kwarg - if reconnecting, skip handleDisconnect(); handleDisconnect() calls dispatcher.reconnect()
* custom_dispatcher switch in handleDisconnect()
* WrappedDispatcher constructor registers keyboard interrupt signal
* DispatcherBase.reconnect(): wrapped while loop in KeyboardInterrupt try/except
* fixed lint errors
* _app: RECONNECT (default 5) and setReconnect() setter; WebSocketApp.run_forever() reconnect kwarg defaults to RECONNECT
* tests.test_app: ws.setReconnect(0) (may fix test stall issue)
* oops, added setReconnect import to websocket __init__
* blank line for linter
* linter line
* added rel to setup extras_require{test}[]
* adjusted testRunForeverDispatcher() to use rel (including dispatch())
* setup: moved rel dep from extras_require{test}[] to tests_require[]
* meh trying install_requires[] (tests_require[] depped??)
* set RECONNECT (run_forever() reconnect kwarg default) to 0 (can be altered with setReconnect()) to preserve old (non-reconnecting) default behavior for existing integrations
* rmed rel from install_requires[] (only added for tests, and was not working...)
* test_app: rmed ws.setReconnect(0) (0 is new default)
* run_forever() reconnect->RECONNECT fallback in func instead of kwarg default
* test_app: disabled rel import (unsure how to set up test dependency) and testRunForeverDispatcher() (also not working previously afaik)
* linter fixes
* linter comment spaces
* run_forever() returns False to pass testRunForeverTeardownCleanExit test
* run_forever() returns False unless error (handleDisconnect() changes to True before calling on_error callback)
* rval->self.has_errored
Co-authored-by: engn33r <engn33r@users.noreply.github.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Allow passing `http_proxy_timeout` to `run_forever`
* Normalize docstring
* fix flake8 lint
Co-authored-by: Adam Wojtczak <adam.wojtczak@cybercare.cc>
Co-authored-by: engn33r <engn33r@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* rel example
* tweaked rel example for linter
* added rel note to examples.rst
* slightly more compact example
* added example header
* matched wording
* _socket.recv(): _recv() except socket.error - changed or to and; added except TimeoutError - raise WebSocketTimeoutException
* _app - custom dispatcher check_callback() integration (and fixed pyevent compatibility): WrappedDispatcher (for use with generic event dispatchers such as pyevent and rel); create_dispatcher() accepts dispatcher kwarg (default None), and if it is specified, returns a WrappedDispatcher; use create_dispatcher() (passing specified dispatcher if any) every time (regardless of dispatcher specification)
* Add clarifying comment, rerun CI tests
* Add space to make linter happy
* working reconnect
* rmed logs
* added _logging.warning() disconnected/reconnected notifications to handleDisconnect()
* moved connect notification and dispatcher.read() (if doread kwarg [default False] is True) to setSock() (prevents those lines from running on ConnectionRefusedError)
* run_forever(): reconnect kwarg now specifies sleep() time (defualt 5)
* handleDisconnect(): fixed log msg
* run_forever() refactor: stabilized stack frame count (at least in rel mode); added stack frame count to disconnect (warning) log; grossly oversimplified ;)
* dispatcher simplification via DispatcherBase and DispatcherBase/WrappedDispatcher.timeout()
* _logging: info(); enableTrace() supports level kwarg (default "DEBUG")
* handleDisconnect() uses info() log
* Fix linting errors
Co-authored-by: engn33r <engn33r@users.noreply.github.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* update dict access
``` if 'header' not in options or 'Sec-WebSocket-Key' not in options['header']:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable```
* Remove extra space for linter
Co-authored-by: engn33r <engn33r@users.noreply.github.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
(#802) (#804)
* Add support to pass pre-initialized stream socket when creating WebSocketApp (#802)
* Fix CI linting error
Co-authored-by: engn33r <engn33r@users.noreply.github.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
called (#788)
* fix!: `WebSocketApp.run_forever()` returning `None` after `close()` is called
BREAKING CHANGE: the return value of `WebSocketApp.run_forever()` will no longer return the (undocumented) `None` value.
* fix(tests): replace the defunct `wss://stream.meetup.com/2/rsvps` with `wss://api.bitfinex.com/ws/2` in several tests
* test: added two new local server tests to cover the changes in #785
* Remove newline to fix lint error
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* rel example
* tweaked rel example for linter
* added rel note to examples.rst
* slightly more compact example
* added example header
* matched wording
* _socket.recv(): _recv() except socket.error - changed or to and; added except TimeoutError - raise WebSocketTimeoutException
* _app - custom dispatcher check_callback() integration (and fixed pyevent compatibility): WrappedDispatcher (for use with generic event dispatchers such as pyevent and rel); create_dispatcher() accepts dispatcher kwarg (default None), and if it is specified, returns a WrappedDispatcher; use create_dispatcher() (passing specified dispatcher if any) every time (regardless of dispatcher specification)
* Add clarifying comment, rerun CI tests
* Add space to make linter happy
Co-authored-by: engn33r <engn33r@users.noreply.github.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fixes #787. Most interactions with a HTTPS website use a wss://
WebSocket, and the initial WebSocket request usually uses a https:// URL
in the Origin header. Previously, a http:// Origin header was the
default value unless a custom origin was specified. Now the Origin header will dynamically set a https:// URL
in the Origin header when a wss:// WebSocket URL is passed instead of
defaulting to http://. This can be
overridden by setting a custom "origin" parameter.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Based on code from issue 522 and information gathered from issues 764 and 775
|
| |
|