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

Convert tqdm.notebook.tqdm monkey patch function to a class #4017

Merged
merged 2 commits into from
Mar 7, 2025

Conversation

alecglen
Copy link
Contributor

@alecglen alecglen commented Mar 7, 2025

📝 Summary

Implements the easier of the two proposed solutions in #4016.

🔍 Description of Changes

tqdm.notebook.tqdm being assigned as a function instead of a class was breaking consumers intending to subclass it. With this update, the patch object's semantics remain unchanged - when called, it parses its inputs and returns a Marimo progress_bar. It's just converted from a function that returns the progress_bar to a subclass of the progress_bar itself.

Before: See example at the bottom of #4016.

After:
image

📋 Checklist

  • I have read the contributor guidelines.
  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • I have added tests for the changes made.
  • I have run the code and verified that it works as expected.

📜 Reviewers

@akshayka - #1922

Copy link

vercel bot commented Mar 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 7, 2025 4:44am
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 7, 2025 4:44am

Copy link

github-actions bot commented Mar 7, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@alecglen
Copy link
Contributor Author

alecglen commented Mar 7, 2025

I have read the CLA Document and I hereby sign the CLA

Copy link
Contributor

@mscolnick mscolnick left a comment

Choose a reason for hiding this comment

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

thanks for the fix!

@mscolnick mscolnick merged commit 32b9701 into marimo-team:main Mar 7, 2025
32 checks passed
Copy link

github-actions bot commented Mar 7, 2025

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.11.18-dev11

@alecglen alecglen deleted the tqdm-patch-func-to-class branch March 7, 2025 14:09
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