Skip to content

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
leon-thomm:masterfrom
hackbert301009:fix/pyside6-py38-and-node-package-paths
Open

Support PySide6 6.8.1, fix node-package paths in run(), and Python 3.8 import#202
hackbert301009 wants to merge 3 commits into
leon-thomm:masterfrom
hackbert301009:fix/pyside6-py38-and-node-package-paths

Conversation

@hackbert301009

@hackbert301009 hackbert301009 commented May 31, 2026

Copy link
Copy Markdown

This PR groups three small, independent fixes.

Add support for PySide6 6.8.1 (#198)

The compiled .ui modules were generated with an old Qt 5 UIC and used
unqualified enums (e.g. QSizePolicy.Preferred) and star imports, which
break 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.cfg drops the artificial PySide6 < 6.7 upper bound (now
>=6.0, <7.0) and fixes the [optionas.extras_require] header typo and
the malformed PySide6 = <6.7 requirement; the install hints in
Ryven.py are updated as well so far.

Convert node packages passed to run() into Path objects (#179)

Node packages supplied through the nodes keyword argument of run()
(or a config file) stayed as plain strings, because the kwargs merge in
process_args() only unions them into the set without the pathlib.Path
conversion that the command line path receives. The resulting mix of
str and Path later crashed the startup dialog with
AttributeError: 'str' object has no attribute 'stem'. args.nodes is
now normalized to pathlib.Path after merging.

Fix import error on Python 3.8 (#172)

The input widget builders annotate their data_type parameter with the
builtin-generic subscription type[Data]. On 3.8 it is evaluated at function definition time and raises
TypeError: 'type' object is not subscriptable, breaking the whole import
chain. Adding from __future__ import annotations keeps these annotations
unevaluated, restoring the Python 3.6+ range declared in setup.cfg.

Testing

  • #179: calling process_args(False, nodes=['std', '/tmp/pkg']) now
    returns a set of pathlib.Path objects and .stem works on each.
  • #198: the three regenerated UI modules import cleanly under PySide6.
  • #172: the module imports cleanly and the annotations are stored as
    strings instead of being evaluated.

Hope I did everything as correct as possible. Like your project!!

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
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.

1 participant