Skip to content

Cleanup ServiceInfo compatibility#60540

Merged
frenck merged 8 commits intohome-assistant:devfrom
epenet:cleanup-serviceinfo-compatibility
May 9, 2022
Merged

Cleanup ServiceInfo compatibility#60540
frenck merged 8 commits intohome-assistant:devfrom
epenet:cleanup-serviceinfo-compatibility

Conversation

@epenet
Copy link
Copy Markdown
Contributor

@epenet epenet commented Nov 29, 2021

Breaking change

Access to discovery information via dictionary methods has been deprecated since release 2021.12.
The compatibility methods have now been removed.

Proposed change

Access to discovery information via dictionary methods has been deprecated since release 2021.12.
This PR removes the corresponding obsolete code.

zeroconf => #60206
homekit => #60206
dhcp => #60136
mqtt => #60191
usb => #60140
ssdp => #59931

⚠️ This is a tracking PR and should not be merged until 2022.5 has been released.
2022.5 beta was cut today 🪓

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@probot-home-assistant
Copy link
Copy Markdown

Hey there @bdraco, mind taking a look at this pull request as it has been labeled with an integration (dhcp) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@probot-home-assistant
Copy link
Copy Markdown

Hey there @bdraco, mind taking a look at this pull request as it has been labeled with an integration (usb) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@probot-home-assistant
Copy link
Copy Markdown

Hey there @bdraco, mind taking a look at this pull request as it has been labeled with an integration (zeroconf) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@probot-home-assistant
Copy link
Copy Markdown

Hey there @emontnemery, mind taking a look at this pull request as it has been labeled with an integration (mqtt) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@bdraco
Copy link
Copy Markdown
Member

bdraco commented Nov 29, 2021

Once we have everything converted in the core codebase and each discovery has been upgraded the logging from debug to warning, we can move the get etc methods into the base class so this is easier to strip out later and we don't have dupe code.

@epenet
Copy link
Copy Markdown
Contributor Author

epenet commented Nov 29, 2021

Sure - though ssdp has specific code so the override will need to stay in there.
I also haven't looked yet at async_step_hassio as I couldn't work out where the object was generated.

@epenet epenet force-pushed the cleanup-serviceinfo-compatibility branch 2 times, most recently from eac532f to 5d1567d Compare February 24, 2022 13:39
@epenet
Copy link
Copy Markdown
Contributor Author

epenet commented Feb 24, 2022

@bendavid, @thecode you may want to check this latest test run.
https://github.com/home-assistant/core/runs/5319600644?check_suite_focus=true

It seems that webostv is still hitting some SsdpServiceInfo is not subscriptable (maybe just in tests - but those need to be adjusted also)

FAILED tests/components/webostv/test_config_flow.py::test_ssdp_update_uuid[pyloop]
FAILED tests/components/webostv/test_config_flow.py::test_form_abort_uuid_configured[pyloop]

@thecode thecode mentioned this pull request Feb 24, 2022
22 tasks
@epenet epenet force-pushed the cleanup-serviceinfo-compatibility branch from 5d1567d to d5f1cbf Compare February 24, 2022 16:05
@epenet epenet force-pushed the cleanup-serviceinfo-compatibility branch from d5f1cbf to 3be4038 Compare April 27, 2022 14:44
@epenet
Copy link
Copy Markdown
Contributor Author

epenet commented Apr 27, 2022

2022.5 beta was cut today 🪓 so this should be ready to merge if tests pass

@epenet epenet marked this pull request as ready for review April 27, 2022 14:47
@epenet epenet changed the title WIP: Cleanup ServiceInfo compatibility Cleanup ServiceInfo compatibility Apr 27, 2022
Copy link
Copy Markdown
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

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

As this is a breaking change for custom integration developers, it needs a small blog post on the developer's documentation.

@epenet epenet added smash Indicator this PR is close to finish for merging or closing and removed docs-missing labels Apr 30, 2022
@frenck
Copy link
Copy Markdown
Member

frenck commented May 9, 2022

Nice, thanks @epenet 👍

@frenck frenck merged commit 141688e into home-assistant:dev May 9, 2022
@epenet epenet deleted the cleanup-serviceinfo-compatibility branch May 9, 2022 12:19
@github-actions github-actions bot locked and limited conversation to collaborators May 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants