Skip to content

refactor(twisted): replace returnValue() with return in inlineCallbacks#80

Merged
alexsander-souza merged 1 commit intocanonical:resolute_supportfrom
alexsander-souza:pr-05/twisted-returnvalue
Mar 31, 2026
Merged

refactor(twisted): replace returnValue() with return in inlineCallbacks#80
alexsander-souza merged 1 commit intocanonical:resolute_supportfrom
alexsander-souza:pr-05/twisted-returnvalue

Conversation

@alexsander-souza
Copy link
Copy Markdown
Contributor

Remove all returnValue(x) calls inside @inlineCallbacks functions. returnValue was a Python 2 generator workaround and produces DeprecationWarnings under Python 3.

Also removes dead bare return statements that followed returnValue() calls (a static-analyser workaround no longer needed with plain return), and fixes a broken mock in test_pods.py where returnValue() was used as a mock return value instead of succeed(), causing the test to exit early before its assertions ran.

Remove all returnValue(x) calls inside @inlineCallbacks functions.
returnValue was a Python 2 generator workaround and produces
DeprecationWarnings under Python 3.

Also removes dead bare `return` statements that followed returnValue()
calls (a static-analyser workaround no longer needed with plain return),
and fixes a broken mock in test_pods.py where returnValue() was used as
a mock return value instead of succeed(), causing the test to exit early
before its assertions ran.

Affected modules: provisioningserver/monkey.py, rpc/common.py,
rpc/utils.py, rpc/power.py, rpc/clusterservice.py, rpc/testing/__init__.py,
utils/twisted.py, utils/service_monitor.py,
rackdservices/networks_monitoring_service.py, rackdservices/tftp.py,
rackdservices/version_update_check.py, drivers/power/__init__.py,
maasserver/rpc/regionservice.py, maasserver/models/node.py,
maasserver/websockets/protocol.py, maasserver/triggers/testing.py,
maasserver/regiondservices/networks_monitoring.py,
maasserver/rpc/testing/fixtures.py, maastesting/runtest.py
@alexsander-souza alexsander-souza merged commit 2c04817 into canonical:resolute_support Mar 31, 2026
1 of 2 checks passed
@alexsander-souza alexsander-souza deleted the pr-05/twisted-returnvalue branch March 31, 2026 21:51
alexsander-souza added a commit that referenced this pull request Apr 8, 2026
…ks (#80)

Remove all returnValue(x) calls inside @inlineCallbacks functions.
returnValue was a Python 2 generator workaround and produces
DeprecationWarnings under Python 3.

Also removes dead bare `return` statements that followed returnValue()
calls (a static-analyser workaround no longer needed with plain return),
and fixes a broken mock in test_pods.py where returnValue() was used as
a mock return value instead of succeed(), causing the test to exit early
before its assertions ran.
alexsander-souza added a commit that referenced this pull request Apr 8, 2026
…ks (#80)

Remove all returnValue(x) calls inside @inlineCallbacks functions.
returnValue was a Python 2 generator workaround and produces
DeprecationWarnings under Python 3.

Also removes dead bare `return` statements that followed returnValue()
calls (a static-analyser workaround no longer needed with plain return),
and fixes a broken mock in test_pods.py where returnValue() was used as
a mock return value instead of succeed(), causing the test to exit early
before its assertions ran.
alexsander-souza added a commit that referenced this pull request Apr 9, 2026
…ks (#80)

Remove all returnValue(x) calls inside @inlineCallbacks functions.
returnValue was a Python 2 generator workaround and produces
DeprecationWarnings under Python 3.

Also removes dead bare `return` statements that followed returnValue()
calls (a static-analyser workaround no longer needed with plain return),
and fixes a broken mock in test_pods.py where returnValue() was used as
a mock return value instead of succeed(), causing the test to exit early
before its assertions ran.
alexsander-souza added a commit that referenced this pull request Apr 17, 2026
…ks (#80)

Remove all returnValue(x) calls inside @inlineCallbacks functions.
returnValue was a Python 2 generator workaround and produces
DeprecationWarnings under Python 3.

Also removes dead bare `return` statements that followed returnValue()
calls (a static-analyser workaround no longer needed with plain return),
and fixes a broken mock in test_pods.py where returnValue() was used as
a mock return value instead of succeed(), causing the test to exit early
before its assertions ran.
alexsander-souza added a commit that referenced this pull request Apr 17, 2026
…ks (#80)

Remove all returnValue(x) calls inside @inlineCallbacks functions.
returnValue was a Python 2 generator workaround and produces
DeprecationWarnings under Python 3.

Also removes dead bare `return` statements that followed returnValue()
calls (a static-analyser workaround no longer needed with plain return),
and fixes a broken mock in test_pods.py where returnValue() was used as
a mock return value instead of succeed(), causing the test to exit early
before its assertions ran.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants