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

Magic prints asyncio functions' docstring #7137

Closed
3 of 4 tasks
thomas-schillaci opened this issue Aug 8, 2023 · 2 comments
Closed
3 of 4 tasks

Magic prints asyncio functions' docstring #7137

thomas-schillaci opened this issue Aug 8, 2023 · 2 comments
Labels
priority:P3 status:confirmed Bug has been confirmed by the Streamlit team type:bug Something isn't working

Comments

@thomas-schillaci
Copy link

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

Hello,

When executing scripts with streamlit run <script_file>, async functions run with asyncio.run get their docstring displayed by Magic.

Please let me know if I can help on that issue :)

Reproducible Code Example

import asyncio

import streamlit as st


def f():
    """
    Doc of function f
    :return:
    """
    return


async def g():
    """
    Doc of function g
    :return:
    """


st.title("Hello world")
f()
asyncio.run(g())

Steps To Reproduce

streamlit run the code above

Expected Behavior

The UI should only display "Hello World"

Current Behavior

The UI displays:

Hello world

Doc of function g :return:

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • Streamlit version: 1.25.0
  • Python version: 3.9.17
  • Operating System: Rocky Linux 8.7
  • Browser: Firefox 102.14.0esr (32-bit)

Additional Information

No response

@thomas-schillaci thomas-schillaci added status:needs-triage Has not been triaged by the Streamlit team type:bug Something isn't working labels Aug 8, 2023
@kajarenc kajarenc added status:confirmed Bug has been confirmed by the Streamlit team priority:P3 and removed status:needs-triage Has not been triaged by the Streamlit team labels Aug 9, 2023
@kajarenc
Copy link
Collaborator

kajarenc commented Aug 9, 2023

Hello, @thomas-schillaci , thank you for opening this issue, I was able to reproduce it, and can confirm that is bug.

Bugfix ready: #7143

@thomas-schillaci
Copy link
Author

Thanks a lot @kajarenc!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:P3 status:confirmed Bug has been confirmed by the Streamlit team type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants