-
Notifications
You must be signed in to change notification settings - Fork 11
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
Fix HA 2025.2.0b0 deprecation warning #146
Conversation
WalkthroughThe pull request updates the import and type annotation for Changes
Assessment against linked issues
Possibly related PRs
Poem
Tip 🌐 Web search-backed reviews and chat
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@@ -20,6 +20,7 @@ | |||
CONF_UNIQUE_ID, | |||
) | |||
from homeassistant.exceptions import HomeAssistantError | |||
from homeassistant.helpers.service_info.zeroconf import ZeroconfServiceInfo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the old import for zeroconf is unused now.
If so it should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
Thanks for the update, however I can only merge after Home Assistant 2025.2 has been released. Because with these changes it now requires Home Assistant 2025.2 to run also some additional changes are needed:
|
That's true! |
I added those changes. You can always commit to this PR if you have any additional changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/push.yaml
(1 hunks)hacs.json
(1 hunks)requirements_dev.txt
(1 hunks)requirements_test.txt
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- hacs.json
🔇 Additional comments (2)
requirements_test.txt (1)
5-5
: Verify compatibility with Python 3.13.The version update aligns with HA 2025.2 requirements, but we need to verify compatibility with Python 3.13 as specified in the workflow.
Run this script to check package metadata:
.github/workflows/push.yaml (1)
18-18
: Verify action compatibility with Python 3.13.The update to Python 3.13 aligns with HA 2025.2 requirements. However, we should verify that all GitHub Actions and dependencies in the workflow support Python 3.13.
Run this script to check action versions and their Python support:
✅ Verification successful
Python 3.13 compatibility verified for all workflow actions
The workflow is fully compatible with Python 3.13:
- actions/setup-python@v5 officially supports Python 3.13 as shown in their documentation
- hassfest and HACS actions run in isolated Docker containers and are not affected by the workflow's Python version
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check latest versions and Python support for actions used in workflow # Check actions/setup-python echo "Checking actions/setup-python..." curl -s https://api.github.com/repos/actions/setup-python/releases/latest | \ jq -r '.tag_name, .body' | grep -i "python 3.13" # Check home-assistant/actions/hassfest echo "Checking hassfest action..." curl -s https://api.github.com/repos/home-assistant/actions/commits/master | \ jq -r '.commit.message' | grep -i "python" # Check HACS action echo "Checking HACS action..." curl -s https://api.github.com/repos/hacs/action/releases/latest | \ jq -r '.tag_name, .body' | grep -i "python"Length of output: 552
Script:
#!/bin/bash # Get workflow content and list all actions echo "=== Workflow Actions ===" cat .github/workflows/push.yaml echo -e "\n=== Setup Python Support ===" # Check setup-python releases without filtering curl -s https://api.github.com/repos/actions/setup-python/releases/latest | jq -r '.tag_name, .body' echo -e "\n=== Hassfest Action Config ===" # Check hassfest action configuration curl -s https://raw.githubusercontent.com/home-assistant/actions/master/hassfest/action.yml echo -e "\n=== HACS Action Config ===" # Check HACS action configuration curl -s https://raw.githubusercontent.com/hacs/action/main/action.ymlLength of output: 4445
Script:
#!/bin/bash # Check setup-python documentation for version support echo "=== Setup Python Documentation ===" curl -s https://raw.githubusercontent.com/actions/setup-python/main/README.md # Check Python 3.13 availability in setup-python action echo -e "\n=== Python 3.13 Support Check ===" curl -s https://raw.githubusercontent.com/actions/setup-python/main/src/tools_versions_list.ts | grep "3.13"Length of output: 7138
@@ -1,4 +1,4 @@ | |||
-r requirements_test.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Critical dependencies missing after requirements_test.txt removal
The following required dependencies are missing in requirements_dev.txt after removing the reference to requirements_test.txt:
- mypy (needed for type checking)
- pytest-homeassistant-custom-component (required for component testing)
- zeroconf (required for network discovery)
These dependencies should be explicitly added to requirements_dev.txt to maintain development and testing functionality.
🔗 Analysis chain
Verify impact of removing requirements_test.txt reference.
The removal of -r requirements_test.txt
might cause missing dependencies. Please ensure all required test dependencies are explicitly listed in this file.
Run this script to check for any missing dependencies:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Compare dependencies between requirements files
# Check for any dependencies that might be missing after removal
# Get unique dependencies from requirements_test.txt
test_deps=$(cat requirements_test.txt | grep -v "^-r" | grep -v "^#" | cut -d'=' -f1)
# Check if these dependencies exist in requirements_dev.txt
for dep in $test_deps; do
if ! grep -q "$dep" requirements_dev.txt; then
echo "Warning: $dep from requirements_test.txt is not in requirements_dev.txt"
fi
done
Length of output: 895
@@ -1,4 +1,4 @@ | |||
-r requirements_test.txt | |||
|
|||
awesomeversion>=24.0.0 | |||
homeassistant-stubs==2024.8.0 | |||
homeassistant-stubs==2025.2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Version 2025.2.0 is not available on PyPI
The latest available version of homeassistant-stubs is 2025.1.4. Since the package follows calendar versioning, version 2025.2.0 would represent the February 2025 release, which is not yet available. Please update the requirement to use the latest stable version (2025.1.4).
🔗 Analysis chain
Version 2025.2.0 is not yet released.
The PR objectives indicate that Home Assistant 2025.2 is not yet officially released. This dependency version might not be available yet.
Run this script to verify package availability:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if the package version exists on PyPI
curl -s https://pypi.org/pypi/homeassistant-stubs/json | jq -r '.releases | keys[]' | grep "2025.2.0" || echo "Version 2025.2.0 not found"
Length of output: 164
Script:
#!/bin/bash
# Description: List the latest 5 versions of homeassistant-stubs
curl -s https://pypi.org/pypi/homeassistant-stubs/json | jq -r '.releases | keys[]' | sort -V | tail -n 5
Length of output: 154
Sorry for the delays. |
This fixes #145
Summary by CodeRabbit