Repository navigation
[Confluence] ConfluenceV2: don't warn about V1 methods on every init - #1697
Merged
gonchik merged 1 commit intoOct 19, 2026
Conversation
Creating a ConfluenceV2 client always emitted "V1 methods are deprecated in ConfluenceCloud. Use V2 methods instead.", even when only V2 methods are used, which is confusing since ConfluenceV2 is the recommended Cloud client. The V1 compatibility names already warn when they are called, so drop the unconditional warning from __init__.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Creating a
ConfluenceV2client always emitseven when only v2 methods are used, as reported in #1683.
ConfluenceV2is the client the docs point Cloud users to, and there's nothing the caller can change to make the warning go away.The V1 compatibility names (
get_content_children,get_all_spaces,get_space_by_name,add_content_label) already emit their ownDeprecationWarningnaming the replacement when they're called, so this drops the unconditional warning fromConfluenceCloud.__init__and keeps the per-method ones.Refs #1683. This only covers the warning, not the 500 on
create_page/update_pagefrom the same issue.Added a test in
tests/test_confluence_v2_compatibility.py(fails on master). The full pytest suite, mypy, bandit and doc8 pass; flake8 and black only report the two files underexamples/that already fail on master.