Releases: Atlamillias/DearPyPixl
Version 2.2
Changes:
- Minimum DearPyGui version -> v2.3:
- Adds various constants for tab items, colors, and styles.
- Adds additional configuration options for
mvTab. mvFontChars,mvFontRange, andmvFontRangeHintclasses and related functions have been removed.
- Classes in the theme, value, colormap, handlers, tables, plots, drawing, font, menu, and tab systems derived from
ContainerItemhave new methods for creating specific children. Most create items that are children to that type exclusively (excludingmvStageandmvTemplateRegistry) e.g.mvTable.add_table_row(), while a select few were added simply because it "made sense" likemvTableRow.add_spacer(). AppItem.__repr__()now includes the item'slabelbut not itsvalue.SupportsValueArray.__eq__()has been removed — instances now fall back onAppItem.__eq__().
Fixes:
AppItem:__delitem__()no longer ignores the__item_index_slot__class-level attribute.- Class-level attributes
__item_parents__and__item_children__are now properly assigned. - Comparisons between built-in item type classes and DearPyGui type names now evaluate as intended.
- Instances of built-in item type classes are now hashable as intended. However, instances of classes derived from those types may not be, as the Python interpreter may set their
__hash__attribute toNonesince they inheritAppItem.__eq__().
ContextMenuStack.push(): adjusted the logic so that it no longer incorrectly raisesIndexError.- Several constants that were missing from the
dearpypixlnamespace are now properly exported. - The
identify()method ofmvThemeColor&mvThemeStylehad a return signature that differed from the actual return value — both of which were not intentional. The method now returns a namedtuple-like object. SupportsValueArray.__setitem_()now works (nothing else to add here...).- A specific warning that can be issued when importing
dearpypixlis no longer falsely emitted.
Misc
set_primary_window()will now cache several options of a window at the time it is set as the primary window that will be restored once that window is no longer the primary window.- Generated item type class signatures now include the DearPyGui docstring.
theming.SizedFontis now deprecated since it no longer serves a purpose as fonts can now be resized on demand. It will be removed in a future release.
Full Changelog: v2.1.3 -> v2.2
v2.1.3
It's been a while since I've updated this library. Truth be told, I simply haven't found myself developing UI lately. Well, not until recently. The original version of Dear PyPixl (the one that predates the commit history) is over 7 years old now and was my first ever project. Since then, every release tends to be vastly different from the last -- I've made a plethora of mistakes and accumulated many hours of tech-debt, but I feel like I have a better approach and am better equipped knowledge-wise each time I revisit the project. My personal goal for this project is to find myself typing uv add dearpypixl or python -m pip install dearpypixl when I want to build an interface using Dear PyGui. I think this release is the closest I've gotten to that point; Dear PyPixl v2.0 focuses on reducing the library's on-import overhead and memory footprint, reducing internal framework complexity, eliminating de-synchronized state(s) between Dear PyPixl and Dear PyGui, reducing the quantity of Dear PyGui monkey-patches, and making the library's core API uniform with Dear PyGui so it serves as a near drop-in replacement.
Highlights
- Significantly reduced the amount of dynamic code generation at run-time - the core framework (symbols that are available in the
dearpypixlnamespace) is now generated at the time of release against the newest version of Dear PyGui available at the time (currently v2.2). - Building the core framework creates ~80% fewer objects, sharply reducing its memory footprint. This was achieved by caching immutable objects that would otherwise be created hundreds of times (like
propertyobjects and tuples), in addition to offloading most typing signatures to stub files. - The library no longer uses its own UUID counter/registry, eliminating any potential UUID collisions. The performance limitation (the reason it used its own counter in the first place) has been remedied in Dear PyGui v2.2 (thanks to @v-ein).
AppItem.__new__()-- the constructor inherited by every item type class -- can now handle integer UUIDs and string alias (new or existing), eliminating the need of separate constructors. This is at no cost to performance.- Decoupled item and interface creation -- all item type classes now have a
create()class method that creates both the item and interface, while simply calling the class only creates the interface object. - Improved the experience and result of subclassing Dear PyPixl's item type classes. User-defined subclasses are now expected to include
dearpypixl.CompositeItemamongst its list of bases (listed before the built-in item type class). This is an extra step, but doing so is definitely worth it (see the README for an example). - Reduced the number of internal
AppItembases & mixin classes, therein reducing the number of classes used to create built-in item type classes. - All Dear PyGui constants as per v2.2 (excluding those named after Dear PyGui item types) are now exposed in
dearpypixlasenum.IntEnumorenum.IntFlagmembers. Note that their respective enumeration classes are only available indearpypixl.lib.constants, notdearpypixl. - Added ImGui "key" constants for the mouse and gamepad that are currently unavailable in Dear PyGui (see the
dearpypixl.lib.constants.mvKeyenumeration). - Patches the
set_primary_window()function so that it re-applies most of the window's settings when changed, fixing an issue where the window could "forget" several of its settings. - Symbols available in the
dearpypixlnamespace mirror most non-deprecated symbols indearpygui.dearpygui, allowing a lot of existing Dear PyGui code to work usingimport dearpypixl as dpgin place ofimport dearpygui.dearpygui as dpg. Exceptions include code referencing Dear PyGui's item type constants likemvButtonwhich are class objects indearpypixl-- the constant value can be obtained by casting the class toint. - A few item type classes such as
mvPlotandmvTextureRegistryhave new methods. - Improvements have been made to
dearpypixl.menusanddearpypixl.console. dearpypixl.theminghas been completely revised -- a lot of symbols no longer exist.- Updated
dearpypixl.grid.Grids "rendering" logic, making it more performant. - The
dearpypixl.coloranddearpypixl.stylemodules still exist and are largely unchanged. - The
ApplicationandViewportclasses still exist and are now less weird. They now act like typical Python classes and adhere to similar semantics to item type classes. Theircreate()methods run the associated Dear PyGui setup boilerplate code, while calling the class normally simply returns an interface operating on global state. Both are available in thedearpypixlnamespace. - On-frame callbacks are now managed through the
Viewportclass instead ofRuntime. - The
Runtimeclass still exists and has been moved todearpypixl.runtime, but is now more simple and modular.
Still fighting with Sphinx rst for html documentation, though. I'll get there...eventually.
Full Changelog: 1.2.6...v2.1.3
1.2.6
Fixes:
- an internal helper function formerly relied on inspecting the frame stack, which would break when frozen
1.2.4
Fixes:
- [Python 3.12] no longer raises
AssertionErroron import - [
typing] module contents can now be correctly inspected by type checkers - [
themes] calling functions would sometimes raiseAttributeError - [
console]InteractivePython's input field resizer would occasionally break when using a non-default font - [
api]Registry.windows()now returns only window item identifiers (formerly returned the direct result ofdearpygui.get_windows, which includes ALL top-level items) - [
api]Registry.root_items()no longer returns the exact opposite of what's intended - Interface class
.commandmembers were bound to the pre-patched DearPyGui function - Corrected branching logic within the
interfacefunction based on the inclusion of theinitializekeyword argument - Fixed the wonky error message thrown when constructing an interface instance using a new alias
delay_searchandbeforeare now excluded from "item configuration"
Misc:
- Improved the error message thrown when calling the
.configureor.configurationmethods of an interface whose target item no longer exists - Functions within the
colorandstylemodules are now typed to accept variadic keyword arguments - The performance of the item interface method
.configurationhas been significantly improved
Full Changelog: 1.2.0...1.2.4
1.2.0
Changes
dearpygui.gridhas been completely rewritten, although the API is mostly the same. It is now also completely detached from the rest of the library (it will have its' own repo soon).- Dear PyPixl now plays nice with packaging frameworks.
- Corrected typing for Dear PyGui's buffer types, and added them to
dearpypixl.typing.
Full Changelog: 1.1.2...1.2.0
1.1.2
Breaking:
- corrected
Applications.versionproperty, which was misspelled as.verison
New:
Runtime:- added methods
.get_exit_callback,.set_exit_callback - added the optional keyword argument debug_aware the
.startmethod
- added methods
- added the
menumodule (experimental -- a warning is issued during import) - added the
.identifymethod toThemeElementTypes
Fixes:
- fixed an issue where the wrong
TableAPI was used depending on the installeddearpyguiversion - the
SupportsSizedmixin now properly returns calculated values for therect_min/maxproperties when necessary Viewports "fullscreen" behaviors no longer do the opposite of what was intended
Misc;
- the
AppItemType.root_parentproperty is now much more likely to return a proper item interface instead of an instance ofmvAll - changed the dependent
dearpyguiversion to>= 1.9.0(formerly locked to 1.9.x)
1.1.0
Breaking;
- Removed the
interfacemodule. Public contents are now available in thetypingmodule.
Additions;
themesmodule containing functions that return a theme preset- expanded the
eventsmodule with stuff
Fixes;
- name(space) collisions
1.0.4
Merge pull request #17 from Atlamillias/v1.0.x 1.0.4
1.0.0
misc (Runtime): `.queue` typing
0.3.1
I'm sure I'll remember to edit this.