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
DM-33403: Move base.Packages to lsst.utils #111
Conversation
By iterating with sys.modules.iteritems(), we're subject to a race condition: if there's another thread (e.g., in scons) that does an import, sys.modules will change while we're iterating over it.
Modernized with futurize command. Currently uses pickle rather than attempting to use cPickle on legacy python.
Since we're reading from a set, the order of iteration isn't otherwise guaranteed. Different order means different version string and hence spurious failures.
Allows Packages to behave more like the dict that it contains.
This lets you bypass a file completely if using an object store.
This forces the unpickling to always use this class even if it was originally written as lsst.base.
The test was explicitly working around that function not existing but now it can be used.
d345cbb
to
70b0c00
Compare
Codecov Report
@@ Coverage Diff @@
## main #111 +/- ##
==========================================
+ Coverage 91.28% 91.51% +0.23%
==========================================
Files 36 38 +2
Lines 2156 2417 +261
==========================================
+ Hits 1968 2212 +244
- Misses 188 205 +17
Continue to review full report at Codecov.
|
We don't include any module for which we cannot determine a version. | ||
""" | ||
# Attempt to import libraries that only report their version in python | ||
for module_name in PYTHON: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is why galsim always turns up in the version information even when we aren't using it.
This lets us test the conda package gathering and the eups.
This implementation can read old pickle files and force them to be frin the lsst.utils class.
Checklist
doc/changes