Skip to content
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

MAINT: Require Python >= 3.5, purge Python 2 compatibility #787

Merged
merged 23 commits into from
Aug 17, 2019

Conversation

effigies
Copy link
Member

@effigies effigies commented Aug 6, 2019

Summary of changes:

  • Minimum Python: 3.5.1 (skipping 3.5.0 lets us drop the gzip buffer hack)
  • Minimum numpy: 1.12.0 (assert_warns does not work properly with multiple warnings being emitted until then; we've been somehow missing this edge case by checking minimum versions on Py2 only)
  • Drop nibabel.externals.six altogether, along with all imports from six
  • Switch from nibabel.py3k to numpy.compat.py3k. They don't seem to be dropping it when dropping Python 2 support so it seems safe to rely on it.
  • A few hacks found with grep -E -rIi 'py(thon)? ?[23]' nibabel | grep '\.py:' were removed.
  • Compatibility in pkg_info will be handled in MAINT: Manage versioning with versioneer #786.

  • Update tests
  • Purge six
  • Purge py3k
  • Purge from __future__
  • Check for any PY2/PY3 tags indicating compatibility hacks
  • Update requirements

@effigies effigies force-pushed the maint/purge_python2 branch 2 times, most recently from 7c437af to 930ee6c Compare August 11, 2019 04:57
@codecov
Copy link

codecov bot commented Aug 12, 2019

Codecov Report

Merging #787 into master will decrease coverage by <.01%.
The diff coverage is 97.67%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #787      +/-   ##
==========================================
- Coverage   90.03%   90.03%   -0.01%     
==========================================
  Files          94       94              
  Lines       12018    11886     -132     
  Branches     2136     2119      -17     
==========================================
- Hits        10821    10702     -119     
+ Misses        851      840      -11     
+ Partials      346      344       -2
Impacted Files Coverage Δ
nibabel/processing.py 100% <ø> (ø) ⬆️
nibabel/volumeutils.py 92.59% <ø> (-0.41%) ⬇️
nibabel/parrec.py 94.37% <ø> (-0.02%) ⬇️
nibabel/gifti/parse_gifti_fast.py 84.47% <ø> (-0.08%) ⬇️
nibabel/mriutils.py 100% <ø> (ø) ⬆️
nibabel/streamlines/array_sequence.py 100% <ø> (ø) ⬆️
nibabel/arraywriters.py 96.92% <ø> (-0.02%) ⬇️
nibabel/fileutils.py 100% <ø> (ø) ⬆️
nibabel/nicom/dicomreaders.py 58.76% <ø> (-0.43%) ⬇️
nibabel/loadsave.py 90.38% <ø> (-0.1%) ⬇️
... and 43 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 10ad38a...6c66c6a. Read the comment docs.

@effigies effigies force-pushed the maint/purge_python2 branch 3 times, most recently from 647c329 to 676be6b Compare August 12, 2019 15:22
Copy link
Member Author

@effigies effigies left a comment

Choose a reason for hiding this comment

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

Still need to update docs one more time.

A review would be greatly appreciated.

doc/source/installation.rst Outdated Show resolved Hide resolved
@effigies effigies added this to the 3.0.0 RC1 milestone Aug 12, 2019
@effigies effigies mentioned this pull request Aug 15, 2019
@effigies
Copy link
Member Author

Taking the plunge.

@effigies effigies merged commit 7c69442 into nipy:master Aug 17, 2019
@effigies effigies deleted the maint/purge_python2 branch August 17, 2019 01:14
@effigies effigies modified the milestones: 3.0.0 RC1, 3.0.0 Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant