#8785 closed defect (fixed)
avoid subtle interaction between importing multiprocessing and twisted
Reported by: | was | Owned by: | jason |
---|---|---|---|
Priority: | major | Milestone: | sage-4.4.1 |
Component: | misc | Keywords: | |
Cc: | Merged in: | sage-4.4.1.alpha0 | |
Authors: | William Stein | Reviewers: | Mariah Lennox |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
It turns out that on some platforms, importing multiprocessing, then twisted, leads to an "int object is not callable" TypeError?. This breaks devel/sage/sage/all.py's quit_sage function, causing a big traceback at exit. This could also cause great confusion for people writing a program that uses @parallel('multiprocessing') followed by anything involving twisted.
A simple fix is to import the relevant part of twisted before using multiprocessing in @parallel. The attached patch does this.
NOTE: The system that exhibits this is in a corporate setting, and no devs have systems where this can be replicated at present, unfortunately. So please do NOT revert this just because you don't see the problem on your laptop!
Attachments (1)
Change History (9)
comment:1 Changed 11 years ago by
- Description modified (diff)
Changed 11 years ago by
comment:2 Changed 11 years ago by
- Status changed from new to needs_review
comment:3 Changed 11 years ago by
- Status changed from needs_review to positive_review
comment:4 Changed 11 years ago by
comment:5 Changed 11 years ago by
- Merged in set to 4.4.1.alpha0
- Resolution set to fixed
- Status changed from positive_review to closed
comment:6 Changed 11 years ago by
- Reviewers set to Mariah Lennox
comment:7 Changed 11 years ago by
- Merged in changed from 4.4.1.alpha0 to sage-4.4.1.alpha0
comment:8 Changed 5 years ago by
Would be more informative to write explicitely on which hardware/OS it failed. "corporate settings" is more than vague. Was there any upstream report? This problem might have been solved since then!
I tried it and it works!