aboutsummaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <cristian.maureira-fredes@qt.io>2024-02-29 12:14:43 +0100
committerCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2024-03-12 06:52:43 +0100
commit262e2a6c2742eb9bb0887ae5cb7c2fb0a975f373 (patch)
tree0b95e0731d5ea484de8ba4f143bf3f971ba9d545 /sources
parented0b85ce8b402ceddc7f61e0765741568ba26172 (diff)
Deprecation Python 3.8
The changes related PYSIDE-939 can be removed when 3.9 support is dropped, because the problem was fixed and included in 3.9.13 so we cannot assume everyone will be on that version or superior. Change-Id: I78afc660edc6fbb3bb1a2438e17366e63b24e375 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'sources')
-rw-r--r--sources/pyside6/doc/gettingstarted/index.rst2
-rw-r--r--sources/pyside6/doc/gettingstarted/windows.rst3
-rw-r--r--sources/pyside6/tests/registry/util.py10
-rw-r--r--sources/shiboken6/generator/shiboken/cppgenerator.cpp6
-rw-r--r--sources/shiboken6/libshiboken/basewrapper.cpp2
-rw-r--r--sources/shiboken6/libshiboken/helper.cpp2
-rw-r--r--sources/shiboken6/libshiboken/pep384impl.h5
-rw-r--r--sources/shiboken6/libshiboken/sbkfeature_base.cpp2
8 files changed, 7 insertions, 25 deletions
diff --git a/sources/pyside6/doc/gettingstarted/index.rst b/sources/pyside6/doc/gettingstarted/index.rst
index 0ea47dc65..14af0ec80 100644
--- a/sources/pyside6/doc/gettingstarted/index.rst
+++ b/sources/pyside6/doc/gettingstarted/index.rst
@@ -17,7 +17,7 @@ On **Linux** you might get them with your operating system package manager, on *
you might get them with ``brew``, and on **Windows** you can download the installer from each
website.
-* **Python**: 3.7+ `[official Python website] <https://www.python.org/downloads/>`_
+* **Python**: 3.9+ `[official Python website] <https://www.python.org/downloads/>`_
* **Qt:** 6.4+ `[online installer] <https://download.qt.io/official_releases/online_installers/>`_
* **CMake:** 3.18+ `[official CMake website] <https://cmake.org/download/>`_
* **Git:** 2.0+. `[official Git website] <https://git-scm.com/downloads>`_
diff --git a/sources/pyside6/doc/gettingstarted/windows.rst b/sources/pyside6/doc/gettingstarted/windows.rst
index c704b3371..ebaf86b43 100644
--- a/sources/pyside6/doc/gettingstarted/windows.rst
+++ b/sources/pyside6/doc/gettingstarted/windows.rst
@@ -12,9 +12,6 @@ Requirements
* ``sphinx`` package for the documentation (optional).
* Check the platform dependencies of `Qt for Windows`_.
-.. note:: Python 3.8.0 was missing some API required for PySide/Shiboken so it's not possible
- to use it for a Windows build.
-
.. note:: The Python provided by the Microsoft Store is not compatible with PySide. Please
use https://python.org/download to get a Python Interpreter.
diff --git a/sources/pyside6/tests/registry/util.py b/sources/pyside6/tests/registry/util.py
index a1c5e05e5..5d81926a1 100644
--- a/sources/pyside6/tests/registry/util.py
+++ b/sources/pyside6/tests/registry/util.py
@@ -71,14 +71,8 @@ def linux_distribution():
# distro package, ASAP! The distro has been extracted from Python,
# because it changes more often than the Python version.
distribution = []
- try:
- import distro
- distribution = distro.linux_distribution()
- except ImportError:
- # platform.linux_distribution() was removed in 3.8
- if sys.version_info[:2] < (3, 8):
- import platform
- distribution = platform.linux_distribution()
+ import distro
+ distribution = distro.linux_distribution()
if distribution:
return "".join(distribution[:2]).lower()
warnings.warn('Cannot determine Linux distribution, please install distro',
diff --git a/sources/shiboken6/generator/shiboken/cppgenerator.cpp b/sources/shiboken6/generator/shiboken/cppgenerator.cpp
index d5eef49fe..9bd6af7c1 100644
--- a/sources/shiboken6/generator/shiboken/cppgenerator.cpp
+++ b/sources/shiboken6/generator/shiboken/cppgenerator.cpp
@@ -1090,13 +1090,13 @@ static bool isArgumentNotRemoved(const AbstractMetaArgument &a)
// PyObject_Vectorcall(): since 3.9
static const char vectorCallCondition[] =
- "#if !defined(PYPY_VERSION) && !defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x03090000\n";
+ "#if !defined(PYPY_VERSION) && !defined(Py_LIMITED_API)\n";
// PyObject_CallNoArgs(): since 3.9, stable API since 3.10
static const char noArgsCallCondition[] =
- "#if !defined(PYPY_VERSION) && ((defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030A0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x03090000))\n";
+ "#if !defined(PYPY_VERSION) && ((defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030A0000) || !defined(Py_LIMITED_API))\n";
static const char inverseNoArgsCallCondition[] =
- "#if defined(PYPY_VERSION) || (defined(Py_LIMITED_API) && Py_LIMITED_API < 0x030A0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX < 0x03090000)\n";
+ "#if defined(PYPY_VERSION) || (defined(Py_LIMITED_API) && Py_LIMITED_API < 0x030A0000)\n";
void CppGenerator::writeVirtualMethodNative(TextStream &s,
const AbstractMetaFunctionCPtr &func,
diff --git a/sources/shiboken6/libshiboken/basewrapper.cpp b/sources/shiboken6/libshiboken/basewrapper.cpp
index 8d722f6e4..779cea5ed 100644
--- a/sources/shiboken6/libshiboken/basewrapper.cpp
+++ b/sources/shiboken6/libshiboken/basewrapper.cpp
@@ -209,10 +209,8 @@ static int SbkObject_tp_traverse(PyObject *self, visitproc visit, void *arg)
if (sbkSelf->ob_dict)
Py_VISIT(sbkSelf->ob_dict);
-#if PY_VERSION_HEX >= 0x03090000
// This was not needed before Python 3.9 (Python issue 35810 and 40217)
Py_VISIT(Py_TYPE(self));
-#endif
return 0;
}
diff --git a/sources/shiboken6/libshiboken/helper.cpp b/sources/shiboken6/libshiboken/helper.cpp
index 9c75c00db..01001dec5 100644
--- a/sources/shiboken6/libshiboken/helper.cpp
+++ b/sources/shiboken6/libshiboken/helper.cpp
@@ -79,7 +79,6 @@ static void formatPyTypeObject(const PyTypeObject *obj, std::ostream &str, bool
str << " [readying]";
if (obj->tp_flags & Py_TPFLAGS_METHOD_DESCRIPTOR)
str << " [method_descriptor]";
-#if PY_VERSION_HEX >= 0x03090000
# ifndef Py_LIMITED_API
if (obj->tp_flags & Py_TPFLAGS_HAVE_VECTORCALL)
str << " [vectorcall]";
@@ -97,7 +96,6 @@ static void formatPyTypeObject(const PyTypeObject *obj, std::ostream &str, bool
str << " [sequence]";
# endif // !Py_LIMITED_API
# endif // 3.10
-#endif // 3.9
if (obj->tp_basicsize != 0)
str << ", basicsize=" << obj->tp_basicsize;
if (verbose) {
diff --git a/sources/shiboken6/libshiboken/pep384impl.h b/sources/shiboken6/libshiboken/pep384impl.h
index d70e1295f..31fd65219 100644
--- a/sources/shiboken6/libshiboken/pep384impl.h
+++ b/sources/shiboken6/libshiboken/pep384impl.h
@@ -4,11 +4,6 @@
#ifndef PEP384IMPL_H
#define PEP384IMPL_H
-// PYSIDE-1436: Adapt to Python 3.10
-#if PY_VERSION_HEX < 0x030900A4
-# define Py_SET_REFCNT(obj, refcnt) ((Py_REFCNT(obj) = (refcnt)), (void)0)
-#endif
-
extern "C"
{
diff --git a/sources/shiboken6/libshiboken/sbkfeature_base.cpp b/sources/shiboken6/libshiboken/sbkfeature_base.cpp
index 4bd69ffd8..caf3517e5 100644
--- a/sources/shiboken6/libshiboken/sbkfeature_base.cpp
+++ b/sources/shiboken6/libshiboken/sbkfeature_base.cpp
@@ -110,7 +110,7 @@ static bool currentOpcode_Is_CallMethNoArgs()
// We look into the currently active operation if we are going to call
// a method with zero arguments.
auto *frame = PyEval_GetFrame();
-#if PY_VERSION_HEX >= 0x03090000 && !Py_LIMITED_API && !defined(PYPY_VERSION)
+#if !Py_LIMITED_API && !defined(PYPY_VERSION)
auto *f_code = PyFrame_GetCode(frame);
#else
static PyObject *const _f_code = Shiboken::String::createStaticString("f_code");