Remove deprecated PTVSD integration (#16069)

This commit is contained in:
Franck Nijhof 2021-01-01 23:36:24 +01:00 committed by GitHub
parent 9d717c5df3
commit 592b253b8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 138 deletions

View File

@ -1,126 +0,0 @@
---
title: PTVSD - Python Tools for Visual Studio Debug Server
description: Debugging from Visual Studio Code.
ha_category:
- Utility
ha_release: 0.93
ha_codeowners:
- '@swamp-ig'
ha_domain: ptvsd
ha_iot_class: Local Push
---
<div class="note warning">
The PTVSD integration has been deprecated and will be removed in Home Assistant 0.120.0.
A full-featured replacement is available, by using the [`debugpy` integration](/integrations/debugpy).
</div>
The `ptvsd` integration allows you to use the Visual Studio Code PTVSD debugger with Home Assistant.
This is useful in testing changes on a local development install, or connecting to a production server to debug issues.
To enable the `ptvsd` integration add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
ptvsd:
```
By default this will listen on all local interfaces, on port 5678, and will not wait for a connection.
{% configuration %}
host:
description: The local interface to listen on.
required: false
default: 0.0.0.0 (all interfaces).
type: string
port:
description: Port to listen on.
required: false
default: 5678
type: integer
wait:
description: If true, wait for the debugger to connect before starting up Home Assistant.
required: false
default: false
type: boolean
{% endconfiguration %}
### Security
Ensure if this is a public-facing server, that the port is secured. Anyone who is able to access the debugger port can *execute arbitrary code* on the Home Assistant server, which is very unsafe.
If the Home Assistant server is behind your firewall with only the http(s) port exposed, then this is safe from outside connections.
Another way of securing the port is to set `host` to localhost and have a secured SSH TCP tunnel with a client certificate for access from the outside internet.
### Memory Use
There have been reports of continually increasing memory use while the debugger is running, although this doesn't seem to appear on all systems. Only configure the debugger on a persistent server when it's actually required.
### Waiting at startup
If you want to debug something in the boot-up sequence, configure the integration to wait for a connection first:
```yaml
# Example configuration.yaml entry
ptvsd:
wait: True
```
The ptvsd debugger is loaded quite early on in the boot-up sequence, before any other components. This will allow you to set breakpoints in `async_setup` or similar and debug the loading of the component.
### Alternate host and port
You can also listen on a different server address or port:
```yaml
# Example configuration.yaml entry
ptvsd:
host: localhost
port: 6789
```
This is useful for multi-homed servers, or for localhost only access
### Example Visual Studio Code configuration
This can be copied into your `launch.json` in the `.vscode` subdirectory in your Visual Studio Code project to connect to the debugger.
```json
{
"version": "0.2.0",
"configurations": [
{
// Example of attaching to local debug server running on WSL
"name": "Python: Attach Local",
"type": "python",
"request": "attach",
"port": 5678,
"host": "localhost",
"pathMappings": [
{
"localRoot": "c:\\Users\\Penny\\Documents\\Software\\home-assistant\\",
"remoteRoot": "/mnt/c/Users/Penny/Documents/Software/home-assistant"
}
],
},
{
// Example of attaching to my production server
"name": "Python: Attach Brontosarus",
"type": "python",
"request": "attach",
"port": 5678,
"host": "10.0.0.3", // Within my firewall so I don't need to secure the port.
"pathMappings": [
{
"localRoot": "c:\\Users\\Penny\\Documents\\Software\\home-assistant\\",
"remoteRoot": "/usr/src/app" // setup for docker container.
}
],
}
]
}
```

View File

@ -81,7 +81,7 @@ For those of you that like to power down your Sonos, Home Assistant should now h
- Adds Orange Pi GPIO platform ([@pascallj] - [#22541]) ([orangepi_gpio docs]) (new-integration) (new-platform) - Adds Orange Pi GPIO platform ([@pascallj] - [#22541]) ([orangepi_gpio docs]) (new-integration) (new-platform)
- Essent sensor ([@TheLastProject] - [#23513]) ([essent docs]) (new-integration) (new-platform) - Essent sensor ([@TheLastProject] - [#23513]) ([essent docs]) (new-integration) (new-platform)
- Ptvsd debugger component. ([@Swamp-Ig] - [#23336]) ([ptvsd docs]) (new-integration) - Ptvsd debugger component. ([@Swamp-Ig] - [#23336]) (new-integration)
- Ambiclimate ([@Danielhiversen] - [#22827]) ([ambiclimate docs]) (new-integration) (new-platform) - Ambiclimate ([@Danielhiversen] - [#22827]) ([ambiclimate docs]) (new-integration) (new-platform)
- Add Intergas InComfort Lan2RF gateway ([@zxdavb] - [#23736]) ([incomfort docs]) (new-integration) (new-platform) - Add Intergas InComfort Lan2RF gateway ([@zxdavb] - [#23736]) ([incomfort docs]) (new-integration) (new-platform)
@ -341,7 +341,7 @@ Experiencing issues introduced by this release? Please report them in our [issue
- Always pad mac addresses from nmap tracker with leading zeros ([@mikeage] - [#23492]) ([nmap_tracker docs]) (breaking change) - Always pad mac addresses from nmap tracker with leading zeros ([@mikeage] - [#23492]) ([nmap_tracker docs]) (breaking change)
- Update mysensors sensor icons ([@MartinHjelmare] - [#23491]) ([mysensors docs]) - Update mysensors sensor icons ([@MartinHjelmare] - [#23491]) ([mysensors docs])
- Add bypass and automatic bypass switch for Danfor Air. ([@JonasPed] - [#23572]) ([danfoss_air docs]) - Add bypass and automatic bypass switch for Danfor Air. ([@JonasPed] - [#23572]) ([danfoss_air docs])
- Ptvsd debugger component. ([@Swamp-Ig] - [#23336]) ([ptvsd docs]) (new-integration) - Ptvsd debugger component. ([@Swamp-Ig] - [#23336]) (new-integration)
- Fix min/max temp and humidity for homekit_controller climate ([@Jc2k] - [#23421]) ([homekit_controller docs]) - Fix min/max temp and humidity for homekit_controller climate ([@Jc2k] - [#23421]) ([homekit_controller docs])
- Fix failing state update tests ([@etheralm] - [#23575]) - Fix failing state update tests ([@etheralm] - [#23575])
- render_with_collect method for template ([@Swamp-Ig] - [#23283]) - render_with_collect method for template ([@Swamp-Ig] - [#23283])
@ -828,7 +828,6 @@ Experiencing issues introduced by this release? Please report them in our [issue
[plex docs]: /integrations/plex/ [plex docs]: /integrations/plex/
[pollen docs]: /integrations/iqvia [pollen docs]: /integrations/iqvia
[ps4 docs]: /integrations/ps4/ [ps4 docs]: /integrations/ps4/
[ptvsd docs]: /integrations/ptvsd/
[rainmachine docs]: /integrations/rainmachine/ [rainmachine docs]: /integrations/rainmachine/
[recorder docs]: /integrations/recorder/ [recorder docs]: /integrations/recorder/
[rest docs]: /integrations/rest/ [rest docs]: /integrations/rest/

View File

@ -784,7 +784,7 @@ The **holiday name** sensor has been renamed to **holiday**. ([@tsvi] - [#27654]
- Move imports in lastfm component ([@djpremier] - [#28010]) ([lastfm docs]) - Move imports in lastfm component ([@djpremier] - [#28010]) ([lastfm docs])
- Move imports in knx component ([@djpremier] - [#28008]) ([knx docs]) - Move imports in knx component ([@djpremier] - [#28008]) ([knx docs])
- Move imports in gtfs component ([@djpremier] - [#27999]) ([gtfs docs]) - Move imports in gtfs component ([@djpremier] - [#27999]) ([gtfs docs])
- Move imports in ptvsd component ([@djpremier] - [#28087]) ([ptvsd docs]) - Move imports in ptvsd component ([@djpremier] - [#28087])
- Move imports in isy994 component ([@djpremier] - [#28004]) ([isy994 docs]) - Move imports in isy994 component ([@djpremier] - [#28004]) ([isy994 docs])
- Support to use Whatsapp numbers (fixes ##28065) ([@fabaff] - [#28078]) ([twilio docs]) ([twilio_call docs]) ([twilio_sms docs]) - Support to use Whatsapp numbers (fixes ##28065) ([@fabaff] - [#28078]) ([twilio docs]) ([twilio_call docs]) ([twilio_sms docs])
- Add modelnumber for ecobee4 ([@marthoc] - [#28107]) ([ecobee docs]) - Add modelnumber for ecobee4 ([@marthoc] - [#28107]) ([ecobee docs])
@ -793,7 +793,7 @@ The **holiday name** sensor has been renamed to **holiday**. ([@tsvi] - [#27654]
- Add support SQL VACUUM for PostgeSQL ([@bastshoes] - [#28106]) ([recorder docs]) - Add support SQL VACUUM for PostgeSQL ([@bastshoes] - [#28106]) ([recorder docs])
- Move imports in dsmr component ([@djpremier] - [#27974]) ([dsmr docs]) - Move imports in dsmr component ([@djpremier] - [#27974]) ([dsmr docs])
- Minor tweaks for sensor device automations ([@emontnemery] - [#27829]) ([sensor docs]) - Minor tweaks for sensor device automations ([@emontnemery] - [#27829]) ([sensor docs])
- Fix test coverage, reverting top level import ptvsd ([@frenck] - [#28118]) ([ptvsd docs]) - Fix test coverage, reverting top level import ptvsd ([@frenck] - [#28118])
- Implement ToggleController, RangeController, and ModeController in alexa ([@ochlocracy] - [#27302]) ([alexa docs]) - Implement ToggleController, RangeController, and ModeController in alexa ([@ochlocracy] - [#27302]) ([alexa docs])
- Add option to specify mDNS advertised IP address for HomeKit Bridge ([@mback2k] - [#26791]) ([homekit docs]) - Add option to specify mDNS advertised IP address for HomeKit Bridge ([@mback2k] - [#26791]) ([homekit docs])
- Support custom source type for MQTT device tracker ([@raman325] - [#27838]) ([mqtt docs]) - Support custom source type for MQTT device tracker ([@raman325] - [#27838]) ([mqtt docs])
@ -1774,7 +1774,6 @@ The **holiday name** sensor has been renamed to **holiday**. ([@tsvi] - [#27654]
[prometheus docs]: /integrations/prometheus/ [prometheus docs]: /integrations/prometheus/
[proxy docs]: /integrations/proxy/ [proxy docs]: /integrations/proxy/
[ps4 docs]: /integrations/ps4/ [ps4 docs]: /integrations/ps4/
[ptvsd docs]: /integrations/ptvsd/
[pushbullet docs]: /integrations/pushbullet/ [pushbullet docs]: /integrations/pushbullet/
[pushover docs]: /integrations/pushover/ [pushover docs]: /integrations/pushover/
[qrcode docs]: /integrations/qrcode/ [qrcode docs]: /integrations/qrcode/

View File

@ -947,7 +947,7 @@ The integrations below have been removed:
- Use chip id in Konnected pro boards ([@kit-klein] - [#36940]) ([konnected docs]) - Use chip id in Konnected pro boards ([@kit-klein] - [#36940]) ([konnected docs])
- Remove unused webhook dependency from device automation ([@balloob] - [#36946]) ([device_automation docs]) - Remove unused webhook dependency from device automation ([@balloob] - [#36946]) ([device_automation docs])
- Add TTS support to Heos ([@avocadio] - [#35386]) ([heos docs]) - Add TTS support to Heos ([@avocadio] - [#35386]) ([heos docs])
- Upgrade ptvsd to 4.3.2 ([@frenck] - [#36950]) ([ptvsd docs]) - Upgrade ptvsd to 4.3.2 ([@frenck] - [#36950])
- Update frontend to 20200620.0 and add redirects ([@bramkragten] - [#36953]) ([frontend docs]) - Update frontend to 20200620.0 and add redirects ([@bramkragten] - [#36953]) ([frontend docs])
- Bump pyaehw4a1 to v.0.3.5 ([@bannhead] - [#36949]) ([hisense_aehw4a1 docs]) - Bump pyaehw4a1 to v.0.3.5 ([@bannhead] - [#36949]) ([hisense_aehw4a1 docs])
- Fix unique_id in Zeroconf flow ([@fredrike] - [#36948]) ([daikin docs]) - Fix unique_id in Zeroconf flow ([@fredrike] - [#36948]) ([daikin docs])
@ -1570,7 +1570,6 @@ The integrations below have been removed:
[prometheus docs]: /integrations/prometheus/ [prometheus docs]: /integrations/prometheus/
[proximity docs]: /integrations/proximity/ [proximity docs]: /integrations/proximity/
[ps4 docs]: /integrations/ps4/ [ps4 docs]: /integrations/ps4/
[ptvsd docs]: /integrations/ptvsd/
[rachio docs]: /integrations/rachio/ [rachio docs]: /integrations/rachio/
[recorder docs]: /integrations/recorder/ [recorder docs]: /integrations/recorder/
[remote_rpi_gpio docs]: /integrations/remote_rpi_gpio/ [remote_rpi_gpio docs]: /integrations/remote_rpi_gpio/

View File

@ -409,7 +409,7 @@ The `ptvsd` integration has been marked as deprecated and will be removed in
Home Assistant Core 0.120. A full-featured replacement is available with the Home Assistant Core 0.120. A full-featured replacement is available with the
[`debugpy`](/integrations/debugpy) integration, which is now considered stable. [`debugpy`](/integrations/debugpy) integration, which is now considered stable.
([@frenck] - [#42351]) ([ptvsd docs]) ([@frenck] - [#42351])
</p> </p>
</details> </details>
@ -782,7 +782,7 @@ all erroneous entries to the new `controller_modes` parameter.
- Create __init__.py in AlarmDecoder tests ([@Olen] - [#42388]) ([alarmdecoder docs]) - Create __init__.py in AlarmDecoder tests ([@Olen] - [#42388]) ([alarmdecoder docs])
- Convert logbook tests to pytest ([@taiyeoguns] - [#42289]) ([logbook docs]) - Convert logbook tests to pytest ([@taiyeoguns] - [#42289]) ([logbook docs])
- Cleanup log style and tests for ElkM1 ([@gwww] - [#42353]) ([elkm1 docs]) - Cleanup log style and tests for ElkM1 ([@gwww] - [#42353]) ([elkm1 docs])
- Deprecate ptvsd integration ([@frenck] - [#42351]) ([ptvsd docs]) (breaking-change) - Deprecate ptvsd integration ([@frenck] - [#42351]) (breaking-change)
- Upgrade debugpy to 1.0.0 ([@frenck] - [#40929]) ([debugpy docs]) - Upgrade debugpy to 1.0.0 ([@frenck] - [#40929]) ([debugpy docs])
- Rewrite pilight/test_init.py tests to pytest style test functions ([@erogleva] - [#42366]) ([pilight docs]) - Rewrite pilight/test_init.py tests to pytest style test functions ([@erogleva] - [#42366]) ([pilight docs])
- Add a test for template entities that reuse the template ([@bdraco] - [#42404]) ([template docs]) - Add a test for template entities that reuse the template ([@bdraco] - [#42404]) ([template docs])
@ -1633,7 +1633,6 @@ all erroneous entries to the new `controller_modes` parameter.
[plex docs]: /integrations/plex/ [plex docs]: /integrations/plex/
[plugwise docs]: /integrations/plugwise/ [plugwise docs]: /integrations/plugwise/
[profiler docs]: /integrations/profiler/ [profiler docs]: /integrations/profiler/
[ptvsd docs]: /integrations/ptvsd/
[python_script docs]: /integrations/python_script/ [python_script docs]: /integrations/python_script/
[rachio docs]: /integrations/rachio/ [rachio docs]: /integrations/rachio/
[rainforest_eagle docs]: /integrations/rainforest_eagle/ [rainforest_eagle docs]: /integrations/rainforest_eagle/

View File

@ -1683,7 +1683,6 @@
/components/proximity /integrations/proximity /components/proximity /integrations/proximity
/components/proxy /integrations/proxy /components/proxy /integrations/proxy
/components/ps4 /integrations/ps4 /components/ps4 /integrations/ps4
/components/ptvsd /integrations/ptvsd
/components/pulseaudio_loopback /integrations/pulseaudio_loopback /components/pulseaudio_loopback /integrations/pulseaudio_loopback
/components/push /integrations/push /components/push /integrations/push
/components/pushbullet /integrations/pushbullet /components/pushbullet /integrations/pushbullet