diff options
author | Mario Corchero <mariocj89@gmail.com> | 2018-02-03 06:40:11 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2018-02-03 06:40:11 (GMT) |
commit | 38bfa8418f5d39bcc7478b8f7aef4a632c26172e (patch) | |
tree | 33c7f43db19885633bbbc0f66cf46d9c74cb9de3 /Lib/pdb.py | |
parent | 4e9da0d163731caa79811c723c703ee416c31826 (diff) | |
download | cpython-38bfa8418f5d39bcc7478b8f7aef4a632c26172e.zip cpython-38bfa8418f5d39bcc7478b8f7aef4a632c26172e.tar.gz cpython-38bfa8418f5d39bcc7478b8f7aef4a632c26172e.tar.bz2 |
bpo-32691: Use mod_spec.parent when running modules with pdb (GH-5474)
Previously the module name was used, which broke relative imports when pdb was run against a plain module or submodule.
Diffstat (limited to 'Lib/pdb.py')
-rwxr-xr-x | Lib/pdb.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1532,7 +1532,7 @@ class Pdb(bdb.Bdb, cmd.Cmd): __main__.__dict__.update({ "__name__": "__main__", "__file__": self.mainpyfile, - "__package__": module_name, + "__package__": mod_spec.parent, "__loader__": mod_spec.loader, "__spec__": mod_spec, "__builtins__": __builtins__, |