Skip to content

Commit f6c1f0b

Browse files
committed
Warn about use of non-public isl API
1 parent ffd8df3 commit f6c1f0b

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

README.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ islpy: Polyhedral Analysis from Python
1212
:target: https://pypi.org/project/islpy/
1313

1414
islpy is a Python wrapper around Sven Verdoolaege's `isl
15-
<http://www.kotnet.org/~skimo/isl/>`_, a library for manipulating sets and
15+
<https://libisl.sourceforge.io/>`_, a library for manipulating sets and
1616
relations of integer points bounded by linear constraints.
1717

1818
Supported operations on sets include
@@ -32,5 +32,12 @@ bounds on piecewise step-polynomials.
3232

3333
Islpy comes with comprehensive `documentation <http://documen.tician.de/islpy>`_.
3434

35-
*Requirements:* islpy needs a C++ compiler to build. GMP, which used to be
36-
a dependency, is no longer required.
35+
*Requirements:* islpy needs a C++ compiler to build. It can optionally make use
36+
of GMP for support of large integers.
37+
38+
One important thing to know about islpy is that it exposes every function in isl
39+
that is visible in the headers, not just what isl's authors consider its
40+
documented, public API (marked by ``__isl_export``). These (technically)
41+
undocumented functions are marked in the islpy documentation. Many of them are useful
42+
and essential for certain operations, but isl's API stability guarantees do not
43+
apply to them. Use them at your own risk.

gen_wrap.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,6 +1393,12 @@ def write_exposer(outf, meth, arg_names, doc_str):
13931393
#if meth.is_static:
13941394
# doc_str = "(static method)\n" + doc_str
13951395

1396+
if not meth.is_exported:
1397+
doc_str = doc_str + (
1398+
"\n\n.. warning::\n\n "
1399+
"This function is not part of the officially public isl API. "
1400+
"Use at your own risk.")
1401+
13961402
doc_str_arg = ', "{}"'.format(doc_str.replace("\n", "\\n"))
13971403

13981404
wrap_class = CLASS_MAP.get(meth.cls, meth.cls)

0 commit comments

Comments
 (0)