Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7fc7277

Browse files
authored
Merge pull request #24278 from neutrinoceros/nep_0053_proof_reading
DOC: fix a couple typos and rst formatting errors in NEP 0053
2 parents f7dec7c + 5c3ebd1 commit 7fc7277

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

doc/neps/nep-0053-c-abi-evolution.rst

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,14 @@ Cython users may use the NumPy C-API via ``cimport numpy as cnp``.
170170
Due to the uncertainty of Cython development, there are two scenarios for
171171
impact on Cython users.
172172

173-
If Cython 3 can be relied on, Cython users would be impacted *less* then C-API
173+
If Cython 3 can be relied on, Cython users would be impacted *less* than C-API
174174
users, because Cython 3 allows us to hide struct layout changes (i.e. changes
175175
to ``PyArray_Descr``).
176-
If this is not the case and we must support Cython 2.x, then Cython users
177-
will also have to use a function/macro like ``PyDataType_ITEMSIZE()`` (or
178-
use the Python object). This is unfortunately less typical in Cython code,
179-
but also unlikely to be a common pattern for dtype struct fields/attributes.
176+
If this is not the case and we must support Cython 0.29.x (which is the historic branch
177+
before Cython 3), then Cython users will also have to use a function/macro like
178+
``PyDataType_ITEMSIZE()`` (or use the Python object). This is unfortunately less
179+
typical in Cython code, but also unlikely to be a common pattern for dtype struct
180+
fields/attributes.
180181

181182
A further impact is that some future API additions such as new classes may
182183
need to placed in a distinct ``.pyd`` file to avoid Cython generating code
@@ -199,7 +200,7 @@ is missing.
199200

200201
Some new API can be backported
201202
-------------------------------
202-
One large advantage of allowing users to compile with the newst version of
203+
One large advantage of allowing users to compile with the newest version of
203204
NumPy is that in some cases we will be able to backport new API.
204205
Some new API functions can be written in terms of old ones or included
205206
directly.
@@ -229,7 +230,7 @@ An implementation can be found in the `PR 23528`_.
229230
The second part is mainly about identifying and implementing the desired
230231
changes in a way that backwards compatibility will not be broken and API
231232
breaks remain manageable for downstream libraries.
232-
Everyone change we do must have a brief note on how to adapt to the
233+
Every change we do must have a brief note on how to adapt to the
233234
API change (i.e. alternative functions).
234235

235236
NumPy 2 compatibility and API table changes
@@ -239,12 +240,13 @@ NumPy 1.x (a table is a list of functions and symbols).
239240

240241
For compatibility we would need to translate the 1.x table to the 2.0 table.
241242
This could be done in headers only in theory, but this seems unwieldy.
242-
We thus propose to add a ``numpy2_compat`` package. This packages main
243+
We thus propose to add a ``numpy2_compat`` package. This package's main
243244
purpose would be to provide a translation of the 1.x table to the 2.x one
244245
in a single place (filling in any necessary blanks).
245246

246247
Introducing this package solves the "transition" issue because it allows
247248
a user to:
249+
248250
* Install a SciPy version that is compatible with 2.0 and 1.x
249251
* and keep using NumPy 1.x because of other packages they are using are not
250252
yet compatible.
@@ -278,6 +280,7 @@ Backward compatibility
278280
======================
279281

280282
As mentioned above backwards compatibility is achieved by:
283+
281284
1. Forcing downstream to recompile with NumPy 2.0
282285
2. Providing a ``numpy2_compat`` library.
283286

0 commit comments

Comments
 (0)