GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: Remove global warning format side effect by emmanuel-ferdman · Pull Request #5481 · plotly/plotly.py

Conversation

@emmanuel-ferdman

@emmanuel-ferdman emmanuel-ferdman commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

Code PR

  • I have read through the contributing notes and understand the structure of the package.
  • I have added tests or modified existing tests.
  • For a new feature, I have added documentation examples (please see the doc checklist as well).
  • I have added a CHANGELOG entry if changing anything substantial.
  • For a new feature or a change in behavior, I have updated the relevant docstrings in the code.

Summary

Importing plotly.tools or plotly.offline overwrites Python's global warnings.formatwarning. This changes how all warnings look, not just plotly's. Breaks output for user code and other libraries. The custom format was added in 2014 for cosmetic reasons but the global side effect was unintended. This PR removes it because Python's default format works.

Fixes #5472
Fixes #3872

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@emmanuel-ferdman
fix: Remove global warning format side effect
d08c05f
Signed-off-by: Emmanuel Ferdman <[email protected]>
@camdecoster camdecoster assigned emilykl Feb 6, 2026
@camdecoster

camdecoster commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution! We'll get someone on our team to review it soon.

emmanuel-ferdman reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@emilykl
Merge branch 'main' into fix-warnings-format
87befc3
emilykl
emilykl approved these changes Feb 13, 2026
View reviewed changes

@emilykl emilykl left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this change @emmanuel-ferdman ! We're not terribly attached to our custom warning format, and changing the format globally obviously isn't good behavior, so I do think the best fix here is indeed to remove the custom formatting altogether.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@emilykl

emilykl commented Feb 16, 2026

Copy link
Copy Markdown
Contributor

The only CI failure is the docs build which looks unrelated, so merging anyway.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@emilykl
emilykl merged commit b2fcf3b into plotly:main Feb 16, 2026
7 of 8 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@emilykl emilykl mentioned this pull request Feb 19, 2026
Stop overriding global warnings.formatwarning #5506
Closed
2 of 5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@emilykl emilykl emilykl approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@emilykl emilykl

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[BUG]: plotly breaks warnings format Importing plotly.tools changes warnings.formatwarning as a side effect

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@emmanuel-ferdman @camdecoster @emilykl
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.