Files
odoo_source/odoo/service
shq_lenovo d3b8f05e1e [FIX] core: --dev=reload with watchdog==4.0.0
If you're on Linux, make sure `inotify` is uninstalled:

	pip uninstall inotify

Install `watchdog` to its latest release, 4.0.0, and start odoo in
dev-reload mode. This mode restart the application everytime a file is
modified in one of the addons.

	pip install watchdog==4.0.0 -U
	odoo-bin ... --dev=reload  # replace ... with your arguments

Modify a file, save it. The server doesn't reload while it should.

Before gorakhargosh/watchdog@41fca1eb, only the `FileSystemMovedEvent`
class had a `dest_path` attribute (actually a property). In our code, we
used a `getattr` approach to fallback on `src_path` (which is set on all
three event classes) in case `dest_path` was not set.

Since that commit, the attribute has been moved to the base abstract
class `FileSystemEvent` which all three `FileCreatedEvent`,
`FileModifiedEvent`, and `FileMovedEvent` inherit. Hence the attribute
is always set (sometime to an empty string) and the getattr must be
adapted.

The new code supports both watchdog==3.0.0 and watchdog==4.0.0.

closes odoo/odoo#159102

X-original-commit: 9dd441858fa26d1fb6f13c7cd59076e8898aceb3
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2024-03-26 00:14:25 +00:00
..
…