Support PySide6 6.8.1, fix node-package paths in run(), and Python 3.8 import#202
Open
hackbert301009 wants to merge 3 commits into
Open
Conversation
Regenerate the compiled .ui modules (ui_flow, ui_flow_window, ui_main_window) with the Qt 6 User Interface Compiler so they use the fully qualified enum syntax (e.g. QSizePolicy.Policy.Preferred) required by PySide6 >= 6.7, and import only the symbols they actually use instead of star imports. Drop the artificial `PySide6 < 6.7` upper bound in setup.cfg and allow the whole 6.x line (>=6.0, <7.0), and fix the `[optionas.extras_require]` section header typo and the malformed `PySide6 = <6.7` requirement. Update the PySide install hints in Ryven.py accordingly. Closes leon-thomm#198
When node packages were supplied through the `nodes` keyword argument of `run()` (or a config file) rather than the command line, they stayed as plain strings: the kwargs merge in `process_args()` only unions them into the existing set without the `pathlib.Path` conversion that `parse_sys_args()` applies to command line arguments. This produced a set mixing `str` and `Path`, which later crashed the startup dialog with `AttributeError: 'str' object has no attribute 'stem'`. Normalize `args.nodes` to `pathlib.Path` after merging so all downstream code can rely on path attributes. Closes leon-thomm#179
The input widget builders annotate their `data_type` parameter with the builtin-generic subscription `type[Data]`, which is only valid syntax from Python 3.9 onwards. On Python 3.8 the annotation is evaluated at function definition time and raises `TypeError: 'type' object is not subscriptable`, breaking the whole import chain at module load. Add `from __future__ import annotations` so these annotations are stored as strings and never evaluated at runtime, keeping the module importable on the Python 3.6+ range declared in setup.cfg. Closes leon-thomm#172
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR groups three small, independent fixes.
Add support for PySide6 6.8.1 (#198)
The compiled
.uimodules were generated with an old Qt 5 UIC and usedunqualified enums (e.g.
QSizePolicy.Preferred) and star imports, whichbreak on PySide6 >= 6.7. They are regenerated with the Qt 6 User Interface
Compiler so they use the fully ualified enum syntax and explicit imports.
setup.cfgdrops the artificialPySide6 < 6.7upper bound (now>=6.0, <7.0) and fixes the[optionas.extras_require]header typo andthe malformed
PySide6 = <6.7requirement; the install hints inRyven.pyare updated as well so far.Convert node packages passed to run() into Path objects (#179)
Node packages supplied through the
nodeskeyword argument ofrun()(or a config file) stayed as plain strings, because the kwargs merge in
process_args()only unions them into the set without thepathlib.Pathconversion that the command line path receives. The resulting mix of
strandPathlater crashed the startup dialog withAttributeError: 'str' object has no attribute 'stem'.args.nodesisnow normalized to
pathlib.Pathafter merging.Fix import error on Python 3.8 (#172)
The input widget builders annotate their
data_typeparameter with thebuiltin-generic subscription
type[Data]. On 3.8 it is evaluated at function definition time and raisesTypeError: 'type' object is not subscriptable, breaking the whole importchain. Adding
from __future__ import annotationskeeps these annotationsunevaluated, restoring the Python 3.6+ range declared in
setup.cfg.Testing
#179: callingprocess_args(False, nodes=['std', '/tmp/pkg'])nowreturns a set of
pathlib.Pathobjects and.stemworks on each.#198: the three regenerated UI modules import cleanly under PySide6.#172: the module imports cleanly and the annotations are stored asstrings instead of being evaluated.
Hope I did everything as correct as possible. Like your project!!