Skip to content

Commit ac3acb9

Browse files
committed
Python: Add more deprecated annotations
These classes/predicates are not used by anything in our codebase, and is using deprecated classes/predicates, so I think it's safe to assume they should also have been marked with the deprecated annotation. Changes the QL compiler warnings with: -WARNING: Type Configuration has been deprecated and may be removed in future (/home/rasmus/code/ql/python/ql/src/semmle/python/dataflow/TaintTracking.qll:663,50-63) -WARNING: Type Configuration has been deprecated and may be removed in future (/home/rasmus/code/ql/python/ql/src/semmle/python/dataflow/TaintTracking.qll:666,19-32) -WARNING: Type Configuration has been deprecated and may be removed in future (/home/rasmus/code/ql/python/ql/src/semmle/python/dataflow/TaintTracking.qll:671,19-32) -WARNING: Type Configuration has been deprecated and may be removed in future (/home/rasmus/code/ql/python/ql/src/semmle/python/dataflow/TaintTracking.qll:733,16-39) -WARNING: Type CustomPointsToAttribute has been deprecated and may be removed in future (/home/rasmus/code/ql/python/ql/src/semmle/python/types/Extensions.qll:181,28-51) -WARNING: Type CustomPointsToFact has been deprecated and may be removed in future (/home/rasmus/code/ql/python/ql/src/semmle/python/types/Extensions.qll:155,60-78) -WARNING: Type CustomPointsToFact has been deprecated and may be removed in future (/home/rasmus/code/ql/python/ql/src/semmle/python/types/Extensions.qll:159,19-37) -WARNING: Type CustomPointsToFact has been deprecated and may be removed in future (/home/rasmus/code/ql/python/ql/src/semmle/python/types/Extensions.qll:41,33-51) +WARNING: Type CustomPointsToFact has been deprecated and may be removed in future (/home/rasmus/code/ql/python/ql/src/semmle/python/types/Extensions.qll:41,44-62)
1 parent 6685a5e commit ac3acb9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

python/ql/src/semmle/python/dataflow/TaintTracking.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ module DataFlow {
659659
}
660660
}
661661

662-
private class ConfigurationAdapter extends TaintTracking::Configuration {
662+
deprecated private class ConfigurationAdapter extends TaintTracking::Configuration {
663663
ConfigurationAdapter() { this instanceof Configuration }
664664

665665
override predicate isSource(DataFlow::Node node, TaintKind kind) {
@@ -727,7 +727,7 @@ module DataFlow {
727727
}
728728
}
729729

730-
private class DataFlowType extends TaintKind {
730+
deprecated private class DataFlowType extends TaintKind {
731731
DataFlowType() {
732732
this = "Data flow" and
733733
exists(DataFlow::Configuration c)

python/ql/src/semmle/python/types/Extensions.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ abstract deprecated class CustomPointsToFact extends @py_flow_node {
3838
}
3939

4040
/* For backwards compatibility */
41-
class FinalCustomPointsToFact = CustomPointsToFact;
41+
deprecated class FinalCustomPointsToFact = CustomPointsToFact;
4242

4343
abstract deprecated class CustomPointsToOriginFact extends CustomPointsToFact {
4444
abstract predicate pointsTo(Object value, ClassObject cls);
@@ -151,7 +151,7 @@ class ReModulePointToExtension extends PointsToExtension {
151151
private predicate pointsTo_helper(Context context) { context.appliesTo(this) }
152152
}
153153

154-
private class BackwardCompatiblePointToExtension extends PointsToExtension {
154+
deprecated private class BackwardCompatiblePointToExtension extends PointsToExtension {
155155
BackwardCompatiblePointToExtension() { this instanceof CustomPointsToFact }
156156

157157
override predicate pointsTo(Context context, ObjectInternal value, ControlFlowNode origin) {
@@ -174,7 +174,7 @@ private class BackwardCompatiblePointToExtension extends PointsToExtension {
174174
}
175175
}
176176

177-
private predicate additionalAttribute(
177+
deprecated private predicate additionalAttribute(
178178
ObjectInternal owner, string name, ObjectInternal value, ControlFlowNode origin
179179
) {
180180
exists(Object obj, ClassObject cls |

0 commit comments

Comments
 (0)