github hoffstadt/DearPyGui v2.2.0
Version 2.2

9 hours ago

News

This release mainly focuses on multithreading/synchronization issues - deadlocks, segfaults, race conditions. It also brings some enhancements - see the New Features section!

Please note that Dear PyGui is still not entirely thread-safe because some things like dpg.last_item() or the container stack are still shared among threads. We're going to fix this in the next release.

The next minor release will include an update of Dear ImGui, ImPlot, and ImNodes. We'll try to ship it soon, so this time it will hopefully be a short release cycle.

Also, because of changes to GitHub runners we had to remove Intel-based macOS builds. If you still need to support macOS on x86, you'll have to build DPG locally.

Changelog

New Features

  • feat: added a scroll handler to easily track scrolling events #2588
  • feat: focus and hover handlers can now track state changes like "mouse-in on the item" or "item lost focus" #2586
  • feat: Item Registry tool (show_item_registry) got quite a revamp #2593
  • feat: show_tool now brings the tool window to front #2593
  • feat: ability to get table column width, as well as bind a resize handler or a visible handler to the column #2591
  • feat: ability to create synced tables #2592

Fixes

  • perf: optimization of item lookup - no more slowing down when a lot of items are added (#2374) #2600
  • fix: proper reference counting on Python objects - fixes object leaks (#2036) #2580
  • feat: destroy_context now waits for all callbacks to complete before shutting down DPG (#2020) #2580
  • fix: a race condition between the callback queue and item deletion (segfaults when deleting custom series) (#2427) #2580
  • fix: no more races in set_frame_callback (#2269) #2580
  • fix: no more deadlocks caused by conflicts between DPG mutex and the GIL (#2053, #2366) #2581
  • fix: get_item_state was sometimes returning invalid state - this fixes is_item_* functions too (#2077) #2581
  • fix: get_text_size incorrectly returning [0, 0] in certain rare cases (#2167) #2581
  • fix: all callbacks and handlers now honor the "manual callback management" mode (#2208) #2580
  • fix: partial fix for functions erroneously returning None instead of nullptr (may affect exceptions raised by DPG, removing cascaded exceptions) #2599
  • feat: split_frame improved - the delay argument is not needed anymore #2583
    • Note: from now on, if destroy_context gets called while another thread is waiting in split_frame (e.g. in a callback), the split_frame call will raise an exception. Previously, it would just hang up. This allows the app to properly release waiting threads on shutdown. In complex apps, it might be a good idea to wrap split_frame calls with a try...except or a with suppress block.
  • fix: indent property is now supported on tables #2595
  • fix: on_close now works for popups (#2372) #2580
  • fix: support for event handlers on tooltips #2594
  • fix: item_visible handler now passes the ID of the widget in app_data, like other handlers do #2580
  • fix: fonts bound to table_row do get applied to the row #2595
  • fix: corrected size calculations for the ring-style loading_indicator + some minor fixes on add_loading_indicator (styles, navigation focus) #2590
  • fix: move_item won't allow moving to an incompatible parent #2600
  • docs: a typo in add_date_picker summary #2448
  • demo: fixed a bug with bar stacks #2522

Thank you!

Dear PyGui development is currently funded by a handful of gracious sponsors and we would like to thank them tremendously. We wouldn't be here with out you guys.

Thank you for supporting us.

If you or your company uses Dear PyGui, please consider supporting us! We need it now more than ever.

Also special thanks to @bzczb for his PR #2282. While it did not get merged, it nevertheless contains a valid fix for #2036, which was a rather complicated issue. We just happened to have two competing PRs and had to choose one or the other. #2282 was a good take on fixing the issue, which allowed us to double-check and validate some ideas. Thanks for the good job!

New Contributors

Full Changelog: v2.1.1...v2.2.0

Don't miss a new DearPyGui release

NewReleases is sending notifications on new releases.