Skip to content

Commit 92ae19d

Browse files
committed
Fix missing boto3 session forwarding.
1 parent 01bbb12 commit 92ae19d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

awswrangler/redshift.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,7 @@ def copy( # pylint: disable=too-many-arguments
12281228
path = path[:-1] if path.endswith("*") else path
12291229
path = path if path.endswith("/") else f"{path}/"
12301230
session: boto3.Session = _utils.ensure_session(session=boto3_session)
1231-
if s3.list_objects(path=path):
1231+
if s3.list_objects(path=path, boto3_session=session):
12321232
raise exceptions.InvalidArgument(
12331233
f"The received S3 path ({path}) is not empty. "
12341234
"Please, provide a different path or use wr.s3.delete_objects() to clean up the current one."

tox.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ envlist = py{36,37,38}
44
[testenv]
55
passenv = AWS_PROFILE AWS_DEFAULT_REGION AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY
66
deps =
7-
pytest==6.1.2
8-
pytest-xdist==2.1.0
7+
pytest==6.2.1
8+
pytest-xdist==2.2.0
99
pytest-timeout==1.4.2
1010
moto==1.3.16
1111
s3fs==0.4.2
1212
commands =
13-
pytest -n 64 --timeout=300 tests
13+
pytest -n 32 --timeout=300 tests
1414

1515
[testenv:py38]
1616
passenv = AWS_PROFILE AWS_DEFAULT_REGION AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY
1717
deps =
1818
{[testenv]deps}
1919
pytest-cov==2.10.1
2020
commands =
21-
pytest -n 64 --timeout=300 --cov=awswrangler tests
21+
pytest -n 32 --timeout=300 --cov=awswrangler tests

0 commit comments

Comments
 (0)