Giter VIP home page Giter VIP logo

backports.pdb's People

Contributors

abravalheri avatar avasam avatar bhrutledge avatar bswck avatar cclauss avatar darkvertex avatar dimitripapadopoulos avatar hugovk avatar jaraco avatar johnthagen avatar joycebrum avatar kolanich avatar layday avatar skriems avatar vfazio avatar webknjaz avatar wimglenn avatar zacharyburnett avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

backports.pdb's Issues

Unable to use module that uses `from .module import content`

Consider this example:

$ mkdir pkg
$ touch pkg/__init__.py
$ cat > pkg/entry.py 

from .lib import stuff

__name__ == '__main__' and stuff()
$ cat > pkg/lib.py  

def stuff():
  print("stuff is done")
$ rwt -q backports.pdb==1.0.1 -- -m backports.pdb -m pkg.entry
> /Users/jaraco/Dropbox/code/public/cpython/test-mod-relative/pkg/entry.py(2)<module>()
-> from .lib import stuff
(Pdb) c
Traceback (most recent call last):
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/rwt-8ihufxfn/backports/pdb.py", line 1714, in main
    pdb._runmodule(mainpyfile)
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/rwt-8ihufxfn/backports/pdb.py", line 1548, in _runmodule
    self.run(code)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/bdb.py", line 431, in run
    exec(cmd, globals, locals)
  File "/Users/jaraco/Dropbox/code/public/cpython/test-mod-relative/pkg/entry.py", line 2, in <module>
    from .lib import stuff
ModuleNotFoundError: No module named 'pkg.entry.lib'; 'pkg.entry' is not a package
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> /Users/jaraco/Dropbox/code/public/cpython/test-mod-relative/pkg/entry.py(2)<module>()
-> from .lib import stuff
(Pdb) 

It seems that from .lib import stuff inside pkg.entry attempts to treat pkg.entry itself as a package.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.