• Kirill Smelkov's avatar
    *: Python3.9 switched __file__ to be always absolute · 4f28dddf
    Kirill Smelkov authored
    https://bugs.python.org/issue20443
    
    This broke test_defer_excchain_dump because
    testprog/golang_test_defer_excchain.txt is prepared with output where
    `python file` shows that file name in traceback as it was specified on
    the command line, e.g.
    
        .../pygolang/golang/testprog$ python golang_test_defer_excchain.py
        Traceback (most recent call last):
          File ".../pygolang/golang/__init__.py", line 103, in _
            return f(*argv, **kw)
          File "golang_test_defer_excchain.py", line 42, in main
            raise RuntimeError("err")
        RuntimeError: err
    
    while with py39 it became
    
        .../pygolang/golang/testprog$ python golang_test_defer_excchain.py
        Traceback (most recent call last):
          File ".../pygolang/golang/__init__.py", line 103, in _
            return f(*argv, **kw)
          File ".../pygolang/golang/testprog/golang_test_defer_excchain.py", line 42, in main
            raise RuntimeError("err")
        RuntimeError: err
    
    (notice the difference relat...
    4f28dddf
__init__.py 18.2 KB