mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Python: Fix recommended module for deprecated posixfile
$ python2 -W default -c 'import posixfile' -c:1: DeprecationWarning: The posixfile module is deprecated; fcntl.lockf() provides better locking https://docs.python.org/2.7/library/posixfile.html
This commit is contained in:
@@ -17,7 +17,7 @@ import python
|
||||
* and module `instead` should be used instead (or `instead = "no replacement"`)
|
||||
*/
|
||||
predicate deprecated_module(string name, string instead, int major, int minor) {
|
||||
name = "posixfile" and instead = "email" and major = 1 and minor = 5
|
||||
name = "posixfile" and instead = "fcntl" and major = 1 and minor = 5
|
||||
or
|
||||
name = "gopherlib" and instead = "no replacement" and major = 2 and minor = 5
|
||||
or
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
| test.py:2:8:2:13 | ImportExpr | The rfc822 module was deprecated in version 2.3. Use email module instead. |
|
||||
| test.py:3:8:3:16 | ImportExpr | The posixfile module was deprecated in version 1.5. Use email module instead. |
|
||||
| test.py:3:8:3:16 | ImportExpr | The posixfile module was deprecated in version 1.5. Use fcntl module instead. |
|
||||
| test.py:8:16:8:18 | ImportExpr | The md5 module was deprecated in version 2.5. Use hashlib module instead. |
|
||||
|
||||
Reference in New Issue
Block a user