Skip to content

Cleanup compression #13340

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

Closed
wants to merge 1 commit into from
Closed

Conversation

lababidi
Copy link

@lababidi lababidi commented Jun 1, 2016

if encoding is not None and not compat.PY3:
Gets file handle for given source and mode.
wraps compressed fileobject in a decompressing fileobject
NOTE: For all files in Python 3.2 and for bzip'd files under all Python
Copy link
Contributor

Choose a reason for hiding this comment

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

we want to remove this statement and its functionaility as we don't support 3.2 anymore

@jreback jreback added the Clean label Jun 1, 2016
@lababidi
Copy link
Author

lababidi commented Jun 1, 2016

@jreback how is it possible that i broke the following? I don't think I touched any of these files:

Traceback (most recent call last): File "/Users/travis/build/pydata/pandas/pandas/tests/frame/test_to_csv.py", line 999, in test_to_csv_compression_xz df.to_csv(filename, compression="xz") File "/Users/travis/build/pydata/pandas/pandas/core/frame.py", line 1344, in to_csv formatter.save() File "/Users/travis/build/pydata/pandas/pandas/formats/format.py", line 1551, in save self._save() File "/Users/travis/build/pydata/pandas/pandas/formats/format.py", line 1638, in _save self._save_header() File "/Users/travis/build/pydata/pandas/pandas/formats/format.py", line 1634, in _save_header writer.writerow(encoded_labels) io.UnsupportedOperation: not writable

@jreback
Copy link
Contributor

jreback commented Jun 1, 2016

well that writes to a csv so sure

@lababidi
Copy link
Author

lababidi commented Jun 1, 2016

But it never calls get_handle??

All the tests pass on my machine. This is strange.

@jreback
Copy link
Contributor

jreback commented Jun 1, 2016

are you sure that test is running? it will skip if you don't have backports.lzma not installed

@lababidi
Copy link
Author

lababidi commented Jun 1, 2016

yeah, i installed backports.lzma and the test runs on my machine. this is strange. especially since i didn't touch any of the files in the stacktrace.

@jreback
Copy link
Contributor

jreback commented Jun 1, 2016

try creating the exact environment (e.g. create a new environment with ci/requirements-2.7.run/pip)

@lababidi
Copy link
Author

lababidi commented Jun 2, 2016

how do i install the .run file? pip needs == while the .run file has =

@jreback
Copy link
Contributor

jreback commented Jun 2, 2016

conda install -n pandas --file=ci/requirements.....run
pip install --upgrade -r ci/requirements....pip

@jreback
Copy link
Contributor

jreback commented Jun 8, 2016

can you rebase/update

@jreback
Copy link
Contributor

jreback commented Jun 24, 2016

can you update

@lababidi
Copy link
Author

This branch is behind on master. memory_map was added and I need time to understand how that changes the logic.

@jorisvandenbossche
Copy link
Member

I think something went wrong with your rebase (lots of commits are included here)

@jorisvandenbossche
Copy link
Member

@lababidi Do you have time to update this? (you should start with a rebase, as lots of other commits are not included in this PR)

@jreback
Copy link
Contributor

jreback commented Sep 9, 2016

can you rebase / update?

@lababidi
Copy link
Author

@jreback on it now

@lababidi
Copy link
Author

@jreback @jorisvandenbossche Again, after rebasing to your code, I find that the tests fail and not due to my changes. This is becoming a detriment to my contributions because it seems someone keeps allowing failing code to get merged. I'm not sure how it happened.

@lababidi
Copy link
Author

@jreback @jorisvandenbossche I've given you access to modify this branch, so feel free to modify anything you'd like. Thank you.

@jreback
Copy link
Contributor

jreback commented Sep 11, 2016

are these your changes: https://travis-ci.org/pydata/pandas/jobs/159174397

master has been and is passing continuously. any failures are changes that you made. They can certainly fail other tests, but that just means your changes are not clean.

@jorisvandenbossche
Copy link
Member

@lababidi If you look at the test failures in the log @jreback linked to, you see that the failure is in the test_iterators test (in test_parsers.py, so related to this PR).
The test failes at chunks = list(parser), and this parser is a file reader with a PythonParser engine which is passed a list of list of strings instead of a file-like object. Because of your change, this list is added to the engine.handles, and this gives the error you see in the test failure "'list' object has no attribute 'close'"

@lababidi
Copy link
Author

@jreback @jorisvandenbossche Thank you for the insight. The handles is new to me. I must be passing the wrong thing through. I'll have to understand the logic correctly on what we're aiming for.

@dhimmel
Copy link
Contributor

dhimmel commented Nov 3, 2016

What is the remaining work that needs to be done for this pull request? I'm willing to give it a try, but need a little guidance to get started.

@jorisvandenbossche
Copy link
Member

@dhimmel To start with, you can look into the failing tests. As that is of course the minimum for getting this merged.
The failure has to do with passing a list of lines to TextParser, which now no longer works.

dhimmel pushed a commit to dhimmel/pandas that referenced this pull request Dec 13, 2016
dhimmel pushed a commit to dhimmel/pandas that referenced this pull request Dec 13, 2016
@jreback jreback closed this in 110ac2a Dec 13, 2016
@jreback jreback added this to the 0.20.0 milestone Dec 13, 2016
ischurov pushed a commit to ischurov/pandas that referenced this pull request Dec 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLN: consolidate compression inference as much as possible
4 participants