Skip to content

Fix issues installing AstroPy with Python 3.x - #23

Merged
eteq merged 14 commits into
astropy:masterfrom
astrofrog:python-3x
Oct 21, 2011
Merged

eteq merged 14 commits into
astropy:masterfrom
astrofrog:python-3x

Conversation

@astrofrog

Copy link
Copy Markdown
Member

The following commits fix the installation issues in Python 3.x while still working in Python 2.6 and 2.7. 22 tests are failing in Python 3.2, but at least the package installs, so maybe we can merge this and then fix the package-specific issues after?

Comment thread astropy/utils/odict.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.

Not to be pedantic, but shouldn't this still say except ImportError?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good catch! Fixed.

Comment thread astropy/setup_helpers.py Outdated

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.

What if the data is not utf-8? Then the comparison with original_data fails. Encoding needs to be the responsibility of the caller. I will submit a pull request to fix this.

mdboom and others added 2 commits October 18, 2011 14:59
@astrofrog

Copy link
Copy Markdown
Member Author

Are there any other issues that need to be fixed before this can be merged?

@eteq

eteq commented Oct 19, 2011

Copy link
Copy Markdown
Member

I'm getting a bunch of errors in the tests that seem to be due to the OrderedDict tests... these seem to mostly have to do with some changes in sequence behavior and various similar quirks. We probably don't care, though, because we sholdn't be using the backported odict in 3.2 anyway. Perhaps we either check for version >2.6 and just have the tests be no-op if so? Or maybe there's a way to tell py.test to do this...

@astrofrog

Copy link
Copy Markdown
Member Author

I was getting some errors both from wcs and odict, but I figured that for now the main issue is to be able to have the package install, then we can try and fix the tests after (I'll ask Tom A. what he thinks re: the failing odict tests since he implemented most of it into astropy). In the mean time, is there any reason not to merge this? (apart from the distutils.log.info issue above?

@eteq

eteq commented Oct 19, 2011

Copy link
Copy Markdown
Member

I think the content looks fine. py.test has a builtin way to skip tests just like this, though (see http://pytest.org/latest/skipping.html#marking-a-test-function-to-be-skipped) - I'll submit a pull request to your branch implementing that just for the odict stuff. So just hold off for a bit so I can do that and you can have a look.

@mdboom

mdboom commented Oct 20, 2011

Copy link
Copy Markdown
Contributor

I've submitted a pull request to this to fix the astropy.wcs tests.

@astrofrog

Copy link
Copy Markdown
Member Author

With the latest commits, AstroPy install correctly on Python 2.6, 2.7, and 3.2, and no tests fail. The odict tests are skipped on 2.7 and 3.2. Ok to merge?

eteq added a commit that referenced this pull request Oct 21, 2011
Fix issues installing AstroPy with Python 3.x
@eteq
eteq merged commit 55ad537 into astropy:master Oct 21, 2011
keflavich pushed a commit to keflavich/astropy that referenced this pull request Oct 9, 2013
Fix issues installing AstroPy with Python 3.x
taldcroft pushed a commit to taldcroft/astropy that referenced this pull request May 2, 2014
@astrofrog
astrofrog deleted the python-3x branch July 5, 2016 18:46
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.

4 participants