MNT: Make yaml import truly optional in io.misc.yaml#10257
MNT: Make yaml import truly optional in io.misc.yaml#10257bsipocz merged 5 commits intoastropy:masterfrom
Conversation
taldcroft
left a comment
There was a problem hiding this comment.
Looks OK to me. Is the min 3.12 requirement new? Maybe this needs to be mentioned in https://docs.astropy.org/en/stable/install.html?
Not really. It is already in the docstring and I am just making the implementation consistent. This line was added in #5486 by @taldcroft . astropy/astropy/io/misc/yaml.py Lines 23 to 25 in f2092fa |
bsipocz
left a comment
There was a problem hiding this comment.
Two minor caveats:
- please add pyyaml==3.12 to the tox file for the oldest deps env
- mention this version in docs/install.rst
|
Oh, the the 32bit failure is related |
|
Re: 32-bit -- I think the failure is not so much 32-bit but the parallel part. Maybe |
|
ugly workaround just for this, but what if we run the 32bit tests with alldeps? I would generarly feel a bit better to have alldeps the default to make sure we run as many tests as possible for a setting, and only have one run with the mandatory only to make sure the bare minimum works as well, rather the other way around. pinging @astrofrog as he may recall if there was any such reason to do the 32bit this way. |
|
I am a little afraid that adding |
|
yeah, I wouldn't be surprised by the tiny monster 🐛 crawling out from their hides |
3a9efad to
a197269
Compare
|
Yup... Can o' worms: I'll think of a way to just do a custom skip on that doctest... |
8180dd0 to
ff6daf4
Compare
|
I think I addressed all the comments. Had to move the docstring to RST though to use the doctest directive that we know would work. I successfully ran all the tests locally without |
|
I don't think this needs a changelog, nothing really changed on for the users. |
|
Thanks @pllim for taking care all these import issues. |
|
I hope it works. I think I must have missed something but I think @mhvk fixed it somewhere else. I am sorry! |
|
Yes, fixed elsewhere. And, overall, very nice to have those imports be truly optional! It would be even nicer if there was some way of bailing from module loading (with |
MNT: Make yaml import truly optional in io.misc.yaml
MNT: Make yaml import truly optional in io.misc.yaml
MNT: Make yaml import truly optional in io.misc.yaml
…skip doctest collection in astropy.io.misc.yaml if PyYAML is not available.
…skip doctest collection in astropy.io.misc.yaml if PyYAML is not available.
…skip doctest collection in astropy.io.misc.yaml if PyYAML is not available.
Description
This pull request is to address the
yamlimport error mentioned in #10246 .With this patch, without PyYAML installed:
TODO