@@ -820,16 +820,126 @@ def setUp(self):
820
820
'error' , message = 'Evaluating non-mapped column expression' ,
821
821
category = sqla_exc .SAWarning )
822
822
823
- # Enable deprecation warnings to capture upcoming SQLAlchemy changes
823
+ # Enable deprecation warnings for nova itself to capture upcoming
824
+ # SQLAlchemy changes
825
+
826
+ warnings .filterwarnings (
827
+ 'ignore' ,
828
+ category = sqla_exc .SADeprecationWarning )
824
829
825
830
warnings .filterwarnings (
826
831
'error' ,
827
832
module = 'nova' ,
828
833
category = sqla_exc .SADeprecationWarning )
829
834
830
- # TODO(stephenfin): Remove once we fix this is oslo.db 10.0.1 or so
835
+ # ...but filter everything out until we get around to fixing them
836
+ # TODO(stephenfin): Fix all of these
837
+
838
+ warnings .filterwarnings (
839
+ 'ignore' ,
840
+ module = 'nova' ,
841
+ message = r'The Engine.execute\(\) method is considered legacy' ,
842
+ category = sqla_exc .SADeprecationWarning )
843
+
844
+ warnings .filterwarnings (
845
+ 'ignore' ,
846
+ module = 'nova' ,
847
+ message = r'The autoload parameter is deprecated .*' ,
848
+ category = sqla_exc .SADeprecationWarning )
849
+
850
+ warnings .filterwarnings (
851
+ 'ignore' ,
852
+ module = 'nova' ,
853
+ message = r'The current statement is being autocommitted .*' ,
854
+ category = sqla_exc .SADeprecationWarning )
855
+
856
+ warnings .filterwarnings (
857
+ 'ignore' ,
858
+ module = 'nova' ,
859
+ message = r'The MetaData.bind argument is deprecated .*' ,
860
+ category = sqla_exc .SADeprecationWarning )
861
+
862
+ warnings .filterwarnings (
863
+ 'ignore' ,
864
+ module = 'nova' ,
865
+ message = r'The legacy calling style of select\(\) .*' ,
866
+ category = sqla_exc .SADeprecationWarning )
867
+
868
+ warnings .filterwarnings (
869
+ 'ignore' ,
870
+ module = 'nova' ,
871
+ message = r'The ``bind`` argument for schema methods .*' ,
872
+ category = sqla_exc .SADeprecationWarning )
873
+
831
874
warnings .filterwarnings (
832
875
'ignore' ,
876
+ module = 'nova' ,
877
+ message = r'The Column.copy\(\) method is deprecated .*' ,
878
+ category = sqla_exc .SADeprecationWarning )
879
+
880
+ warnings .filterwarnings (
881
+ 'ignore' ,
882
+ module = 'nova' ,
883
+ message = r'The Row.keys\(\) method is considered legacy .*' ,
884
+ category = sqla_exc .SADeprecationWarning )
885
+
886
+ warnings .filterwarnings (
887
+ 'ignore' ,
888
+ module = 'nova' ,
889
+ message = r'Using non-integer/slice indices on Row is deprecated .*' ,
890
+ category = sqla_exc .SADeprecationWarning )
891
+
892
+ warnings .filterwarnings (
893
+ 'ignore' ,
894
+ module = 'nova' ,
895
+ message = r'The .close\(\) method on a so-called .*' ,
896
+ category = sqla_exc .SADeprecationWarning )
897
+
898
+ warnings .filterwarnings (
899
+ 'ignore' ,
900
+ module = 'nova' ,
901
+ message = r'The Connection.connect\(\) method is considered .*' ,
902
+ category = sqla_exc .SADeprecationWarning )
903
+
904
+ warnings .filterwarnings (
905
+ 'ignore' ,
906
+ module = 'nova' ,
907
+ message = r'Passing a string to Connection.execute\(\) is .*' ,
908
+ category = sqla_exc .SADeprecationWarning )
909
+
910
+ warnings .filterwarnings (
911
+ 'ignore' ,
912
+ module = 'nova' ,
913
+ message = r'The insert.inline parameter will be removed .*' ,
914
+ category = sqla_exc .SADeprecationWarning )
915
+
916
+ warnings .filterwarnings (
917
+ 'ignore' ,
918
+ module = 'nova' ,
919
+ message = r'Using strings to indicate column or relationship .*' ,
920
+ category = sqla_exc .SADeprecationWarning )
921
+
922
+ warnings .filterwarnings (
923
+ 'ignore' ,
924
+ module = 'nova' ,
925
+ message = r'Using strings to indicate relationship names .*' ,
926
+ category = sqla_exc .SADeprecationWarning )
927
+
928
+ warnings .filterwarnings (
929
+ 'ignore' ,
930
+ module = 'nova' ,
931
+ message = r'The Executable.execute\(\) method is considered .*' ,
932
+ category = sqla_exc .SADeprecationWarning )
933
+
934
+ warnings .filterwarnings (
935
+ 'ignore' ,
936
+ module = 'nova' ,
937
+ message = r'The Executable.scalar\(\) method is considered .*' ,
938
+ category = sqla_exc .SADeprecationWarning )
939
+
940
+ warnings .filterwarnings (
941
+ 'ignore' ,
942
+ module = 'nova' ,
833
943
message = r'Invoking and_\(\) without arguments is deprecated, .*' ,
834
944
category = sqla_exc .SADeprecationWarning )
835
945
0 commit comments