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

User agent 2.1: Propagate Botocore context to child threads #335

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

hssyoo
Copy link

@hssyoo hssyoo commented Feb 13, 2025

Companion PR to boto/botocore#3389

Description

Context variables aren't automatically propagated from parent to child threads. To ensure the Botocore client captures features registered outside of concurrent context, we need to explicitly get and pass the context to the thread pool executor.

@@ -17,6 +17,8 @@
from collections import namedtuple
from concurrent import futures

from botocore.context import get_context
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current version requirement for s3transfer is:

requires = [
    'botocore>=1.36.0,<2.0a.0',
]

We should bump the minimum supported version to prevent import errors since the botocore.context won't exist in versions between 1.36.0 and the version that releases boto/botocore#3389

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