Skip to content

DEP: Deprecate PyArray_FromDimsAndDataAndDescr, PyArray_FromDims - #14100

Merged
mattip merged 3 commits into
numpy:masterfrom
kritisingh1:dep3
Aug 8, 2019
Merged

mattip merged 3 commits into
numpy:masterfrom
kritisingh1:dep3

Conversation

@kritisingh1

@kritisingh1 kritisingh1 commented Jul 24, 2019 •

Copy link
Copy Markdown
Member

Related to #11521
@seberg Please review.

@kritisingh1 kritisingh1 added 07 - Deprecation 63 - C API Changes or additions to the C API. Mailing list should usually be notified. labels Jul 24, 2019
@seberg
seberg self-requested a review July 24, 2019 17:27
Comment thread numpy/core/src/multiarray/ctors.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine. In principle (what I mentioned with the reference counts). This needs the additional line

Py_DECREF(descr);

(it was missing in the DEPRECATE path before). This is because the reference to descr is normally "stolen" by PyArray_NewFromDescr.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(the same applies below).

Comment thread numpy/core/src/multiarray/ctors.c Outdated

@seberg seberg Jul 24, 2019 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would prefer this simply as part of the comment right above the function. Just replace the current comment (it is useless now anyway). (If you edit it, also please make sure it adheres to our comment style:

/*NUMPY_API
 *
 * Comment comme
 * Which may be multiline
 */

@seberg

seberg commented Jul 24, 2019

Copy link
Copy Markdown
Member

Should do that for the previous one as well, but can you add a changelog/14100.expired.rst file with a bullet point * one sentance about these two being effectively removed (always error).

@seberg

seberg commented Jul 28, 2019

Copy link
Copy Markdown
Member

Thanks it looks good. we should add a release note for this (and actually also for the other one). The way I guess we do that now is to add a file changelog/14100.expired.rst, it can be just a short:

* ... will now always result in an error.

or something similar. (could add a second file with the old PR# for the first deprecation, but I will just do it some time otherwise.)

@seberg

seberg commented Jul 29, 2019

Copy link
Copy Markdown
Member

Thanks, may just merge later. The function names could be in double ticks ``PyArray..`` (and I think depending on where we go, a single bullet point may be nicer, but that is probably something to fix up later in any case, when I fixed up towncrier a bit more).

@mattip
mattip merged commit 24bc2da into numpy:master Aug 8, 2019
@mattip

mattip commented Aug 8, 2019

Copy link
Copy Markdown
Member

Thanks @kritisingh1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

07 - Deprecation 63 - C API Changes or additions to the C API. Mailing list should usually be notified.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants