[all-commits] [llvm/llvm-project] 1197ee: [lldb] Unconditionally strip the `.py(c)` extensio...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Tue Oct 13 23:51:17 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1197ee35b84e1fe1c1884b3228b95351719fbb09
      https://github.com/llvm/llvm-project/commit/1197ee35b84e1fe1c1884b3228b95351719fbb09
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2020-10-13 (Tue, 13 Oct 2020)

  Changed paths:
    M lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp

  Log Message:
  -----------
  [lldb] Unconditionally strip the `.py(c)` extension when loading a module

Currently we only strip the Python extension when the file exists on
disk because we assumed that if it didn't exist it was a module.
However, with the change from D89334 this is no longer the case as we
want to be able to import a relative path to a .py as a module. Since we
always import a scripting module as a "python module" we should always
strip the extension if present.

Differential revision: https://reviews.llvm.org/D89352


  Commit: 3b33b41604784f903c7c5c38665d75da93dbf805
      https://github.com/llvm/llvm-project/commit/3b33b41604784f903c7c5c38665d75da93dbf805
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2020-10-13 (Tue, 13 Oct 2020)

  Changed paths:
    M lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp

  Log Message:
  -----------
  [lldb] Remove lexical block and fix formatting LoadScriptingModule (NFC)


Compare: https://github.com/llvm/llvm-project/compare/625fa4761702...3b33b4160478


More information about the All-commits mailing list