Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@smmaurer
Copy link
Member

@smmaurer smmaurer commented Nov 3, 2020

This PR provides compatibility updates to support current and future versions of Python, Pandas, and PyToolz.

  1. Switches abstract base class imports from collections to collections.abc for Python 3 (deprecated in v3.3, stops working in Python 3.8)

  2. pandas.util.testing –> pandas.testing (per a deprecation warning)

  3. pd.Series().to_csv(path=..) –> pd.Series().to_csv(path_or_buf=..) (deprecated in v0.24, stops working in Pandas 1.0 i think)

  4. pd.np.nan –> np.nan (Pandas used to allow this if you didn't want to import numpy, I guess, but it stopped working)

  5. Dropped use of a cross-Python-compatibility version of the zip() function from PyToolz, in favor of native Python zip(). 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

@smmaurer smmaurer requested a review from sablanchard November 3, 2020 05:41
@coveralls
Copy link

Coverage Status

Coverage increased (+0.007%) to 96.606% when pulling 8d5352f on toolz-patch into 28f67c0 on dev.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.007%) to 96.606% when pulling 8d5352f on toolz-patch into 28f67c0 on dev.

Copy link

@sablanchard sablanchard left a comment

Choose a reason for hiding this comment

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

looks good!

@smmaurer smmaurer merged commit 1d32078 into dev Nov 3, 2020
@smmaurer smmaurer deleted the toolz-patch branch November 3, 2020 21:25
@smmaurer smmaurer mentioned this pull request Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants