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

postpone referencing sys.modules["__main__"] #2215

Merged
merged 2 commits into from
Mar 17, 2022
Merged

Conversation

adriangb
Copy link
Contributor

This currently breaks anyio (and presumably other things that do multiprocessing stuff) just from an import.
To reproduce:

from time import sleep

from anyio import to_process, run
import click  # this import breaks the program

async def main() -> None:
    await to_process.run_sync(sleep, 0)

if __name__ == "__main__":
    run(main)

cc @agronholm

src/click/utils.py Outdated Show resolved Hide resolved
@davidism davidism added this to the 8.1.0 milestone Mar 17, 2022
@davidism davidism merged commit bf9da48 into pallets:main Mar 17, 2022
@adriangb adriangb deleted the fix-anyio branch March 17, 2022 23:29
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants