Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue16968] Fix test discovery for test_concurrent_futures.py

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Aug 6, 2013, 4:50 AM

Post #1 of 3 (15 views)
Permalink
[issue16968] Fix test discovery for test_concurrent_futures.py

Serhiy Storchaka added the comment:

As far as I understand threads reaping needed only when ThreadPoolExecutor is used and children reaping needed only when ProcessPoolExecutor is used. Why not use them only in tests which needs them?

class ThreadPoolMixin(ExecutorMixin):
executor_type = futures.ThreadPoolExecutor

def run(self, result):
key = test.support.threading_setup()
try:
return super().run(result)
finally:
test.support.threading_cleanup(*key)


class ProcessPoolMixin(ExecutorMixin):
executor_type = futures.ProcessPoolExecutor

def run(self, result):
try:
return super().run(result)
finally:
test.support.reap_children()

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue16968>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 7, 2013, 8:29 PM

Post #2 of 3 (12 views)
Permalink
[issue16968] Fix test discovery for test_concurrent_futures.py [In reply to]

Zachary Ware added the comment:

That's a much better solution, thank you, Serhiy. Here's a new patch. test.support is no longer changed at all, but regrtest.py still is; the extra reference to the tests still causes issues, so it is removed.

----------
Added file: http://bugs.python.org/file31191/test_concurrent_futures_discovery.v5.diff

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue16968>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 11, 2013, 1:12 PM

Post #3 of 3 (10 views)
Permalink
[issue16968] Fix test discovery for test_concurrent_futures.py [In reply to]

Serhiy Storchaka added the comment:

I think this problem deserves a discussion on Python-Dev: http://comments.gmane.org/gmane.comp.python.devel/141068 .

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue16968>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.