-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
Refactor init for Excel readers to _BaseExcelReader #26233
Refactor init for Excel readers to _BaseExcelReader #26233
Conversation
…-init-to-baseclass # Conflicts: # pandas/io/excel/_base.py # pandas/io/excel/_xlrd.py
looks good. ping when ready. cc @WillAyd |
try: | ||
# GH 19779 | ||
filepath_or_buffer.seek(0) | ||
except UnsupportedOperation: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this wasn't carried over - is it no longer valid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now dealt with by wrapping url responses in BytesIO(urlopen(filepath_or_buffer).read())
. So now all items with "read"
can also support seek(0)
@tdamsma restarted all of them. Not sure what is wrong with the checks_and_doc job off the top of my head but looks like this PR introduced some regressions with handling of S3 excel files as shown in the Travis failures. If you could take a look would be great |
Codecov Report
@@ Coverage Diff @@
## master #26233 +/- ##
==========================================
- Coverage 91.97% 91.96% -0.02%
==========================================
Files 175 175
Lines 52368 52376 +8
==========================================
+ Hits 48164 48166 +2
- Misses 4204 4210 +6
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #26233 +/- ##
===========================================
- Coverage 91.97% 23.01% -68.96%
===========================================
Files 175 175
Lines 52368 52377 +9
===========================================
- Hits 48164 12055 -36109
- Misses 4204 40322 +36118
Continue to review full report at Codecov.
|
6e646e9
to
903b188
Compare
lgtm. @WillAyd |
@WillAyd, I addressed the regression. Also I accidentally committed (and reverted) a setting to limit the test scope, that explains the codecov report. |
Nice job @tdamsma - looking forward to the follow ups! |
Great, thanks for the reviews |
Pre-cursor for #25092. To support multiple excel readers the init function is moved to _BaseExcelReader. The function is made a bit more general to be able to support multiple excel readers.
git diff upstream/master -u -- "*.py" | flake8 --diff