Skip to content

Commit 912fb61

Browse files
committed
DOC: Move documentation from 2.0 Notes/migration guide to release fragment
1 parent b48d3bf commit 912fb61

File tree

3 files changed

+15
-26
lines changed

3 files changed

+15
-26
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
API symbols now hidden but customizable
2+
---------------------------------------
3+
NumPy now defaults to hide the API symbols it adds to allow all NumPy API
4+
usage.
5+
This means that by default you cannot dynamically fetch the NumPy API from
6+
another library (this was never possible on windows).
7+
8+
If you are experiencing linking errors related to ``PyArray_API`` or
9+
``PyArray_RUNTIME_VERSION``, you can define the
10+
:c:macro:`NPY_API_SYMBOL_ATTRIBUTE` to opt-out of this change.
11+
12+
If you are experiencing problems due to an upstream header including NumPy,
13+
the solution is to make sure you ``#include "numpy/ndarrayobject.h"`` before
14+
their header and import NumPy yourself based on :ref:`including-the-c-api`.
15+

doc/source/numpy_2_0_migration_guide.rst

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -221,21 +221,6 @@ using the NumPy types. You can still write cython code using the ``c.real`` and
221221
``c.imag`` attributes (using the native typedefs), but you can no longer use
222222
in-place operators ``c.imag += 1`` in Cython's c++ mode.
223223

224-
.. _api-table-visibility-change:
225-
226-
Changes in table visibility (linking error)
227-
-------------------------------------------
228-
If you are experiencing linking errors related to ``PyArray_API`` or
229-
``PyArray_RUNTIME_VERSION``, NumPy changed the default visibility to hidden
230-
(which was always the case on windows).
231-
You can use the :c:macro:`NPY_API_SYMBOL_ATTRIBUTE` to opt-out of this change.
232-
However, we generally discourage linking across project boundaries because
233-
it breaks NumPy compatibility checks.
234-
235-
If you are experiencing problems due to an upstream header including NumPy,
236-
the solution is to make sure you ``#include "numpy/ndarrayobject.h"`` before
237-
their header and import NumPy yourself based on :ref:`including-the-c-api`.
238-
239224

240225
Changes to namespaces
241226
=====================

doc/source/release/2.0.0-notes.rst

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -655,17 +655,6 @@ Please see :ref:`migration_c_descr` for more information.
655655

656656
(`gh-25943 <https://github.com/numpy/numpy/pull/25943>`__)
657657

658-
API symbols now hidden but customizable
659-
---------------------------------------
660-
NumPy now defaults to hide the API symbols it adds to allow all NumPy API
661-
usage.
662-
This means that by default you cannot dynamically fetch the NumPy API from
663-
another library (this was never possible on windows).
664-
Please see :ref:`api-table-visibility-change` and the new
665-
:c:macro:`NPY_API_SYMBOL_ATTRIBUTE` which allows to customize/revert this.
666-
667-
(`gh-26103 <https://github.com/numpy/numpy/pull/26103>`__)
668-
669658

670659
NumPy 2.0 C API removals
671660
========================

0 commit comments

Comments
 (0)