diff --git a/doc/sphinx/python/index.rst b/doc/sphinx/python/index.rst index cc256e189..b53c39862 100644 --- a/doc/sphinx/python/index.rst +++ b/doc/sphinx/python/index.rst @@ -4,6 +4,15 @@ Python Module Documentation (Legacy) ==================================== +.. warning:: + + This version of the Cantera Python module is deprecated. The last version + of Cantera that this module will be included with is Cantera 2.1. Starting + with Cantera 2.1, a new Python module (based on the Cython package) is + available. When compiling Cantera, the new module can be build by using the + SCons option ``python_package=new``. Changes to the user interface are documented in :ref:`sec-cython-documentation`. + + Contents: .. toctree:: diff --git a/interfaces/python/Cantera/__init__.py b/interfaces/python/Cantera/__init__.py index 46be418fd..4e6e985d6 100755 --- a/interfaces/python/Cantera/__init__.py +++ b/interfaces/python/Cantera/__init__.py @@ -15,6 +15,13 @@ from importFromFile import * import os as _os import sys as _sys +import warnings +warnings.warn( + "\nThis version of the Cantera Python module is deprecated and will not be\n" + "available in Cantera 2.2 or later. For details on the new module, see\n" + "http://cantera.github.io/dev-docs/sphinx/html/cython/index.html\n", + stacklevel=2) + if not os.getenv('PYTHON_CMD'): # Setting PYTHON_CMD here avoids issues with .cti -> .xml conversions # in cases where the python interpreter isn't in the system path.