Add monkey patch notes

This commit is contained in:
Paulus Schoutsen 2017-06-17 13:31:58 -07:00
parent abfd390dc8
commit 6c41741c6b

View File

@ -42,6 +42,22 @@ Z-Wave is also getting a big update in this release. The confusing entity_ids wi
6. Restart Home Assistant to run with new IDs.
7. The old entity IDs will be available in the more info dialog to trace down any remaining errors.
## {% linkable_title Monkey Patching Python 3.6 %}
Some people have noticed that running Home Assistant under Python 3.6 can lead to segfaults. It seems to be related to the [earlier segfault issues][old-bug] that we experienced when we released the asyncio-based core. We thought that those issues would have been fixed when [Python bug 26617] was resolved. Although we see less reports compared to the old bug, there are still users [experiencing them][new-bug] ([gdb stacktrace points at `PyObject_GC_Del()`][gdb]).
Since Python 3.6, the Task and Future classes have been moved to C. This gives a nice speed boost but also prevents us from monkey patching the Task class to avoid the segfault. [Ben Bangert] managed to brew up another monkey patch to stop Python 3.6 from using the C classes, falling back to the Python versions instead. This allows us to apply the original monkey patch again.
Both monkey patches are now active by default starting version 0.47 to avoid our users experiencing segfaults. This comes at a cost of not being able to benefit from all optimizations that were introduced in Python 3.6.
To run without the monkey patch, start Home Assistant with `HASS_NO_MONKEY=1 hass`. We will further investigate this issue and try to fix it in a future version of Python.
[old-bug]: https://github.com/home-assistant/home-assistant/issues/3453
[Python bug 26617]: https://bugs.python.org/issue26617
[new-bug]: https://github.com/home-assistant/home-assistant/issues/7752
[gdb]: https://github.com/home-assistant/home-assistant/issues/7752#issuecomment-305100009
[Ben Bangert]: https://github.com/bbangert
## {% linkable_title New platforms %}
- Added a Taps Aff binary sensor ([@bazwilliams] - [#7880]) ([binary_sensor.tapsaff docs]) (new-platform)