8000 MAINT: Cleanup references to python2 by sethtroisi · Pull Request #15417 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

MAINT: Cleanup references to python2 #15417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 29, 2020
Merged

Conversation

sethtroisi
Copy link
Contributor

These were found with grep [pP]ython\s*2 and should probably be cleaned up.

@@ -5,9 +5,6 @@
*/
8000 #include "typeinfo.h"

/* In python 2, this is not exported from Python.h */
#include <structseq.h>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

for PyPy3 numpy/core/src/multiarray/typeinfo.c:16:8: error: unknown type name ‘PyStructSequence_Field’

I'll investigate further.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I reverted removing the include because it fails in PyPy.
I opened an issue on pypy to see if this should be fixed in the future but even if it does that won't be fixed for months.
https://bitbucket.org/pypy/pypy/issues/3160/structseqh-missing-from-pythonh

Copy link
Member

Choose a reason for hiding this comment

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

Probably better "In PyPy <= 7.3.0", and you can drop the comment if you do

#if (defined(PYPY_VERSION_NUM) && (PYPY_VERSION_NUM <= 0x07030000))
/* PyPy issue 3160 */
#include <structseq.h>
#endif

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment updated.

Thanks for the informative comments in the PyPy issue (https://bitbucket.org/pypy/pypy/issues/3160/structseqh-missing-from-pythonh)

@sethtroisi sethtroisi closed this Jan 28, 2020
@sethtroisi sethtroisi reopened this Jan 28, 2020
@sethtroisi sethtroisi changed the title MAINT: Python2 Cleanups MAINT: Cleanup references to python2 Jan 28, 2020
@mattip mattip merged commit 05cb43b into numpy:master Jan 29, 2020
@mattip
Copy link
Member
mattip commented Jan 29, 2020

Thanks @sethtroisi

@sethtroisi sethtroisi deleted the python2_easy branch January 29, 2020 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0