[v1.5.4.dev0] Compatibility updates #51
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR provides compatibility updates to support current and future versions of Python, Pandas, and PyToolz.
Switches abstract base class imports from
collections
tocollections.abc
for Python 3 (deprecated in v3.3, stops working in Python 3.8)pandas.util.testing
–>pandas.testing
(per a deprecation warning)pd.Series().to_csv(path=..)
–>pd.Series().to_csv(path_or_buf=..)
(deprecated in v0.24, stops working in Pandas 1.0 i think)pd.np.nan
–>np.nan
(Pandas used to allow this if you didn't want to import numpy, I guess, but it stopped working)Dropped use of a cross-Python-compatibility version of the
zip()
function from PyToolz, in favor of native Pythonzip()
. The functionality for this changed in PyToolz v0.11 in a way that breaks our code. See issue Orca breaks with toolz>=0.11, because tz.compatibility.zip is depreciated #50, which this resolves.Testing
Unit tests are passing in Python 2.7, 3.5, 3.6, 3.7, 3.8, and 3.9