-
Remove imp import from xxxswf for python 3.12 compatability
-
Fix unittests
-
Should help debugging unexpected results.
-
Another recent pull request changed the outcome of 2 tests for one sample. However, those results do not appear on my system or the github integrated unittest systems. Maybe detection is dependent on system encoding? Need to investigate, exclude sample for now.
-
Introduced an error when silencing pylint warnings. This should fix it.
-
rtfobj.py syntax error
-
oleobj.py syntax error
-
Run unittests automatically on github
-
In python 3.12+ this escaping is reported as syntax error. Moving the dash to the end of the regex avoids the need for escaping it. oletools/oleobj.py:537 /rpmbuild/BUILD/oletools-78b2d459a33df378a4f69ffc6c33313509cecfe4/oletools/oleobj.py:537: SyntaxWarning: invalid escape sequence '\-' sane_fname = re.sub(u'[^a-zA-Z0-9.\-_ ]', replacement, basepath)
-
In python 3.12+ it is reporting the syntax error oletools/rtfobj.py:272 /rpmbuild/BUILD/oletools-78b2d459a33df378a4f69ffc6c33313509cecfe4/oletools/rtfobj.py:272: SyntaxWarning: invalid escape sequence '\d' DECIMAL_GROUP = b'(\d{1,250})'
-
Relax pyparsing requirement.
-
# Conflicts: # tests/olevba/test_basic.py
-
This was removed by github in June 2023
-
Decrypting test samples "on the fly" using a generator causes trouble when removing the temp file, PyPy/Windows thinks the file is still being used.
-
I do not see how I could keep the code clean for both for pylint2 and pylint3 at the same time, so do not even try.
-
Pylint is just wrong in a few cases (admittedly: those are hard), so can safely ignore these warnings. Also ignore errors in thirdparty, this is not really our code. Also remove a few old "pylint silencers" ("# pylint: disable=...") that are not used any more in v3.10 of pylint -
Availability of python versions in cached runner images is subject to change and specification in https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json did not help
-
If there is an error in log-handling (e.g. wrong args to logger call) do not fail or raise but produce something helpful
-
Use a standard logging.Formatter to do %-formatting and other stuff (i.e. the regular formatter job) before converting to Json.
-
Need to make sure that json output is formatted since e.g. warning messages are created like this: log.warning('%s', actual_message) so without proper formatting the message is just "%s". Also test that exception info is added as usual. -
Warning message includes source file and line number, hope this is not dependent on python version..
-
We set logging.captureWarnings to True and use our logging framework for python's builtin warnings logger. Warnings from that logger will have "type=warning" per default (as opposed to "type=msg").
-
Encountered an example where a 3rd-party library issued a warning that messed up the json output. Create test to reproduce this.