Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-mpi4py for openSUSE:Factory 
checked in at 2025-03-04 18:33:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-mpi4py (Old)
 and      /work/SRC/openSUSE:Factory/.python-mpi4py.new.19136 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-mpi4py"

Tue Mar  4 18:33:06 2025 rev:24 rq:1250001 version:4.0.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-mpi4py/python-mpi4py.changes      
2024-12-29 11:56:22.687535418 +0100
+++ /work/SRC/openSUSE:Factory/.python-mpi4py.new.19136/python-mpi4py.changes   
2025-03-04 18:33:35.108439947 +0100
@@ -1,0 +2,11 @@
+Tue Mar  4 04:34:29 UTC 2025 - Atri Bhattacharya <badshah...@gmail.com>
+
+- Update to version 4.0.3:
+  * Fix DLPack v1.0 support.
+- Changes from version 4.0.2:
+  * Support MPI-4 features within Intel MPI 2021.14.
+  * Various fixes and updates to tests.
+  * Minor fixes to typing support.
+  * Minor fix to documentation.
+
+-------------------------------------------------------------------

Old:
----
  mpi4py-4.0.1.tar.gz

New:
----
  mpi4py-4.0.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-mpi4py.spec ++++++
--- /var/tmp/diff_new_pack.7kJOa0/_old  2025-03-04 18:33:35.656462831 +0100
+++ /var/tmp/diff_new_pack.7kJOa0/_new  2025-03-04 18:33:35.656462831 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-mpi4py
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %define plainpython python
 Name:           python-mpi4py
-Version:        4.0.1
+Version:        4.0.3
 Release:        0
 Summary:        MPI for Python
 License:        BSD-3-Clause

++++++ mpi4py-4.0.1.tar.gz -> mpi4py-4.0.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/CHANGES.rst new/mpi4py-4.0.3/CHANGES.rst
--- old/mpi4py-4.0.1/CHANGES.rst        2024-10-11 12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/CHANGES.rst        2025-02-13 16:34:54.000000000 +0100
@@ -1,3 +1,21 @@
+Release 4.0.3 [2025-02-13]
+==========================
+
+* Fix DLPack v1.0 support.
+
+
+Release 4.0.2 [2025-02-01]
+==========================
+
+* Support MPI-4 features within Intel MPI 2021.14.
+
+* Various fixes and updates to tests.
+
+* Minor fixes to typing support.
+
+* Minor fix to documentation.
+
+
 Release 4.0.1 [2024-10-11]
 ==========================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/CMakeLists.txt 
new/mpi4py-4.0.3/CMakeLists.txt
--- old/mpi4py-4.0.1/CMakeLists.txt     2024-10-11 12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/CMakeLists.txt     2025-02-13 16:34:54.000000000 +0100
@@ -29,13 +29,6 @@
 set(SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
 
 
-# mpi.pth
-set(mpi.pth ${SRCDIR}/mpi.pth)
-if (WIN32)
-  install(FILES ${mpi.pth} DESTINATION .)
-endif()
-
-
 # Cython
 set(cythonize ${TOPDIR}/conf/cythonize.py)
 set(Cython_COMMAND ${Python_EXECUTABLE} ${cythonize})
@@ -118,3 +111,12 @@
   get_filename_component(dir ${file} DIRECTORY)
   install(FILES ${SRCDIR}/${file} DESTINATION ${dir})
 endforeach()
+
+if (WIN32)
+  set(mpidllpath mpi.pth)
+  foreach(file ${mpidllpath})
+    if (EXISTS ${SRCDIR}/${file})
+      install(FILES ${SRCDIR}/${file} DESTINATION .)
+    endif()
+  endforeach()
+endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/LICENSE.rst new/mpi4py-4.0.3/LICENSE.rst
--- old/mpi4py-4.0.1/LICENSE.rst        2024-10-11 12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/LICENSE.rst        2025-02-13 16:34:54.000000000 +0100
@@ -1,4 +1,4 @@
-Copyright (c) 2024, Lisandro Dalcin
+Copyright (c) 2025, Lisandro Dalcin
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/PKG-INFO new/mpi4py-4.0.3/PKG-INFO
--- old/mpi4py-4.0.1/PKG-INFO   2024-10-11 12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/PKG-INFO   2025-02-13 16:34:54.000000000 +0100
@@ -1,6 +1,6 @@
-Metadata-Version: 2.1
+Metadata-Version: 2.2
 Name: mpi4py
-Version: 4.0.1
+Version: 4.0.3
 Summary: Python bindings for MPI
 Author: Lisandro Dalcin
 Author-email: dalc...@gmail.com
@@ -47,6 +47,16 @@
 Requires-Python: >=3.6
 Description-Content-Type: text/x-rst
 License-File: LICENSE.rst
+Dynamic: author
+Dynamic: author-email
+Dynamic: classifier
+Dynamic: description
+Dynamic: description-content-type
+Dynamic: keywords
+Dynamic: license
+Dynamic: project-url
+Dynamic: requires-python
+Dynamic: summary
 
 ==============
 MPI for Python
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/conf/mpiapigen.py 
new/mpi4py-4.0.3/conf/mpiapigen.py
--- old/mpi4py-4.0.1/conf/mpiapigen.py  2024-10-11 12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/conf/mpiapigen.py  2025-02-13 16:34:54.000000000 +0100
@@ -2,7 +2,7 @@
 # 'cdef extern from *' Cython blocks in in source files, and next
 # generate compatibility headers for partially implemented MPIs.
 
-# ruff: noqa: E501
+# ruff: noqa: E501, UP031
 
 import re
 from textwrap import indent, dedent
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/conf/mpidistutils.py 
new/mpi4py-4.0.3/conf/mpidistutils.py
--- old/mpi4py-4.0.1/conf/mpidistutils.py       2024-10-11 12:23:10.000000000 
+0200
+++ new/mpi4py-4.0.3/conf/mpidistutils.py       2025-02-13 16:34:54.000000000 
+0100
@@ -692,7 +692,7 @@
         log.info("checking for header '%s' ...", header)
         body = "int main(int n, char**v) { (void)n; (void)v; return 0; }"
         ok = self.try_compile(body, [*headers, header], include_dirs)
-        log.info(ok and 'success!' or 'failure.')
+        log.info('success!' if ok else 'failure.')
         return ok
 
     def check_macro(
@@ -1120,6 +1120,18 @@
         if with_coverage():
             ext.define_macros += [('CYTHON_TRACE_NOGIL', 1)]
 
+    def _get_pth_files(self, ext):
+        if ext.name == 'mpi4py.MPI' and sys.platform == 'win32':
+            confdir = os.path.dirname(__file__)
+            topdir = os.path.dirname(confdir)
+            srcdir = os.path.join(topdir, 'src')
+            dstdir = self.build_lib
+            for pthfile in ('mpi.pth', ):
+                source = os.path.join(srcdir, pthfile)
+                target = os.path.join(dstdir, pthfile)
+                if os.path.exists(source):
+                    yield (source, target)
+
     def build_extension (self, ext):
         fullname = self.get_ext_fullname(ext.name)
         filename = os.path.join(
@@ -1132,28 +1144,19 @@
         self.config_extension(ext)
         cmd_build_ext.build_ext.build_extension(self, ext)
         #
-        if ext.name == 'mpi4py.MPI' and sys.platform == 'win32':
-            confdir = os.path.dirname(__file__)
-            topdir = os.path.dirname(confdir)
-            srcdir = os.path.join(topdir, 'src')
-            pthfile = 'mpi.pth'
-            source = os.path.join(srcdir, pthfile)
-            target = os.path.join(self.build_lib, pthfile)
-            if os.path.exists(source):
-                log.info("writing %s", target)
-                copy_file(
-                    source, target,
-                    verbose=False,
-                    dry_run=self.dry_run,
-                )
+        for source, target in self._get_pth_files(ext):
+            log.info("writing %s", target)
+            copy_file(
+                source, target,
+                verbose=False,
+                dry_run=self.dry_run
+            )
 
     def get_outputs(self):
         outputs = cmd_build_ext.build_ext.get_outputs(self)
         for ext in self.extensions:
-            if ext.name == 'mpi4py.MPI' and sys.platform == 'win32':
-                pthfile = 'mpi.pth'
-                output_file = os.path.join(self.build_lib, pthfile)
-                outputs.append(output_file)
+            for _, target in self._get_pth_files(ext):
+                outputs.append(target)
         return outputs
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/conf/nompi/pympiconf.h 
new/mpi4py-4.0.3/conf/nompi/pympiconf.h
--- old/mpi4py-4.0.1/conf/nompi/pympiconf.h     2024-10-11 12:23:10.000000000 
+0200
+++ new/mpi4py-4.0.3/conf/nompi/pympiconf.h     2025-02-13 16:34:54.000000000 
+0100
@@ -602,14 +602,6 @@
 #undef  PyMPI_HAVE_MPI_Neighbor_alltoall_init_c
 #undef  PyMPI_HAVE_MPI_Neighbor_alltoallv_init_c
 #undef  PyMPI_HAVE_MPI_Neighbor_alltoallw_init_c
-#undef  PyMPI_HAVE_MPI_Comm_revoke
-#undef  PyMPI_HAVE_MPI_Comm_is_revoked
-#undef  PyMPI_HAVE_MPI_Comm_get_failed
-#undef  PyMPI_HAVE_MPI_Comm_ack_failed
-#undef  PyMPI_HAVE_MPI_Comm_agree
-#undef  PyMPI_HAVE_MPI_Comm_iagree
-#undef  PyMPI_HAVE_MPI_Comm_shrink
-#undef  PyMPI_HAVE_MPI_Comm_ishrink
 #undef  PyMPI_HAVE_MPI_WIN_NULL
 #undef  PyMPI_HAVE_MPI_Win_free
 #undef  PyMPI_HAVE_MPI_Win_create
@@ -879,9 +871,6 @@
 #undef  PyMPI_HAVE_MPI_ERR_CONVERSION
 #undef  PyMPI_HAVE_MPI_ERR_DUP_DATAREP
 #undef  PyMPI_HAVE_MPI_ERR_VALUE_TOO_LARGE
-#undef  PyMPI_HAVE_MPI_ERR_REVOKED
-#undef  PyMPI_HAVE_MPI_ERR_PROC_FAILED
-#undef  PyMPI_HAVE_MPI_ERR_PROC_FAILED_PENDING
 #undef  PyMPI_HAVE_MPI_Alloc_mem
 #undef  PyMPI_HAVE_MPI_Free_mem
 #define PyMPI_HAVE_MPI_Init 1
@@ -966,5 +955,16 @@
 #undef  PyMPI_HAVE_MPI_COMBINER_HVECTOR_INTEGER
 #undef  PyMPI_HAVE_MPI_COMBINER_HINDEXED_INTEGER
 #undef  PyMPI_HAVE_MPI_COMBINER_STRUCT_INTEGER
+#undef  PyMPI_HAVE_MPI_ERR_REVOKED
+#undef  PyMPI_HAVE_MPI_ERR_PROC_FAILED
+#undef  PyMPI_HAVE_MPI_ERR_PROC_FAILED_PENDING
+#undef  PyMPI_HAVE_MPI_Comm_revoke
+#undef  PyMPI_HAVE_MPI_Comm_is_revoked
+#undef  PyMPI_HAVE_MPI_Comm_get_failed
+#undef  PyMPI_HAVE_MPI_Comm_ack_failed
+#undef  PyMPI_HAVE_MPI_Comm_agree
+#undef  PyMPI_HAVE_MPI_Comm_iagree
+#undef  PyMPI_HAVE_MPI_Comm_shrink
+#undef  PyMPI_HAVE_MPI_Comm_ishrink
 
 #endif /* !PyMPI_PYMPICONF_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/conf/requirements-docs.txt 
new/mpi4py-4.0.3/conf/requirements-docs.txt
--- old/mpi4py-4.0.1/conf/requirements-docs.txt 2024-10-11 12:23:10.000000000 
+0200
+++ new/mpi4py-4.0.3/conf/requirements-docs.txt 2025-02-13 16:34:54.000000000 
+0100
@@ -1,3 +1,3 @@
-sphinx == 8.0.2
+sphinx == 8.1.3
 sphinx-copybutton == 0.5.2
-sphinx-rtd-theme == 3.0.0
+sphinx-rtd-theme == 3.0.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/demo/futures/test_futures.py 
new/mpi4py-4.0.3/demo/futures/test_futures.py
--- old/mpi4py-4.0.1/demo/futures/test_futures.py       2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/demo/futures/test_futures.py       2025-02-13 
16:34:54.000000000 +0100
@@ -1735,9 +1735,10 @@
     if version == (4,0,2) and sys.platform=='darwin':
         SKIP_POOL_TEST = True
     if version == (4,1,2) and sys.platform=='linux':
+        azure = (os.environ.get('TF_BUILD') == 'True')
         github = (os.environ.get('GITHUB_ACTIONS') == 'true')
-        SKIP_POOL_TEST = github
-    if version >= (5,0,0) and version < (5,1,0):
+        SKIP_POOL_TEST = azure or github
+    if version >= (5,0,0) and version < (5,0,7):
         SKIP_POOL_TEST = skip_spawn()
 if name == 'MPICH':
     if sys.platform == 'darwin':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/demo/test-run/test_run.py 
new/mpi4py-4.0.3/demo/test-run/test_run.py
--- old/mpi4py-4.0.1/demo/test-run/test_run.py  2024-10-11 12:23:10.000000000 
+0200
+++ new/mpi4py-4.0.3/demo/test-run/test_run.py  2025-02-13 16:34:54.000000000 
+0100
@@ -8,6 +8,11 @@
 import mpi4py
 
 on_pypy = hasattr(sys, 'pypy_version_info')
+on_ci = any((
+    os.environ.get('GITHUB_ACTIONS') == 'true',
+    os.environ.get('TF_BUILD') == 'True',
+    os.environ.get('CIRCLECI') == 'true',
+))
 
 
 def find_executable(exe):
@@ -93,16 +98,11 @@
             for output in (stdout, stderr)
             for mpiabort in patterns
         )
-        ci = any((
-            os.environ.get('GITHUB_ACTIONS') == 'true',
-            os.environ.get('TF_BUILD') == 'True',
-            os.environ.get('CIRCLECI') == 'true',
-        ))
         if aborted:
-            if message is not None and not ci:
+            if message is not None and not on_ci:
                 self.assertIn(message, stderr)
             return
-        if not (stdout or stderr) or ci:
+        if not (stdout or stderr) or on_ci:
             with warnings.catch_warnings():
                 warnings.simplefilter("always")
                 warnings.warn(
@@ -139,6 +139,7 @@
             for rank in range(0, np):
                 args = ['--rank', str(rank), '--exception', message]
                 status, stdout, stderr = self.execute(args, np)
+                if on_ci and status == 221: continue
                 self.assertEqual(status, 1)
                 self.assertMPIAbort(stdout, stderr, excmess)
 
@@ -169,6 +170,7 @@
             for rank in range(0, np):
                 args = ['--rank', str(rank), '--interrupt']
                 status, stdout, stderr = self.execute(args, np)
+                if on_ci and status == 221: continue
                 if not on_pypy:
                     self.assertEqual(status, SIGINT + 128)
                 self.assertMPIAbort(stdout, stderr, excmess)
@@ -262,6 +264,7 @@
         for np in (1, 2):
             for rank in range(0, np):
                 status, stdout, stderr = self.execute(command.format(rank), np)
+                if on_ci and status == 221: continue
                 self.assertEqual(status, 1)
                 self.assertMPIAbort(stdout, stderr, excmess)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/docs/source/mpi4py.rst 
new/mpi4py-4.0.3/docs/source/mpi4py.rst
--- old/mpi4py-4.0.1/docs/source/mpi4py.rst     2024-10-11 12:23:10.000000000 
+0200
+++ new/mpi4py-4.0.3/docs/source/mpi4py.rst     2025-02-13 16:34:54.000000000 
+0100
@@ -203,8 +203,8 @@
 
 .. envvar:: MPI4PY_RC_IRECV_BUFSZ
 
-  :type: :class:`bool`
-  :default: :obj:`True`
+  :type: :class:`int`
+  :default: ``32768``
 
   Default buffer size in bytes for :meth:`~MPI.Comm.irecv`.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/meson.build new/mpi4py-4.0.3/meson.build
--- old/mpi4py-4.0.1/meson.build        2024-10-11 12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/meson.build        2025-02-13 16:34:54.000000000 +0100
@@ -23,7 +23,11 @@
 
 # ---
 
-mpi = dependency('', required: false)
+if host_machine.system() == 'windows'
+  mpi = dependency('mpi', required: true)
+else
+  mpi = dependency('', required: false)
+endif
 pyembed = py.dependency(embed: true, disabler: true)
 compiler = meson.get_compiler('c')
 
@@ -60,14 +64,7 @@
 echo = [py, '-c', 'import sys; print(*sys.argv[1:], sep=chr(10))']
 copy = [py, '-c', 'import shutil, sys; shutil.copy(*sys.argv[1:])']
 
-install_mpi_pth = (host_machine.system() == 'windows')
-custom_target(
-  input: files(srcdir / 'mpi.pth'),
-  output: 'mpi.pth',
-  command: copy + ['@INPUT@', '@OUTPUT0@'],
-  install: install_mpi_pth,
-  install_dir: dstdir,
-)
+# ---
 
 cython = [py, files('conf' / 'cythonize.py')]
 cython_flags = ['--3str', '--cleanup', '3']
@@ -168,4 +165,17 @@
   endforeach
 endif
 
+if host_machine.system() == 'windows'
+  mpidllpath = ['mpi.pth']
+  foreach fn : mpidllpath
+    if fs.exists(srcdir / fn)
+      py.install_sources(
+        srcdir / fn,
+        pure: false,
+        subdir: '',
+      )
+    endif
+  endforeach
+endif
+
 # ---
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/lib-mpi/config/impi.h 
new/mpi4py-4.0.3/src/lib-mpi/config/impi.h
--- old/mpi4py-4.0.1/src/lib-mpi/config/impi.h  2024-10-11 12:23:10.000000000 
+0200
+++ new/mpi4py-4.0.3/src/lib-mpi/config/impi.h  2025-02-13 16:34:54.000000000 
+0100
@@ -232,6 +232,35 @@
 #define PyMPI_HAVE_MPI_Reduce_local_c 1
 #endif
 
+#if I_MPI_NUMVERSION >= 20211400300
+#define PyMPI_HAVE_MPI_Status_get_source 1
+#define PyMPI_HAVE_MPI_Status_set_source 1
+#define PyMPI_HAVE_MPI_Status_get_tag 1
+#define PyMPI_HAVE_MPI_Status_set_tag 1
+#define PyMPI_HAVE_MPI_Status_get_error 1
+#define PyMPI_HAVE_MPI_Status_set_error 1
+#define PyMPI_HAVE_MPI_Request_get_status_any 1
+#define PyMPI_HAVE_MPI_Request_get_status_all 1
+#define PyMPI_HAVE_MPI_Request_get_status_some 1
+#define PyMPI_HAVE_MPI_Pready 1
+#define PyMPI_HAVE_MPI_Pready_range 1
+#define PyMPI_HAVE_MPI_Pready_list 1
+#define PyMPI_HAVE_MPI_Parrived 1
+#define PyMPI_HAVE_MPI_BUFFER_AUTOMATIC 1
+#define PyMPI_HAVE_MPI_Psend_init 1
+#define PyMPI_HAVE_MPI_Precv_init 1
+#define PyMPI_HAVE_MPI_Comm_idup_with_info 1
+#define PyMPI_HAVE_MPI_COMM_TYPE_HW_UNGUIDED 1
+#define PyMPI_HAVE_MPI_COMM_TYPE_RESOURCE_GUIDED 1
+#define PyMPI_HAVE_MPI_Intercomm_create_from_groups 1
+#define PyMPI_HAVE_MPI_ERR_PROC_ABORTED 1
+#define PyMPI_HAVE_MPI_ERR_VALUE_TOO_LARGE 1
+#define PyMPI_HAVE_MPI_F_SOURCE 1
+#define PyMPI_HAVE_MPI_F_TAG 1
+#define PyMPI_HAVE_MPI_F_ERROR 1
+#define PyMPI_HAVE_MPI_F_STATUS_SIZE 1
+#endif
+
 #endif
 
 #endif /* !PyMPI_CONFIG_IMPI_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/lib-mpi/config/mpi-50.h 
new/mpi4py-4.0.3/src/lib-mpi/config/mpi-50.h
--- old/mpi4py-4.0.1/src/lib-mpi/config/mpi-50.h        2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/src/lib-mpi/config/mpi-50.h        2025-02-13 
16:34:54.000000000 +0100
@@ -1,16 +1,5 @@
 #if defined(MPI_VERSION)
 #if (MPI_VERSION >= 5)
 
-#define PyMPI_HAVE_MPI_ERR_REVOKED 1
-#define PyMPI_HAVE_MPI_ERR_PROC_FAILED 1
-#define PyMPI_HAVE_MPI_ERR_PROC_FAILED_PENDING 1
-#define PyMPI_HAVE_MPI_Comm_revoke 1
-#define PyMPI_HAVE_MPI_Comm_is_revoked 1
-#define PyMPI_HAVE_MPI_Comm_get_failed 1
-#define PyMPI_HAVE_MPI_Comm_ack_failed 1
-#define PyMPI_HAVE_MPI_Comm_agree 1
-#define PyMPI_HAVE_MPI_Comm_iagree 1
-#define PyMPI_HAVE_MPI_Comm_shrink 1
-
 #endif
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/lib-mpi/config/mpi-60.h 
new/mpi4py-4.0.3/src/lib-mpi/config/mpi-60.h
--- old/mpi4py-4.0.1/src/lib-mpi/config/mpi-60.h        1970-01-01 
01:00:00.000000000 +0100
+++ new/mpi4py-4.0.3/src/lib-mpi/config/mpi-60.h        2025-02-13 
16:34:54.000000000 +0100
@@ -0,0 +1,18 @@
+#if defined(MPI_VERSION)
+#if (MPI_VERSION >= 6)
+
+/*
+#define PyMPI_HAVE_MPI_ERR_REVOKED 1
+#define PyMPI_HAVE_MPI_ERR_PROC_FAILED 1
+#define PyMPI_HAVE_MPI_ERR_PROC_FAILED_PENDING 1
+#define PyMPI_HAVE_MPI_Comm_revoke 1
+#define PyMPI_HAVE_MPI_Comm_is_revoked 1
+#define PyMPI_HAVE_MPI_Comm_get_failed 1
+#define PyMPI_HAVE_MPI_Comm_ack_failed 1
+#define PyMPI_HAVE_MPI_Comm_agree 1
+#define PyMPI_HAVE_MPI_Comm_iagree 1
+#define PyMPI_HAVE_MPI_Comm_shrink 1
+*/
+
+#endif
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/lib-mpi/config/mpiapi.h 
new/mpi4py-4.0.3/src/lib-mpi/config/mpiapi.h
--- old/mpi4py-4.0.1/src/lib-mpi/config/mpiapi.h        2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/src/lib-mpi/config/mpiapi.h        2025-02-13 
16:34:54.000000000 +0100
@@ -10,5 +10,6 @@
 #include "mpi-40.h"
 #include "mpi-41.h"
 #include "mpi-50.h"
+#include "mpi-60.h"
 
 #endif /* !PyMPI_CONFIG_MPIAPI_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/lib-mpi/config/mpich.h 
new/mpi4py-4.0.3/src/lib-mpi/config/mpich.h
--- old/mpi4py-4.0.1/src/lib-mpi/config/mpich.h 2024-10-11 12:23:10.000000000 
+0200
+++ new/mpi4py-4.0.3/src/lib-mpi/config/mpich.h 2025-02-13 16:34:54.000000000 
+0100
@@ -12,8 +12,11 @@
 #endif
 
 /* MPI I/O may not be available */
+/* https://github.com/pmodels/mpich/issues/7278 */
+#if MPICH_NUMVERSION < 40300000
 #ifndef ROMIO_VERSION
 #include "mpi-io.h"
 #endif
+#endif
 
 #endif /* !PyMPI_CONFIG_MPICH_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/lib-mpi/missing.h 
new/mpi4py-4.0.3/src/lib-mpi/missing.h
--- old/mpi4py-4.0.1/src/lib-mpi/missing.h      2024-10-11 12:23:10.000000000 
+0200
+++ new/mpi4py-4.0.3/src/lib-mpi/missing.h      2025-02-13 16:34:54.000000000 
+0100
@@ -3047,46 +3047,6 @@
 #define MPI_Neighbor_alltoallw_init_c(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) 
PyMPI_UNAVAILABLE("MPI_Neighbor_alltoallw_init_c",a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)
 #endif
 
-#ifndef PyMPI_HAVE_MPI_Comm_revoke
-#undef  MPI_Comm_revoke
-#define MPI_Comm_revoke(a1) PyMPI_UNAVAILABLE("MPI_Comm_revoke",a1)
-#endif
-
-#ifndef PyMPI_HAVE_MPI_Comm_is_revoked
-#undef  MPI_Comm_is_revoked
-#define MPI_Comm_is_revoked(a1,a2) 
PyMPI_UNAVAILABLE("MPI_Comm_is_revoked",a1,a2)
-#endif
-
-#ifndef PyMPI_HAVE_MPI_Comm_get_failed
-#undef  MPI_Comm_get_failed
-#define MPI_Comm_get_failed(a1,a2) 
PyMPI_UNAVAILABLE("MPI_Comm_get_failed",a1,a2)
-#endif
-
-#ifndef PyMPI_HAVE_MPI_Comm_ack_failed
-#undef  MPI_Comm_ack_failed
-#define MPI_Comm_ack_failed(a1,a2,a3) 
PyMPI_UNAVAILABLE("MPI_Comm_ack_failed",a1,a2,a3)
-#endif
-
-#ifndef PyMPI_HAVE_MPI_Comm_agree
-#undef  MPI_Comm_agree
-#define MPI_Comm_agree(a1,a2) PyMPI_UNAVAILABLE("MPI_Comm_agree",a1,a2)
-#endif
-
-#ifndef PyMPI_HAVE_MPI_Comm_iagree
-#undef  MPI_Comm_iagree
-#define MPI_Comm_iagree(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Comm_iagree",a1,a2,a3)
-#endif
-
-#ifndef PyMPI_HAVE_MPI_Comm_shrink
-#undef  MPI_Comm_shrink
-#define MPI_Comm_shrink(a1,a2) PyMPI_UNAVAILABLE("MPI_Comm_shrink",a1,a2)
-#endif
-
-#ifndef PyMPI_HAVE_MPI_Comm_ishrink
-#undef  MPI_Comm_ishrink
-#define MPI_Comm_ishrink(a1,a2,a3) 
PyMPI_UNAVAILABLE("MPI_Comm_ishrink",a1,a2,a3)
-#endif
-
 #ifndef PyMPI_HAVE_MPI_WIN_NULL
 #undef  MPI_WIN_NULL
 #define MPI_WIN_NULL ((MPI_Win)0)
@@ -3682,7 +3642,7 @@
 
 #ifndef PyMPI_HAVE_MPI_DISPLACEMENT_CURRENT
 #undef  MPI_DISPLACEMENT_CURRENT
-#define MPI_DISPLACEMENT_CURRENT (3)
+#define MPI_DISPLACEMENT_CURRENT (0)
 #endif
 
 #ifndef PyMPI_HAVE_MPI_File_seek
@@ -4439,21 +4399,6 @@
 #define MPI_ERR_VALUE_TOO_LARGE (MPI_ERR_LASTCODE)
 #endif
 
-#ifndef PyMPI_HAVE_MPI_ERR_REVOKED
-#undef  MPI_ERR_REVOKED
-#define MPI_ERR_REVOKED (MPI_ERR_UNKNOWN)
-#endif
-
-#ifndef PyMPI_HAVE_MPI_ERR_PROC_FAILED
-#undef  MPI_ERR_PROC_FAILED
-#define MPI_ERR_PROC_FAILED (MPI_ERR_UNKNOWN)
-#endif
-
-#ifndef PyMPI_HAVE_MPI_ERR_PROC_FAILED_PENDING
-#undef  MPI_ERR_PROC_FAILED_PENDING
-#define MPI_ERR_PROC_FAILED_PENDING (MPI_ERR_UNKNOWN)
-#endif
-
 #ifndef PyMPI_HAVE_MPI_Alloc_mem
 #undef  MPI_Alloc_mem
 #define MPI_Alloc_mem(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Alloc_mem",a1,a2,a3)
@@ -4878,4 +4823,59 @@
 #define MPI_COMBINER_STRUCT_INTEGER (MPI_UNDEFINED)
 #endif
 
+#ifndef PyMPI_HAVE_MPI_ERR_REVOKED
+#undef  MPI_ERR_REVOKED
+#define MPI_ERR_REVOKED (MPI_ERR_UNKNOWN)
+#endif
+
+#ifndef PyMPI_HAVE_MPI_ERR_PROC_FAILED
+#undef  MPI_ERR_PROC_FAILED
+#define MPI_ERR_PROC_FAILED (MPI_ERR_UNKNOWN)
+#endif
+
+#ifndef PyMPI_HAVE_MPI_ERR_PROC_FAILED_PENDING
+#undef  MPI_ERR_PROC_FAILED_PENDING
+#define MPI_ERR_PROC_FAILED_PENDING (MPI_ERR_UNKNOWN)
+#endif
+
+#ifndef PyMPI_HAVE_MPI_Comm_revoke
+#undef  MPI_Comm_revoke
+#define MPI_Comm_revoke(a1) PyMPI_UNAVAILABLE("MPI_Comm_revoke",a1)
+#endif
+
+#ifndef PyMPI_HAVE_MPI_Comm_is_revoked
+#undef  MPI_Comm_is_revoked
+#define MPI_Comm_is_revoked(a1,a2) 
PyMPI_UNAVAILABLE("MPI_Comm_is_revoked",a1,a2)
+#endif
+
+#ifndef PyMPI_HAVE_MPI_Comm_get_failed
+#undef  MPI_Comm_get_failed
+#define MPI_Comm_get_failed(a1,a2) 
PyMPI_UNAVAILABLE("MPI_Comm_get_failed",a1,a2)
+#endif
+
+#ifndef PyMPI_HAVE_MPI_Comm_ack_failed
+#undef  MPI_Comm_ack_failed
+#define MPI_Comm_ack_failed(a1,a2,a3) 
PyMPI_UNAVAILABLE("MPI_Comm_ack_failed",a1,a2,a3)
+#endif
+
+#ifndef PyMPI_HAVE_MPI_Comm_agree
+#undef  MPI_Comm_agree
+#define MPI_Comm_agree(a1,a2) PyMPI_UNAVAILABLE("MPI_Comm_agree",a1,a2)
+#endif
+
+#ifndef PyMPI_HAVE_MPI_Comm_iagree
+#undef  MPI_Comm_iagree
+#define MPI_Comm_iagree(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Comm_iagree",a1,a2,a3)
+#endif
+
+#ifndef PyMPI_HAVE_MPI_Comm_shrink
+#undef  MPI_Comm_shrink
+#define MPI_Comm_shrink(a1,a2) PyMPI_UNAVAILABLE("MPI_Comm_shrink",a1,a2)
+#endif
+
+#ifndef PyMPI_HAVE_MPI_Comm_ishrink
+#undef  MPI_Comm_ishrink
+#define MPI_Comm_ishrink(a1,a2,a3) 
PyMPI_UNAVAILABLE("MPI_Comm_ishrink",a1,a2,a3)
+#endif
+
 #endif /* !PyMPI_MISSING_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/lib-mpi/mpiulfm.h 
new/mpi4py-4.0.3/src/lib-mpi/mpiulfm.h
--- old/mpi4py-4.0.1/src/lib-mpi/mpiulfm.h      2024-10-11 12:23:10.000000000 
+0200
+++ new/mpi4py-4.0.3/src/lib-mpi/mpiulfm.h      2025-02-13 16:34:54.000000000 
+0100
@@ -5,7 +5,7 @@
 #define PyMPI_SKIP_MPIULFM 0
 #endif
 
-#if MPI_VERSION < 5 && !PyMPI_SKIP_MPIULFM
+#if MPI_VERSION < 6 && !PyMPI_SKIP_MPIULFM
 
 #if defined(MPICH_NAME) && (MPICH_NAME >= 3)
 #if MPICH_NUMVERSION >= 30200000 && 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/MPI.src/Comm.pyx 
new/mpi4py-4.0.3/src/mpi4py/MPI.src/Comm.pyx
--- old/mpi4py-4.0.1/src/mpi4py/MPI.src/Comm.pyx        2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/src/mpi4py/MPI.src/Comm.pyx        2025-02-13 
16:34:54.000000000 +0100
@@ -242,9 +242,9 @@
         """
         Free a communicator.
         """
+        cdef MPI_Comm save = self.ob_mpi
         with nogil: CHKERR( MPI_Comm_free(&self.ob_mpi) )
-        if self is __COMM_SELF__:  self.ob_mpi = MPI_COMM_SELF
-        if self is __COMM_WORLD__: self.ob_mpi = MPI_COMM_WORLD
+        if constobj(self): self.ob_mpi = save
 
     # Process Fault Tolerance
     # -----------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/MPI.src/Datatype.pyx 
new/mpi4py-4.0.3/src/mpi4py/MPI.src/Datatype.pyx
--- old/mpi4py-4.0.1/src/mpi4py/MPI.src/Datatype.pyx    2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/src/mpi4py/MPI.src/Datatype.pyx    2025-02-13 
16:34:54.000000000 +0100
@@ -407,77 +407,9 @@
         """
         Free the datatype.
         """
+        cdef MPI_Datatype save = self.ob_mpi
         CHKERR( MPI_Type_free(&self.ob_mpi) )
-        cdef Datatype t = self
-        cdef MPI_Datatype p = MPI_DATATYPE_NULL
-        if   t is __PACKED__                 : p = MPI_PACKED
-        elif t is __BYTE__                   : p = MPI_BYTE
-        elif t is __AINT__                   : p = MPI_AINT
-        elif t is __OFFSET__                 : p = MPI_OFFSET
-        elif t is __COUNT__                  : p = MPI_COUNT
-        elif t is __CHAR__                   : p = MPI_CHAR
-        elif t is __WCHAR__                  : p = MPI_WCHAR
-        elif t is __SIGNED_CHAR__            : p = MPI_SIGNED_CHAR
-        elif t is __SHORT__                  : p = MPI_SHORT
-        elif t is __INT__                    : p = MPI_INT
-        elif t is __LONG__                   : p = MPI_LONG
-        elif t is __LONG_LONG__              : p = MPI_LONG_LONG
-        elif t is __UNSIGNED_CHAR__          : p = MPI_UNSIGNED_CHAR
-        elif t is __UNSIGNED_SHORT__         : p = MPI_UNSIGNED_SHORT
-        elif t is __UNSIGNED__               : p = MPI_UNSIGNED
-        elif t is __UNSIGNED_LONG__          : p = MPI_UNSIGNED_LONG
-        elif t is __UNSIGNED_LONG_LONG__     : p = MPI_UNSIGNED_LONG_LONG
-        elif t is __FLOAT__                  : p = MPI_FLOAT
-        elif t is __DOUBLE__                 : p = MPI_DOUBLE
-        elif t is __LONG_DOUBLE__            : p = MPI_LONG_DOUBLE
-        elif t is __C_BOOL__                 : p = MPI_C_BOOL
-        elif t is __INT8_T__                 : p = MPI_INT8_T
-        elif t is __INT16_T__                : p = MPI_INT16_T
-        elif t is __INT32_T__                : p = MPI_INT32_T
-        elif t is __INT64_T__                : p = MPI_INT64_T
-        elif t is __UINT8_T__                : p = MPI_UINT8_T
-        elif t is __UINT16_T__               : p = MPI_UINT16_T
-        elif t is __UINT32_T__               : p = MPI_UINT32_T
-        elif t is __UINT64_T__               : p = MPI_UINT64_T
-        elif t is __C_COMPLEX__              : p = MPI_C_COMPLEX
-        elif t is __C_FLOAT_COMPLEX__        : p = MPI_C_FLOAT_COMPLEX
-        elif t is __C_DOUBLE_COMPLEX__       : p = MPI_C_DOUBLE_COMPLEX
-        elif t is __C_LONG_DOUBLE_COMPLEX__  : p = MPI_C_LONG_DOUBLE_COMPLEX
-        elif t is __CXX_BOOL__               : p = MPI_CXX_BOOL
-        elif t is __CXX_FLOAT_COMPLEX__      : p = MPI_CXX_FLOAT_COMPLEX
-        elif t is __CXX_DOUBLE_COMPLEX__     : p = MPI_CXX_DOUBLE_COMPLEX
-        elif t is __CXX_LONG_DOUBLE_COMPLEX__: p = MPI_CXX_LONG_DOUBLE_COMPLEX
-        elif t is __SHORT_INT__              : p = MPI_SHORT_INT
-        elif t is __INT_INT__                : p = MPI_2INT
-        elif t is __LONG_INT__               : p = MPI_LONG_INT
-        elif t is __FLOAT_INT__              : p = MPI_FLOAT_INT
-        elif t is __DOUBLE_INT__             : p = MPI_DOUBLE_INT
-        elif t is __LONG_DOUBLE_INT__        : p = MPI_LONG_DOUBLE_INT
-        elif t is __CHARACTER__              : p = MPI_CHARACTER
-        elif t is __LOGICAL__                : p = MPI_LOGICAL
-        elif t is __INTEGER__                : p = MPI_INTEGER
-        elif t is __REAL__                   : p = MPI_REAL
-        elif t is __DOUBLE_PRECISION__       : p = MPI_DOUBLE_PRECISION
-        elif t is __COMPLEX__                : p = MPI_COMPLEX
-        elif t is __DOUBLE_COMPLEX__         : p = MPI_DOUBLE_COMPLEX
-        elif t is __LOGICAL1__               : p = MPI_LOGICAL1
-        elif t is __LOGICAL2__               : p = MPI_LOGICAL2
-        elif t is __LOGICAL4__               : p = MPI_LOGICAL4
-        elif t is __LOGICAL8__               : p = MPI_LOGICAL8
-        elif t is __INTEGER1__               : p = MPI_INTEGER1
-        elif t is __INTEGER2__               : p = MPI_INTEGER2
-        elif t is __INTEGER4__               : p = MPI_INTEGER4
-        elif t is __INTEGER8__               : p = MPI_INTEGER8
-        elif t is __INTEGER16__              : p = MPI_INTEGER16
-        elif t is __REAL2__                  : p = MPI_REAL2
-        elif t is __REAL4__                  : p = MPI_REAL4
-        elif t is __REAL8__                  : p = MPI_REAL8
-        elif t is __REAL16__                 : p = MPI_REAL16
-        elif t is __COMPLEX4__               : p = MPI_COMPLEX4
-        elif t is __COMPLEX8__               : p = MPI_COMPLEX8
-        elif t is __COMPLEX16__              : p = MPI_COMPLEX16
-        elif t is __COMPLEX32__              : p = MPI_COMPLEX32
-        self.ob_mpi = p
+        if constobj(self): self.ob_mpi = save
 
     # Datatype Resizing
     # -----------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/MPI.src/Errhandler.pyx 
new/mpi4py-4.0.3/src/mpi4py/MPI.src/Errhandler.pyx
--- old/mpi4py-4.0.1/src/mpi4py/MPI.src/Errhandler.pyx  2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/src/mpi4py/MPI.src/Errhandler.pyx  2025-02-13 
16:34:54.000000000 +0100
@@ -44,10 +44,9 @@
         """
         Free an error handler.
         """
+        cdef MPI_Errhandler save = self.ob_mpi
         CHKERR( MPI_Errhandler_free(&self.ob_mpi) )
-        if self is __ERRORS_RETURN__:    self.ob_mpi = MPI_ERRORS_RETURN
-        if self is __ERRORS_ABORT__:     self.ob_mpi = MPI_ERRORS_ABORT
-        if self is __ERRORS_ARE_FATAL__: self.ob_mpi = MPI_ERRORS_ARE_FATAL
+        if constobj(self): self.ob_mpi = save
 
     # Fortran Handle
     # --------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/MPI.src/File.pyx 
new/mpi4py-4.0.3/src/mpi4py/MPI.src/File.pyx
--- old/mpi4py-4.0.1/src/mpi4py/MPI.src/File.pyx        2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/src/mpi4py/MPI.src/File.pyx        2025-02-13 
16:34:54.000000000 +0100
@@ -113,7 +113,9 @@
         """
         Close a file.
         """
+        cdef MPI_File save = self.ob_mpi
         with nogil: CHKERR( MPI_File_close(&self.ob_mpi) )
+        if constobj(self): self.ob_mpi = save
 
     @classmethod
     def Delete(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/MPI.src/Group.pyx 
new/mpi4py-4.0.3/src/mpi4py/MPI.src/Group.pyx
--- old/mpi4py-4.0.1/src/mpi4py/MPI.src/Group.pyx       2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/src/mpi4py/MPI.src/Group.pyx       2025-02-13 
16:34:54.000000000 +0100
@@ -227,8 +227,9 @@
         """
         Free a group.
         """
+        cdef MPI_Group save = self.ob_mpi
         CHKERR( MPI_Group_free(&self.ob_mpi) )
-        if self is __GROUP_EMPTY__: self.ob_mpi = MPI_GROUP_EMPTY
+        if constobj(self): self.ob_mpi = save
 
     # Fortran Handle
     # --------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/MPI.src/Info.pyx 
new/mpi4py-4.0.3/src/mpi4py/MPI.src/Info.pyx
--- old/mpi4py-4.0.1/src/mpi4py/MPI.src/Info.pyx        2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/src/mpi4py/MPI.src/Info.pyx        2025-02-13 
16:34:54.000000000 +0100
@@ -86,8 +86,9 @@
         """
         Free an info object.
         """
+        cdef MPI_Info save = self.ob_mpi
         CHKERR( MPI_Info_free(&self.ob_mpi) )
-        if self is __INFO_ENV__: self.ob_mpi = MPI_INFO_ENV
+        if constobj(self): self.ob_mpi = save
 
     def Dup(self) -> Self:
         """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/MPI.src/Op.pyx 
new/mpi4py-4.0.3/src/mpi4py/MPI.src/Op.pyx
--- old/mpi4py-4.0.1/src/mpi4py/MPI.src/Op.pyx  2024-10-11 12:23:10.000000000 
+0200
+++ new/mpi4py-4.0.3/src/mpi4py/MPI.src/Op.pyx  2025-02-13 16:34:54.000000000 
+0100
@@ -71,22 +71,10 @@
         """
         Free a user-defined reduction operation.
         """
+        cdef MPI_Op save = self.ob_mpi
         CHKERR( MPI_Op_free(&self.ob_mpi) )
+        if constobj(self): self.ob_mpi = save
         op_user_del(self)
-        if   self is __MAX__     : self.ob_mpi =  MPI_MAX
-        elif self is __MIN__     : self.ob_mpi =  MPI_MIN
-        elif self is __SUM__     : self.ob_mpi =  MPI_SUM
-        elif self is __PROD__    : self.ob_mpi =  MPI_PROD
-        elif self is __LAND__    : self.ob_mpi =  MPI_LAND
-        elif self is __BAND__    : self.ob_mpi =  MPI_BAND
-        elif self is __LOR__     : self.ob_mpi =  MPI_LOR
-        elif self is __BOR__     : self.ob_mpi =  MPI_BOR
-        elif self is __LXOR__    : self.ob_mpi =  MPI_LXOR
-        elif self is __BXOR__    : self.ob_mpi =  MPI_BXOR
-        elif self is __MAXLOC__  : self.ob_mpi =  MPI_MAXLOC
-        elif self is __MINLOC__  : self.ob_mpi =  MPI_MINLOC
-        elif self is __REPLACE__ : self.ob_mpi =  MPI_REPLACE
-        elif self is __NO_OP__   : self.ob_mpi =  MPI_NO_OP
 
     # Process-local reduction
     # -----------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/MPI.src/Request.pyx 
new/mpi4py-4.0.3/src/mpi4py/MPI.src/Request.pyx
--- old/mpi4py-4.0.1/src/mpi4py/MPI.src/Request.pyx     2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/src/mpi4py/MPI.src/Request.pyx     2025-02-13 
16:34:54.000000000 +0100
@@ -277,7 +277,9 @@
         """
         Free a communication request.
         """
+        cdef MPI_Request save = self.ob_mpi
         with nogil: CHKERR( MPI_Request_free(&self.ob_mpi) )
+        if constobj(self): self.ob_mpi = save
 
     # Fortran Handle
     # --------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/MPI.src/Session.pyx 
new/mpi4py-4.0.3/src/mpi4py/MPI.src/Session.pyx
--- old/mpi4py-4.0.1/src/mpi4py/MPI.src/Session.pyx     2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/src/mpi4py/MPI.src/Session.pyx     2025-02-13 
16:34:54.000000000 +0100
@@ -59,7 +59,9 @@
         """
         Finalize a session.
         """
+        cdef MPI_Session save = self.ob_mpi
         CHKERR( MPI_Session_finalize(&self.ob_mpi) )
+        if constobj(self): self.ob_mpi = save
 
     def Get_num_psets(self, Info info: Info = INFO_NULL) -> int:
         """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/MPI.src/Win.pyx 
new/mpi4py-4.0.3/src/mpi4py/MPI.src/Win.pyx
--- old/mpi4py-4.0.1/src/mpi4py/MPI.src/Win.pyx 2024-10-11 12:23:10.000000000 
+0200
+++ new/mpi4py-4.0.3/src/mpi4py/MPI.src/Win.pyx 2025-02-13 16:34:54.000000000 
+0100
@@ -188,7 +188,9 @@
         """
         Free a window.
         """
+        cdef MPI_Win save = self.ob_mpi
         with nogil: CHKERR( MPI_Win_free(&self.ob_mpi) )
+        if constobj(self): self.ob_mpi = save
         self.ob_mem = None
 
     # Window Info
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/MPI.src/asbuffer.pxi 
new/mpi4py-4.0.3/src/mpi4py/MPI.src/asbuffer.pxi
--- old/mpi4py-4.0.1/src/mpi4py/MPI.src/asbuffer.pxi    2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/src/mpi4py/MPI.src/asbuffer.pxi    2025-02-13 
16:34:54.000000000 +0100
@@ -2,6 +2,7 @@
 
 cdef extern from "Python.h":
     ctypedef struct PyObject
+    void Py_CLEAR(PyObject*)
     object PyLong_FromVoidPtr(void*)
     void*  PyLong_AsVoidPtr(object) except? NULL
 
@@ -75,6 +76,14 @@
             raise
         raise
 
+cdef void PyMPI_ReleaseBuffer(int kind, Py_buffer *view) noexcept:
+    if kind == 0:
+        # Python buffer interface
+        PyBuffer_Release(view)
+    else:
+        # DLPack/CAI buffer interface
+        Py_CLEAR(view.obj)
+
 # -----------------------------------------------------------------------------
 
 cdef extern from "Python.h":
@@ -124,7 +133,7 @@
                               NULL, 0, 0, PyBUF_SIMPLE)
 
     def __dealloc__(self):
-        PyBuffer_Release(&self.view)
+        PyMPI_ReleaseBuffer(self.kind, &self.view)
 
     @staticmethod
     def allocate(
@@ -243,7 +252,7 @@
 
     def release(self) -> None:
         """Release the underlying buffer exposed by the buffer object."""
-        PyBuffer_Release(&self.view)
+        PyMPI_ReleaseBuffer(self.kind, &self.view)
         PyBuffer_FillInfo(&self.view, <object>NULL,
                           NULL, 0, 0, PyBUF_SIMPLE)
         self.kind = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/MPI.src/atimport.pxi 
new/mpi4py-4.0.3/src/mpi4py/MPI.src/atimport.pxi
--- old/mpi4py-4.0.1/src/mpi4py/MPI.src/atimport.pxi    2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/src/mpi4py/MPI.src/atimport.pxi    2025-02-13 
16:34:54.000000000 +0100
@@ -1,6 +1,12 @@
 # -----------------------------------------------------------------------------
 
-cdef extern from * nogil:
+cdef extern from "Python.h":
+    """
+    #define MPICH_SKIP_MPICXX 1
+    #define OMPI_SKIP_MPICXX  1
+    """
+
+cdef extern from "<mpi.h>" nogil:
     """
     #include "lib-mpi/config.h"
     #include "lib-mpi/missing.h"
@@ -20,26 +26,17 @@
 
 cdef extern from "Python.h":
     """
+    #ifdef Py_PYTHON_H
     #if PY_VERSION_HEX < 0x030B0000 && !defined(Py_GETENV)
     #  define Py_GETENV(s) (Py_IgnoreEnvironmentFlag ? NULL : getenv(s))
     #endif
-    """
-    const char *Py_GETENV(const char[]) nogil
-
-cdef extern from * nogil:
-    """
-    #if defined(PYPY_VERSION)
-    #  define PyMPI_RUNTIME_PYPY 1
-    #else
-    #  define PyMPI_RUNTIME_PYPY 0
     #endif
     """
-    enum: PYPY "PyMPI_RUNTIME_PYPY"
-
-# -----------------------------------------------------------------------------
+    const char *Py_GETENV(const char[]) nogil
 
 cdef extern from "Python.h":
     """
+    #ifdef Py_PYTHON_H
     #if PY_VERSION_HEX < 0x30C00A7 && !defined(PyErr_DisplayException)
     #define PyErr_DisplayException PyErr_DisplayException_312
     static void PyErr_DisplayException(PyObject *exc)
@@ -55,6 +52,7 @@
       if (tb) Py_DecRef(tb);
     }
     #endif
+    #endif
     """
     void *PyExc_RuntimeError
     void *PyExc_NotImplementedError
@@ -68,6 +66,18 @@
 
 cdef extern from * nogil:
     """
+    #if defined(PYPY_VERSION)
+    #  define PyMPI_RUNTIME_PYPY 1
+    #else
+    #  define PyMPI_RUNTIME_PYPY 0
+    #endif
+    """
+    enum: PYPY "PyMPI_RUNTIME_PYPY"
+
+# -----------------------------------------------------------------------------
+
+cdef extern from * nogil:
+    """
     #if !defined(PyMPI_USE_MATCHED_RECV)
     #  if defined(PyMPI_HAVE_MPI_Mprobe) && defined(PyMPI_HAVE_MPI_Mrecv)
     #    if defined(MPI_VERSION) && MPI_VERSION >= 3
@@ -222,12 +232,6 @@
 
 # -----------------------------------------------------------------------------
 
-cdef extern from "Python.h":
-    """
-    #define MPICH_SKIP_MPICXX 1
-    #define OMPI_SKIP_MPICXX  1
-    """
-
 cdef int warn_environ(const char envvar[]) except -1 with gil:
     PyErr_WarnFormat(
         RuntimeWarning, 1,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/MPI.src/objmodel.pxi 
new/mpi4py-4.0.3/src/mpi4py/MPI.src/objmodel.pxi
--- old/mpi4py-4.0.1/src/mpi4py/MPI.src/objmodel.pxi    2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/src/mpi4py/MPI.src/objmodel.pxi    2025-02-13 
16:34:54.000000000 +0100
@@ -307,6 +307,9 @@
 cdef inline int nonnull(PyMPIClass self) noexcept nogil:
     return self.ob_mpi != mpinull(self.ob_mpi)
 
+cdef inline int constobj(PyMPIClass self) noexcept nogil:
+    return self.flags & PyMPI_FLAGS_CONST
+
 # -----------------------------------------------------------------------------
 
 cdef dict def_registry = {}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/__init__.py 
new/mpi4py-4.0.3/src/mpi4py/__init__.py
--- old/mpi4py-4.0.1/src/mpi4py/__init__.py     2024-10-11 12:23:10.000000000 
+0200
+++ new/mpi4py-4.0.3/src/mpi4py/__init__.py     2025-02-13 16:34:54.000000000 
+0100
@@ -17,7 +17,7 @@
 
 """
 
-__version__ = '4.0.1'
+__version__ = '4.0.3'
 __author__ = 'Lisandro Dalcin'
 __credits__ = 'MPI Forum, MPICH Team, Open MPI Team'
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/futures/__init__.py 
new/mpi4py-4.0.3/src/mpi4py/futures/__init__.py
--- old/mpi4py-4.0.1/src/mpi4py/futures/__init__.py     2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/src/mpi4py/futures/__init__.py     2025-02-13 
16:34:54.000000000 +0100
@@ -12,7 +12,7 @@
     ALL_COMPLETED,
     as_completed,
     CancelledError,
-    TimeoutError,
+    TimeoutError,  # noqa: A004
     InvalidStateError,
     BrokenExecutor,
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/futures/__init__.pyi 
new/mpi4py-4.0.3/src/mpi4py/futures/__init__.pyi
--- old/mpi4py-4.0.1/src/mpi4py/futures/__init__.pyi    2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/src/mpi4py/futures/__init__.pyi    2025-02-13 
16:34:54.000000000 +0100
@@ -7,7 +7,7 @@
     ALL_COMPLETED as ALL_COMPLETED,
     as_completed as as_completed,
     CancelledError as CancelledError,
-    TimeoutError as TimeoutError,
+    TimeoutError as TimeoutError,  # noqa: A004
     InvalidStateError as InvalidStateError,
     BrokenExecutor as BrokenExecutor,
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/futures/_base.py 
new/mpi4py-4.0.3/src/mpi4py/futures/_base.py
--- old/mpi4py-4.0.1/src/mpi4py/futures/_base.py        2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/src/mpi4py/futures/_base.py        2025-02-13 
16:34:54.000000000 +0100
@@ -10,7 +10,7 @@
     FIRST_EXCEPTION,
     ALL_COMPLETED,
     CancelledError,
-    TimeoutError,
+    TimeoutError,  # noqa: A004
     Future,
     Executor,
     wait,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/futures/_base.pyi 
new/mpi4py-4.0.3/src/mpi4py/futures/_base.pyi
--- old/mpi4py-4.0.1/src/mpi4py/futures/_base.pyi       2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/src/mpi4py/futures/_base.pyi       2025-02-13 
16:34:54.000000000 +0100
@@ -3,7 +3,7 @@
     FIRST_EXCEPTION as FIRST_EXCEPTION,
     ALL_COMPLETED as ALL_COMPLETED,
     CancelledError as CancelledError,
-    TimeoutError as TimeoutError,
+    TimeoutError as TimeoutError,  # noqa: A004
     BrokenExecutor as BrokenExecutor,
     InvalidStateError as InvalidStateError,
     Future as Future,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/futures/_core.py 
new/mpi4py-4.0.3/src/mpi4py/futures/_core.py
--- old/mpi4py-4.0.1/src/mpi4py/futures/_core.py        2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/src/mpi4py/futures/_core.py        2025-02-13 
16:34:54.000000000 +0100
@@ -1208,7 +1208,7 @@
 
 
 def server_main_service():
-    from getopt import getopt
+    from getopt import getopt  # pylint: disable=deprecated-module
     longopts = ['bind=', 'port=', 'service=', 'info=']
     optlist, _ = getopt(sys.argv[1:], '', longopts)
     optdict = {opt[2:]: val for opt, val in optlist}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/futures/_core.pyi 
new/mpi4py-4.0.3/src/mpi4py/futures/_core.pyi
--- old/mpi4py-4.0.1/src/mpi4py/futures/_core.pyi       2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/src/mpi4py/futures/_core.pyi       2025-02-13 
16:34:54.000000000 +0100
@@ -37,12 +37,12 @@
     def sleep(self) -> None: ...
 
 class TaskQueue(Generic[T]):
-    def put(self, x: T) -> None: ...
+    def put(self, __x: T) -> None: ...
     def pop(self) -> T: ...
-    def add(self, x: T) -> None: ...
+    def add(self, __x: T) -> None: ...
 
 class WorkerSet(Generic[T]):
-    def add(self, x: T) -> None: ...
+    def add(self, __x: T) -> None: ...
     def pop(self) -> T: ...
 
 _WeakKeyDict: TypeAlias = weakref.WeakKeyDictionary
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/futures/pool.pyi 
new/mpi4py-4.0.3/src/mpi4py/futures/pool.pyi
--- old/mpi4py-4.0.1/src/mpi4py/futures/pool.pyi        2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/src/mpi4py/futures/pool.pyi        2025-02-13 
16:34:54.000000000 +0100
@@ -22,7 +22,7 @@
     def __init__(
         self,
         max_workers: int | None = None,
-        initializer: Callable[..., None] | None = None,
+        initializer: Callable[..., object] | None = None,
         initargs: Iterable[Any] = (),
         *,
         python_exe: str = ...,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/libmpi.pxd 
new/mpi4py-4.0.3/src/mpi4py/libmpi.pxd
--- old/mpi4py-4.0.1/src/mpi4py/libmpi.pxd      2024-10-11 12:23:10.000000000 
+0200
+++ new/mpi4py-4.0.3/src/mpi4py/libmpi.pxd      2025-02-13 16:34:54.000000000 
+0100
@@ -781,16 +781,6 @@
     int MPI_Neighbor_alltoallv_init_c(void*, MPI_Count[], MPI_Aint[], 
MPI_Datatype, void*, MPI_Count[], MPI_Aint[], MPI_Datatype, MPI_Comm, MPI_Info, 
MPI_Request*)
     int MPI_Neighbor_alltoallw_init_c(void*, MPI_Count[], MPI_Aint[], 
MPI_Datatype[], void*, MPI_Count[], MPI_Aint[], MPI_Datatype[], MPI_Comm, 
MPI_Info, MPI_Request*)
 
-    # MPI-5 process fault tolerance
-    int MPI_Comm_revoke(MPI_Comm)
-    int MPI_Comm_is_revoked(MPI_Comm, int*)
-    int MPI_Comm_get_failed(MPI_Comm, MPI_Group*)
-    int MPI_Comm_ack_failed(MPI_Comm, int, int*)
-    int MPI_Comm_agree(MPI_Comm, int*)
-    int MPI_Comm_iagree(MPI_Comm, int*, MPI_Request*)
-    int MPI_Comm_shrink(MPI_Comm, MPI_Comm*)
-    int MPI_Comm_ishrink(MPI_Comm, MPI_Comm*, MPI_Request*)
-
     #-----------------------------------------------------------------
 
     MPI_Win MPI_WIN_NULL  #:= 0
@@ -938,7 +928,7 @@
     enum: MPI_SEEK_SET              #:= 0
     enum: MPI_SEEK_CUR              #:= 1
     enum: MPI_SEEK_END              #:= 2
-    enum: MPI_DISPLACEMENT_CURRENT  #:= 3
+    enum: MPI_DISPLACEMENT_CURRENT  #:= 0
     int MPI_File_seek(MPI_File, MPI_Offset, int)
     int MPI_File_get_position(MPI_File, MPI_Offset*)
     int MPI_File_get_byte_offset(MPI_File, MPI_Offset, MPI_Offset*)
@@ -1123,10 +1113,6 @@
     enum: MPI_ERR_CONVERSION             #:= MPI_ERR_LASTCODE
     enum: MPI_ERR_DUP_DATAREP            #:= MPI_ERR_LASTCODE
     enum: MPI_ERR_VALUE_TOO_LARGE        #:= MPI_ERR_LASTCODE
-    # Process Fault Tolerance
-    enum: MPI_ERR_REVOKED                #:= MPI_ERR_UNKNOWN
-    enum: MPI_ERR_PROC_FAILED            #:= MPI_ERR_UNKNOWN
-    enum: MPI_ERR_PROC_FAILED_PENDING    #:= MPI_ERR_UNKNOWN
 
     #-----------------------------------------------------------------
 
@@ -1258,3 +1244,18 @@
     enum: MPI_COMBINER_STRUCT_INTEGER   #:= MPI_UNDEFINED
 
     #-----------------------------------------------------------------
+
+    # MPI-6 process fault tolerance
+    enum: MPI_ERR_REVOKED                #:= MPI_ERR_UNKNOWN
+    enum: MPI_ERR_PROC_FAILED            #:= MPI_ERR_UNKNOWN
+    enum: MPI_ERR_PROC_FAILED_PENDING    #:= MPI_ERR_UNKNOWN
+    int MPI_Comm_revoke(MPI_Comm)
+    int MPI_Comm_is_revoked(MPI_Comm, int*)
+    int MPI_Comm_get_failed(MPI_Comm, MPI_Group*)
+    int MPI_Comm_ack_failed(MPI_Comm, int, int*)
+    int MPI_Comm_agree(MPI_Comm, int*)
+    int MPI_Comm_iagree(MPI_Comm, int*, MPI_Request*)
+    int MPI_Comm_shrink(MPI_Comm, MPI_Comm*)
+    int MPI_Comm_ishrink(MPI_Comm, MPI_Comm*, MPI_Request*)
+
+    #-----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py/util/pool.pyi 
new/mpi4py-4.0.3/src/mpi4py/util/pool.pyi
--- old/mpi4py-4.0.1/src/mpi4py/util/pool.pyi   2024-10-11 12:23:10.000000000 
+0200
+++ new/mpi4py-4.0.3/src/mpi4py/util/pool.pyi   2025-02-13 16:34:54.000000000 
+0100
@@ -30,7 +30,7 @@
     def __init__(
         self,
         processes: int | None = None,
-        initializer: Callable[..., None] | None = None,
+        initializer: Callable[..., object] | None = None,
         initargs: Iterable[Any] = (),
         **kwargs: Any,
     ) -> None: ...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py.egg-info/PKG-INFO 
new/mpi4py-4.0.3/src/mpi4py.egg-info/PKG-INFO
--- old/mpi4py-4.0.1/src/mpi4py.egg-info/PKG-INFO       2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/src/mpi4py.egg-info/PKG-INFO       2025-02-13 
16:34:54.000000000 +0100
@@ -1,6 +1,6 @@
-Metadata-Version: 2.1
+Metadata-Version: 2.2
 Name: mpi4py
-Version: 4.0.1
+Version: 4.0.3
 Summary: Python bindings for MPI
 Author: Lisandro Dalcin
 Author-email: dalc...@gmail.com
@@ -47,6 +47,16 @@
 Requires-Python: >=3.6
 Description-Content-Type: text/x-rst
 License-File: LICENSE.rst
+Dynamic: author
+Dynamic: author-email
+Dynamic: classifier
+Dynamic: description
+Dynamic: description-content-type
+Dynamic: keywords
+Dynamic: license
+Dynamic: project-url
+Dynamic: requires-python
+Dynamic: summary
 
 ==============
 MPI for Python
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/src/mpi4py.egg-info/SOURCES.txt 
new/mpi4py-4.0.3/src/mpi4py.egg-info/SOURCES.txt
--- old/mpi4py-4.0.1/src/mpi4py.egg-info/SOURCES.txt    2024-10-11 
12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/src/mpi4py.egg-info/SOURCES.txt    2025-02-13 
16:34:54.000000000 +0100
@@ -251,6 +251,7 @@
 src/lib-mpi/config/mpi-40.h
 src/lib-mpi/config/mpi-41.h
 src/lib-mpi/config/mpi-50.h
+src/lib-mpi/config/mpi-60.h
 src/lib-mpi/config/mpi-io.h
 src/lib-mpi/config/mpiapi.h
 src/lib-mpi/config/mpich.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/test/dlpackimpl.py 
new/mpi4py-4.0.3/test/dlpackimpl.py
--- old/mpi4py-4.0.1/test/dlpackimpl.py 2024-10-11 12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/test/dlpackimpl.py 2025-02-13 16:34:54.000000000 +0100
@@ -104,7 +104,7 @@
 
 PyCapsule_IsValid = pyapi.PyCapsule_IsValid
 PyCapsule_IsValid.restype = ctypes.c_int
-PyCapsule_IsValid.argtypes = [ctypes.py_object]
+PyCapsule_IsValid.argtypes = [ctypes.py_object, ctypes.c_char_p]
 
 PyCapsule_GetPointer = pyapi.PyCapsule_GetPointer
 PyCapsule_GetPointer.restype = ctypes.c_void_p
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/test/test_attributes.py 
new/mpi4py-4.0.3/test/test_attributes.py
--- old/mpi4py-4.0.1/test/test_attributes.py    2024-10-11 12:23:10.000000000 
+0200
+++ new/mpi4py-4.0.3/test/test_attributes.py    2025-02-13 16:34:54.000000000 
+0100
@@ -110,7 +110,7 @@
         attr = obj.Get_attr(self.keyval)
         self.assertEqual(attr, addr)
 
-    @unittest.skipMPI('impi')
+    @unittest.skipMPI('impi(<2021.14.0)')
     @unittest.skipMPI('mvapich')
     @unittest.skipMPI('mpich(<4.2.1)')
     @unittest.skipMPI('openmpi(<5.0.0)')
@@ -133,7 +133,7 @@
             obj.Delete_attr(self.keyval)
             self.keyval = cls.Free_keyval(self.keyval)
 
-    @unittest.skipMPI('impi')
+    @unittest.skipMPI('impi(<2021.14.0)')
     @unittest.skipMPI('mvapich')
     @unittest.skipMPI('mpich(<4.2.1)')
     def testAttrDeleteException(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/test/test_comm.py 
new/mpi4py-4.0.3/test/test_comm.py
--- old/mpi4py-4.0.1/test/test_comm.py  2024-10-11 12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/test/test_comm.py  2025-02-13 16:34:54.000000000 +0100
@@ -251,6 +251,8 @@
         self.assertEqual(comm, MPI.COMM_NULL)
         info.Set("mpi_hw_resource_type", "@dont-thread-on-me@")
         comm = self.COMM.Split_type(split_type, info=info)
+        if unittest.is_mpi('impi(==2021.14.0)'): comm.free()
+        if unittest.is_mpi('impi(==2021.14.1)'): comm.free()
         self.assertEqual(comm, MPI.COMM_NULL)
         info.Free()
         #
@@ -302,6 +304,8 @@
         self.assertEqual(comm, MPI.COMM_NULL)
         info.Set("mpi_hw_resource_type", "@dont-thread-on-me@")
         comm = self.COMM.Split_type(split_type, info=info)
+        if unittest.is_mpi('impi(==2021.14.0)'): comm.free()
+        if unittest.is_mpi('impi(==2021.14.1)'): comm.free()
         self.assertEqual(comm, MPI.COMM_NULL)
         info.Free()
         #
@@ -420,7 +424,7 @@
         rank = self.COMM.Get_rank()
         self.assertEqual(rank, 0)
 
-    @unittest.skipMPI('openmpi(<5.2.0)')  # open-mpi/ompi#10895
+    @unittest.skipMPI('openmpi(<5.0.6)')
     def testCreateFromGroup(self):
         super().testCreateFromGroup()
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/test/test_comm_inter.py 
new/mpi4py-4.0.3/test/test_comm_inter.py
--- old/mpi4py-4.0.1/test/test_comm_inter.py    2024-10-11 12:23:10.000000000 
+0200
+++ new/mpi4py-4.0.3/test/test_comm_inter.py    2025-02-13 16:34:54.000000000 
+0100
@@ -113,7 +113,7 @@
             comm.Free()
 
     @unittest.skipMPI('msmpi')
-    @unittest.skipMPI('openmpi')  # TODO: open-mpi/ompi#11672
+    @unittest.skipMPI('openmpi(<5.0.0)')
     @unittest.skipMPI('mpich(<4.2.0)', ch3_nemesis())
     @unittest.skipMPI('mvapich(<3.0.0)', MPI.COMM_WORLD.Get_size() > 2)
     def testSplitTypeShared(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/test/test_dynproc.py 
new/mpi4py-4.0.3/test/test_dynproc.py
--- old/mpi4py-4.0.1/test/test_dynproc.py       2024-10-11 12:23:10.000000000 
+0200
+++ new/mpi4py-4.0.3/test/test_dynproc.py       2025-02-13 16:34:54.000000000 
+0100
@@ -158,6 +158,8 @@
         intercomm.Free()
 
     @unittest.skipIf(socket is None, 'socket')
+    @unittest.skipMPI('impi', MPI.COMM_WORLD.Get_size() > 2
+                      and github() and os.name == 'nt')
     def testJoin(self):
         size = MPI.COMM_WORLD.Get_size()
         rank = MPI.COMM_WORLD.Get_rank()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/test/test_errhandler.py 
new/mpi4py-4.0.3/test/test_errhandler.py
--- old/mpi4py-4.0.1/test/test_errhandler.py    2024-10-11 12:23:10.000000000 
+0200
+++ new/mpi4py-4.0.3/test/test_errhandler.py    2025-02-13 16:34:54.000000000 
+0100
@@ -137,7 +137,7 @@
 
     @unittest.skipUnless(MPI.ERRORS_ABORT, 'mpi-errors-abort')
     @unittest.skipMPI('mpich(<4.1.0)')
-    @unittest.skipMPI('impi')
+    @unittest.skipMPI('impi(<2021.14.0)')
     def testErrorsAbort(self):
         self._run_test_get_set(MPI.ERRORS_ABORT)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/test/test_mpiapi.py 
new/mpi4py-4.0.3/test/test_mpiapi.py
--- old/mpi4py-4.0.1/test/test_mpiapi.py        2024-10-11 12:23:10.000000000 
+0200
+++ new/mpi4py-4.0.3/test/test_mpiapi.py        2025-02-13 16:34:54.000000000 
+0100
@@ -70,7 +70,7 @@
         'MPI_Get_hw_resource_info',
     ]
 
-if MPI.Get_version() < (5, 0):
+if MPI.Get_version() < (6, 0):
     mpi_missing += [
         'MPI_Comm_ack_failed',
         'MPI_Comm_agree',
@@ -159,6 +159,9 @@
                 uncovered.discard(sym[:-2] + '_c')
         if MPI.REAL == MPI.DATATYPE_NULL or MPI.REAL.Get_size() == 0:
             uncovered.difference_update(mpi_fortran)
+        if name == 'MPICH' and MPI.DISPLACEMENT_CURRENT == 0:
+            mpiio = re.compile('MPI_(File_.*|Register_datarep)')
+            uncovered = set(filter( lambda s: not mpiio.match(s), uncovered))
         self.assertFalse(uncovered)
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/test/test_request.py 
new/mpi4py-4.0.3/test/test_request.py
--- old/mpi4py-4.0.1/test/test_request.py       2024-10-11 12:23:10.000000000 
+0200
+++ new/mpi4py-4.0.3/test/test_request.py       2025-02-13 16:34:54.000000000 
+0100
@@ -91,6 +91,8 @@
             index, flag = MPI.Request.Get_status_any(self.REQUESTS, None)
             self.assertEqual(index, MPI.UNDEFINED)
             self.assertTrue(flag)
+            if unittest.is_mpi('impi(==2021.14.0)'): status.error = MPI.SUCCESS
+            if unittest.is_mpi('impi(==2021.14.1)'): status.error = MPI.SUCCESS
             index, flag = MPI.Request.Get_status_any(self.REQUESTS, status)
             self.assertEqual(index, MPI.UNDEFINED)
             self.assertTrue(flag)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/test/test_spawn.py 
new/mpi4py-4.0.3/test/test_spawn.py
--- old/mpi4py-4.0.1/test/test_spawn.py 2024-10-11 12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/test/test_spawn.py 2025-02-13 16:34:54.000000000 +0100
@@ -87,8 +87,9 @@
 @unittest.skipMPI('openmpi(==4.0.0)')
 @unittest.skipMPI('openmpi(==4.0.1)', macos())
 @unittest.skipMPI('openmpi(==4.0.2)', macos())
+@unittest.skipMPI('openmpi(>=4.1.0,<4.2.0)', azure())
 @unittest.skipMPI('openmpi(>=4.1.0,<4.2.0)', github())
-@unittest.skipMPI('openmpi(>=5.0.0,<5.1.0)', skip_spawn())
+@unittest.skipMPI('openmpi(>=5.0.0,<5.0.7)', skip_spawn())
 @unittest.skipMPI('mpich(<4.1.0)', appnum() is None)
 @unittest.skipMPI('mpich(<4.3.0)', badport())
 @unittest.skipMPI('msmpi(<8.1.0)')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/test/test_util_pool.py 
new/mpi4py-4.0.3/test/test_util_pool.py
--- old/mpi4py-4.0.1/test/test_util_pool.py     2024-10-11 12:23:10.000000000 
+0200
+++ new/mpi4py-4.0.3/test/test_util_pool.py     2025-02-13 16:34:54.000000000 
+0100
@@ -373,6 +373,7 @@
 def broken_mpi_spawn():
     darwin = (sys.platform == 'darwin')
     windows = (sys.platform == 'win32')
+    azure = (os.environ.get('TF_BUILD') == 'True')
     github = (os.environ.get('GITHUB_ACTIONS') == 'true')
     skip_spawn = (
         os.environ.get('MPI4PY_TEST_SPAWN')
@@ -389,9 +390,9 @@
         if version == (4,0,2) and darwin:
             return True
         if version >= (4,1,0) and version < (4,2,0):
-            if github:
+            if azure or github:
                 return True
-        if version >= (5,0,0) and version < (5,1,0):
+        if version >= (5,0,0) and version < (5,0,7):
             if skip_spawn:
                 return True
     if name == 'MPICH':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/test/test_win.py 
new/mpi4py-4.0.3/test/test_win.py
--- old/mpi4py-4.0.1/test/test_win.py   2024-10-11 12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/test/test_win.py   2025-02-13 16:34:54.000000000 +0100
@@ -1,6 +1,6 @@
 from mpi4py import MPI
 import mpiunittest as unittest
-import sys
+import sys, os
 try:
     sys.getrefcount
 except AttributeError:
@@ -24,6 +24,9 @@
 def ch3_sock():
     return 'ch3:sock' in MPI.Get_library_version()
 
+def github():
+    return os.environ.get('GITHUB_ACTIONS') == 'true'
+
 
 class TestWinNull(unittest.TestCase):
 
@@ -210,6 +213,8 @@
             self.assertEqual(size, memories[i][1])
             self.assertEqual(disp, 1)
 
+@unittest.skipMPI('impi(==2021.14.0)', github())
+@unittest.skipMPI('impi(==2021.14.1)', github())
 class BaseTestWinCreateDynamic(BaseTestWin):
 
     CREATE_FLAVOR = MPI.WIN_FLAVOR_DYNAMIC
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpi4py-4.0.1/tox.ini new/mpi4py-4.0.3/tox.ini
--- old/mpi4py-4.0.1/tox.ini    2024-10-11 12:23:10.000000000 +0200
+++ new/mpi4py-4.0.3/tox.ini    2025-02-13 16:34:54.000000000 +0100
@@ -14,6 +14,7 @@
     py310
     py311
     py312
+    py313
     pypy3.7
     pypy3.8
     pypy3.9

Reply via email to