Skip to content

Commit d07b958

Browse files
author
Felicity Chapman
committed
Finalize text for 1.20 release
1 parent 95ead47 commit d07b958

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

change-notes/1.20/analysis-python.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@
22

33
## General improvements
44

5-
The extractor now parses all Python code from a single unified grammar. This means that almost all Python code will be successfully parsed, even if mutually incompatible Python code is present in the same project. This also means that Python code for any version can be correctly parsed on a worker running any other supported version of Python. For example, Python 3.7 code is parsed correctly, even if the installed version of Python is only 3.5.
5+
### Extractor changes
6+
7+
The extractor now parses all Python code from a single unified grammar. This means that almost all Python code will be successfully parsed, even if mutually incompatible Python code is present in the same project. This also means that Python code for any version can be correctly parsed on a worker running any other supported version of Python. For example, Python 3.7 code is parsed correctly, even if the installed version of Python is only 3.5. This will reduce the number of syntax errors found in many projects.
8+
9+
### Regular expression analysis improvements
10+
11+
The Python `re` (regular expressions) module library has a couple of constants called `MULTILINE` and `VERBOSE` which determine the parsing of regular expressions. Python 3.6 changed the implementation of these constants, which resulted in false positive results for some queries. The relevant QL libraries have been updated to support both implementations which will remove false positive results from projects that use Python 3.6 and later versions.
12+
13+
### API improvements
614

7-
The constants `MULTILINE` and `VERBOSE` in `re` module, are now understood for Python 3.6 and upward.
8-
Removes false positives seen when using Python 3.6, but not when using earlier versions.
915
The API has been improved to declutter the global namespace and improve discoverability and readability.
1016
* New predicates `ModuleObject::named(name)` and `ModuleObject.attr(name)` have been added, allowing more readable access to common objects. For example, `(any ModuleObject m | m.getName() = "sys").getAttribute("exit")` can be replaced with `ModuleObject::named("sys").attr("exit")`
1117
* The API for accessing builtin functions has been improved. Predicates of the form `theXXXFunction()`, such as `theLenFunction()`, have been deprecated in favour of `Object::builtin(name)`.

0 commit comments

Comments
 (0)