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

Do not call multiprocessing module in frozen binaries #3984

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

vasole
Copy link
Member

@vasole vasole commented Nov 29, 2023

Calls to multiprocessing fail when using PyInstaller frozen applications

Calls to multiprocessing fail when using PyInstaller frozen applications on Mac or Windows.
@vasole vasole requested a review from woutdenolf November 29, 2023 16:30
@woutdenolf
Copy link
Contributor

How about instead of doing this

def retry_in_subprocess(
   ...
):
   
    import multiprocessing
    def decorator(method):
        @wraps(method)
        def wrapper(*args, **kw):
             ...

        return wrapper

    return decorator

do this

def retry_in_subprocess(
   ...
):
   
    def decorator(method):
        @wraps(method)
        def wrapper(*args, **kw):
             import multiprocessing
             ...

        return wrapper

    return decorator

@woutdenolf
Copy link
Contributor

Ah ok, multiprocessing will not work at all, so yes your solution is better.

@woutdenolf woutdenolf merged commit f272166 into main Nov 29, 2023
7 checks passed
@vasole vasole deleted the vasole-patch-2 branch November 29, 2023 19:34
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

Successfully merging this pull request may close these issues.

2 participants