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

Timeout decorator is no longer working with python 3.8 #8

Open
vacary opened this issue Dec 14, 2020 · 4 comments
Open

Timeout decorator is no longer working with python 3.8 #8

vacary opened this issue Dec 14, 2020 · 4 comments
Assignees

Comments

@vacary
Copy link
Member

vacary commented Dec 14, 2020

Timeout decorator is no longer working with python 3.8. It seems that there is an issue with the name of the function from
Caller._internal_call to __main__.Caller._internal_call

It is perhaps related to if __name__ == '__main__':

Traceback (most recent call last):
  File "/Users/acary/Work/faf/src/comp.py", line 221, in __call__
    self._internal_call(solver, sproblem, filename, pfilename,
  File "/Users/acary/Work/faf/src/faf_timeout.py", line 40, in inner
    proc.start()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context.py", line 284, in _Popen
    return Popen(process_obj)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch
    reduction.dump(process_obj, fp)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
_pickle.PicklingError: Can't pickle <function Caller._internal_call at 0x1120e6f70>: it's not the same object as __main__.Caller._internal_call
@vacary
Copy link
Member Author

vacary commented Dec 14, 2020

@vacary
Copy link
Member Author

vacary commented Dec 14, 2020

it works in python 3.7 :-(

@vacary
Copy link
Member Author

vacary commented Dec 14, 2020

@vacary
Copy link
Member Author

vacary commented Dec 14, 2020

Temporary fix in 888da84

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

2 participants