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

Make concurrent.futures.Future usable outside of executors #89528

Open
masklinn mannequin opened this issue Oct 4, 2021 · 2 comments
Open

Make concurrent.futures.Future usable outside of executors #89528

masklinn mannequin opened this issue Oct 4, 2021 · 2 comments
Labels
3.11 only security fixes stdlib Python modules in the Lib dir topic-multiprocessing type-feature A feature request or enhancement

Comments

@masklinn
Copy link
Mannequin

masklinn mannequin commented Oct 4, 2021

BPO 45365
Nosy @masklinn

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2021-10-04.19:31:22.097>
labels = ['type-feature', 'library', '3.11']
title = 'Make concurrent.futures.Future usable outside of executors'
updated_at = <Date 2021-10-08.21:22:50.931>
user = 'https://github.com/masklinn'

bugs.python.org fields:

activity = <Date 2021-10-08.21:22:50.931>
actor = 'terry.reedy'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2021-10-04.19:31:22.097>
creator = 'xmorel'
dependencies = []
files = []
hgrepos = []
issue_num = 45365
keywords = []
message_count = 1.0
messages = ['403181']
nosy_count = 1.0
nosy_names = ['xmorel']
pr_nums = []
priority = 'normal'
resolution = None
stage = 'test needed'
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue45365'
versions = ['Python 3.11']

@masklinn
Copy link
Mannequin Author

masklinn mannequin commented Oct 4, 2021

concurrent.futures.Future currently has the note:

Future instances are created by Executor.submit() and should not be created directly except for testing.

That seems like a shame as futures are useful concurrency construct and having to rebuild them "by hand" seems like a waste.

What are the issues which prevent safely using futures outside of executors, and is there a way they could be fixed / lifted?

@masklinn masklinn mannequin added 3.10 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Oct 4, 2021
@terryjreedy terryjreedy added 3.11 only security fixes and removed 3.10 only security fixes labels Oct 8, 2021
@terryjreedy terryjreedy changed the title concurrent.futures.Future should be suitable for use outside of executors Make concurrent.futures.Future usable outside of executors Oct 8, 2021
@terryjreedy terryjreedy added 3.11 only security fixes and removed 3.10 only security fixes labels Oct 8, 2021
@terryjreedy terryjreedy changed the title concurrent.futures.Future should be suitable for use outside of executors Make concurrent.futures.Future usable outside of executors Oct 8, 2021
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@python-ast-person
Copy link

As far as I know, they are safe to use outside of an Executor, it's just almost all of the intended use cases were in Executor implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.11 only security fixes stdlib Python modules in the Lib dir topic-multiprocessing type-feature A feature request or enhancement
Projects
Status: No status
Development

No branches or pull requests

3 participants