Skip to content

Cvs 178976 rh python312#3896

Merged
rasapala merged 20 commits intomainfrom
CVS-178976_rh_python312
Jan 15, 2026
Merged

Cvs 178976 rh python312#3896
rasapala merged 20 commits intomainfrom
CVS-178976_rh_python312

Conversation

@rasapala
Copy link
Copy Markdown
Collaborator

@rasapala rasapala commented Jan 8, 2026

🛠 Summary

Changing redhat core python from 3.9 to 3.12
3.9 still required for tensorflow compilation.

🧪 Checklist

  • Unit tests added.
  • The documentation updated.
  • Change follows security best practices.
    ``

@rasapala rasapala requested review from dtrawins and mzegla January 9, 2026 11:07
Comment thread run_unit_tests.sh Outdated
@@ -1,37 +0,0 @@
#*****************************************************************************
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this is removed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used anywhere.

Co-authored-by: Trawinski, Dariusz <dariusz.trawinski@intel.com>
Comment thread src/python/pythoninterpretermodule.hpp Outdated
std::unique_ptr<PythonBackend> pythonBackend;
mutable std::unique_ptr<py::gil_scoped_release> GILScopedRelease;
std::thread::id threadId;
bool hasModuleInitializedTheInterpreter;
Copy link
Copy Markdown
Collaborator

@mzegla mzegla Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit shorter option

Suggested change
bool hasModuleInitializedTheInterpreter;
bool ownsInterpreter;

Comment thread src/python/pythoninterpretermodule.cpp Outdated
Comment on lines +80 to +82
// No need to release GIL it must be handled with the initialize interpreter class. Currently in gtest PythonEnvironment.
if (!hasModuleInitializedTheInterpreter)
return;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO the comment does not bring too much context and unnecessarily gives information about testing - it's not bound. I also don't think this logic should be here. Can you move such check to the place this method is used - server.cpp and go with something like:

        auto pythonModule = dynamic_cast<const PythonInterpreterModule*>(it->second.get());
		if(pythonModule->ownsInterpreter()) {
			// Natively GIL is held by the thread that initialized interpreter, so we only need to release it, if we own the interpreter. 
			// If it was initialized externally, then the external thread shall release the GIL before launching that module.
        	pythonModule->releaseGILFromThisThread();
		}

@rasapala rasapala merged commit 2540826 into main Jan 15, 2026
1 check passed
@rasapala rasapala deleted the CVS-178976_rh_python312 branch January 15, 2026 16:00
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.

3 participants