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

ignore_version_mismatch doesn't appear to be used? #1811

Closed
astrofrog opened this issue Jul 25, 2024 · 10 comments
Closed

ignore_version_mismatch doesn't appear to be used? #1811

astrofrog opened this issue Jul 25, 2024 · 10 comments

Comments

@astrofrog
Copy link
Contributor

I am getting warnings about mismatched schema versions regardless of whether ignore_version_mismatch is set or not in open. It doesn't look like this setting is actually used anywhere in the asdf package?

@braingram
Copy link
Contributor

Thanks for opening the issue. What's the error you're seeing? Also what package versions are you using (a full pip freeze output would be helpful)?

@braingram
Copy link
Contributor

Thanks also for pointing out that this setting is unused. I opened an issue to track it's removal. I is a left-over from the legacy extension API that was removed in asdf 3.0.0.

@astrofrog
Copy link
Contributor Author

@braingram - well no error message as such, just that I would like to actually ignore the version mismatch issues. What is the recommended way to do that now if that option is deprecated?

@braingram
Copy link
Contributor

What's the warning message?

@astrofrog
Copy link
Contributor Author

astrofrog commented Jul 25, 2024

asdf.exceptions.AsdfPackageVersionWarning: File 'file:///home/runner/work/reproject/reproject/.tox/py312-test-devdeps/lib/python3.12/site-packages/reproject/tests/data/aia_171_level1.asdf'
was created with extension URI 'asdf://asdf-format.org/core/extensions/core-1.5.0'
(from package asdf-astropy==0.6.1), but older package (asdf-astropy==0.6.1.dev24+gfa5f1f4) is installed.

@astrofrog
Copy link
Contributor Author

which is frustrating because in fact I am using the development version of asdf-astropy which is more recent than 0.6.1.

@braingram
Copy link
Contributor

Thanks! I think that also means the main branch of asdf-astropy could use a newer (0.6.2) dev tag. I'll give that a look.

One way to ignore these warnings would be to:

import asdf
import warnings
warnings.simplefilter("ignore", category=asdf.exceptions.AsdfPackageVersionWarning)
# your code here

@braingram
Copy link
Contributor

I added a 0.6.2.dev tag to asdf-astropy so I think pulling the tags should also fix the issue.

@astrofrog
Copy link
Contributor Author

Thanks! Weirdly I thought setuptools-scm was smart enough to use the next version for the start of the version string. I'll need to take a look!

@braingram
Copy link
Contributor

braingram commented Jul 25, 2024

Let me know if you run into any issues. I'm going to close this issue but feel free to re-open it. Also, thanks again for opening the issue!

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

No branches or pull requests

2 participants