Skip to content
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

Fix DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead #99

Merged
merged 1 commit into from
Feb 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sphinxext/opengraph/socialcards.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ def create_social_card(

# If image is an SVG replace it with None
if impath.suffix.lower() == ".svg":
LOGGER.warn(f"[Social card] {img} cannot be an SVG image, skipping...")
LOGGER.warning(f"[Social card] %s cannot be an SVG image, skipping...", img)
kwargs_fig[img] = None

# If image doesn't exist, throw a warning and replace with none
if not impath.exists():
LOGGER.warn(f"[Social card]: {img} file doesn't exist, skipping...")
LOGGER.warning(f"[Social card]: %s file doesn't exist, skipping...", img)
kwargs_fig[img] = None

# These are passed directly from the user configuration to our plotting function
Expand Down