-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Python: Hide points-to imports in python.qll
#20739
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
Merged
tausbn
merged 22 commits into
main
from
tausbn/python-remove-top-level-points-to-imports
Dec 5, 2025
Merged
Changes from 20 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
78c33ab
Python: Remove points-to references from `python.qll`
tausbn f0465f4
Python: Get rid of some `get...Object` methods
tausbn 0a4ec2c
Python: Move some non-points-to methods out of points-to
tausbn 2732a65
Python: Fix example snippets
tausbn 5b63b49
Python: Fix query tests
tausbn 85029bd
Python: Fix Python 2 tests
tausbn 665104e
Python: Fix Python 3 tests
tausbn b3b87c9
Python: Fix extractor/experimental tests
tausbn 7176898
Python: Fix library tests
tausbn 21e74a3
Python: Fully remove points-to from `Flow.qll`
tausbn 7328f26
Python: Fix reachability-related test failures
tausbn e098404
Python: Get rid of points-to from `Definitions.qll`
tausbn 9dc774a
Python: Remove points-to dependency from parts of SSA
tausbn 5b47fcb
Python: Remove dependence on `Builtins` from attribute module
tausbn b9a5b3b
Python: Remove points-to from `SSA.ql`
tausbn cd1619b
Python: Fix queries and tests
tausbn c75329d
Python: Move metrics-related API to `LegacyPointsTo` module
tausbn 24a29f4
Python: Fix all metrics-related compilation failures
tausbn c6ad438
Python: Add change note
tausbn a7458df
Python: Appease the QLDoc checker
tausbn bc8ed28
Python: Make some more points-to imports private
tausbn ec336a0
Python: Fix list bullets in change note
tausbn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,7 @@ | |
| */ | ||
|
|
||
| import python | ||
| private import LegacyPointsTo | ||
|
|
||
| from ClassObject sub, ClassObject base | ||
| where | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ | |
| */ | ||
|
|
||
| import python | ||
| private import LegacyPointsTo | ||
|
|
||
| from AstNode call, PythonFunctionValue method | ||
| where | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
python/ql/lib/change-notes/2025-11-26-remove-top-level-points-to-import.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| category: breaking | ||
| --- | ||
|
|
||
| - All modules that depend on the points-to analysis have now been removed from the top level `python.qll` module. To access the points-to functionality, import the new `LegacyPointsTo` module. This also means that some predicates have been removed from various classes, for instance `Function.getFunctionObject()`. To access these predicates, import the `LegacyPointsTo` module and use the `FunctionWithPointsTo` class instead. Most cases follow this pattern, but there are a few exceptions: | ||
| - The `getLiteralObject` method on `ImmutableLiteral` subclasses has been replaced with a predicate `getLiteralObject(ImmutableLiteral l)` in the `LegacyPointsTo` module. | ||
| - The `getMetrics` method on `Function`, `Class`, and `Module` has been removed. To access metrics, import `LegacyPointsTo` and use the classes `FunctionMetrics`, etc. instead. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.