Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: qoretechnologies/module-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: feature/5164_jit
Choose a base ref
...
head repository: qoretechnologies/module-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: develop
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 5 commits
  • 8 files changed
  • 3 contributors

Commits on Jun 5, 2026

  1. ci: revert base image refs to qore-test-base:develop

    Revert the temporary :jit base-image refs from the feature/5164_jit testing
    campaign now that qore + modules are merged and the develop base image is
    rebuilt with all merged components.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
    davidnich and claude committed Jun 5, 2026
    Configuration menu
    Copy the full SHA
    d9a8e9b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7ab8e73 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2026

  1. fix(qoreloader): import every root namespace a Qore module declares i…

    …tems in
    
    A Python module "qore.X" was backed by a single Qore namespace, chosen by
    scanning the root namespace for the first one holding an item declared by module
    X. A Qore module is not restricted to one namespace, so when X declared items in
    more than one root namespace, everything outside the namespace that happened to
    be found first was invisible to Python, and which namespace won depended on
    namespace iteration order.
    
    Qorus hits this: QorusClientCore declares classes in both ::OMQ and
    ::RemoteDevelopment, so "qore.QorusClientCore" was rooted at ::RemoteDevelopment
    and "from qore.QorusClientCore import QorusClient" failed with
    
      ImportError: cannot import name 'QorusClient' from 'qore.QorusClientCore'
    
    The same failure hit "qore.QorusClientBase" in the Qorus k8s CI jobs, where the
    generated QorusClientBase module also declares items in a second root namespace,
    which broke the Python remote-development tests.
    
    Collect every root namespace that directly owns items declared by the module and
    import all of them into the Python module; a namespace matched only through the
    module's reexport list remains a fallback used when there is no direct owner. The
    namespace named after the module, when there is one, stays the primary namespace
    and gives the Python module its __path__, so nothing changes for modules that
    declare items in a single namespace.
    
    Adds a test with a module declaring classes in two root namespaces, neither named
    after the module: without this fix one of the two classes cannot be imported.
    davidnich committed Jul 13, 2026
    Configuration menu
    Copy the full SHA
    4b6dea6 View commit details
    Browse the repository at this point in the history
  2. fix: use-after-free of exception values when raising a Python excepti…

    …on in a sub-interpreter
    
    QorePythonProgram::raisePythonException() borrows the err, desc, and arg values
    from the ExceptionSink, but the owns_interpreter branch cleared the exception
    after converting only err and desc; the borrowed values were then dereferenced
    when converting arg and again when reading the error string on the fallback
    path.  In debug builds this aborts on the type assertion in QoreValue::get<>();
    in release builds freed memory is read silently.
    
    The exception is now cleared only after all three values have been converted,
    matching the main-interpreter branch, and the error string used by the fallback
    path is copied before the exception is cleared.
    davidnich committed Jul 13, 2026
    Configuration menu
    Copy the full SHA
    e734077 View commit details
    Browse the repository at this point in the history
  3. feat: add Python::set_save_object_callback() namespace function

    Add the function form of PythonProgram::setSaveObjectCallback() in a new
    src/ql_python.qpp, registered via init_python_functions() in the Python
    namespace, mirroring jni::set_save_object_callback().
    
    This lets a privileged parent Program enable object capture on a sandboxed
    interface Program via Program::callFunction() (Qorus
    CommonInterfaceBase::startCapturingObjectsFromPython()): unlike a
    cross-Program static method call, callFunction() evaluates the function's
    dom=PROCESS functional-domain check against the calling (parent) Program's
    parse options.  The callback continues to be dispatched normally; captured
    objects are stored by the callback (e.g. via Program::saveObject()).
    
    flags=NAMED_ARGS is already supported on qore develop, so this builds
    against both current develop and the in-development qore branch.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
    davidnich and claude committed Jul 13, 2026
    Configuration menu
    Copy the full SHA
    011ef4c View commit details
    Browse the repository at this point in the history
Loading