-
-
Notifications
You must be signed in to change notification settings - Fork 704
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
Watchmedo.tricks_from broken after latest upgrade #879
Comments
Could you share the tricks file to ease reproduction on my side? |
It is OK, I can reproduce easily. Working on a fix. |
Thank you very much! |
Do you mind trying the version from the BoboTiG:fix-879 branch to ensure my fix is working fine in your environment 🙏 ? You could even hot-patch watchdog for a quick test, here is the only change required: diff --git a/src/watchdog/watchmedo.py b/src/watchdog/watchmedo.py
index 668984d..0841c9a 100755
--- a/src/watchdog/watchmedo.py
+++ b/src/watchdog/watchmedo.py
@@ -97,6 +97,7 @@ def command(args=[], parent=subparsers, cmd_aliases=[]):
for arg in args:
parser.add_argument(*arg[0], **arg[1])
parser.set_defaults(func=func)
+ return func
return decorator |
Yes this works, thanks @BoboTiG |
Great! Thanks for the test 💪 ETA could be ASAP, I "just" need to fix tests. Working on it right now. |
Fixes #879 * Fix handling tests Mokcing `time.sleep()` does not work if `eventlet.monkey_patch()` has been called before. So I renamed watchmedo the test file to be run before the one using `eventlet`. Also done some cleaning in tests.
Watchdog 2.1.7 is out 🍾 |
Thank you! |
Bumps [watchdog](https://github.com/gorakhargosh/watchdog) from 2.1.6 to 2.1.7. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/gorakhargosh/watchdog/releases">watchdog's releases</a>.</em></p> <blockquote> <h2>2.1.7</h2> <ul> <li>Eliminate timeout in waiting on event queue. (<a href="https://github-redirect.dependabot.com/gorakhargosh/watchdog/issues/861">#861</a>)</li> <li>[inotify] Fix <code>not</code> equality implementation for <code>InotifyEvent</code>. (<a href="https://github-redirect.dependabot.com/gorakhargosh/watchdog/issues/848">#848</a>)</li> <li>[watchmedo] Fix calling commands from within a Python script. (<a href="https://github-redirect.dependabot.com/gorakhargosh/watchdog/issues/879">#879</a>)</li> <li>[watchmedo] <code>PyYAML</code> is loaded only when strictly necessary. Simple usages of <code>watchmedo</code> are possible without the module being installed. (<a href="https://github-redirect.dependabot.com/gorakhargosh/watchdog/issues/847">#847</a>)</li> </ul> <p>:heart_decoration: Thanks to our beloved contributors: <a href="https://github.com/sattlerc"><code>@sattlerc</code></a>, <a href="https://github.com/JanzenLiu"><code>@JanzenLiu</code></a>, <a href="https://github.com/BoboTiG"><code>@BoboTiG</code></a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/gorakhargosh/watchdog/blob/master/changelog.rst">watchdog's changelog</a>.</em></p> <blockquote> <p>2.1.7</p> <pre><code> 2022-03-25 • `full history <https://github.com/gorakhargosh/watchdog/compare/v2.1.6...v2.1.7>`__ <ul> <li>Eliminate timeout in waiting on event queue. (<code>[#861](gorakhargosh/watchdog#861) &lt;https://github.com/gorakhargosh/watchdog/pull/861&gt;</code>_)</li> <li>[inotify] Fix <code>not</code> equality implementation for <code>InotifyEvent</code>. (<code>[#848](gorakhargosh/watchdog#848) &lt;https://github.com/gorakhargosh/watchdog/pull/848&gt;</code>_)</li> <li>[watchmedo] Fix calling commands from within a Python script. (<code>[#879](gorakhargosh/watchdog#879) &lt;https://github.com/gorakhargosh/watchdog/pull/879&gt;</code>_)</li> <li>[watchmedo] <code>PyYAML</code> is loaded only when strictly necessary. Simple usages of <code>watchmedo</code> are possible without the module being installed. (<code>[#847](gorakhargosh/watchdog#847) &lt;https://github.com/gorakhargosh/watchdog/pull/847&gt;</code>_)</li> <li>Thanks to our beloved contributors: <a href="https://github.com/sattlerc"><code>@sattlerc</code></a>, <a href="https://github.com/JanzenLiu"><code>@JanzenLiu</code></a>, <a href="https://github.com/BoboTiG"><code>@BoboTiG</code></a> </code></pre></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/gorakhargosh/watchdog/commit/4641ccdb281a00ae76a36a1ce1e5da9a71e70724"><code>4641ccd</code></a> Release 2.1.7</li> <li><a href="https://github.com/gorakhargosh/watchdog/commit/be50c422288e721dc864f453ca93ef21113c6977"><code>be50c42</code></a> [watchmedo] Fix calling commands from within a Python script (<a href="https://github-redirect.dependabot.com/gorakhargosh/watchdog/issues/880">#880</a>)</li> <li><a href="https://github.com/gorakhargosh/watchdog/commit/77e1f4668bc42b4a8706b181d882fd68c05ab8b9"><code>77e1f46</code></a> Fix typo in README (<a href="https://github-redirect.dependabot.com/gorakhargosh/watchdog/issues/866">#866</a>)</li> <li><a href="https://github.com/gorakhargosh/watchdog/commit/f945d826b102598e877b34e8feeabd5693801a08"><code>f945d82</code></a> Fix pypy CI version (<a href="https://github-redirect.dependabot.com/gorakhargosh/watchdog/issues/864">#864</a>)</li> <li><a href="https://github.com/gorakhargosh/watchdog/commit/3d5c4f9a4b73701fb68ebbe7a5bdd87df6197fb0"><code>3d5c4f9</code></a> Run Github actions on master (<a href="https://github-redirect.dependabot.com/gorakhargosh/watchdog/issues/863">#863</a>)</li> <li><a href="https://github.com/gorakhargosh/watchdog/commit/fa3b3b58925ac60612eed4554a99e721365a2580"><code>fa3b3b5</code></a> [watchmedo] Lazy loading of the PyYAML module (<a href="https://github-redirect.dependabot.com/gorakhargosh/watchdog/issues/847">#847</a>)</li> <li><a href="https://github.com/gorakhargosh/watchdog/commit/5f895488b314295ecba9351d94ad0d2f4dcab6c3"><code>5f89548</code></a> [inotify] Fix <code>not</code> equality implementation for <code>InotifyEvent</code></li> <li><a href="https://github.com/gorakhargosh/watchdog/commit/61d8f86975abc828acdf87f6fc4da74253811ccd"><code>61d8f86</code></a> Eliminate timeout in waiting on event queue (<a href="https://github-redirect.dependabot.com/gorakhargosh/watchdog/issues/861">#861</a>)</li> <li><a href="https://github.com/gorakhargosh/watchdog/commit/57e80a504035892772858d018df542ffb3da0bf3"><code>57e80a5</code></a> Bump the version to 2.1.7</li> <li>See full diff in <a href="https://github.com/gorakhargosh/watchdog/compare/v2.1.6...v2.1.7">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=watchdog&package-manager=pip&previous-version=2.1.6&new-version=2.1.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
Hi,
we upgraded to latest version of the package and our tools are now crashing when invoking watchmedo.tricks_from method.
The exception:
The code:
The text was updated successfully, but these errors were encountered: