Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reloading modules with relative imports fails #680

Closed
fabioz opened this issue Jul 25, 2021 · 0 comments
Closed

Reloading modules with relative imports fails #680

fabioz opened this issue Jul 25, 2021 · 0 comments

Comments

@fabioz
Copy link
Collaborator

fabioz commented Jul 25, 2021

Structure to reproduce:

main.py
package/
   module.py
   module1.py

main.py:

from package.module1 import add_more_text

def main():
    
    while True:
        s = input()
        print(add_more_text(s))

if __name__=="__main__":
    main()

module.py

def add_text(s):
    return s + " foo bar"

module1.py:

from . import module

def add_more_text(s):
    s = module.add_text(s)
    return s + ' zoom'
fabioz added a commit to fabioz/debugpy that referenced this issue Jul 30, 2021
fabioz added a commit to fabioz/debugpy that referenced this issue Jul 30, 2021
@fabioz fabioz closed this as completed in 202a5ef Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant