Skip to content

allow async with to be used with a ButtplugClient object - #21

Merged
qdot merged 18 commits into
buttplugio:devfrom
jlamothe:master
Sep 6, 2026
Merged

qdot merged 18 commits into
buttplugio:devfrom
jlamothe:master

Conversation

@jlamothe

@jlamothe jlamothe commented Sep 6, 2026

Copy link
Copy Markdown

This allows you to do the following:

async def my_func():
    async with ButtplugClient('test') as cli:
        cli.connect('ws://127.0.0.1:12345')
        # do some stuff...

...and the client will automatically be cleanly disconnected when the block exits, whether normally or as a result of an unhandled exception.

dependabot Bot and others added 18 commits June 11, 2021 17:54
Bumps [websockets](https://github.com/aaugustin/websockets) from 7.0 to 9.1.
- [Release notes](https://github.com/aaugustin/websockets/releases)
- [Changelog](https://github.com/aaugustin/websockets/blob/9.1/docs/changelog.rst)
- [Commits](python-websockets/websockets@7.0...9.1)

---
updated-dependencies:
- dependency-name: websockets
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Like, it still basically works fine and doing the python move to
FFI is going to suck.
C#/node are dead, thank fuck
device_removed_handlers now correctly receive the removed ButtplugClientDevice rather than its integer id
Event handler API change is a breaking exposed API
change, so need to up the version
This repo hasn't been touched in 3 years so might as well over

Or let the robot start it over, as it were
Update to look more like Rust and C#
Bumps [pygments](https://github.com/pygments/pygments) from 2.19.2 to 2.20.0.
- [Release notes](https://github.com/pygments/pygments/releases)
- [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES)
- [Commits](pygments/pygments@2.19.2...2.20.0)

---
updated-dependencies:
- dependency-name: pygments
  dependency-version: 2.20.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [pytest](https://github.com/pytest-dev/pytest) from 9.0.2 to 9.0.3.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](pytest-dev/pytest@9.0.2...9.0.3)

---
updated-dependencies:
- dependency-name: pytest
  dependency-version: 9.0.3
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
...to ensure it's cleanly disconnected when no longer required
@CLAassistant

CLAassistant commented Sep 6, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@qdot

qdot commented Sep 6, 2026

Copy link
Copy Markdown
Member

Oh, nice, thanks! I'll try to get this in and a point release out this weekend.

Let me know if you have any other suggestions too, most of my python implementation experience was pre-3.5 and... I'm not sure how this current implementation feels 'cause I don't write much python these days. :|

@qdot
qdot changed the base branch from master to dev September 6, 2026 05:22
@qdot
qdot merged commit 197bc72 into buttplugio:dev Sep 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants