Skip to content

Commit e5f33f4

Browse files
committed
CI: Update deps, docs
1 parent 5950249 commit e5f33f4

9 files changed

+14
-12
lines changed

ci/requirements-2.7-64.run

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ sqlalchemy
1111
lxml=3.2.1
1212
scipy
1313
xlsxwriter
14-
boto
14+
s3fs
1515
bottleneck
1616
html5lib
1717
beautiful-soup

ci/requirements-2.7.run

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ sqlalchemy=0.9.6
1111
lxml=3.2.1
1212
scipy
1313
xlsxwriter=0.4.6
14-
boto=2.36.0
14+
s3fs
1515
bottleneck
1616
psycopg2=2.5.2
1717
patsy

ci/requirements-2.7_SLOW.run

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ numexpr
1313
pytables
1414
sqlalchemy
1515
lxml
16-
boto
16+
s3fs
1717
bottleneck
1818
psycopg2
1919
pymysql

ci/requirements-3.5.run

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ sqlalchemy
1717
pymysql
1818
psycopg2
1919
xarray
20-
boto
20+
s3fs
2121

2222
# incompat with conda ATM
2323
# beautiful-soup

ci/requirements-3.5_OSX.run

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ matplotlib
1212
jinja2
1313
bottleneck
1414
xarray
15-
boto
15+
s3fs
1616

1717
# incompat with conda ATM
1818
# beautiful-soup

doc/source/install.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ Optional Dependencies
262262
* `XlsxWriter <https://pypi.python.org/pypi/XlsxWriter>`__: Alternative Excel writer
263263

264264
* `Jinja2 <http://jinja.pocoo.org/>`__: Template engine for conditional HTML formatting.
265-
* `boto <https://pypi.python.org/pypi/boto>`__: necessary for Amazon S3 access.
265+
* `s3fs <http://s3fs.readthedocs.io/>`__: necessary for Amazon S3 access.
266266
* `blosc <https://pypi.python.org/pypi/blosc>`__: for msgpack compression using ``blosc``
267267
* One of `PyQt4
268268
<http://www.riverbankcomputing.com/software/pyqt/download>`__, `PySide

pandas/io/parsers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
from s3fs import S3File
4545
need_text_wrapping = (compat.BytesIO, S3File)
4646
except ImportError:
47-
need_text_wrapping = (compat.BtyesIO,)
47+
need_text_wrapping = (compat.BytesIO,)
4848

4949

5050
# BOM character (byte order mark)

pandas/io/s3.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pandas import compat
33
try:
44
import s3fs
5+
from botocore.exceptions import NoCredentialsError
56
except:
67
raise ImportError("The s3fs library is required to handle s3 files")
78

@@ -19,15 +20,16 @@ def _strip_schema(url):
1920

2021
def get_filepath_or_buffer(filepath_or_buffer, encoding=None,
2122
compression=None):
22-
23-
# Assuming AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_S3_HOST
24-
# are environment variables
2523
fs = s3fs.S3FileSystem(anon=False)
2624
try:
2725
filepath_or_buffer = fs.open(_strip_schema(filepath_or_buffer))
28-
except OSError:
26+
except (OSError, NoCredentialsError):
2927
# boto3 has troubles when trying to access a public file
3028
# when credentialed...
29+
# An OSError is raised if you have credentials, but they
30+
# aren't valid for that bucket.
31+
# A NoCredentialsError is raised if you don't have creds
32+
# for that bucket.
3133
fs = s3fs.S3FileSystem(anon=True)
3234
filepath_or_buffer = fs.open(_strip_schema(filepath_or_buffer))
3335
return filepath_or_buffer, None, compression

pandas/util/print_versions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def show_versions(as_json=False):
9494
("pymysql", lambda mod: mod.__version__),
9595
("psycopg2", lambda mod: mod.__version__),
9696
("jinja2", lambda mod: mod.__version__),
97-
("boto", lambda mod: mod.__version__),
97+
("s3fs", lambda mod: mod.__version__),
9898
("pandas_datareader", lambda mod: mod.__version__)
9999
]
100100

0 commit comments

Comments
 (0)