Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README/ReleaseNotes/v642/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,22 @@ The following people have contributed to this new version:

## Python Interface

### Connecting Python callables to signals

`TQObject::Connect()` now directly accepts a Python callable as the slot, for
example `button.Connect("Clicked()", on_clicked)`. The arguments emitted by the
signal are forwarded to the callable, as far as its signature accepts them, and
the connection keeps the callable alive. Use `Disconnect(signal, callable)` to
undo the connection. Signals of any signature are supported, no longer only
those covered by the `TPyDispatcher::Dispatch()` overloads.

The `TPyDispatcher` class and its `ROOT/TPyDispatcher.h` header are removed:
it required the user to create and keep alive a dispatcher object manually,
and it was broken in recent releases anyway, since the interpreter could not
resolve its symbols from the `libROOTPythonizations` Python extension module.
Replace `obj.Connect(signal, "TPyDispatcher", disp, "Dispatch()")` with
`obj.Connect(signal, callable)`.

## I/O

## Core
Expand Down
18 changes: 0 additions & 18 deletions bindings/pyroot/pythonizations/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,15 @@
# CMakeLists.txt file for building ROOT pythonizations libraries
################################################################

list(APPEND PYROOT_EXTRA_HEADERS
inc/TPyDispatcher.h)

set(cpp_sources
src/PyROOTModule.cxx
src/RPyROOTApplication.cxx
src/GenericPyz.cxx
src/TClassPyz.cxx
src/TTreePyz.cxx
src/CPPInstancePyz.cxx
src/TPyDispatcher.cxx
inc/TPyDispatcher.h
)

set(ROOT_headers_dir inc)

# Copy headers inside build_dir/include/ROOT
file(COPY ${ROOT_headers_dir}/ DESTINATION ${CMAKE_BINARY_DIR}/include/ROOT)

set(libname ROOTPythonizations)

add_library(${libname} SHARED ${cpp_sources})
Expand Down Expand Up @@ -56,9 +46,6 @@ else()
target_link_libraries(${libname} PUBLIC -Wl,--unresolved-symbols=ignore-all)
endif()

target_include_directories(${libname}
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>)

# Disables warnings caused by Py_RETURN_TRUE/Py_RETURN_FALSE
if(NOT MSVC)
target_compile_options(${libname} PRIVATE -Wno-strict-aliasing)
Expand Down Expand Up @@ -99,11 +86,6 @@ install(TARGETS ${libname} EXPORT ${CMAKE_PROJECT_NAME}Exports
LIBRARY DESTINATION ${pymoduledir_install} COMPONENT libraries
ARCHIVE DESTINATION ${pymoduledir_install} COMPONENT libraries)

# Install headers required by pythonizations
install(FILES ${PYROOT_EXTRA_HEADERS}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ROOT
COMPONENT headers)

# For the ROOT Python package
add_subdirectory(python)

Expand Down
136 changes: 0 additions & 136 deletions bindings/pyroot/pythonizations/inc/TPyDispatcher.h

This file was deleted.

1 change: 1 addition & 0 deletions bindings/pyroot/pythonizations/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ set(py_sources
ROOT/_pythonization/_titer.py
ROOT/_pythonization/_tobject.py
ROOT/_pythonization/_tobjstring.py
ROOT/_pythonization/_tqobject.py
ROOT/_pythonization/_tscatter.py
ROOT/_pythonization/_tseqcollection.py
ROOT/_pythonization/_tstring.py
Expand Down
8 changes: 0 additions & 8 deletions bindings/pyroot/pythonizations/python/ROOT/_facade.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,14 +602,6 @@ def NumbaExt(self):
# Return something as it is a property function
return self

# Get TPyDispatcher for programming GUI callbacks
@property
def TPyDispatcher(self):
self._cppyy.include("ROOT/TPyDispatcher.h")
tpd = self._cppyy.gbl.TPyDispatcher
type(self).TPyDispatcher = tpd
return tpd

# Create the uhi namespace
@property
def uhi(self):
Expand Down
Loading
Loading