Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion alibuild_helpers/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,12 +502,19 @@ def _s3_init(self) -> None:
# have to install it in the first place.
try:
import boto3
from botocore.config import Config
except ImportError:
error("boto3 must be installed to use %s", Boto3RemoteSync)
sys.exit(1)

try:
self.s3 = boto3.client("s3", endpoint_url="https://s3.cern.ch",
Copy link
Member

Choose a reason for hiding this comment

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

Can you make sure this works with all versions of boto3, rather than just the last one? We have plenty of people who have a pinned version of boto3 installed and I'd rather not tell all of them to update if they do not need to.

Copy link
Member

Choose a reason for hiding this comment

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

Did you manage to do this?

config = Config(
request_checksum_calculation='WHEN_REQUIRED',
response_checksum_validation='WHEN_REQUIRED',
)
self.s3 = boto3.client("s3",
config=config,
endpoint_url="https://s3.cern.ch",
aws_access_key_id=os.environ["AWS_ACCESS_KEY_ID"],
aws_secret_access_key=os.environ["AWS_SECRET_ACCESS_KEY"])
except KeyError:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies = [
'requests',
'distro',
'jinja2',
'boto3<1.36.0',
'boto3',
]

[project.optional-dependencies]
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ requests
pyyaml
distro
jinja2
# https://github.com/boto/boto3/issues/4398
boto3<1.36.0
boto3
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()

install_requires = ['pyyaml', 'requests', 'distro', 'jinja2', 'boto3<1.36.0']
install_requires = ['pyyaml', 'requests', 'distro', 'jinja2', 'boto3']

setup(
name='alibuild',
Expand Down