Skip to content

Commits on Source 2

  • Chandan Singh's avatar
    tests/frontend/logging.py: Fix regex Deprecation Warning · d960a337
    Chandan Singh authored
    Use raw strings for regex searches, which is the preferred way to do
    regular expressions in Python.
    
    Without this patch, currently we get the following warnings:
    
    ```
    tests/frontend/logging.py:44
      /builds/BuildStream/buildstream/dist/buildstream/tests/frontend/logging.py:44: DeprecationWarning: invalid escape sequence \[
        m = re.search("\[\d\d:\d\d:\d\d\]\[\]\[\] SUCCESS Checking sources", result.stderr)
    
    tests/frontend/logging.py:80
      /builds/BuildStream/buildstream/dist/buildstream/tests/frontend/logging.py:80: DeprecationWarning: invalid escape sequence \d
        m = re.search("\d\d:\d\d:\d\d,\d\d:\d\d:\d\d.\d{6},\d\d:\d\d:\d\d,,,SUCCESS,Checking sources", result.stderr)
    ```
    d960a337
  • Chandan Singh's avatar
    buildstream/utils.py: Fix regex Deprecation Warning · ef524b3d
    Chandan Singh authored
    Specify flags at the start of the expression as per the recommendation
    of the standard library.
    
    Without this patch, we currently get the following warning:
    
    ```
    tests/examples/junctions.py::test_open_cross_junction_workspace
      /builds/BuildStream/buildstream/dist/buildstream/buildstream/utils.py:213: DeprecationWarning: Flags not at the start of the expression '\\/[^/]*\\Z(?ms)'
        regexer = re.compile(expression)
    ```
    ef524b3d
Loading