Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump websockets minimum version to 13 #139

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

epenet
Copy link
Collaborator

@epenet epenet commented Nov 25, 2024

Fixes various deprecation warnings in Home Assistant

See https://websockets.readthedocs.io/en/stable/howto/upgrade.html

Copy link
Contributor

@chemelli74 chemelli74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thx !

@epenet epenet requested a review from xchwarze November 25, 2024 10:00
@xchwarze xchwarze merged commit 0f78dd2 into xchwarze:master Nov 25, 2024
7 checks passed
@epenet epenet deleted the epenet-20241125-1045 branch November 25, 2024 14:10
@xchwarze
Copy link
Owner

@epenet if we are going to make a launch for HA we should see about integrating this one too #129

@epenet
Copy link
Collaborator Author

epenet commented Nov 25, 2024

@xchwarze how are new packages deployed?
Is it a manual process on your end? or is it automated?

@epenet
Copy link
Collaborator Author

epenet commented Nov 25, 2024

I assume it's currently manual, and we should look at implementing a CI pipeline:
https://developers.home-assistant.io/docs/core/integration-quality-scale/rules/dependency-transparency

The package published to PyPi should be built and published inside a CI pipeline.

@epenet
Copy link
Collaborator Author

epenet commented Nov 25, 2024

@epenet if we are going to make a launch for HA we should see about integrating this one too #129

I don't really understand the point of #129
In what context do you have this issue?
keep-alive should be handled automatically via PING-PONG

@xchwarze
Copy link
Owner

I assume it's currently manual, and we should look at implementing a CI pipeline: https://developers.home-assistant.io/docs/core/integration-quality-scale/rules/dependency-transparency

The package published to PyPi should be built and published inside a CI pipeline.

Yes, as it is a library with few releases it was manual.

I don't really understand the point of #129
In what context do you have this issue?

As mentioned in the PR I noticed that every few hours the tv starts rejecting commands. Reject the first one and regenerate the session and it works again.
Where this is annoying is to turn the tv off as it looks like it is turned off but it is on.

keep-alive should be handled automatically via PING-PONG

When I started to do the POC to test a solution that was the first thing that came to my mind, I don't know if it's completely correct...

@xchwarze
Copy link
Owner

@epenet do you find any errors in this pipeline?

name: Publish to PyPI

on:
  push:
    tags:
      - 'v*'

jobs:
  publish:
    runs-on: ubuntu-latest

    steps:
    - name: Checkout code
      uses: actions/checkout@v3

    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: '3.10'

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install build twine

    - name: Build package
      run: python -m build

    - name: Publish to PyPI
      env:
        TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
        TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
      run: twine upload dist/*

@epenet
Copy link
Collaborator Author

epenet commented Nov 25, 2024

I think it's now deprecated to use username/password
Even tokens should be migrated to trusted publishing.

Take a look at
https://github.com/pypa/gh-action-pypi-publish/tree/unstable/v1

@chemelli74
Copy link
Contributor

chemelli74 commented Nov 25, 2024

@epenet do you find any errors in this pipeline?

You take a look at aiovodafone/aiocomelit

@xchwarze
Copy link
Owner

@epenet @chemelli74 I add a new workflow and generate with it a new release
https://github.com/xchwarze/samsung-tv-ws-api/blob/master/.github/workflows/release.yml

To use it you have to create the tag by cli and everything is generated by pipeline.

@epenet
Copy link
Collaborator Author

epenet commented Nov 27, 2024

Great thanks!
Corresponding PR opened on Home Assistant: home-assistant/core#131690

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