Replies: 1 comment
-
| 
         Hello @sdbbs, So, when you did  After we deprecate something, you should really not do that  >>> import colour
>>> colour.sRGB_COLOURSPACE
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/kelsolaar/Documents/Development/colour-science/colour/colour/__init__.py", line 383, in __getattr__
    return super(colour, self).__getattr__(attribute)
  File "/Users/kelsolaar/Documents/Development/colour-science/colour/colour/utilities/deprecation.py", line 349, in __getattr__
    return getattr(self._module, attribute)
AttributeError: module 'colour' has no attribute 'sRGB_COLOURSPACE'
>>> colour.RGB_COLOURSPACE_sRGB
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/kelsolaar/Documents/Development/colour-science/colour/colour/__init__.py", line 383, in __getattr__
    return super(colour, self).__getattr__(attribute)
  File "/Users/kelsolaar/Documents/Development/colour-science/colour/colour/utilities/deprecation.py", line 349, in __getattr__
    return getattr(self._module, attribute)
AttributeError: module 'colour' has no attribute 'RGB_COLOURSPACE_sRGB'
>>> colour.models.RGB_COLOURSPACE_sRGB
RGB_Colourspace(sRGB,
                [[ 0.64,  0.33],
                 [ 0.3 ,  0.6 ],
                 [ 0.15,  0.06]],
                [ 0.3127,  0.329 ],
                D65,
                [[ 0.4124,  0.3576,  0.1805],
                 [ 0.2126,  0.7152,  0.0722],
                 [ 0.0193,  0.1192,  0.9505]],
                [[ 3.2406, -1.5372, -0.4986],
                 [-0.9689,  1.8758,  0.0415],
                 [ 0.0557, -0.204 ,  1.057 ]],
                <function eotf_inverse_sRGB at 0x1297be940>,
                <function eotf_sRGB at 0x1297be9d0>,
                False,
                False)
>>> colour.RGB_COLOURSPACE_sRGB = colour.models.RGB_COLOURSPACE_sRGB
>>> colour.RGB_COLOURSPACE_sRGB
RGB_Colourspace(sRGB,
                [[ 0.64,  0.33],
                 [ 0.3 ,  0.6 ],
                 [ 0.15,  0.06]],
                [ 0.3127,  0.329 ],
                D65,
                [[ 0.4124,  0.3576,  0.1805],
                 [ 0.2126,  0.7152,  0.0722],
                 [ 0.0193,  0.1192,  0.9505]],
                [[ 3.2406, -1.5372, -0.4986],
                 [-0.9689,  1.8758,  0.0415],
                 [ 0.0557, -0.204 ,  1.057 ]],
                <function eotf_inverse_sRGB at 0x1297be940>,
                <function eotf_sRGB at 0x1297be9d0>,
                False,
                False) | 
  
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Not really a bug, just wanted to point out this:
I am using colour-science
colour.__version__of 0.3.16.So, at a point in my code, I have:
When I run my code, I get:
Sure, no problem - let me then just change to this:
... but now I get:
Eh ... I thought I could get rid of the warning by:
... but no, warning recognizes it is the "deprecated" access, and is raised again. Filtering it finally works:
So, I'd like to suggest, to only enable deprecation warnings, if one can do something about them - since it looks that for now, I will just have to filter this warning.
But it's not that big of an issue for me - so let me just close with: Thanks for a great library!
Beta Was this translation helpful? Give feedback.
All reactions