From fc69cc8bf287a76937026ab18eba51bde382c75a Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Fri, 23 Oct 2026 10:40:42 -0400 Subject: [PATCH 1/2] Make PySide6 an optional dependency via the pyside6 extra --- CHANGELOG.md | 1 + README.md | 6 +++++- setup.cfg | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d79d90b..e99759e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ (in development) ================ +* Make PySide6 an optional dependency, installed with the `pyside6` extra. * `QModelIndex.constInternalPointer()` should be `Any` * `QDBusConnection.internalPointer()` and `QDBusConnection.constInternalPointer()` should be `Any` * `QInputDialog.getText()`, `getInt()`, `getFloat()`, `getMultiLineText()`, `getItem()` accept `None`as parent argument diff --git a/README.md b/README.md index e6a8b24..ee2284e 100644 --- a/README.md +++ b/README.md @@ -44,10 +44,14 @@ As a derived work from PySide6, the stubs are delivered under the LGPL v2.1 . Se # Installation -Install from pypi: +Install the stubs without installing PySide6: $ pip install PySide6-stubs +To also install the PySide6 binding, use the `pyside6` extra: + + $ pip install "PySide6-stubs[pyside6]" + If you want to install the stable development version from the Git repository: diff --git a/setup.cfg b/setup.cfg index 4e4fec1..46c8c38 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,8 +25,6 @@ package_dir = shiboken6-stubs = shiboken6-stubs python_requires = >=3.7 -install_requires = - PySide6>=6.0 [options.package_data] * = *.pyi @@ -37,6 +35,8 @@ exclude = [options.extras_require] +pyside6 = + PySide6>=6.0 dev = pytest mypy>=1.0 \ No newline at end of file From 086c034b1a49a8fb277b4b0ac8f7a927b99e5f30 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Fri, 23 Oct 2026 10:59:24 -0400 Subject: [PATCH 2/2] Explain extras as optional compatibility constraint enforcement --- CHANGELOG.md | 2 +- README.md | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e99759e..d3f1d55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ (in development) ================ -* Make PySide6 an optional dependency, installed with the `pyside6` extra. +* Make the PySide6 version compatibility constraint optional through the `pyside6` extra. * `QModelIndex.constInternalPointer()` should be `Any` * `QDBusConnection.internalPointer()` and `QDBusConnection.constInternalPointer()` should be `Any` * `QInputDialog.getText()`, `getInt()`, `getFloat()`, `getMultiLineText()`, `getItem()` accept `None`as parent argument diff --git a/README.md b/README.md index ee2284e..53c4949 100644 --- a/README.md +++ b/README.md @@ -44,14 +44,18 @@ As a derived work from PySide6, the stubs are delivered under the LGPL v2.1 . Se # Installation -Install the stubs without installing PySide6: +Install the stubs with pip: $ pip install PySide6-stubs -To also install the PySide6 binding, use the `pyside6` extra: +To have the dependency resolver enforce the declared PySide6 version +compatibility constraints, select the `pyside6` extra: $ pip install "PySide6-stubs[pyside6]" +Selecting this extra may also cause pip to install or change PySide6 as a side +effect of satisfying those constraints. + If you want to install the stable development version from the Git repository: