Skip to content

Commits on Source 4

  • Chandan Singh's avatar
    tests/frontend/logging.py: Fix regex Deprecation Warning · c05d8b4f
    Chandan Singh authored and Chandan Singh's avatar Chandan Singh committed
    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)
    ```
    c05d8b4f
  • Chandan Singh's avatar
    buildstream/utils.py: Fix regex Deprecation Warning · e8055a56
    Chandan Singh authored and Chandan Singh's avatar Chandan Singh committed
    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)
    ```
    e8055a56
  • Chandan Singh's avatar
    Merge branch 'chandan/fix-warning' into 'master' · cd4889af
    Chandan Singh authored
    Fix Deprecation warnings from regex module
    
    See merge request !1010
    cd4889af
  • Tom Pollard's avatar
    ac995236
Loading