Skip to content

Conversation

@mdboom
Copy link
Contributor

@mdboom mdboom commented Apr 3, 2013

This problem was discussed some in #934 and #908.

Sphinx recently put out v1.2 beta 1 on PyPI - this was killing the travis build, so you can see the error for this in e.g. https://s3.amazonaws.com/archive.travis-ci.org/jobs/5958983/log.txt .

The underlying problem is twofold: First, WCSBase is not picklable. Sphinx 1.2b1 tries to pickle it where 1.1.3 did not, and that leads to this failure. The second part is why Sphinx 1.2 is pickling WCSBase at all. I can't see anything in the sphinx 1.2 changelog that would cause this, so I posted to the sphinx mailing list asking about it (https://groups.google.com/forum/?fromgroups=#!topic/sphinx-users/kpMScxmeMMc).

@mdboom - do you have any thoughts here? A workaround might be to make WCSBase support pickling, although I'm not sure how much work that would be.

@mdboom
Copy link
Contributor

mdboom commented Apr 3, 2013

Thanks for getting to the bottom of this. I think it would be a fair bit of work to make WCSBase picklable, and I'd rather not bother unless absolutely necessary. Maybe we should wait to see what the response is to the Sphinx bug first -- I'm not sure why one would need to pickle an entire class just to retain its docstrings...

@mdboom
Copy link
Contributor

mdboom commented Apr 3, 2013

On further investigation, it looks like it only needs to pickle the "type" WCSBase, not a WCSBase instance, which should be an easier problem, since it has no state. In fact, Python should be able to handle that automatically, I would have thought. It turns out that by getting Sphinx to use pickle rather than cPickle, you get a better error message out:

  File "/usr/lib64/python2.7/pickle.py", line 748, in save_global
    (obj, module, name))
pickle.PicklingError: Can't pickle <type 'astropy.wcs.WCSBase'>: it's not found as astropy.wcs.WCSBase

And from that, it's clear what's going on. astropy.wcs.WCSBase wasn't actually accessible by that path. The attached PR fixes that. I'm comfortable with this as a workaround for Sphinx 1.2b1, since I think it actually makes the documentation match the code better.

Getting through this, I did uncover another issue hiding beneath it, but I'll file a new issue for that.

@eteq
Copy link
Member Author

eteq commented Apr 3, 2013

Ahhh, that explains why I was having so much trouble finding WCSBase in the first place. Alright, looks good to me, then.

It's still a bit confusing why this behavior changed from 1.1.3 to 1.2, but it's not really a big deal.

eteq added a commit that referenced this pull request Apr 4, 2013
Docs won't build on Sphinx 1.2b1 due to WCSBase
@eteq eteq merged commit 38d1bde into astropy:master Apr 4, 2013
eteq added a commit that referenced this pull request May 13, 2013
Docs won't build on Sphinx 1.2b1 due to WCSBase
@mdboom mdboom deleted the docs/fix-building-with-sphinx1.2b1 branch May 21, 2014 23:54
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.

2 participants