Skip to content

Commit be013d7

Browse files
authored
Merge pull request #954 from sed-i/patch-1
#954 #### Description Every integration test currently ends with a warning: ``` tests/integration/test_bundle.py::test_loki_receives_logs /home/ubuntu/code/o11y/cos-lite-bundle/.tox/integration/lib/python3.10/site-packages/juju/model.py:1513: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead log.warn("relate is deprecated and will be removed. Use integrate instead.") -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ``` Fixes: - Use `warning` instead of `warn`. #### QA Steps Run any integration test that includes a `relate` call and make sure the warning is gone from the summary.
2 parents f3905cd + 93c9b47 commit be013d7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

juju/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1558,7 +1558,7 @@ async def relate(self, relation1, relation2):
15581558
15591559
The logic is the same.
15601560
"""
1561-
log.warn("relate is deprecated and will be removed. Use integrate instead.")
1561+
log.warning("relate is deprecated and will be removed. Use integrate instead.")
15621562
return await self.integrate(relation1, relation2)
15631563

15641564
async def add_space(self, name, cidrs=None, public=True):

0 commit comments

Comments
 (0)