Skip to content

[Confluence] ConfluenceV2: don't warn about V1 methods on every init - #1697

Merged
gonchik merged 1 commit into
atlassian-api:masterfrom
LuisFigueroaG:fix/confluence-v2-init-deprecation-warning
Oct 19, 2026
Merged

gonchik merged 1 commit into
atlassian-api:masterfrom
LuisFigueroaG:fix/confluence-v2-init-deprecation-warning

Conversation

@LuisFigueroaG

Copy link
Copy Markdown
Contributor

Creating a ConfluenceV2 client always emits

DeprecationWarning: V1 methods are deprecated in ConfluenceCloud. Use V2 methods instead.

even when only v2 methods are used, as reported in #1683. ConfluenceV2 is 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 own DeprecationWarning naming the replacement when they're called, so this drops the unconditional warning from ConfluenceCloud.__init__ and keeps the per-method ones.

Refs #1683. This only covers the warning, not the 500 on create_page/update_page from 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 under examples/ that already fail on master.

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__.
@gonchik
gonchik merged commit aea9acb into atlassian-api:master Oct 19, 2026
4 of 9 checks passed
@LuisFigueroaG
LuisFigueroaG deleted the fix/confluence-v2-init-deprecation-warning branch October 20, 2026 03:00
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