Skip to content

MAINT: Remove sys.version checks#15335

Merged
mattip merged 1 commit into
numpy:masterfrom
sethtroisi:sys_version_easy
Jan 21, 2020
Merged

MAINT: Remove sys.version checks#15335
mattip merged 1 commit into
numpy:masterfrom
sethtroisi:sys_version_easy

Conversation

@sethtroisi

@sethtroisi sethtroisi commented Jan 16, 2020

Copy link
Copy Markdown
Contributor

More sys.version cleanups (these are not limited to test files like #15305 was), after this change only a handful sys.versions exist which I'll add remove/convert/simplify in a final PR.

#15306

Comment thread numpy/core/defchararray.py Outdated
Comment thread numpy/lib/npyio.py Outdated
Comment thread tools/changelog.py Outdated

@mattip mattip left a comment

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.

Only a few style nits. In general, I tried to flag import builtins, it usually indicates a hacky solution to a problem and causes a very small performance penalty. Also, there are some strange import semantics where python2 is using relative imports but python3 changed to absolute.

Comment thread numpy/core/defchararray.py Outdated
Comment thread numpy/core/numeric.py Outdated
Comment thread numpy/core/numerictypes.py Outdated
Comment thread numpy/distutils/log.py Outdated
Comment thread numpy/distutils/mingw32ccompiler.py Outdated
Comment thread numpy/lib/npyio.py Outdated
Comment thread numpy/lib/npyio.py Outdated
Comment thread numpy/ma/core.py Outdated
Comment thread runtests.py Outdated
Comment thread tools/changelog.py Outdated
Comment thread numpy/distutils/ccompiler.py Outdated

@mwtoews mwtoews left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a few imports to remove or sort/group at the top

Comment thread numpy/core/__init__.py Outdated
Comment thread benchmarks/benchmarks/bench_indexing.py Outdated
Comment thread numpy/core/arrayprint.py Outdated
Comment thread numpy/core/numerictypes.py Outdated
Comment thread numpy/distutils/fcompiler/gnu.py Outdated
Comment thread numpy/lib/recfunctions.py Outdated
Comment thread numpy/linalg/lapack_lite/clapack_scrub.py Outdated
Comment thread numpy/ma/core.py Outdated
Comment thread numpy/ma/core.py Outdated
Comment thread tools/changelog.py Outdated
@sethtroisi

Copy link
Copy Markdown
Contributor Author

These are wonderful comments mwtoews I'm on vacation but will fix when I'm back

@mattip

mattip commented Jan 20, 2020

Copy link
Copy Markdown
Member

There are merge conflicts

@mattip mattip left a comment

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.

There are some comments still open, and a few follow-on comments as well.

Comment thread numpy/core/numeric.py Outdated
Comment thread tools/changelog.py Outdated
@sethtroisi

Copy link
Copy Markdown
Contributor Author

Addressed @mattip's comments, fixed merge conflict, and did another quick pass over all the changes.

@mattip mattip merged commit f71d993 into numpy:master Jan 21, 2020
@mattip

mattip commented Jan 21, 2020

Copy link
Copy Markdown
Member

Thanks @sethtroisi

@sethtroisi sethtroisi deleted the sys_version_easy branch January 21, 2020 00:36
@sethtroisi

Copy link
Copy Markdown
Contributor Author

Thanks for all the comments and pointers.

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.

5 participants