mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Refactor Python for 3.12 integration (#1807)
* Correct JS requestConfig call
* Update requestWriteConfig to new API format
* Add hyperion-light and bare-minimum preset scenarios
* Refactor Python
* Windows add bcrypt until mbedtls is fixed
(https://github.com/Mbed-TLS/mbedtls/pull/9554)
* Corrections
* Use ScreenCaptureKit under macOS 15 and above
* ReSigning macOS package
* Python 3.11.10 test
* Revert "Python 3.11.10 test"
This reverts commit ee921e4f12
.
* Handle defined exits from python scripts
* Update change.log
* CodeQL findings
---------
Co-authored-by: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#undef slots
|
||||
#include <Python.h>
|
||||
#define slots Q_SLOTS
|
||||
|
||||
///
|
||||
/// @brief Handle the PythonInit, module registers and DeInit
|
||||
///
|
||||
@@ -10,4 +14,8 @@ private:
|
||||
|
||||
PythonInit();
|
||||
~PythonInit();
|
||||
|
||||
#if (PY_VERSION_HEX >= 0x03080000)
|
||||
void handlePythonError(PyStatus status, PyConfig& config);
|
||||
#endif
|
||||
};
|
||||
|
@@ -9,6 +9,8 @@
|
||||
#include "Python.h"
|
||||
#define slots
|
||||
|
||||
#include <python/PythonUtils.h>
|
||||
|
||||
class Logger;
|
||||
|
||||
class PythonProgram
|
||||
@@ -17,9 +19,15 @@ public:
|
||||
PythonProgram(const QString & name, Logger * log);
|
||||
~PythonProgram();
|
||||
|
||||
operator PyThreadState* ()
|
||||
{
|
||||
return _tstate;
|
||||
}
|
||||
|
||||
void execute(const QByteArray &python_code);
|
||||
|
||||
private:
|
||||
|
||||
QString _name;
|
||||
Logger* _log;
|
||||
PyThreadState* _tstate;
|
||||
|
Reference in New Issue
Block a user