Skip to content

Remove support for Numpy 1.5#3100

Merged
astrofrog merged 6 commits into
astropy:masterfrom
mdboom:misc/remove-numpy-15
Nov 18, 2014
Merged

Remove support for Numpy 1.5#3100
astrofrog merged 6 commits into
astropy:masterfrom
mdboom:misc/remove-numpy-15

Conversation

@mdboom

@mdboom mdboom commented Nov 14, 2014

Copy link
Copy Markdown
Contributor

Since there seems to be consensus on doing this, we should go through and update the minimum version and remove any backward-compatibility hacks that exist in various places.

@mdboom mdboom self-assigned this Nov 14, 2014
@mdboom mdboom added this to the v1.0.0 milestone Nov 14, 2014
@astrofrog

Copy link
Copy Markdown
Member

If anyone knows of specific hacks, you can list them here. For instance, we can remove anywhere that uses NUMPY_LT_1P6.

@embray

embray commented Nov 14, 2014

Copy link
Copy Markdown
Member

In any case anyone is working on a patch for this, I think all of the hacks starting on line 56 can be removed from here:

https://github.com/astropy/astropy/blob/master/astropy/io/fits/py3compat.py#L56

But I need to double check that (against Numpy 1.6 at a minimum).

@astrofrog

Copy link
Copy Markdown
Member

Also there is an instance of _NUMPY_GTR_15 being used, so that code can be removed.

@taldcroft

Copy link
Copy Markdown
Member

I just grepped on NUMPY in the astropy source tree and there are a number of relevant hits in table and io.ascii where numpy 1.5 (or < 1.6.x) is being special-cased. I think most of these are straightforward to take out.

@eteq

eteq commented Nov 14, 2014

Copy link
Copy Markdown
Member

Note that #2992 requires numpy > 1.6, so it needs to at the least remove the test in 1.5 before it can be merged. before this issue was created I pushed up a couple of commits that update the minimum numpy version, but I could roll that back to just removing the 1.5 test from travis (and then this issue would actually bump up the officially-listed minimum).

I don't really mind either way, but I do really want to see #2992 merged ASAP, as it's blocking other critical work.

@mdboom

mdboom commented Nov 14, 2014

Copy link
Copy Markdown
Contributor Author

Just FYI: I'm working on this (I've assigned myself, but just in case there's confusion).

@mdboom

mdboom commented Nov 14, 2014

Copy link
Copy Markdown
Contributor Author

PR attached.

There is one extra place to remove, but I didn't feel like I could quite navigate it: io/fits/column.py:_scalar_to_format says it only exists for Numpy 1.5 support. Cc: @embray

Comment thread astropy/units/quantity_helper.py 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.

Is this safe to remove since it's <=?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oops. Just missed this one. I'll reinstate.

@embray

embray commented Nov 14, 2014

Copy link
Copy Markdown
Member

I don't know if we've started a "What's New" page for 1.0, but this should definitely be in there too. Do we at least want to open an issue for that and start a checklist?

@embray

embray commented Nov 14, 2014

Copy link
Copy Markdown
Member

@mdboom I'm not sure if anything really needs to be done for astropy.io.fits.column but I'll take a look.

@astrofrog

Copy link
Copy Markdown
Member

@embray - see #2935

@astrofrog astrofrog mentioned this pull request Nov 14, 2014
10 tasks
@taldcroft

Copy link
Copy Markdown
Member

👍 from my perspective, nice!

@eteq eteq mentioned this pull request Nov 15, 2014
2 tasks
@eteq

eteq commented Nov 15, 2014

Copy link
Copy Markdown
Member

👍 from me too - I can rebase #2992 after this is merged - @mdboom addressed my concern about this delaying #2992 by just doing it all right now!

Also @taldcroft - I'm not surprised you're happy with this: it's roughly a 7:1 ratio of lines removed to lines added. 😉

@astrofrog

Copy link
Copy Markdown
Member

There have been no objections so I think this is fine to merge 👍

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.

With this line removed you can also remove the from distutils import version on line 8 of this file.

@mdboom

mdboom commented Nov 17, 2014

Copy link
Copy Markdown
Contributor Author

I've deleted the unused imports mentioned by @embray.

@mdboom mdboom force-pushed the misc/remove-numpy-15 branch from cd94e27 to 857ecad Compare November 17, 2014 22:33
@astrofrog

Copy link
Copy Markdown
Member

There have been zero objections to this, so I will go ahead and merge so that @eteq can continue the ERFA work. Thanks @mdboom!

astrofrog added a commit that referenced this pull request Nov 18, 2014
@astrofrog astrofrog merged commit 0bbf114 into astropy:master Nov 18, 2014
@eteq

eteq commented Nov 18, 2014

Copy link
Copy Markdown
Member

Thanks @mdboom !

@mdboom mdboom deleted the misc/remove-numpy-15 branch March 3, 2015 16:19
sargas added a commit to sargas/pyregion that referenced this pull request Dec 11, 2015
This has been removed in astropy in astropy/astropy#3100
sargas added a commit to sargas/pyregion that referenced this pull request Mar 30, 2016
This has been removed in astropy in astropy/astropy#3100
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